Open z3t0 opened 8 years ago
System.Activator.CreateInstance(type, param1, param2, param3 ...)
Seems to be work, now just need to find a nice way to integrate this solution in an intuitive way!
This is just a thought but it might work by simply removing the MonoBehaviour on Moddable
Hmm actually nevermind, I think it should work if we just ignore the non mono scripts...
I seem to have hit a wall, if we only use MonoBehaviour scripts (Moddable) then how would we go about creating classes and we want to create multiple instances of?
For example,
And then in another script:
This would fail if Block inherited MonoBehaviour as monobehaviour scripts cannot be "instantiated". I think the limitation for this lies within System.Activator.CreateInstance, but haven't figured out a work around yet.