PixelCrushers.LODManager Class Reference

Implements a Level of Detail (LOD) system according to distance from the player. More...

Inheritance diagram for PixelCrushers.LODManager:
Collaboration diagram for PixelCrushers.LODManager:

Classes

class  LOD
 

Public Member Functions

void FindPlayer ()
 Assigns the GameObject tagged "Player" to the player property.
 
void CheckLOD ()
 Updates the current level of detail based on distance from the player and the component's LOD ranges.
 

Static Public Member Functions

static List< string > ZonePluginActivator ()
 For optional UtopiaWorx Zone Controller integration.
 

Properties

LOD[] levels [get, set]
 The LODs.
 
float monitorFrequency [get, set]
 The frequency at which to check distance from the player and update the current LOD if necessary.
 
Transform player [get, set]
 Gets or sets the player's transform.
 

Detailed Description

Implements a Level of Detail (LOD) system according to distance from the player.

Add this component to any GameObject with script(s) that implement a method named OnLOD(int). It's the script's responsibility to handle the message accordingly. For example, an AI script could reduce the frequency of perception checks as the LOD number increases.

Member Function Documentation

◆ CheckLOD()

void PixelCrushers.LODManager.CheckLOD ( )
inline

Updates the current level of detail based on distance from the player and the component's LOD ranges.

◆ FindPlayer()

void PixelCrushers.LODManager.FindPlayer ( )
inline

Assigns the GameObject tagged "Player" to the player property.

◆ ZonePluginActivator()

static List< string > PixelCrushers.LODManager.ZonePluginActivator ( )
inlinestatic

For optional UtopiaWorx Zone Controller integration.

Returns
The properties that Zone Controller can control.

Property Documentation

◆ levels

LOD [] PixelCrushers.LODManager.levels
getset

The LODs.

◆ monitorFrequency

float PixelCrushers.LODManager.monitorFrequency
getset

The frequency at which to check distance from the player and update the current LOD if necessary.

◆ player

Transform PixelCrushers.LODManager.player
getset

Gets or sets the player's transform.

The Start method assigns the GameObject tagged "Player" to this property.

The player.


The documentation for this class was generated from the following file: