typically in order to have a script execute relative to a GameObject, you attach an individual file to a GameObject, and it just works.
Imagine I have something like this:
namespace Something {
class X1 {
class X2 {
class Human : MonoBehaviour {
// Some functions
}
}
}
}
I would like to attach Human as if they were separate file. I would like to attach this class to a GameObject, it to be serialized and edit its unique variables in Inspector. Is there a way to do it?
I did make them public, but I think the main issue is the namespace. I did create a new script, opened up reference directly pointing to demo, then reloaded, the slot showed up on test object. I dragged GameObject containing the namespace but it won’t grab it. Neither asset nor scene browser detects this public MonoBehaviour, and even manual grab of new Test.X1.X2.X3() worked.