CullingController
A class in Root.Township, the global namespace.
Client: on the local player, switches between the game's portal-based culling camera and Unity's occlusion culling when PortalBasedCullingCamera.IsCulling changes.
- Listed in Global namespace: C to D
- Inherits or implements
NetworkEntityBehaviour,IInitializeAsLocalPlayer
Constructors
| Member | What it is |
|---|---|
CullingController() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
2 private and internal fields
| Member | What it is |
|---|---|
private PlayerController controller | The local PlayerController, whose camera's occlusion culling is toggled. |
private PortalBasedCullingCamera cullingCamera | The PortalBasedCullingCamera enabled or disabled. |
Methods
3 private and internal methods
| Member | What it is |
|---|---|
private void CullingChanged() | Enables the portal culling camera when culling is on and, except on Android, turns Unity occlusion culling off to match. |
private void IInitializeAsLocalPlayer.InitializeAsLocalPlayer(PlayerController controller) | Stores the player controller, subscribes to PortalBasedCullingCamera.CullingChanged and applies the current state. |
private void OnDestroy() | Unsubscribes from PortalBasedCullingCamera.CullingChanged. |