private void RegisterCallbacks(PriorityCallbacks <DungeonGeneratorPostProcessCallback> callbacks) { if (config.InitializeSharedTilemaps) { callbacks.RegisterCallback(PostProcessPriorities.InitializeSharedTilemaps, (level, description) => { // PostProcessUtils.InitializeSharedTilemaps(level, tilemapLayersHandler, config.TilemapMaterial); PostProcessUtils.InitializeSharedTilemaps(level, config.TilemapLayersStructure, defaultTilemapLayersHandlerFactory(), config.TilemapLayersHandler, config.TilemapLayersExample, config.TilemapMaterial); PostProcessUtils.SetTilemapsMaterial(level, config.TilemapMaterial); }); } if (config.CopyTilesToSharedTilemaps) { callbacks.RegisterCallback(PostProcessPriorities.CopyTilesToSharedTilemaps, (level, description) => { PostProcessUtils.CopyTilesToSharedTilemaps(level); }); } if (config.CenterGrid) { callbacks.RegisterCallback(PostProcessPriorities.CenterGrid, (level, description) => { PostProcessUtils.CenterGrid(level); }); } if (config.DisableRoomTemplatesRenderers) { callbacks.RegisterCallback(PostProcessPriorities.DisableRoomTemplateRenderers, (level, description) => { PostProcessUtils.DisableRoomTemplatesRenderers(level); }); } if (config.DisableRoomTemplatesColliders) { callbacks.RegisterCallback(PostProcessPriorities.DisableRoomTemplateColliders, (level, description) => { PostProcessUtils.DisableRoomTemplatesColliders(level); }); } }
/// <summary> /// Disables tilemap renderers in room template instances. /// </summary> /// <remarks> /// This method is useful when using shared tilemaps. /// </remarks> /// <param name="level"></param> public static void DisableRoomTemplateRenderers(GeneratedLevel level) { PostProcessUtils.DisableRoomTemplatesRenderers(level); }