Advertisement
evelynshilosky

EnvironmentManager - Part 34

Mar 8th, 2024
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.55 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.  
  11.     public GameObject allTrees;
  12.  
  13.     public GameObject allAnimals;
  14.  
  15.     public GameObject placeables;
  16.  
  17.     private void Awake()
  18.     {
  19.         if (Instance != null && Instance != this)
  20.         {
  21.             Destroy(gameObject);
  22.         }
  23.         else
  24.         {
  25.             Instance = this;
  26.         }
  27.     }
  28. }
  29.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement