Scripting API
Table of Contents
Input
reference
Application
reference
Time
reference
- Use Time.timeScale for slow motion effects.
- Use Time.realtimeSinceStartup to avoid the effect of
Time.timeScale
. Otherwise, should use Time.time instead
Random
reference
// min [inclusive] and max [inclusive]
public static float Range(float min, float max);
// 0.0 [inclusive] and 1.0 [inclusive]
public static float value;
public static Quaternion rotation;
public static Vector2 insideUnitCircle;
// Many other overloadings
public static Color ColorHSV();
PlayerPrefs
vs EditorPrefs
discussion
PlayerPrefs
: Stores and accesses player preferences between game sessions.EditorPrefs
: Stores and accesses Unity editor preferences.PlayerPrefs
is inUnityEngine
, whileEditorPrefs
is inUnityEditor
PlayerPrefs
is used for the game player's preferences and stored in the local device.EditorPrefs
is the only one namesace across projects, within the development environment.