public override void OnInspectorGUI() { DrawDefaultInspector(); BackgroundRandomizer BG = (BackgroundRandomizer)target; if (GUILayout.Button("RANDOMIZE BACKGROUND/TILE")) { BG.RandomizeBackground(); } }
void Awake() { if (Instance == null) { Instance = this; } else if (Instance != this) { Destroy(gameObject); } Debug.Log(currentBackground); this.backgrounds = new List <GameObject>(); this.backgrounds.AddRange(GameObject.FindGameObjectsWithTag("Background")); this.ShuffleBackgrounds(); }