- Home /
Referencing a class defined within a ScriptableObject
I am creating an item database system. Each database is its own ScriptableObject instance, containing (among other things) a list of Items, and a list of Recipes.
The behavior I want: a) Define an item in the item list inside the ScriptableObject b) In the recipe list of the same ScriptableObject, have that Item appear as an option as an Object selector or something similar (like a serialized GameObject)
The issue: I can serialize by reference or not, but I can't dynamically do both. Hard to explain, but here are some images that hopefully will help outline the issue:
Serialized by reference
Not serialized by reference
Any idea how to resolve this such that the item is defined in-line as in image 1, but have the ingredient reference an item as in image 2?
Am also open to alternative approach, but am trying to avoid the need to make each item its own scriptable object.