public void Setup() { window = (TracerWindow)EditorWindow.GetWindow(typeof(TracerWindow)); tracer = GameObject.Find("Tracer").GetComponent <Tracer>(); //Añadimos 4 variables: tracer.vars = new List <TracedVar>(); tracer.vars.Add(new TracedVar(GameObject.Find("Game").GetComponent <Game>(), "currentLifes")); //Correcta tracer.vars.Add(new TracedVar(GameObject.Find("Game").GetComponent <Game>(), "currentLifes")); //Correcta pero igual que la 1ª tracer.vars.Add(new TracedVar(GameObject.Find("ShipModel").GetComponent <Ship>(), "position")); //Correcta tracer.vars.Add(new TracedVar(GameObject.Find("ShipModel").GetComponent <Ship>(), "isKinematic")); //Incorrecta }
static void Init() { TracerWindow window = (TracerWindow)EditorWindow.GetWindow(typeof(TracerWindow)); window.Show(); }