/// <summary> /// Print data about the specified chunk controller /// </summary> /// <param name="chunkID"></param> public static void PrintChunkControllerRecords(int chunkControllerID, LevelTerrainManager terrainManager) { if (terrainManager.tryToGetChunkControllerByID(chunkControllerID, out ChunkController chunkController)) { World.Debug.log($"Logs for chunk controller on object : {chunkController.gameObject.name}\n" + $"Is Active: {chunkController.isActive}\n" + $"Is Meshed: {chunkController.isMeshed}\n" + "Edit History:\n" + RecordedInterfaceHelper.FormatRecordsMarkdown(chunkController.getRecordedEvents())); } else World.Debug.logError($"Tried to get data for non existant chunk controller: {chunkControllerID}"); }
/// <summary> /// Initialize this chunk controller /// </summary> public void initalize(LevelTerrainManager terrainManager) { this.terrainManager = terrainManager; meshCollider = GetComponent<MeshCollider>(); meshFilter = GetComponent<MeshFilter>(); meshFilter.mesh = new Mesh(); meshFilter.mesh.Clear(); #if DEBUG recordEvent($"Initialized as {gameObject.name}"); #endif }
/// <summary> /// Init /// </summary> void Start() { levelTerrainManager = GetComponentInChildren<LevelTerrainManager>(); }