I am scripting in an editor script, both GameObjects A and B have the script.
In the Editor Script, I have created gameobject B (from A) by using :
GameObject objB = null; (it's populated later)
Now, I want to call a function on GameObjectB's EDITOR SCRIPT. How can I do this?
If I call the function directly:
myFunction();
... then it would be run on Gameobject A.
So I'm trying to do something like:
objB.getEditorScript().myFunction();
Any tips?
↧