Class SpeedHackProofTime
Speed-hack resistant Time.* alternative. Does proxies to the regular Time.* APIs until actual speed hack is detected.
[AddComponentMenu("")]
[DisallowMultipleComponent]
public class SpeedHackProofTime : KeepAliveBehaviour<SpeedHackProofTime>
- Inheritance
-
objectObjectComponentBehaviourMonoBehaviourSpeedHackProofTime
- Inherited Members
Remarks
Requires running SpeedHackDetector to operate properly. Make sure to start SpeedHackDetector before calling Init().
Uses Unity's Time.* APIs until speed hack is detected and switches to the speed-hack resistant time since then.
May be unreliable in WebGL and other sandboxed environments.
Properties
deltaTime
Speed-hack resistant analogue on Unity's Time.deltaTime API.
public static float deltaTime { get; }
Property Value
- float
realtimeSinceStartup
Speed-hack resistant analogue on Unity's Time.realtimeSinceStartup API.
public static float realtimeSinceStartup { get; }
Property Value
- float
time
Speed-hack resistant analogue on Unity's Time.time API.
public static float time { get; }
Property Value
- float
timeScale
Safe timeScale property that uses SpeedHackDetector's authorized API.
public static float timeScale { get; set; }
Property Value
- float
timeSinceLevelLoad
Speed-hack resistant analogue on Unity's Time.timeSinceLevelLoad API.
public static float timeSinceLevelLoad { get; }
Property Value
- float
unscaledDeltaTime
Speed-hack resistant analogue on Unity's Time.unscaledDeltaTime API.
public static float unscaledDeltaTime { get; }
Property Value
- float
unscaledTime
Speed-hack resistant analogue on Unity's Time.unscaledTime API.
public static float unscaledTime { get; }
Property Value
- float
Methods
Dispose()
Call to remove from scene and clean internal resources.
public static void Dispose()
Init()
Call to add to the scene and force internal initialization. Gets called automatically when necessary if not initialized.
public static void Init()