I have scriptable object class as flows:
*
public class ItemObjectt : ScriptableObject
public GameObject prefab; // let’s say linked prefab is Flower
*
I’m trying to access mesh from this “Flower” from another script and assign in editor.
I can create public mesh and it will work(… = item.mesh). But wondering if I can simplify this somehow
I would assume it will look something like this:
*
…
public ItemObjectt item;
GetComponentInChildren<MeshFilter>().mesh = item.GetComponent(typeof(MeshFilter));