Implements a Level of Detail (LOD) system according to distance from the player. More...
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. | |
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.
|
inline |
Updates the current level of detail based on distance from the player and the component's LOD ranges.
|
inline |
Assigns the GameObject tagged "Player" to the player property.
|
inlinestatic |
For optional UtopiaWorx Zone Controller integration.
|
getset |
The LODs.
|
getset |
The frequency at which to check distance from the player and update the current LOD if necessary.
|
getset |
Gets or sets the player's transform.
The Start method assigns the GameObject tagged "Player" to this property.
The player.