Class ZOGameObjectBase
Abstract class that defines a lot of Zero Sim core game object behavior.
Update Rates: Can setup update rate using the ZOUpdateHzSynchronized() and
Startup: Use ZOStart() instead standard Unity Start() method.
ZOFixedUpdateHzSynchronized methods.
Inheritance
Inherited Members
Namespace: ZO.Util
Assembly: Unity.ZeroSim.dll
Syntax
public abstract class ZOGameObjectBase : MonoBehaviour
Fields
| Improve this Doc View Source_debug
Declaration
public bool _debug
Field Value
| Type | Description |
|---|---|
| System.Boolean |
_updateRateHz
Declaration
[Header("ZeroSim GameObject Base")]
public float _updateRateHz
Field Value
| Type | Description |
|---|---|
| System.Single |
Properties
| Improve this Doc View SourceIsDebug
Debug flag dependent on implementation. May not do anything.
Declaration
public bool IsDebug { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
NextFixedUpdateTime
Declaration
public double NextFixedUpdateTime { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Double |
NextUpdateTime
Declaration
public float NextUpdateTime { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Single |
UpdateRateHz
The update rate in Hz
Declaration
public float UpdateRateHz { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Single |
UpdateTimeSeconds
The delta update time in seconds.
Declaration
public float UpdateTimeSeconds { get; }
Property Value
| Type | Description |
|---|---|
| System.Single |
Methods
| Improve this Doc View SourceStartHZEnforcedCoroutine(Action)
Starts a coroutine that runs 'singleLoopLogic' using the HZ update rate.
Declaration
protected Coroutine StartHZEnforcedCoroutine(Action singleLoopLogic)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Action | singleLoopLogic |
Returns
| Type | Description |
|---|---|
| UnityEngine.Coroutine |
ZOAwake()
Awake function for Zero Sim Objects
Declaration
protected virtual void ZOAwake()
ZOFixedUpdate()
FixedUpdate function for Zero Sim Objects. Will run inside this Monobehavior's Update function
Declaration
protected virtual void ZOFixedUpdate()
ZOFixedUpdateHzSynchronized()
HZ synched function that runs inside Monobehavior's FixedUpdate function. It's guaranteed to use the set frequency HZ for this sensor.
Declaration
protected virtual void ZOFixedUpdateHzSynchronized()
ZOOnDestroy()
Destruction function for Zero Sim Objects
Declaration
protected virtual void ZOOnDestroy()
ZOOnGUI()
OnGUI is called for rendering and handling GUI events. OnGUI is the only function that can implement the "Immediate Mode" GUI (IMGUI) system for rendering and handling GUI events. Your OnGUI implementation might be called several times per frame (one call per event). For more information on GUI events see the Event reference. If the MonoBehaviour's enabled property is set to false, OnGUI() will not be called.
If Debug property is set to false ZOOnGUI will not be called.
Declaration
protected virtual void ZOOnGUI()
ZOReset()
Reset function for Zero Sim Objects
Declaration
protected virtual void ZOReset()
ZOStart()
Start function for Zero Sim Objects
Declaration
protected virtual void ZOStart()
ZOUpdate()
Update function for Zero Sim Objects. Will run inside this Monobehavior's Update function.
Declaration
protected virtual void ZOUpdate()
ZOUpdateHzSynchronized()
HZ synched function that runs inside Monobehavior's Update function. It's guaranteed to use the set frequency HZ for this sensor.
Declaration
protected virtual void ZOUpdateHzSynchronized()