namespace UnityEngine
{
//
// 摘要:
// MonoBehaviour is the base class from which every Unity script derives.
[ExtensionOfNativeClass]
[NativeHeader("Runtime/Mono/MonoBehaviour.h")]
[NativeHeader("Runtime/Scripting/DelayedCallUtility.h")]
[RequiredByNativeCode]
public class MonoBehaviour : Behaviour
{
public MonoBehaviour();
//
// 摘要:
// Disabling this lets you skip the GUI layout phase.
public bool useGUILayout { get; set; }
//
// 摘要:
// Allow a specific instance of a MonoBehaviour to run in edit mode (only available
// in the editor).
public bool runInEditMode { get; set; }
//
// 摘要:
// Logs message to the Unity Console (identical to Debug.Log).
//
// 参数:
// message:
public static void print(object message);
//
// 摘要:
// Cancels all Invoke calls with name methodName on this behaviour.
//
// 参数:
// methodName:
public void CancelInvoke(string methodName);
//
// 摘要:
// Cancels all Invoke calls on this MonoBehaviour.
public void CancelInvoke();
//
// 摘要:
// Invokes the method methodName in time seconds.
//
// 参数:
// methodName:
//
// time:
public void Invoke(string methodName, float time);
//
// 摘要:
// Invokes the method methodName in time seconds, then repeatedly every repeatRate
// seconds.
//
// 参数:
// methodName:
//
// time:
//
// repeatRate:
public void InvokeRepeating(string methodName, float time, float repeatRate);
//
// 摘要:
// Is any invoke on methodName pending?
//
// 参数:
// methodName:
public bool IsInvoking(string methodName);
//
// 摘要:
// Is any invoke pending on this MonoBehaviour?
public bool IsInvoking();
//
// 摘要:
// Starts a coroutine named methodName.
//
// 参数:
// methodName:
//
// value:
[ExcludeFromDocs]
public Coroutine StartCoroutine(string methodName);
//
// 摘要:
// Starts a Coroutine.
//
// 参数:
// routine:
public Coroutine StartCoroutine(IEnumerator routine);
//
// 摘要:
// Starts a coroutine named methodName.
//
// 参数:
// methodName:
//
// value:
public Coroutine StartCoroutine(string methodName, [DefaultValue("null")] object value);
[Obsolete("StartCoroutine_Auto has been deprecated. Use StartCoroutine instead (UnityUpgradable) -> StartCoroutine([mscorlib] System.Collections.IEnumerator)", false)]
public Coroutine StartCoroutine_Auto(IEnumerator routine);
//
// 摘要:
// Stops all coroutines running on this behaviour.
public void StopAllCoroutines();
//
// 摘要:
// Stops the first coroutine named methodName, or the coroutine stored in routine
// running on this behaviour.
//
// 参数:
// methodName:
// Name of coroutine.
//
// routine:
// Name of the function in code, including coroutines.
public void StopCoroutine(IEnumerator routine);
//
// 摘要:
// Stops the first coroutine named methodName, or the coroutine stored in routine
// running on this behaviour.
//
// 参数:
// methodName:
// Name of coroutine.
//
// routine:
// Name of the function in code, including coroutines.
public void StopCoroutine(Coroutine routine);
//
// 摘要:
// Stops the first coroutine named methodName, or the coroutine stored in routine
// running on this behaviour.
//
// 参数:
// methodName:
// Name of coroutine.
//
// routine:
// Name of the function in code, including coroutines.
public void StopCoroutine(string methodName);
}
}
namespace UnityEngine
{
//
// 摘要:
// Base class for everything attached to GameObjects.
[NativeClass("Unity::Component")]
[NativeHeader("Runtime/Export/Scripting/Component.bindings.h")]
[RequiredByNativeCode]
public class Component : Object
{
public Component();
//
// 摘要:
// The ParticleSystem attached to this GameObject. (Null if there is none attached).
[EditorBrowsable(EditorBrowsableState.Never)]
[Obsolete("Property particleSystem has been deprecated. Use GetComponent<ParticleSystem>() instead. (UnityUpgradable)", true)]
public Component particleSystem { get; }
//
// 摘要:
// The Transform attached to this GameObject.
public Transform transform { get; }
//
// 摘要:
// The game object this component is attached to. A component is always attached
// to a game object.
public GameObject gameObject { get; }
//
// 摘要:
// The tag of this game object.
public string tag { get; set; }
//
// 摘要:
// The Rigidbody attached to this GameObject. (Null if there is none attached).
[EditorBrowsable(EditorBrowsableState.Never)]
[Obsolete("Property rigidbody has been deprecated. Use GetComponent<Rigidbody>() instead. (UnityUpgradable)", true)]
public Component rigidbody { get; }
//
// 摘要:
// The HingeJoint attached to this GameObject. (Null if there is none attached).
[EditorBrowsable(EditorBrowsableState.Never)]
[Obsolete("Property hingeJoint has been deprecated. Use GetComponent<HingeJoint>() instead. (UnityUpgradable)", true)]
public Component hingeJoint { get; }
//
// 摘要:
// The Camera attached to this GameObject. (Null if there is none attached).
[EditorBrowsable(EditorBrowsableState.Never)]
[Obsolete("Property camera has been deprecated. Use GetComponent<Camera>() instead. (UnityUpgradable)", true)]
public Component camera { get; }
//
// 摘要:
// The Rigidbody2D that is attached to the Component's GameObject.
[EditorBrowsable(EditorBrowsableState.Never)]
[Obsolete("Property rigidbody2D has been deprecated. Use GetComponent<Rigidbody2D>() instead. (UnityUpgradable)", true)]
public Component rigidbody2D { get; }
//
// 摘要:
// The Animation attached to this GameObject. (Null if there is none attached).
[EditorBrowsable(EditorBrowsableState.Never)]
[Obsolete("Property animation has been deprecated. Use GetComponent<Animation>() instead. (UnityUpgradable)", true)]
public Component animation { get; }
//
// 摘要:
// The ConstantForce attached to this GameObject. (Null if there is none attached).
[EditorBrowsable(EditorBrowsableState.Never)]
[Obsolete("Property constantForce has been deprecated. Use GetComponent<ConstantForce>() instead. (UnityUpgradable)", true)]
public Component constantForce { get; }
//
// 摘要:
// The Renderer attached to this GameObject. (Null if there is none attached).
[EditorBrowsable(EditorBrowsableState.Never)]
[Obsolete("Property renderer has been deprecated. Use GetComponent<Renderer>() instead. (UnityUpgradable)", true)]
public Component renderer { get; }
//
// 摘要:
// The AudioSource attached to this GameObject. (Null if there is none attached).
[EditorBrowsable(EditorBrowsableState.Never)]
[Obsolete("Property audio has been deprecated. Use GetComponent<AudioSource>() instead. (UnityUpgradable)", true)]
public Component audio { get; }
//
// 摘要:
// The NetworkView attached to this GameObject (Read Only). (null if there is none
// attached).
[EditorBrowsable(EditorBrowsableState.Never)]
[Obsolete("Property networkView has been deprecated. Use GetComponent<NetworkView>() instead. (UnityUpgradable)", true)]
public Component networkView { get; }
//
// 摘要:
// The Collider attached to this GameObject. (Null if there is none attached).
[EditorBrowsable(EditorBrowsableState.Never)]
[Obsolete("Property collider has been deprecated. Use GetComponent<Collider>() instead. (UnityUpgradable)", true)]
public Component collider { get; }
//
// 摘要:
// The Collider2D component attached to the object.
[EditorBrowsable(EditorBrowsableState.Never)]
[Obsolete("Property collider2D has been deprecated. Use GetComponent<Collider2D>() instead. (UnityUpgradable)", true)]
public Component collider2D { get; }
//
// 摘要:
// The Light attached to this GameObject. (Null if there is none attached).
[EditorBrowsable(EditorBrowsableState.Never)]
[Obsolete("Property light has been deprecated. Use GetComponent<Light>() instead. (UnityUpgradable)", true)]
public Component light { get; }
//
// 摘要:
// Calls the method named methodName on every MonoBehaviour in this game object
// or any of its children.
//
// 参数:
// methodName:
// Name of the method to call.
//
// parameter:
// Optional parameter to pass to the method (can be any value).
//
// options:
// Should an error be raised if the method does not exist for a given target object?
public void BroadcastMessage(string methodName, SendMessageOptions options);
//
// 摘要:
// Calls the method named methodName on every MonoBehaviour in this game object
// or any of its children.
//
// 参数:
// methodName:
// Name of the method to call.
//
// parameter:
// Optional parameter to pass to the method (can be any value).
//
// options:
// Should an error be raised if the method does not exist for a given target object?
[ExcludeFromDocs]
public void BroadcastMessage(string methodName);
//
// 摘要:
// Calls the method named methodName on every MonoBehaviour in this game object
// or any of its children.
//
// 参数:
// methodName:
// Name of the method to call.
//
// parameter:
// Optional parameter to pass to the method (can be any value).
//
// options:
// Should an error be raised if the method does not exist for a given target object?
[ExcludeFromDocs]
public void BroadcastMessage(string methodName, object parameter);
//
// 摘要:
// Calls the method named methodName on every MonoBehaviour in this game object
// or any of its children.
//
// 参数:
// methodName:
// Name of the method to call.
//
// parameter:
// Optional parameter to pass to the method (can be any value).
//
// options:
// Should an error be raised if the method does not exist for a given target object?
[FreeFunction("BroadcastMessage", HasExplicitThis = true)]
public void BroadcastMessage(string methodName, [Internal.DefaultValue("null")] object parameter, [Internal.DefaultValue("SendMessageOptions.RequireReceiver")] SendMessageOptions options);
//
// 摘要:
// Is this game object tagged with tag ?
//
// 参数:
// tag:
// The tag to compare.
public bool CompareTag(string tag);
//
// 摘要:
// Returns the component of Type type if the game object has one attached, null
// if it doesn't.
//
// 参数:
// type:
// The type of Component to retrieve.
[TypeInferenceRule(TypeInferenceRules.TypeReferencedByFirstArgument)]
public Component GetComponent(Type type);
[SecuritySafeCritical]
public T GetComponent<T>();
//
// 摘要:
// Returns the component with name type if the game object has one attached, null
// if it doesn't.
//
// 参数:
// type:
[FreeFunction(HasExplicitThis = true)]
public Component GetComponent(string type);
[TypeInferenceRule(TypeInferenceRules.TypeReferencedByFirstArgument)]
public Component GetComponentInChildren(Type t, bool includeInactive);
//
// 摘要:
// Returns the component of Type type in the GameObject or any of its children using
// depth first search.
//
// 参数:
// t:
// The type of Component to retrieve.
//
// 返回结果:
// A component of the matching type, if found.
[TypeInferenceRule(TypeInferenceRules.TypeReferencedByFirstArgument)]
public Component GetComponentInChildren(Type t);
public T GetComponentInChildren<T>([Internal.DefaultValue("false")] bool includeInactive);
[ExcludeFromDocs]
public T GetComponentInChildren<T>();
//
// 摘要:
// Returns the component of Type type in the GameObject or any of its parents.
//
// 参数:
// t:
// The type of Component to retrieve.
//
// 返回结果:
// A component of the matching type, if found.
[TypeInferenceRule(TypeInferenceRules.TypeReferencedByFirstArgument)]
public Component GetComponentInParent(Type t);
public T GetComponentInParent<T>();
//
// 摘要:
// Returns all components of Type type in the GameObject.
//
// 参数:
// type:
// The type of Component to retrieve.
public Component[] GetComponents(Type type);
public void GetComponents(Type type, List<Component> results);
public void GetComponents<T>(List<T> results);
public T[] GetComponents<T>();
[ExcludeFromDocs]
public Component[] GetComponentsInChildren(Type t);
public void GetComponentsInChildren<T>(List<T> results);
public T[] GetComponentsInChildren<T>();
public void GetComponentsInChildren<T>(bool includeInactive, List<T> result);
public T[] GetComponentsInChildren<T>(bool includeInactive);
//
// 摘要:
// Returns all components of Type type in the GameObject or any of its children.
//
// 参数:
// t:
// The type of Component to retrieve.
//
// includeInactive:
// Should Components on inactive GameObjects be included in the found set? includeInactive
// decides which children of the GameObject will be searched. The GameObject that
// you call GetComponentsInChildren on is always searched regardless.
public Component[] GetComponentsInChildren(Type t, bool includeInactive);
public T[] GetComponentsInParent<T>(bool includeInactive);
[ExcludeFromDocs]
public Component[] GetComponentsInParent(Type t);
//
// 摘要:
// Returns all components of Type type in the GameObject or any of its parents.
//
// 参数:
// t:
// The type of Component to retrieve.
//
// includeInactive:
// Should inactive Components be included in the found set?
public Component[] GetComponentsInParent(Type t, [Internal.DefaultValue("false")] bool includeInactive);
public T[] GetComponentsInParent<T>();
public void GetComponentsInParent<T>(bool includeInactive, List<T> results);
//
// 摘要:
// Calls the method named methodName on every MonoBehaviour in this game object.
//
// 参数:
// methodName:
// Name of the method to call.
//
// value:
// Optional parameter for the method.
//
// options:
// Should an error be raised if the target object doesn't implement the method for
// the message?
[FreeFunction("SendMessage", HasExplicitThis = true)]
public void SendMessage(string methodName, object value, SendMessageOptions options);
//
// 摘要:
// Calls the method named methodName on every MonoBehaviour in this game object.
//
// 参数:
// methodName:
// Name of the method to call.
//
// value:
// Optional parameter for the method.
//
// options:
// Should an error be raised if the target object doesn't implement the method for
// the message?
public void SendMessage(string methodName);
//
// 摘要:
// Calls the method named methodName on every MonoBehaviour in this game object.
//
// 参数:
// methodName:
// Name of the method to call.
//
// value:
// Optional parameter for the method.
//
// options:
// Should an error be raised if the target object doesn't implement the method for
// the message?
public void SendMessage(string methodName, object value);
//
// 摘要:
// Calls the method named methodName on every MonoBehaviour in this game object.
//
// 参数:
// methodName:
// Name of the method to call.
//
// value:
// Optional parameter for the method.
//
// options:
// Should an error be raised if the target object doesn't implement the method for
// the message?
public void SendMessage(string methodName, SendMessageOptions options);
//
// 摘要:
// Calls the method named methodName on every MonoBehaviour in this game object
// and on every ancestor of the behaviour.
//
// 参数:
// methodName:
// Name of method to call.
//
// value:
// Optional parameter value for the method.
//
// options:
// Should an error be raised if the method does not exist on the target object?
[ExcludeFromDocs]
public void SendMessageUpwards(string methodName, object value);
//
// 摘要:
// Calls the method named methodName on every MonoBehaviour in this game object
// and on every ancestor of the behaviour.
//
// 参数:
// methodName:
// Name of method to call.
//
// value:
// Optional parameter value for the method.
//
// options:
// Should an error be raised if the method does not exist on the target object?
public void SendMessageUpwards(string methodName, SendMessageOptions options);
//
// 摘要:
// Calls the method named methodName on every MonoBehaviour in this game object
// and on every ancestor of the behaviour.
//
// 参数:
// methodName:
// Name of method to call.
//
// value:
// Optional parameter value for the method.
//
// options:
// Should an error be raised if the method does not exist on the target object?
[ExcludeFromDocs]
public void SendMessageUpwards(string methodName);
//
// 摘要:
// Calls the method named methodName on every MonoBehaviour in this game object
// and on every ancestor of the behaviour.
//
// 参数:
// methodName:
// Name of method to call.
//
// value:
// Optional parameter value for the method.
//
// options:
// Should an error be raised if the method does not exist on the target object?
[FreeFunction(HasExplicitThis = true)]
public void SendMessageUpwards(string methodName, [Internal.DefaultValue("null")] object value, [Internal.DefaultValue("SendMessageOptions.RequireReceiver")] SendMessageOptions options);
[SecuritySafeCritical]
public bool TryGetComponent<T>(out T component);
[TypeInferenceRule(TypeInferenceRules.TypeReferencedByFirstArgument)]
public bool TryGetComponent(Type type, out Component component);
}
}
namespace UnityEngine
{
//
// 摘要:
// Base class for all entities in Unity Scenes.
[ExcludeFromPreset]
[NativeHeader("Runtime/Export/Scripting/GameObject.bindings.h")]
[UsedByNativeCode]
public sealed class GameObject : Object
{
//
// 摘要:
// Creates a new game object, named name.
//
// 参数:
// name:
// The name that the GameObject is created with.
//
// components:
// A list of Components to add to the GameObject on creation.
public GameObject();
//
// 摘要:
// Creates a new game object, named name.
//
// 参数:
// name:
// The name that the GameObject is created with.
//
// components:
// A list of Components to add to the GameObject on creation.
public GameObject(string name);
//
// 摘要:
// Creates a new game object, named name.
//
// 参数:
// name:
// The name that the GameObject is created with.
//
// components:
// A list of Components to add to the GameObject on creation.
public GameObject(string name, params Type[] components);
//
// 摘要:
// The ParticleSystem attached to this GameObject (Read Only). (Null if there is
// none attached).
[EditorBrowsable(EditorBrowsableState.Never)]
[Obsolete("Property particleSystem has been deprecated. Use GetComponent<ParticleSystem>() instead. (UnityUpgradable)", true)]
public Component particleSystem { get; }
//
// 摘要:
// The Transform attached to this GameObject.
public Transform transform { get; }
//
// 摘要:
// The layer the game object is in.
public int layer { get; set; }
[Obsolete("GameObject.active is obsolete. Use GameObject.SetActive(), GameObject.activeSelf or GameObject.activeInHierarchy.")]
public bool active { get; set; }
//
// 摘要:
// The local active state of this GameObject. (Read Only)
public bool activeSelf { get; }
//
// 摘要:
// Defines whether the GameObject is active in the Scene.
public bool activeInHierarchy { get; }
//
// 摘要:
// Gets and sets the GameObject's StaticEditorFlags.
public bool isStatic { get; set; }
//
// 摘要:
// The tag of this game object.
public string tag { get; set; }
//
// 摘要:
// Scene that the GameObject is part of.
public Scene scene { get; }
//
// 摘要:
// Scene culling mask Unity uses to determine which scene to render the GameObject
// in.
public ulong sceneCullingMask { get; }
public GameObject gameObject { get; }
//
// 摘要:
// The Rigidbody2D component attached to this GameObject. (Read Only)
[EditorBrowsable(EditorBrowsableState.Never)]
[Obsolete("Property rigidbody2D has been deprecated. Use GetComponent<Rigidbody2D>() instead. (UnityUpgradable)", true)]
public Component rigidbody2D { get; }
//
// 摘要:
// The Camera attached to this GameObject (Read Only). (Null if there is none attached).
[EditorBrowsable(EditorBrowsableState.Never)]
[Obsolete("Property camera has been deprecated. Use GetComponent<Camera>() instead. (UnityUpgradable)", true)]
public Component camera { get; }
//
// 摘要:
// The Light attached to this GameObject (Read Only). (Null if there is none attached).
[EditorBrowsable(EditorBrowsableState.Never)]
[Obsolete("Property light has been deprecated. Use GetComponent<Light>() instead. (UnityUpgradable)", true)]
public Component light { get; }
//
// 摘要:
// The Animation attached to this GameObject (Read Only). (Null if there is none
// attached).
[EditorBrowsable(EditorBrowsableState.Never)]
[Obsolete("Property animation has been deprecated. Use GetComponent<Animation>() instead. (UnityUpgradable)", true)]
public Component animation { get; }
//
// 摘要:
// The ConstantForce attached to this GameObject (Read Only). (Null if there is
// none attached).
[EditorBrowsable(EditorBrowsableState.Never)]
[Obsolete("Property constantForce has been deprecated. Use GetComponent<ConstantForce>() instead. (UnityUpgradable)", true)]
public Component constantForce { get; }
//
// 摘要:
// The Renderer attached to this GameObject (Read Only). (Null if there is none
// attached).
[EditorBrowsable(EditorBrowsableState.Never)]
[Obsolete("Property renderer has been deprecated. Use GetComponent<Renderer>() instead. (UnityUpgradable)", true)]
public Component renderer { get; }
//
// 摘要:
// The AudioSource attached to this GameObject (Read Only). (Null if there is none
// attached).
[EditorBrowsable(EditorBrowsableState.Never)]
[Obsolete("Property audio has been deprecated. Use GetComponent<AudioSource>() instead. (UnityUpgradable)", true)]
public Component audio { get; }
//
// 摘要:
// The NetworkView attached to this GameObject (Read Only). (Null if there is none
// attached).
[EditorBrowsable(EditorBrowsableState.Never)]
[Obsolete("Property networkView has been deprecated. Use GetComponent<NetworkView>() instead. (UnityUpgradable)", true)]
public Component networkView { get; }
//
// 摘要:
// The Collider attached to this GameObject (Read Only). (Null if there is none
// attached).
[EditorBrowsable(EditorBrowsableState.Never)]
[Obsolete("Property collider has been deprecated. Use GetComponent<Collider>() instead. (UnityUpgradable)", true)]
public Component collider { get; }
//
// 摘要:
// The Collider2D component attached to this object.
[EditorBrowsable(EditorBrowsableState.Never)]
[Obsolete("Property collider2D has been deprecated. Use GetComponent<Collider2D>() instead. (UnityUpgradable)", true)]
public Component collider2D { get; }
//
// 摘要:
// The Rigidbody attached to this GameObject (Read Only). (Null if there is none
// attached).
[EditorBrowsable(EditorBrowsableState.Never)]
[Obsolete("Property rigidbody has been deprecated. Use GetComponent<Rigidbody>() instead. (UnityUpgradable)", true)]
public Component rigidbody { get; }
//
// 摘要:
// The HingeJoint attached to this GameObject (Read Only). (Null if there is none
// attached).
[EditorBrowsable(EditorBrowsableState.Never)]
[Obsolete("Property hingeJoint has been deprecated. Use GetComponent<HingeJoint>() instead. (UnityUpgradable)", true)]
public Component hingeJoint { get; }
//
// 摘要:
// Creates a game object with a primitive mesh renderer and appropriate collider.
//
// 参数:
// type:
// The type of primitive object to create.
[FreeFunction("GameObjectBindings::CreatePrimitive")]
public static GameObject CreatePrimitive(PrimitiveType type);
//
// 摘要:
// Finds a GameObject by name and returns it.
//
// 参数:
// name:
[FreeFunction(Name = "GameObjectBindings::Find")]
public static GameObject Find(string name);
//
// 摘要:
// Returns an array of active GameObjects tagged tag. Returns empty array if no
// GameObject was found.
//
// 参数:
// tag:
// The name of the tag to search GameObjects for.
[FreeFunction(Name = "GameObjectBindings::FindGameObjectsWithTag", ThrowsException = true)]
public static GameObject[] FindGameObjectsWithTag(string tag);
[FreeFunction(Name = "GameObjectBindings::FindGameObjectWithTag", ThrowsException = true)]
public static GameObject FindGameObjectWithTag(string tag);
//
// 摘要:
// Returns one active GameObject tagged tag. Returns null if no GameObject was found.
//
// 参数:
// tag:
// The tag to search for.
public static GameObject FindWithTag(string tag);
public T AddComponent<T>() where T : Component;
//
// 摘要:
// Adds a component class named className to the game object.
//
// 参数:
// className:
[EditorBrowsable(EditorBrowsableState.Never)]
[Obsolete("GameObject.AddComponent with string argument has been deprecated. Use GameObject.AddComponent<T>() instead. (UnityUpgradable).", true)]
public Component AddComponent(string className);
//
// 摘要:
// Adds a component class of type componentType to the game object. C# Users can
// use a generic version.
//
// 参数:
// componentType:
[TypeInferenceRule(TypeInferenceRules.TypeReferencedByFirstArgument)]
public Component AddComponent(Type componentType);
//
// 参数:
// methodName:
//
// options:
public void BroadcastMessage(string methodName, SendMessageOptions options);
//
// 摘要:
// Calls the method named methodName on every MonoBehaviour in this game object
// or any of its children.
//
// 参数:
// methodName:
//
// parameter:
//
// options:
[FreeFunction(Name = "Scripting::BroadcastScriptingMessage", HasExplicitThis = true)]
public void BroadcastMessage(string methodName, [Internal.DefaultValue("null")] object parameter, [Internal.DefaultValue("SendMessageOptions.RequireReceiver")] SendMessageOptions options);
//
// 摘要:
// Calls the method named methodName on every MonoBehaviour in this game object
// or any of its children.
//
// 参数:
// methodName:
//
// parameter:
//
// options:
[ExcludeFromDocs]
public void BroadcastMessage(string methodName, object parameter);
//
// 摘要:
// Calls the method named methodName on every MonoBehaviour in this game object
// or any of its children.
//
// 参数:
// methodName:
//
// parameter:
//
// options:
[ExcludeFromDocs]
public void BroadcastMessage(string methodName);
//
// 摘要:
// Is this game object tagged with tag ?
//
// 参数:
// tag:
// The tag to compare.
[FreeFunction(Name = "GameObjectBindings::CompareTag", HasExplicitThis = true)]
public bool CompareTag(string tag);
[SecuritySafeCritical]
public T GetComponent<T>();
//
// 摘要:
// Returns the component of Type type if the game object has one attached, null
// if it doesn't.
//
// 参数:
// type:
// The type of Component to retrieve.
[FreeFunction(Name = "GameObjectBindings::GetComponentFromType", HasExplicitThis = true, ThrowsException = true)]
[TypeInferenceRule(TypeInferenceRules.TypeReferencedByFirstArgument)]
public Component GetComponent(Type type);
//
// 摘要:
// Returns the component with name type if the game object has one attached, null
// if it doesn't.
//
// 参数:
// type:
// The type of Component to retrieve.
public Component GetComponent(string type);
//
// 摘要:
// Returns the component of Type type in the GameObject or any of its children using
// depth first search.
//
// 参数:
// type:
// The type of Component to retrieve.
//
// includeInactive:
//
// 返回结果:
// A component of the matching type, if found.
[TypeInferenceRule(TypeInferenceRules.TypeReferencedByFirstArgument)]
public Component GetComponentInChildren(Type type);
//
// 摘要:
// Returns the component of Type type in the GameObject or any of its children using
// depth first search.
//
// 参数:
// type:
// The type of Component to retrieve.
//
// includeInactive:
//
// 返回结果:
// A component of the matching type, if found.
[FreeFunction(Name = "GameObjectBindings::GetComponentInChildren", HasExplicitThis = true, ThrowsException = true)]
[TypeInferenceRule(TypeInferenceRules.TypeReferencedByFirstArgument)]
public Component GetComponentInChildren(Type type, bool includeInactive);
public T GetComponentInChildren<T>([Internal.DefaultValue("false")] bool includeInactive);
[ExcludeFromDocs]
public T GetComponentInChildren<T>();
public T GetComponentInParent<T>();
//
// 摘要:
// Returns the component of Type type in the GameObject or any of its parents.
//
// 参数:
// type:
// Type of component to find.
[FreeFunction(Name = "GameObjectBindings::GetComponentInParent", HasExplicitThis = true, ThrowsException = true)]
[TypeInferenceRule(TypeInferenceRules.TypeReferencedByFirstArgument)]
public Component GetComponentInParent(Type type);
//
// 摘要:
// Returns all components of Type type in the GameObject.
//
// 参数:
// type:
// The type of component to retrieve.
public Component[] GetComponents(Type type);
public T[] GetComponents<T>();
public void GetComponents(Type type, List<Component> results);
public void GetComponents<T>(List<T> results);
public T[] GetComponentsInChildren<T>();
//
// 摘要:
// Returns all components of Type type in the GameObject or any of its children.
//
// 参数:
// type:
// The type of Component to retrieve.
//
// includeInactive:
// Should Components on inactive GameObjects be included in the found set?
[ExcludeFromDocs]
public Component[] GetComponentsInChildren(Type type);
//
// 摘要:
// Returns all components of Type type in the GameObject or any of its children.
//
// 参数:
// type:
// The type of Component to retrieve.
//
// includeInactive:
// Should Components on inactive GameObjects be included in the found set?
public Component[] GetComponentsInChildren(Type type, [Internal.DefaultValue("false")] bool includeInactive);
public T[] GetComponentsInChildren<T>(bool includeInactive);
public void GetComponentsInChildren<T>(bool includeInactive, List<T> results);
public void GetComponentsInChildren<T>(List<T> results);
public T[] GetComponentsInParent<T>(bool includeInactive);
[ExcludeFromDocs]
public Component[] GetComponentsInParent(Type type);
public void GetComponentsInParent<T>(bool includeInactive, List<T> results);
public T[] GetComponentsInParent<T>();
//
// 摘要:
// Returns all components of Type type in the GameObject or any of its parents.
//
// 参数:
// type:
// The type of Component to retrieve.
//
// includeInactive:
// Should inactive Components be included in the found set?
public Component[] GetComponentsInParent(Type type, [Internal.DefaultValue("false")] bool includeInactive);
[EditorBrowsable(EditorBrowsableState.Never)]
[Obsolete("gameObject.PlayAnimation is not supported anymore. Use animation.Play()", true)]
public void PlayAnimation(Object animation);
[EditorBrowsable(EditorBrowsableState.Never)]
[Obsolete("GameObject.SampleAnimation(AnimationClip, float) has been deprecated. Use AnimationClip.SampleAnimation(GameObject, float) instead (UnityUpgradable).", true)]
public void SampleAnimation(Object clip, float time);
//
// 参数:
// methodName:
//
// options:
public void SendMessage(string methodName, SendMessageOptions options);
//
// 摘要:
// Calls the method named methodName on every MonoBehaviour in this game object.
//
// 参数:
// methodName:
// The name of the method to call.
//
// value:
// An optional parameter value to pass to the called method.
//
// options:
// Should an error be raised if the method doesn't exist on the target object?
[FreeFunction(Name = "Scripting::SendScriptingMessage", HasExplicitThis = true)]
public void SendMessage(string methodName, [Internal.DefaultValue("null")] object value, [Internal.DefaultValue("SendMessageOptions.RequireReceiver")] SendMessageOptions options);
//
// 摘要:
// Calls the method named methodName on every MonoBehaviour in this game object.
//
// 参数:
// methodName:
// The name of the method to call.
//
// value:
// An optional parameter value to pass to the called method.
//
// options:
// Should an error be raised if the method doesn't exist on the target object?
[ExcludeFromDocs]
public void SendMessage(string methodName, object value);
//
// 摘要:
// Calls the method named methodName on every MonoBehaviour in this game object.
//
// 参数:
// methodName:
// The name of the method to call.
//
// value:
// An optional parameter value to pass to the called method.
//
// options:
// Should an error be raised if the method doesn't exist on the target object?
[ExcludeFromDocs]
public void SendMessage(string methodName);
//
// 摘要:
// Calls the method named methodName on every MonoBehaviour in this game object
// and on every ancestor of the behaviour.
//
// 参数:
// methodName:
// The name of the method to call.
//
// value:
// An optional parameter value to pass to the called method.
//
// options:
// Should an error be raised if the method doesn't exist on the target object?
[FreeFunction(Name = "Scripting::SendScriptingMessageUpwards", HasExplicitThis = true)]
public void SendMessageUpwards(string methodName, [Internal.DefaultValue("null")] object value, [Internal.DefaultValue("SendMessageOptions.RequireReceiver")] SendMessageOptions options);
//
// 参数:
// methodName:
//
// options:
public void SendMessageUpwards(string methodName, SendMessageOptions options);
//
// 摘要:
// Calls the method named methodName on every MonoBehaviour in this game object
// and on every ancestor of the behaviour.
//
// 参数:
// methodName:
// The name of the method to call.
//
// value:
// An optional parameter value to pass to the called method.
//
// options:
// Should an error be raised if the method doesn't exist on the target object?
[ExcludeFromDocs]
public void SendMessageUpwards(string methodName);
//
// 摘要:
// Calls the method named methodName on every MonoBehaviour in this game object
// and on every ancestor of the behaviour.
//
// 参数:
// methodName:
// The name of the method to call.
//
// value:
// An optional parameter value to pass to the called method.
//
// options:
// Should an error be raised if the method doesn't exist on the target object?
[ExcludeFromDocs]
public void SendMessageUpwards(string methodName, object value);
//
// 摘要:
// ActivatesDeactivates the GameObject, depending on the given true or false/ value.
//
// 参数:
// value:
// Activate or deactivate the object, where true activates the GameObject and false
// deactivates the GameObject.
[NativeMethod(Name = "SetSelfActive")]
public void SetActive(bool value);
[NativeMethod(Name = "SetActiveRecursivelyDeprecated")]
[Obsolete("gameObject.SetActiveRecursively() is obsolete. Use GameObject.SetActive(), which is now inherited by children.")]
public void SetActiveRecursively(bool state);
[EditorBrowsable(EditorBrowsableState.Never)]
[Obsolete("gameObject.StopAnimation is not supported anymore. Use animation.Stop()", true)]
public void StopAnimation();
public bool TryGetComponent(Type type, out Component component);
[SecuritySafeCritical]
public bool TryGetComponent<T>(out T component);
}
}
下面是Object类:
namespace UnityEngine
{
//
// 摘要:
// Base class for all objects Unity can reference.
[NativeHeader("Runtime/GameCode/CloneObject.h")]
[NativeHeader("Runtime/Export/Scripting/UnityEngineObject.bindings.h")]
[NativeHeader("Runtime/SceneManager/SceneManager.h")]
[RequiredByNativeCode(GenerateProxy = true)]
public class Object
{
public Object();
//
// 摘要:
// Should the object be hidden, saved with the Scene or modifiable by the user?
public HideFlags hideFlags { get; set; }
//
// 摘要:
// The name of the object.
public string name { get; set; }
//
// 摘要:
// Removes a GameObject, component or asset.
//
// 参数:
// obj:
// The object to destroy.
//
// t:
// The optional amount of time to delay before destroying the object.
[ExcludeFromDocs]
public static void Destroy(Object obj);
//
// 摘要:
// Removes a GameObject, component or asset.
//
// 参数:
// obj:
// The object to destroy.
//
// t:
// The optional amount of time to delay before destroying the object.
[NativeMethod(Name = "Scripting::DestroyObjectFromScripting", IsFreeFunction = true, ThrowsException = true)]
public static void Destroy(Object obj, [DefaultValue("0.0F")] float t);
//
// 摘要:
// Destroys the object obj immediately. You are strongly recommended to use Destroy
// instead.
//
// 参数:
// obj:
// Object to be destroyed.
//
// allowDestroyingAssets:
// Set to true to allow assets to be destroyed.
[ExcludeFromDocs]
public static void DestroyImmediate(Object obj);
//
// 摘要:
// Destroys the object obj immediately. You are strongly recommended to use Destroy
// instead.
//
// 参数:
// obj:
// Object to be destroyed.
//
// allowDestroyingAssets:
// Set to true to allow assets to be destroyed.
[NativeMethod(Name = "Scripting::DestroyObjectFromScriptingImmediate", IsFreeFunction = true, ThrowsException = true)]
public static void DestroyImmediate(Object obj, [DefaultValue("false")] bool allowDestroyingAssets);
[Obsolete("use Object.Destroy instead.")]
public static void DestroyObject(Object obj, [DefaultValue("0.0F")] float t);
[ExcludeFromDocs]
[Obsolete("use Object.Destroy instead.")]
public static void DestroyObject(Object obj);
//
// 摘要:
// Do not destroy the target Object when loading a new Scene.
//
// 参数:
// target:
// An Object not destroyed on Scene change.
[FreeFunction("GetSceneManager().DontDestroyOnLoad")]
public static void DontDestroyOnLoad(Object target);
//
// 摘要:
// Returns the first active loaded object of Type type.
//
// 参数:
// type:
// The type of object to find.
//
// 返回结果:
// This returns the Object that matches the specified type. It returns null if no
// Object matches the type.
[TypeInferenceRule(TypeInferenceRules.TypeReferencedByFirstArgument)]
public static Object FindObjectOfType(Type type);
public static T FindObjectOfType<T>() where T : Object;
public static T[] FindObjectsOfType<T>() where T : Object;
//
// 摘要:
// Returns a list of all active loaded objects of Type type.
//
// 参数:
// type:
// The type of object to find.
//
// includeInactive:
// If true, components attached to inactive GameObjects are also included.
//
// 返回结果:
// The array of objects found matching the type specified.
[FreeFunction("UnityEngineObjectBindings::FindObjectsOfType")]
[TypeInferenceRule(TypeInferenceRules.ArrayOfTypeReferencedByFirstArgument)]
public static Object[] FindObjectsOfType(Type type);
//
// 摘要:
// Returns a list of all active and inactive loaded objects of Type type.
//
// 参数:
// type:
// The type of object to find.
//
// 返回结果:
// The array of objects found matching the type specified.
[Obsolete("Please use Resources.FindObjectsOfTypeAll instead")]
public static Object[] FindObjectsOfTypeAll(Type type);
//
// 摘要:
// Returns a list of all active and inactive loaded objects of Type type, including
// assets.
//
// 参数:
// type:
// The type of object or asset to find.
//
// 返回结果:
// The array of objects and assets found matching the type specified.
[FreeFunction("UnityEngineObjectBindings::FindObjectsOfTypeIncludingAssets")]
[Obsolete("use Resources.FindObjectsOfTypeAll instead.")]
public static Object[] FindObjectsOfTypeIncludingAssets(Type type);
[FreeFunction("UnityEngineObjectBindings::FindObjectsOfType")]
[Obsolete("warning use Object.FindObjectsOfType instead.")]
public static Object[] FindSceneObjectsOfType(Type type);
//
// 摘要:
// Clones the object original and returns the clone.
//
// 参数:
// original:
// An existing object that you want to make a copy of.
//
// position:
// Position for the new object.
//
// rotation:
// Orientation of the new object.
//
// parent:
// Parent that will be assigned to the new object.
//
// instantiateInWorldSpace:
// When you assign a parent Object, pass true to position the new object directly
// in world space. Pass false to set the Object’s position relative to its new parent..
//
// 返回结果:
// The instantiated clone.
[TypeInferenceRule(TypeInferenceRules.TypeOfFirstArgument)]
public static Object Instantiate(Object original);
//
// 摘要:
// Clones the object original and returns the clone.
//
// 参数:
// original:
// An existing object that you want to make a copy of.
//
// position:
// Position for the new object.
//
// rotation:
// Orientation of the new object.
//
// parent:
// Parent that will be assigned to the new object.
//
// instantiateInWorldSpace:
// When you assign a parent Object, pass true to position the new object directly
// in world space. Pass false to set the Object’s position relative to its new parent..
//
// 返回结果:
// The instantiated clone.
[TypeInferenceRule(TypeInferenceRules.TypeOfFirstArgument)]
public static Object Instantiate(Object original, Transform parent);
//
// 摘要:
// Clones the object original and returns the clone.
//
// 参数:
// original:
// An existing object that you want to make a copy of.
//
// position:
// Position for the new object.
//
// rotation:
// Orientation of the new object.
//
// parent:
// Parent that will be assigned to the new object.
//
// instantiateInWorldSpace:
// When you assign a parent Object, pass true to position the new object directly
// in world space. Pass false to set the Object’s position relative to its new parent..
//
// 返回结果:
// The instantiated clone.
[TypeInferenceRule(TypeInferenceRules.TypeOfFirstArgument)]
public static Object Instantiate(Object original, Vector3 position, Quaternion rotation);
//
// 摘要:
// Clones the object original and returns the clone.
//
// 参数:
// original:
// An existing object that you want to make a copy of.
//
// position:
// Position for the new object.
//
// rotation:
// Orientation of the new object.
//
// parent:
// Parent that will be assigned to the new object.
//
// instantiateInWorldSpace:
// When you assign a parent Object, pass true to position the new object directly
// in world space. Pass false to set the Object’s position relative to its new parent..
//
// 返回结果:
// The instantiated clone.
[TypeInferenceRule(TypeInferenceRules.TypeOfFirstArgument)]
public static Object Instantiate(Object original, Vector3 position, Quaternion rotation, Transform parent);
public static T Instantiate<T>(T original, Transform parent, bool worldPositionStays) where T : Object;
public static T Instantiate<T>(T original, Transform parent) where T : Object;
public static T Instantiate<T>(T original, Vector3 position, Quaternion rotation, Transform parent) where T : Object;
public static T Instantiate<T>(T original, Vector3 position, Quaternion rotation) where T : Object;
public static T Instantiate<T>(T original) where T : Object;
//
// 摘要:
// Clones the object original and returns the clone.
//
// 参数:
// original:
// An existing object that you want to make a copy of.
//
// position:
// Position for the new object.
//
// rotation:
// Orientation of the new object.
//
// parent:
// Parent that will be assigned to the new object.
//
// instantiateInWorldSpace:
// When you assign a parent Object, pass true to position the new object directly
// in world space. Pass false to set the Object’s position relative to its new parent..
//
// 返回结果:
// The instantiated clone.
[TypeInferenceRule(TypeInferenceRules.TypeOfFirstArgument)]
public static Object Instantiate(Object original, Transform parent, bool instantiateInWorldSpace);
public override bool Equals(object other);
public override int GetHashCode();
//
// 摘要:
// Returns the instance id of the object.
[SecuritySafeCritical]
public int GetInstanceID();
//
// 摘要:
// Returns the name of the object.
//
// 返回结果:
// The name returned by ToString.
public override string ToString();
public static bool operator ==(Object x, Object y);
public static bool operator !=(Object x, Object y);
public static implicit operator bool(Object exists);
}
}
namespace UnityEngine
{
//
// 摘要:
// The interface to get time information from Unity.
[NativeHeader("Runtime/Input/TimeManager.h")]
[StaticAccessor("GetTimeManager()", StaticAccessorType.Dot)]
public class Time
{
public Time();
//
// 摘要:
// Slows game playback time to allow screenshots to be saved between frames.
public static float captureDeltaTime { get; set; }
//
// 摘要:
// The real time in seconds since the game started (Read Only).
[NativeProperty("Realtime")]
public static float realtimeSinceStartup { get; }
[NativeProperty("RenderFrameCount")]
public static int renderedFrameCount { get; }
//
// 摘要:
// The total number of frames that have passed (Read Only).
public static int frameCount { get; }
//
// 摘要:
// The scale at which time passes. This can be used for slow motion effects.
public static float timeScale { get; set; }
//
// 摘要:
// The maximum time a frame can spend on particle updates. If the frame takes longer
// than this, then updates are split into multiple smaller updates.
public static float maximumParticleDeltaTime { get; set; }
//
// 摘要:
// A smoothed out Time.deltaTime (Read Only).
public static float smoothDeltaTime { get; }
//
// 摘要:
// The maximum time a frame can take. Physics and other fixed frame rate updates
// (like MonoBehaviour's MonoBehaviour.FixedUpdate) will be performed only for this
// duration of time per frame.
public static float maximumDeltaTime { get; set; }
//
// 摘要:
// The interval in seconds at which physics and other fixed frame rate updates (like
// MonoBehaviour's MonoBehaviour.FixedUpdate) are performed.
public static float fixedDeltaTime { get; set; }
//
// 摘要:
// The timeScale-independent interval in seconds from the last fixed frame to the
// current one (Read Only).
public static float fixedUnscaledDeltaTime { get; }
//
// 摘要:
// The timeScale-independent interval in seconds from the last frame to the current
// one (Read Only).
public static float unscaledDeltaTime { get; }
//
// 摘要:
// The TimeScale-independant time the latest MonoBehaviour.FixedUpdate has started
// (Read Only). This is the time in seconds since the start of the game.
public static float fixedUnscaledTime { get; }
//
// 摘要:
// The timeScale-independant time for this frame (Read Only). This is the time in
// seconds since the start of the game.
public static float unscaledTime { get; }
//
// 摘要:
// The time the latest MonoBehaviour.FixedUpdate has started (Read Only). This is
// the time in seconds since the start of the game.
public static float fixedTime { get; }
//
// 摘要:
// The completion time in seconds since the last frame (Read Only).
public static float deltaTime { get; }
//
// 摘要:
// The time this frame has started (Read Only). This is the time in seconds since
// the last level has been loaded.
[NativeProperty("TimeSinceSceneLoad")]
public static float timeSinceLevelLoad { get; }
//
// 摘要:
// The time at the beginning of this frame (Read Only). This is the time in seconds
// since the start of the game.
[NativeProperty("CurTime")]
public static float time { get; }
//
// 摘要:
// The reciprocal of Time.captureDeltaTime.
public static int captureFramerate { get; set; }
//
// 摘要:
// Returns true if called inside a fixed time step callback (like MonoBehaviour's
// MonoBehaviour.FixedUpdate), otherwise returns false.
public static bool inFixedTimeStep { get; }
}
}
namespace UnityEngine
{
//
// 摘要:
// Representation of 3D vectors and points.
[DefaultMember("Item")]
[NativeClass("Vector3f")]
[NativeHeader("Runtime/Math/Vector3.h")]
[NativeHeader("Runtime/Math/MathScripting.h")]
[NativeType(Header = "Runtime/Math/Vector3.h")]
[RequiredByNativeCode(Optional = true, GenerateProxy = true)]
public struct Vector3 : IEquatable<Vector3>
{
public const float kEpsilon = 1E-05F;
public const float kEpsilonNormalSqrt = 1E-15F;
//
// 摘要:
// X component of the vector.
public float x;
//
// 摘要:
// Y component of the vector.
public float y;
//
// 摘要:
// Z component of the vector.
public float z;
//
// 摘要:
// Creates a new vector with given x, y components and sets z to zero.
//
// 参数:
// x:
//
// y:
public Vector3(float x, float y);
//
// 摘要:
// Creates a new vector with given x, y, z components.
//
// 参数:
// x:
//
// y:
//
// z:
public Vector3(float x, float y, float z);
public float this[int index] { get; set; }
//
// 摘要:
// Shorthand for writing Vector3(1, 0, 0).
public static Vector3 right { get; }
//
// 摘要:
// Shorthand for writing Vector3(-1, 0, 0).
public static Vector3 left { get; }
//
// 摘要:
// Shorthand for writing Vector3(0, 1, 0).
public static Vector3 up { get; }
//
// 摘要:
// Shorthand for writing Vector3(0, 0, -1).
public static Vector3 back { get; }
//
// 摘要:
// Shorthand for writing Vector3(0, 0, 1).
public static Vector3 forward { get; }
//
// 摘要:
// Shorthand for writing Vector3(1, 1, 1).
public static Vector3 one { get; }
//
// 摘要:
// Shorthand for writing Vector3(0, 0, 0).
public static Vector3 zero { get; }
//
// 摘要:
// Shorthand for writing Vector3(float.NegativeInfinity, float.NegativeInfinity,
// float.NegativeInfinity).
public static Vector3 negativeInfinity { get; }
//
// 摘要:
// Shorthand for writing Vector3(float.PositiveInfinity, float.PositiveInfinity,
// float.PositiveInfinity).
public static Vector3 positiveInfinity { get; }
//
// 摘要:
// Shorthand for writing Vector3(0, -1, 0).
public static Vector3 down { get; }
[Obsolete("Use Vector3.forward instead.")]
public static Vector3 fwd { get; }
//
// 摘要:
// Returns the squared length of this vector (Read Only).
public float sqrMagnitude { get; }
//
// 摘要:
// Returns this vector with a magnitude of 1 (Read Only).
public Vector3 normalized { get; }
//
// 摘要:
// Returns the length of this vector (Read Only).
public float magnitude { get; }
//
// 摘要:
// Returns the angle in degrees between from and to.
//
// 参数:
// from:
// The vector from which the angular difference is measured.
//
// to:
// The vector to which the angular difference is measured.
//
// 返回结果:
// The angle in degrees between the two vectors.
public static float Angle(Vector3 from, Vector3 to);
[Obsolete("Use Vector3.Angle instead. AngleBetween uses radians instead of degrees and was deprecated for this reason")]
public static float AngleBetween(Vector3 from, Vector3 to);
//
// 摘要:
// Returns a copy of vector with its magnitude clamped to maxLength.
//
// 参数:
// vector:
//
// maxLength:
public static Vector3 ClampMagnitude(Vector3 vector, float maxLength);
//
// 摘要:
// Cross Product of two vectors.
//
// 参数:
// lhs:
//
// rhs:
public static Vector3 Cross(Vector3 lhs, Vector3 rhs);
//
// 摘要:
// Returns the distance between a and b.
//
// 参数:
// a:
//
// b:
public static float Distance(Vector3 a, Vector3 b);
//
// 摘要:
// Dot Product of two vectors.
//
// 参数:
// lhs:
//
// rhs:
public static float Dot(Vector3 lhs, Vector3 rhs);
[Obsolete("Use Vector3.ProjectOnPlane instead.")]
public static Vector3 Exclude(Vector3 excludeThis, Vector3 fromThat);
//
// 摘要:
// Linearly interpolates between two points.
//
// 参数:
// a:
//
// b:
//
// t:
public static Vector3 Lerp(Vector3 a, Vector3 b, float t);
//
// 摘要:
// Linearly interpolates between two vectors.
//
// 参数:
// a:
//
// b:
//
// t:
public static Vector3 LerpUnclamped(Vector3 a, Vector3 b, float t);
public static float Magnitude(Vector3 vector);
//
// 摘要:
// Returns a vector that is made from the largest components of two vectors.
//
// 参数:
// lhs:
//
// rhs:
public static Vector3 Max(Vector3 lhs, Vector3 rhs);
//
// 摘要:
// Returns a vector that is made from the smallest components of two vectors.
//
// 参数:
// lhs:
//
// rhs:
public static Vector3 Min(Vector3 lhs, Vector3 rhs);
//
// 摘要:
// Calculate a position between the points specified by current and target, moving
// no farther than the distance specified by maxDistanceDelta.
//
// 参数:
// current:
// The position to move from.
//
// target:
// The position to move towards.
//
// maxDistanceDelta:
// Distance to move current per call.
//
// 返回结果:
// The new position.
public static Vector3 MoveTowards(Vector3 current, Vector3 target, float maxDistanceDelta);
//
// 摘要:
// Makes this vector have a magnitude of 1.
//
// 参数:
// value:
public static Vector3 Normalize(Vector3 value);
public static void OrthoNormalize(ref Vector3 normal, ref Vector3 tangent, ref Vector3 binormal);
public static void OrthoNormalize(ref Vector3 normal, ref Vector3 tangent);
//
// 摘要:
// Projects a vector onto another vector.
//
// 参数:
// vector:
//
// onNormal:
public static Vector3 Project(Vector3 vector, Vector3 onNormal);
//
// 摘要:
// Projects a vector onto a plane defined by a normal orthogonal to the plane.
//
// 参数:
// planeNormal:
// The direction from the vector towards the plane.
//
// vector:
// The location of the vector above the plane.
//
// 返回结果:
// The location of the vector on the plane.
public static Vector3 ProjectOnPlane(Vector3 vector, Vector3 planeNormal);
//
// 摘要:
// Reflects a vector off the plane defined by a normal.
//
// 参数:
// inDirection:
//
// inNormal:
public static Vector3 Reflect(Vector3 inDirection, Vector3 inNormal);
//
// 摘要:
// Rotates a vector current towards target.
//
// 参数:
// current:
// The vector being managed.
//
// target:
// The vector.
//
// maxRadiansDelta:
// The maximum angle in radians allowed for this rotation.
//
// maxMagnitudeDelta:
// The maximum allowed change in vector magnitude for this rotation.
//
// 返回结果:
// The location that RotateTowards generates.
[FreeFunction(IsThreadSafe = true)]
public static Vector3 RotateTowards(Vector3 current, Vector3 target, float maxRadiansDelta, float maxMagnitudeDelta);
//
// 摘要:
// Multiplies two vectors component-wise.
//
// 参数:
// a:
//
// b:
public static Vector3 Scale(Vector3 a, Vector3 b);
//
// 摘要:
// Returns the signed angle in degrees between from and to.
//
// 参数:
// from:
// The vector from which the angular difference is measured.
//
// to:
// The vector to which the angular difference is measured.
//
// axis:
// A vector around which the other vectors are rotated.
public static float SignedAngle(Vector3 from, Vector3 to, Vector3 axis);
//
// 摘要:
// Spherically interpolates between two vectors.
//
// 参数:
// a:
//
// b:
//
// t:
[FreeFunction("VectorScripting::Slerp", IsThreadSafe = true)]
public static Vector3 Slerp(Vector3 a, Vector3 b, float t);
//
// 摘要:
// Spherically interpolates between two vectors.
//
// 参数:
// a:
//
// b:
//
// t:
[FreeFunction("VectorScripting::SlerpUnclamped", IsThreadSafe = true)]
public static Vector3 SlerpUnclamped(Vector3 a, Vector3 b, float t);
public static Vector3 SmoothDamp(Vector3 current, Vector3 target, ref Vector3 currentVelocity, float smoothTime, [DefaultValue("Mathf.Infinity")] float maxSpeed, [DefaultValue("Time.deltaTime")] float deltaTime);
[ExcludeFromDocs]
public static Vector3 SmoothDamp(Vector3 current, Vector3 target, ref Vector3 currentVelocity, float smoothTime, float maxSpeed);
[ExcludeFromDocs]
public static Vector3 SmoothDamp(Vector3 current, Vector3 target, ref Vector3 currentVelocity, float smoothTime);
public static float SqrMagnitude(Vector3 vector);
public bool Equals(Vector3 other);
//
// 摘要:
// Returns true if the given vector is exactly equal to this vector.
//
// 参数:
// other:
public override bool Equals(object other);
public override int GetHashCode();
public void Normalize();
//
// 摘要:
// Multiplies every component of this vector by the same component of scale.
//
// 参数:
// scale:
public void Scale(Vector3 scale);
//
// 摘要:
// Set x, y and z components of an existing Vector3.
//
// 参数:
// newX:
//
// newY:
//
// newZ:
public void Set(float newX, float newY, float newZ);
//
// 摘要:
// Returns a nicely formatted string for this vector.
//
// 参数:
// format:
public string ToString(string format);
//
// 摘要:
// Returns a nicely formatted string for this vector.
//
// 参数:
// format:
public override string ToString();
public static Vector3 operator +(Vector3 a, Vector3 b);
public static Vector3 operator -(Vector3 a);
public static Vector3 operator -(Vector3 a, Vector3 b);
public static Vector3 operator *(Vector3 a, float d);
public static Vector3 operator *(float d, Vector3 a);
public static Vector3 operator /(Vector3 a, float d);
public static bool operator ==(Vector3 lhs, Vector3 rhs);
public static bool operator !=(Vector3 lhs, Vector3 rhs);
}
}
namespace UnityEngine
{
//
// 摘要:
// Position, rotation and scale of an object.
[NativeHeader("Runtime/Transform/Transform.h")]
[NativeHeader("Runtime/Transform/ScriptBindings/TransformScriptBindings.h")]
[NativeHeader("Configuration/UnityConfigure.h")]
[RequiredByNativeCode]
public class Transform : Component, IEnumerable
{
protected Transform();
//
// 摘要:
// Position of the transform relative to the parent transform.
public Vector3 localPosition { get; set; }
//
// 摘要:
// The rotation as Euler angles in degrees.
public Vector3 eulerAngles { get; set; }
//
// 摘要:
// The rotation as Euler angles in degrees relative to the parent transform's rotation.
public Vector3 localEulerAngles { get; set; }
//
// 摘要:
// The red axis of the transform in world space.
public Vector3 right { get; set; }
//
// 摘要:
// The green axis of the transform in world space.
public Vector3 up { get; set; }
//
// 摘要:
// Returns a normalized vector representing the blue axis of the transform in world
// space.
public Vector3 forward { get; set; }
//
// 摘要:
// A Quaternion that stores the rotation of the Transform in world space.
public Quaternion rotation { get; set; }
//
// 摘要:
// The world space position of the Transform.
public Vector3 position { get; set; }
//
// 摘要:
// The rotation of the transform relative to the transform rotation of the parent.
public Quaternion localRotation { get; set; }
//
// 摘要:
// The parent of the transform.
public Transform parent { get; set; }
//
// 摘要:
// Matrix that transforms a point from world space into local space (Read Only).
public Matrix4x4 worldToLocalMatrix { get; }
//
// 摘要:
// Matrix that transforms a point from local space into world space (Read Only).
public Matrix4x4 localToWorldMatrix { get; }
//
// 摘要:
// Returns the topmost transform in the hierarchy.
public Transform root { get; }
//
// 摘要:
// The number of children the parent Transform has.
public int childCount { get; }
//
// 摘要:
// The global scale of the object (Read Only).
public Vector3 lossyScale { get; }
//
// 摘要:
// Has the transform changed since the last time the flag was set to 'false'?
[NativeProperty("HasChangedDeprecated")]
public bool hasChanged { get; set; }
//
// 摘要:
// The scale of the transform relative to the GameObjects parent.
public Vector3 localScale { get; set; }
//
// 摘要:
// The transform capacity of the transform's hierarchy data structure.
public int hierarchyCapacity { get; set; }
//
// 摘要:
// The number of transforms in the transform's hierarchy data structure.
public int hierarchyCount { get; }
//
// 摘要:
// Unparents all children.
[FreeFunction("DetachChildren", HasExplicitThis = true)]
public void DetachChildren();
//
// 摘要:
// Finds a child by n and returns it.
//
// 参数:
// n:
// Name of child to be found.
//
// 返回结果:
// The returned child transform or null if no child is found.
public Transform Find(string n);
[Obsolete("FindChild has been deprecated. Use Find instead (UnityUpgradable) -> Find([mscorlib] System.String)", false)]
public Transform FindChild(string n);
//
// 摘要:
// Returns a transform child by index.
//
// 参数:
// index:
// Index of the child transform to return. Must be smaller than Transform.childCount.
//
// 返回结果:
// Transform child by index.
[FreeFunction("GetChild", HasExplicitThis = true)]
[NativeThrows]
public Transform GetChild(int index);
[NativeMethod("GetChildrenCount")]
[Obsolete("warning use Transform.childCount instead (UnityUpgradable) -> Transform.childCount", false)]
public int GetChildCount();
public IEnumerator GetEnumerator();
//
// 摘要:
// Gets the sibling index.
public int GetSiblingIndex();
//
// 摘要:
// Transforms a direction from world space to local space. The opposite of Transform.TransformDirection.
//
// 参数:
// direction:
public Vector3 InverseTransformDirection(Vector3 direction);
//
// 摘要:
// Transforms the direction x, y, z from world space to local space. The opposite
// of Transform.TransformDirection.
//
// 参数:
// x:
//
// y:
//
// z:
public Vector3 InverseTransformDirection(float x, float y, float z);
//
// 摘要:
// Transforms the position x, y, z from world space to local space. The opposite
// of Transform.TransformPoint.
//
// 参数:
// x:
//
// y:
//
// z:
public Vector3 InverseTransformPoint(float x, float y, float z);
//
// 摘要:
// Transforms position from world space to local space.
//
// 参数:
// position:
public Vector3 InverseTransformPoint(Vector3 position);
//
// 摘要:
// Transforms a vector from world space to local space. The opposite of Transform.TransformVector.
//
// 参数:
// vector:
public Vector3 InverseTransformVector(Vector3 vector);
//
// 摘要:
// Transforms the vector x, y, z from world space to local space. The opposite of
// Transform.TransformVector.
//
// 参数:
// x:
//
// y:
//
// z:
public Vector3 InverseTransformVector(float x, float y, float z);
//
// 摘要:
// Is this transform a child of parent?
//
// 参数:
// parent:
[FreeFunction("Internal_IsChildOrSameTransform", HasExplicitThis = true)]
public bool IsChildOf([NotNull] Transform parent);
//
// 摘要:
// Rotates the transform so the forward vector points at target's current position.
//
// 参数:
// target:
// Object to point towards.
//
// worldUp:
// Vector specifying the upward direction.
public void LookAt(Transform target, [DefaultValue("Vector3.up")] Vector3 worldUp);
//
// 摘要:
// Rotates the transform so the forward vector points at worldPosition.
//
// 参数:
// worldPosition:
// Point to look at.
//
// worldUp:
// Vector specifying the upward direction.
public void LookAt(Vector3 worldPosition, [DefaultValue("Vector3.up")] Vector3 worldUp);
//
// 摘要:
// Rotates the transform so the forward vector points at worldPosition.
//
// 参数:
// worldPosition:
// Point to look at.
//
// worldUp:
// Vector specifying the upward direction.
public void LookAt(Vector3 worldPosition);
//
// 摘要:
// Rotates the transform so the forward vector points at target's current position.
//
// 参数:
// target:
// Object to point towards.
//
// worldUp:
// Vector specifying the upward direction.
public void LookAt(Transform target);
public void Rotate(float xAngle, float yAngle, float zAngle);
//
// 摘要:
// Applies a rotation of eulerAngles.z degrees around the z-axis, eulerAngles.x
// degrees around the x-axis, and eulerAngles.y degrees around the y-axis (in that
// order).
//
// 参数:
// eulers:
// The rotation to apply.
//
// relativeTo:
// Determines whether to rotate the GameObject either locally to the GameObject
// or relative to the Scene in world space.
public void Rotate(Vector3 eulers, [DefaultValue("Space.Self")] Space relativeTo);
public void Rotate(Vector3 eulers);
//
// 摘要:
// The implementation of this method applies a rotation of zAngle degrees around
// the z axis, xAngle degrees around the x axis, and yAngle degrees around the y
// axis (in that order).
//
// 参数:
// relativeTo:
// Determines whether to rotate the GameObject either locally to the GameObject
// or relative to the Scene in world space.
//
// xAngle:
// Degrees to rotate the GameObject around the X axis.
//
// yAngle:
// Degrees to rotate the GameObject around the Y axis.
//
// zAngle:
// Degrees to rotate the GameObject around the Z axis.
public void Rotate(float xAngle, float yAngle, float zAngle, [DefaultValue("Space.Self")] Space relativeTo);
//
// 摘要:
// Rotates the object around the given axis by the number of degrees defined by
// the given angle.
//
// 参数:
// angle:
// The degrees of rotation to apply.
//
// axis:
// The axis to apply rotation to.
//
// relativeTo:
// Determines whether to rotate the GameObject either locally to the GameObject
// or relative to the Scene in world space.
public void Rotate(Vector3 axis, float angle, [DefaultValue("Space.Self")] Space relativeTo);
public void Rotate(Vector3 axis, float angle);
//
// 摘要:
// Rotates the transform about axis passing through point in world coordinates by
// angle degrees.
//
// 参数:
// point:
//
// axis:
//
// angle:
public void RotateAround(Vector3 point, Vector3 axis, float angle);
//
// 参数:
// axis:
//
// angle:
[Obsolete("warning use Transform.Rotate instead.")]
public void RotateAround(Vector3 axis, float angle);
[Obsolete("warning use Transform.Rotate instead.")]
public void RotateAroundLocal(Vector3 axis, float angle);
//
// 摘要:
// Move the transform to the start of the local transform list.
public void SetAsFirstSibling();
//
// 摘要:
// Move the transform to the end of the local transform list.
public void SetAsLastSibling();
//
// 摘要:
// Set the parent of the transform.
//
// 参数:
// parent:
// The parent Transform to use.
//
// worldPositionStays:
// If true, the parent-relative position, scale and rotation are modified such that
// the object keeps the same world space position, rotation and scale as before.
//
// p:
public void SetParent(Transform p);
//
// 摘要:
// Set the parent of the transform.
//
// 参数:
// parent:
// The parent Transform to use.
//
// worldPositionStays:
// If true, the parent-relative position, scale and rotation are modified such that
// the object keeps the same world space position, rotation and scale as before.
//
// p:
[FreeFunction("SetParent", HasExplicitThis = true)]
public void SetParent(Transform parent, bool worldPositionStays);
//
// 摘要:
// Sets the world space position and rotation of the Transform component.
//
// 参数:
// position:
//
// rotation:
public void SetPositionAndRotation(Vector3 position, Quaternion rotation);
//
// 摘要:
// Sets the sibling index.
//
// 参数:
// index:
// Index to set.
public void SetSiblingIndex(int index);
//
// 摘要:
// Transforms direction x, y, z from local space to world space.
//
// 参数:
// x:
//
// y:
//
// z:
public Vector3 TransformDirection(float x, float y, float z);
//
// 摘要:
// Transforms direction from local space to world space.
//
// 参数:
// direction:
public Vector3 TransformDirection(Vector3 direction);
//
// 摘要:
// Transforms the position x, y, z from local space to world space.
//
// 参数:
// x:
//
// y:
//
// z:
public Vector3 TransformPoint(float x, float y, float z);
//
// 摘要:
// Transforms position from local space to world space.
//
// 参数:
// position:
public Vector3 TransformPoint(Vector3 position);
//
// 摘要:
// Transforms vector x, y, z from local space to world space.
//
// 参数:
// x:
//
// y:
//
// z:
public Vector3 TransformVector(float x, float y, float z);
//
// 摘要:
// Transforms vector from local space to world space.
//
// 参数:
// vector:
public Vector3 TransformVector(Vector3 vector);
//
// 摘要:
// Moves the transform by x along the x axis, y along the y axis, and z along the
// z axis.
//
// 参数:
// x:
//
// y:
//
// z:
//
// relativeTo:
public void Translate(float x, float y, float z);
//
// 摘要:
// Moves the transform by x along the x axis, y along the y axis, and z along the
// z axis.
//
// 参数:
// x:
//
// y:
//
// z:
//
// relativeTo:
public void Translate(float x, float y, float z, [DefaultValue("Space.Self")] Space relativeTo);
//
// 摘要:
// Moves the transform in the direction and distance of translation.
//
// 参数:
// translation:
//
// relativeTo:
public void Translate(Vector3 translation);
//
// 摘要:
// Moves the transform in the direction and distance of translation.
//
// 参数:
// translation:
//
// relativeTo:
public void Translate(Vector3 translation, [DefaultValue("Space.Self")] Space relativeTo);
//
// 摘要:
// Moves the transform by x along the x axis, y along the y axis, and z along the
// z axis.
//
// 参数:
// x:
//
// y:
//
// z:
//
// relativeTo:
public void Translate(float x, float y, float z, Transform relativeTo);
//
// 摘要:
// Moves the transform in the direction and distance of translation.
//
// 参数:
// translation:
//
// relativeTo:
public void Translate(Vector3 translation, Transform relativeTo);
}
}
namespace UnityEngine
{
//
// 摘要:
// Interface into the Input system.
[NativeHeader("Runtime/Input/InputBindings.h")]
public class Input
{
public Input();
//
// 摘要:
// Returns the keyboard input entered this frame. (Read Only)
[NativeThrows]
public static string inputString { get; }
//
// 摘要:
// Controls enabling and disabling of IME input composition.
public static IMECompositionMode imeCompositionMode { get; set; }
//
// 摘要:
// The current IME composition string being typed by the user.
public static string compositionString { get; }
//
// 摘要:
// Does the user have an IME keyboard input source selected?
public static bool imeIsSelected { get; }
//
// 摘要:
// The current text input position used by IMEs to open windows.
public static Vector2 compositionCursorPos { get; set; }
//
// 摘要:
// Property indicating whether keypresses are eaten by a textinput if it has focus
// (default true).
[Obsolete("eatKeyPressOnTextFieldFocus property is deprecated, and only provided to support legacy behavior.")]
public static bool eatKeyPressOnTextFieldFocus { get; set; }
//
// 摘要:
// Indicates if a mouse device is detected.
public static bool mousePresent { get; }
//
// 摘要:
// Number of touches. Guaranteed not to change throughout the frame. (Read Only)
public static int touchCount { get; }
//
// 摘要:
// Bool value which let's users check if touch pressure is supported.
public static bool touchPressureSupported { get; }
//
// 摘要:
// Returns true when Stylus Touch is supported by a device or platform.
public static bool stylusTouchSupported { get; }
//
// 摘要:
// Returns whether the device on which application is currently running supports
// touch input.
public static bool touchSupported { get; }
//
// 摘要:
// Property indicating whether the system handles multiple touches.
public static bool multiTouchEnabled { get; set; }
[Obsolete("isGyroAvailable property is deprecated. Please use SystemInfo.supportsGyroscope instead.")]
public static bool isGyroAvailable { get; }
//
// 摘要:
// Device physical orientation as reported by OS. (Read Only)
public static DeviceOrientation deviceOrientation { get; }
//
// 摘要:
// Last measured linear acceleration of a device in three-dimensional space. (Read
// Only)
public static Vector3 acceleration { get; }
//
// 摘要:
// This property controls if input sensors should be compensated for screen orientation.
public static bool compensateSensors { get; set; }
//
// 摘要:
// Number of acceleration measurements which occurred during last frame.
public static int accelerationEventCount { get; }
//
// 摘要:
// Should Back button quit the application? Only usable on Android, Windows Phone
// or Windows Tablets.
public static bool backButtonLeavesApp { get; set; }
//
// 摘要:
// Property for accessing device location (handheld devices only). (Read Only)
public static LocationService location { get; }
//
// 摘要:
// Property for accessing compass (handheld devices only). (Read Only)
public static Compass compass { get; }
//
// 摘要:
// Returns default gyroscope.
public static Gyroscope gyro { get; }
//
// 摘要:
// The current mouse scroll delta. (Read Only)
[NativeThrows]
public static Vector2 mouseScrollDelta { get; }
//
// 摘要:
// The current mouse position in pixel coordinates. (Read Only)
[NativeThrows]
public static Vector3 mousePosition { get; }
//
// 摘要:
// Returns list of acceleration measurements which occurred during the last frame.
// (Read Only) (Allocates temporary variables).
public static AccelerationEvent[] accelerationEvents { get; }
//
// 摘要:
// Returns true the first frame the user hits any key or mouse button. (Read Only)
[NativeThrows]
public static bool anyKeyDown { get; }
//
// 摘要:
// Is any key or mouse button currently held down? (Read Only)
[NativeThrows]
public static bool anyKey { get; }
//
// 摘要:
// Enables/Disables mouse simulation with touches. By default this option is enabled.
public static bool simulateMouseWithTouches { get; set; }
//
// 摘要:
// Returns list of objects representing status of all touches during last frame.
// (Read Only) (Allocates temporary variables).
public static Touch[] touches { get; }
//
// 摘要:
// Returns specific acceleration measurement which occurred during last frame. (Does
// not allocate temporary variables).
//
// 参数:
// index:
[NativeThrows]
public static AccelerationEvent GetAccelerationEvent(int index);
//
// 摘要:
// Returns the value of the virtual axis identified by axisName.
//
// 参数:
// axisName:
[NativeThrows]
public static float GetAxis(string axisName);
//
// 摘要:
// Returns the value of the virtual axis identified by axisName with no smoothing
// filtering applied.
//
// 参数:
// axisName:
[NativeThrows]
public static float GetAxisRaw(string axisName);
//
// 摘要:
// Returns true while the virtual button identified by buttonName is held down.
//
// 参数:
// buttonName:
// The name of the button such as Jump.
//
// 返回结果:
// True when an axis has been pressed and not released.
[NativeThrows]
public static bool GetButton(string buttonName);
//
// 摘要:
// Returns true during the frame the user pressed down the virtual button identified
// by buttonName.
//
// 参数:
// buttonName:
[NativeThrows]
public static bool GetButtonDown(string buttonName);
//
// 摘要:
// Returns true the first frame the user releases the virtual button identified
// by buttonName.
//
// 参数:
// buttonName:
[NativeThrows]
public static bool GetButtonUp(string buttonName);
//
// 摘要:
// Returns an array of strings describing the connected joysticks.
[NativeThrows]
public static string[] GetJoystickNames();
//
// 摘要:
// Returns true while the user holds down the key identified by name.
//
// 参数:
// name:
public static bool GetKey(string name);
//
// 摘要:
// Returns true while the user holds down the key identified by the key KeyCode
// enum parameter.
//
// 参数:
// key:
public static bool GetKey(KeyCode key);
//
// 摘要:
// Returns true during the frame the user starts pressing down the key identified
// by the key KeyCode enum parameter.
//
// 参数:
// key:
public static bool GetKeyDown(KeyCode key);
//
// 摘要:
// Returns true during the frame the user starts pressing down the key identified
// by name.
//
// 参数:
// name:
public static bool GetKeyDown(string name);
//
// 摘要:
// Returns true during the frame the user releases the key identified by the key
// KeyCode enum parameter.
//
// 参数:
// key:
public static bool GetKeyUp(KeyCode key);
//
// 摘要:
// Returns true during the frame the user releases the key identified by name.
//
// 参数:
// name:
public static bool GetKeyUp(string name);
//
// 摘要:
// Returns whether the given mouse button is held down.
//
// 参数:
// button:
[NativeThrows]
public static bool GetMouseButton(int button);
//
// 摘要:
// Returns true during the frame the user pressed the given mouse button.
//
// 参数:
// button:
[NativeThrows]
public static bool GetMouseButtonDown(int button);
//
// 摘要:
// Returns true during the frame the user releases the given mouse button.
//
// 参数:
// button:
[NativeThrows]
public static bool GetMouseButtonUp(int button);
//
// 摘要:
// Call Input.GetTouch to obtain a Touch struct.
//
// 参数:
// index:
// The touch input on the device screen.
//
// 返回结果:
// Touch details in the struct.
[NativeThrows]
public static Touch GetTouch(int index);
//
// 摘要:
// Determine whether a particular joystick model has been preconfigured by Unity.
// (Linux-only).
//
// 参数:
// joystickName:
// The name of the joystick to check (returned by Input.GetJoystickNames).
//
// 返回结果:
// True if the joystick layout has been preconfigured; false otherwise.
public static bool IsJoystickPreconfigured(string joystickName);
//
// 摘要:
// Resets all input. After ResetInputAxes all axes return to 0 and all buttons return
// to 0 for one frame.
[FreeFunction("ResetInput")]
public static void ResetInputAxes();
}
}
namespace UnityEngine
{
//
// 摘要:
// Access to display information.
public sealed class Screen
{
public Screen();
//
// 摘要:
// Set this property to one of the values in FullScreenMode to change the display
// mode of your application.
public static FullScreenMode fullScreenMode { get; set; }
[EditorBrowsable(EditorBrowsableState.Never)]
[Obsolete("Property GetResolution has been deprecated. Use resolutions instead (UnityUpgradable) -> resolutions", true)]
public static Resolution[] GetResolution { get; }
//
// 摘要:
// The current brightness of the screen.
public static float brightness { get; set; }
//
// 摘要:
// A power saving setting, allowing the screen to dim some time after the last active
// user interaction.
public static int sleepTimeout { get; set; }
//
// 摘要:
// Specifies logical orientation of the screen.
public static ScreenOrientation orientation { get; set; }
//
// 摘要:
// Allow auto-rotation to landscape right?
public static bool autorotateToLandscapeRight { get; set; }
//
// 摘要:
// Allow auto-rotation to landscape left?
public static bool autorotateToLandscapeLeft { get; set; }
//
// 摘要:
// Allow auto-rotation to portrait, upside down?
public static bool autorotateToPortraitUpsideDown { get; set; }
//
// 摘要:
// Allow auto-rotation to portrait?
public static bool autorotateToPortrait { get; set; }
//
// 摘要:
// Returns a list of screen areas that are not functional for displaying content
// (Read Only).
public static Rect[] cutouts { get; }
//
// 摘要:
// Returns the safe area of the screen in pixels (Read Only).
public static Rect safeArea { get; }
//
// 摘要:
// Should the cursor be locked?
[EditorBrowsable(EditorBrowsableState.Never)]
[Obsolete("Use Cursor.lockState and Cursor.visible instead.", false)]
public static bool lockCursor { get; set; }
//
// 摘要:
// Is the game running full-screen?
public static bool fullScreen { get; set; }
//
// 摘要:
// All full-screen resolutions supported by the monitor (Read Only).
public static Resolution[] resolutions { get; }
//
// 摘要:
// The current screen resolution (Read Only).
public static Resolution currentResolution { get; }
//
// 摘要:
// The current DPI of the screen / device (Read Only).
public static float dpi { get; }
//
// 摘要:
// The current height of the screen window in pixels (Read Only).
public static int height { get; }
//
// 摘要:
// The current width of the screen window in pixels (Read Only).
public static int width { get; }
//
// 摘要:
// Should the cursor be visible?
[EditorBrowsable(EditorBrowsableState.Never)]
[Obsolete("Property showCursor has been deprecated. Use Cursor.visible instead (UnityUpgradable) -> UnityEngine.Cursor.visible", true)]
public static bool showCursor { get; set; }
//
// 摘要:
// Switches the screen resolution.
//
// 参数:
// width:
//
// height:
//
// fullscreen:
//
// preferredRefreshRate:
//
// fullscreenMode:
public static void SetResolution(int width, int height, bool fullscreen);
//
// 摘要:
// Switches the screen resolution.
//
// 参数:
// width:
//
// height:
//
// fullscreen:
//
// preferredRefreshRate:
//
// fullscreenMode:
public static void SetResolution(int width, int height, bool fullscreen, [Internal.DefaultValue("0")] int preferredRefreshRate);
public static void SetResolution(int width, int height, FullScreenMode fullscreenMode);
//
// 摘要:
// Switches the screen resolution.
//
// 参数:
// width:
//
// height:
//
// fullscreen:
//
// preferredRefreshRate:
//
// fullscreenMode:
public static void SetResolution(int width, int height, FullScreenMode fullscreenMode, [Internal.DefaultValue("0")] int preferredRefreshRate);
}
}