コード例 #1
0
    public override void OnInspectorGUI()
    {
        DrawDefaultInspector();
        BackgroundRandomizer BG = (BackgroundRandomizer)target;

        if (GUILayout.Button("RANDOMIZE BACKGROUND/TILE"))
        {
            BG.RandomizeBackground();
        }
    }
コード例 #2
0
 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();
 }