public override void OnInspectorGUI() { DrawDefaultInspector(); GameBackgroundController controller = target as GameBackgroundController; if (controller == null || controller.Backgrounds == null) { return; } int i = 1; foreach (GameBackground background in controller.Backgrounds) { if (GUILayout.Button("Transition to BG " + i)) { controller.TransitionToBackground(background); } i++; } }
void Awake() { Instance = this; }
void Awake() { instance = this; }