Hi guys,
I got 2 classes. The first one looks like this:
public class Generator : MonoBehaviour {
public GameObject bodyRig;
//...
}
And the second one looks like this:
public class VisualJointEditor : EditorWindow {
GameObject bodyRig;
//...
}
I want both GameObjects to be the same. The GameObject in the first class can be easily assigned in the Editor. Now I want that the GameObject of the VisualJointEditor can access the GameObject of the Generator class.
Is it possible to access a public variable from the EditorWindow class?
If the public variable would be static, I could access it - but how can I, when it is not? Because a static variable can not be assigned in the Editor
Thanks for any help