Class MenuConstants
Contains constants for adding Wildtile specific options to Unity's different menus.
Designed for use with CreateAssetMenuAttribute, AddComponentMenu, and MenuItem.
Inheritance
System.Object
MenuConstants
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: CarbideFunction.Wildtile
Syntax
public static class MenuConstants
Fields
addComponentOrderBase
The base order value for AddComponentMenu.
Declaration
public const int addComponentOrderBase = 1897
Field Value
Type | Description |
---|---|
System.Int32 |
Examples
[AddComponentMenu(
MenuConstants.topMenuName + "Wildtile Component",
componentOrder=MenuConstants.addComponentOrderBase + 5
)]
class WildtileComponent : MonoBehaviour
{
}
orderBase
The base order value for CreateAssetMenuAttribute and MenuItem.
Declaration
public const int orderBase = 1897
Field Value
Type | Description |
---|---|
System.Int32 |
Examples
[CreateAssetMenu(
fileName="New Wildtile Asset",
menuName=MenuConstants.topMenuName + "Wildtile Asset",
order=MenuConstants.orderBase + 5
)]
class WildtileAsset : ScriptableObject
{
}
topMenuName
The root menu name for CreateAssetMenuAttribute and MenuItem.
This includes the path separator, so any added values should start with characters immediately:
MenuConstants.topMenuName + "My Custom Asset"
Declaration
public const string topMenuName = "Wildtile/"
Field Value
Type | Description |
---|---|
System.String |
Examples
[CreateAssetMenu(
fileName="New Wildtile Asset",
menuName=MenuConstants.topMenuName + "Wildtile Asset",
)]
class WildtileAsset : ScriptableObject
{
}