Example #1
0
 public static void Initialize()
 {
     if (WorldHeightmap.instance == null)
     {
         WorldHeightmap.AddWorldHeightmap();
     }
 }
Example #2
0
 private static void AddWorldHeightmap()
 {
     if (GameObject.Find("World Heightmap") == null)
     {
         GameObject gameObject = new GameObject("World Heightmap");
         WorldHeightmap.instance = gameObject.AddComponent<WorldHeightmap>();
     }
     else
     {
         Debug.Log("World Heightmap already added. :)");
     }
 }
Example #3
0
 private void Awake()
 {
     if (WorldHeightmap.instance)
     {
         UnityEngine.Object.Destroy(this);
     }
     else
     {
         WorldHeightmap.instance = this;
     }
 }