Beispiel #1
0
 private void Start()
 {
     foreach (GPUInstancerManager manager in GPUInstancerManager.activeManagerList)
     {
         if ((!removeFromDetailManagers && manager is GPUInstancerDetailManager) ||
             (!removeFromTreeManagers && manager is GPUInstancerTreeManager) ||
             (!removeFromPrefabManagers && manager is GPUInstancerPrefabManager))
         {
             continue;
         }
         //GPUInstancerAPI.InitializeGPUInstancer(manager, false);
         foreach (Collider collider in selectedColliders)
         {
             if (useBounds)
             {
                 GPUInstancerAPI.RemoveInstancesInsideBounds(manager, collider.bounds, offset, onlyRemoveSelectedPrototypes ? selectedPrototypes : null);
             }
             else
             {
                 GPUInstancerAPI.RemoveInstancesInsideCollider(manager, collider, offset, onlyRemoveSelectedPrototypes ? selectedPrototypes : null);
             }
         }
     }
 }