Skip to main content

AltaMenuItemBase.Assets.Create.ScriptableObject<T>

An abstract class in Alta.MenuItem, the global namespace.

Editor menu item base that adds an "Assets/Create" entry for a ScriptableObject type T. Asset types nest a Create class deriving from it. Editor-only; does nothing at runtime.

Constructors​

MemberWhat it is
protected ScriptableObject()Creates an AltaMenuItemBase.Assets.Create.ScriptableObject with default values.

Fields​

2 private and internal fields
MemberWhat it is
private string pathType name of T with dots and plus signs turned into underscores, used to name the generated create action class.
private string typeFull C# name of this generic menu item type, written into the generated editor code.

Properties​

MemberWhat it is
T Created { get; private set; }The asset created by the last run of the menu item.
override string Name { get; }Menu label, the type name of T with spaces before capitals.
protected virtual string DefaultName { get; }Default file name for new assets, "New TypeName.asset".

Methods​

MemberWhat it is
override void Content(TextWriter writer)Writes the generated editor code that creates the asset when the menu item runs.
override void ExternalContent(TextWriter writer)Writes the helper class the generated menu code needs.
override string GetPath()Builds the menu path from the nesting of the declaring class under AltaMenuItemBase.
protected override void Run()Empty in this build.