using Cysharp.Threading.Tasks; using QSB.WorldSync; using System.Threading; namespace QSB.PoolSync { internal class PoolManager : WorldObjectManager { public override WorldObjectType WorldObjectType => WorldObjectType.SolarSystem; public override async UniTask BuildWorldObjects(OWScene scene, CancellationToken ct) { foreach (var streaming in QSBWorldSync.GetUnityObjects()) { streaming.gameObject.AddComponent(); } foreach (var camera in QSBWorldSync.GetUnityObjects()) { camera.gameObject.AddComponent(); } foreach (var platform in QSBWorldSync.GetUnityObjects()) { platform.gameObject.AddComponent(); } } public override void UnbuildWorldObjects() { foreach (var platform in QSBWorldSync.GetUnityObjects()) { Destroy(platform); } foreach (var camera in QSBWorldSync.GetUnityObjects()) { Destroy(camera); } foreach (var streaming in QSBWorldSync.GetUnityObjects()) { Destroy(streaming); } } } }