I’m restructuring my code and got the idea of putting all the scriptable objects code into a namespace.
It seems to work but when I create the object, the field Script is missing the script, saying No MonoScript.
I thought it was because of the CreateAssetMenu attribute as numberkrunch didn’t use it in this post , but wrote an editor script following his steps and got the same result. Even though, it displayed the intended behaviour in his tests.
I really wish to put all these scriptable objects together… is there any way to make it work?
namespace BBMM.UI.ScriptableObjects
{
[CreateAssetMenu(fileName = "New Size Preset", menuName = "BBMM/Size Preset")]
public class SO_UI_SizePreset : ScriptableObject
{
public string presetName;
public Vector2 realSize;
public UnitType unit;
}
[CreateAssetMenu(fileName = "New Object", menuName = "BBMM/Object Container")]
public class SO_UI_ObjectList_Item : ScriptableObject
{
public string objectName;
public GameObject prefab;
}
}