evelynshilosky

EnvironmentManager - Part 31

Feb 2nd, 2024
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.44 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4.  
  5. public class EnvironmentManager : MonoBehaviour
  6. {
  7.     public static EnvironmentManager Instance { get; set; }
  8.  
  9.     public GameObject allItems;
  10.     private void Awake()
  11.     {
  12.         if (Instance != null && Instance != this)
  13.         {
  14.             Destroy(gameObject);
  15.         }
  16.         else
  17.         {
  18.             Instance = this;
  19.         }
  20.     }
  21. }
  22.  
Add Comment
Please, Sign In to add comment