[System.Serializable]
public class Bow
{
[SerializeField]
public Sprite[] AnimationSprites;
}
[System.Serializable]
public class TestClass : MonoBehaviour
{
[SerializeField]
private List<Bow> BowSprites = new List<Bow>();
}
Which when put on some GameObject gives me this:
Now, I want to have a bunch of bows, with attributes n stuff yknow the usual.
So I have a few ways of doing this:
Making a GameObject that holds my data script and reference this everywhere I need it.
or
Making a static class and manually code in all the values.
But I dont like either of them. Doing it manually is too much for for lazy me, and having a data object just seems… inconvinient. Like I will always have this Object in my Hirarchy, begging to be replaced by something more intuitive.
So what I need help with:
Can I make a static class, whose Variables I can edit like in the picture above, without having this data Game Object ruining the perfect View of the mess I call a game?
Maybe something like a custom menu, where I can put all my data? Like the input menu, just for sprites and other variables? I just want to have it organized and easy to edit. Anyone know how or if I can archive this?
This might help solving your issue (an probably many other issues :
Attach the list to a ScriptableObject not to a Monobehavior. From ScriptableObject (derived) class you can instantiate it as asset in edit mode and you can reference a ScriptableObject (asset) from any Scene component and make use of its data and classes. It also persists across scenes (since it’s asset and not scene component). Takes a while to get familiar with but it’s really worth it.
This might help solving your issue (an probably many other issues :
Attach the list to a ScriptableObject not to a Monobehavior. From ScriptableObject (derived) class you can instantiate it as asset in edit mode and you can reference a ScriptableObject (asset) from any Scene component and make use of its data and classes. It also persists across scenes (since it’s asset and not scene component). Takes a while to get familiar with but it’s really worth it.