Example of a ScriptableObject base class that implements ExposeMember.
Shows how to use the conditionalDisplayMemberName and tool-tip parameters in ExposeMember Attributes Shows use of the Unity defined MultiLine attribute
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
{
public abstract class InventoryObjectType : ScriptableObject
{
[ExposeMemberAttribute(conditionalDisplayMemberName = "isAnInventoryObjectType", tooltip = "When Saved as an asset, the system will attempted to use this string for filename of the InventoryObjectType asset.")]
public string inventoryObjectTypeName { get { return base.name; } set { base.name = value; } }
[ExposeMemberAttribute]
[Multiline]
public string typeDescription;
[ExposeMemberAttribute]
public ObjectSize sizeInInventory = new ObjectSize();
[ExposeMember]
public Mesh model;
[ExposeMember]
public abstract float Price
{
get;
}
bool isAnInventoryObjectType() { return this.GetType() == typeof(InventoryObjectType); }
}
}