I’ve a ScriptableObject that is attached to a GameObject. Is there any way to find the gameObject from the ScriptableObject?
A ScriptableObject is an asset, it isn’t attached to anything. You can reference a ScriptableObject from a MonoBehavior, and then put that MonoBehavior onto a GameObject, but that doesn’t mean the SO knows anything about this relationship unless you build logic into it to know.
What are you trying to use SO’s for?
A Sensory system. Since each sensor is basically data for it’s shape and an origin, it made sense to put that into a ScriptableObject. That way it was only active when called.
Register the GameObject with the ScriptableObject when you instantiate it.
2 Likes
That’s what I thought I’d have to do. Thanks