大家好,我是佛系工程师☆恬静的小魔龙☆,不定时更新Unity开发技巧,觉得有用记得一键三连哦。

一、目录

  • UnityEngine.Object
  • UnityEngine.GameObject
  • UnityEngine.Component
  • UnityEngine.Texture
  • UnityEngine.Mesh
  • UnityEngine.Material
  • UnityEngine.Transform
  • UnityEngine.Renderer
  • UnityEngine.ParticalSystem
  • UnityEngine.Behaviour
  • UnityEngine.Collider
  • UnityEngine.Rigidbody
  • UnityEngine.AudioListener
  • UnityEngine.Camera
  • UnityEngine.Animator
  • UnityEngine.AudioSource
  • UnityEngine.Light
  • UnityEngine.Animation
  • UnityEngine.MonoBehaviour

二、Unity3D核心类型一览

【Unity3D日常开发】Unity3D中核心类型一览(Unity3D的API这一篇就够了)_perl

本文记录了Unity3D的最基本的核心类型。包括Object、GameObject、Component、Transform、Behaviour、Renderer、Collider、Rigidbody、Camera、Light、MonoBehaviour等。

需要展开了public类型方法的类图请点这里(http://www.cnblogs.com/bitzhuwei/gallery/image/152116.html)。

最核心的类型就这几个:Object、GameObject、Component、Behaviour、MonoBehaviour。

【Unity3D日常开发】Unity3D中核心类型一览(Unity3D的API这一篇就够了)_c#_02

需要展开了这几个public类型方法的类图请点这里(http://www.cnblogs.com/bitzhuwei/gallery/image/152118.html)

UnityEngine.Object

所有Unity3D的基类。

持有实例的ID信息。

实现了静态方法:增(Instantiate)删(Destroy)查(FindObjectsOfType)

Any public variable you make that derives from Object gets shown in the inspector as a drop target, allowing you to set the value from the GUI.

namespace UnityEngine
{
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using UnityEngine.Internal;
using UnityEngineInternal;

[StructLayout(LayoutKind.Sequential)]
public class Object
{
private ReferenceData m_UnityRuntimeReferenceData;
private string m_UnityRuntimeErrorString;
public override bool Equals(object o)
{
return CompareBaseObjects(this, o as UnityEngine.Object);
}

public override int GetHashCode()
{
return this.GetInstanceID();
}

private static bool CompareBaseObjects(UnityEngine.Object lhs, UnityEngine.Object rhs)
{
return CompareBaseObjectsInternal(lhs, rhs);
}

[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
private static extern bool CompareBaseObjectsInternal([Writable] UnityEngine.Object lhs, [Writable] UnityEngine.Object rhs);
[NotRenamed]
public int GetInstanceID()
{
return this.m_UnityRuntimeReferenceData.instanceID;
}

[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
private static extern UnityEngine.Object Internal_CloneSingle(UnityEngine.Object data);
private static UnityEngine.Object Internal_InstantiateSingle(UnityEngine.Object data, Vector3 pos, Quaternion rot)
{
return INTERNAL_CALL_Internal_InstantiateSingle(data, ref pos, ref rot);
}

[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
private static extern UnityEngine.Object INTERNAL_CALL_Internal_InstantiateSingle(UnityEngine.Object data, ref Vector3 pos, ref Quaternion rot);
[TypeInferenceRule(TypeInferenceRules.TypeOfFirstArgument)]
public static UnityEngine.Object Instantiate(UnityEngine.Object original, Vector3 position, Quaternion rotation)
{
CheckNullArgument(original, "The prefab you want to instantiate is null.");
return Internal_InstantiateSingle(original, position, rotation);
}

[TypeInferenceRule(TypeInferenceRules.TypeOfFirstArgument)]
public static UnityEngine.Object Instantiate(UnityEngine.Object original)
{
CheckNullArgument(original, "The thing you want to instantiate is null.");
return Internal_CloneSingle(original);
}

private static void CheckNullArgument(object arg, string message)
{
if (arg == null)
{
throw new ArgumentException(message);
}
}

[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
public static extern void Destroy(UnityEngine.Object obj, [DefaultValue("0.0F")] float t);
[ExcludeFromDocs]
public static void Destroy(UnityEngine.Object obj)
{
float t = 0f;
Destroy(obj, t);
}

[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
public static extern void DestroyImmediate(UnityEngine.Object obj, [DefaultValue("false")] bool allowDestroyingAssets);
[ExcludeFromDocs]
public static void DestroyImmediate(UnityEngine.Object obj)
{
bool allowDestroyingAssets = false;
DestroyImmediate(obj, allowDestroyingAssets);
}

[MethodImpl(MethodImplOptions.InternalCall), TypeInferenceRule(TypeInferenceRules.ArrayOfTypeReferencedByFirstArgument), WrapperlessIcall]
public static extern UnityEngine.Object[] FindObjectsOfType(System.Type type);
public static T[] FindObjectsOfType<T>() where T: UnityEngine.Object
{
return Resources.ConvertObjects<T>(FindObjectsOfType(typeof(T)));
}

[TypeInferenceRule(TypeInferenceRules.TypeReferencedByFirstArgument)]
public static UnityEngine.Object FindObjectOfType(System.Type type)
{
UnityEngine.Object[] objArray = FindObjectsOfType(type);
if (objArray.Length > 0)
{
return objArray[0];
}
return null;
}

public static T FindObjectOfType<T>() where T: UnityEngine.Object
{
return (T) FindObjectOfType(typeof(T));
}

public string name { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] set; }
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
public static extern void DontDestroyOnLoad(UnityEngine.Object target);
public HideFlags hideFlags { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] set; }
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
public static extern void DestroyObject(UnityEngine.Object obj, [DefaultValue("0.0F")] float t);
[ExcludeFromDocs]
public static void DestroyObject(UnityEngine.Object obj)
{
float t = 0f;
DestroyObject(obj, t);
}

[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall, Obsolete("use Object.FindObjectsOfType instead.")]
public static extern UnityEngine.Object[] FindSceneObjectsOfType(System.Type type);
[MethodImpl(MethodImplOptions.InternalCall), Obsolete("use Resources.FindObjectsOfTypeAll instead."), WrapperlessIcall]
public static extern UnityEngine.Object[] FindObjectsOfTypeIncludingAssets(System.Type type);
[Obsolete("Please use Resources.FindObjectsOfTypeAll instead")]
public static UnityEngine.Object[] FindObjectsOfTypeAll(System.Type type)
{
return Resources.FindObjectsOfTypeAll(type);
}

[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
public override extern string ToString();
public static implicit operator bool(UnityEngine.Object exists)
{
return !CompareBaseObjects(exists, null);
}

public static bool operator ==(UnityEngine.Object x, UnityEngine.Object y)
{
return CompareBaseObjects(x, y);
}

public static bool operator !=(UnityEngine.Object x, UnityEngine.Object y)
{
return !CompareBaseObjects(x, y);
}
}
}

UnityEngine.GameObject

///

/// game object contains components.

/// Add Component

/// Find Component

/// common components

/// BroadcastMessage在这个游戏物体及其子物体的所有MonoBehaviour中调用名称为methodName的方法.

///

GameObject.active is obsolete. Use GameObject.SetActive() , GameObject.activeSelf(read only) or GameObject.activeInHierarchy(read only) .

gameObject.SetActiveRecursively() is obsolete. Use GameObject.SetActive(), which is now inherited by children.

namespace UnityEngine
{
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using UnityEngine.Internal;
using UnityEngineInternal;

public sealed class GameObject : UnityEngine.Object
{
public GameObject()
{
Internal_CreateGameObject(this, null);
}

public GameObject(string name)
{
Internal_CreateGameObject(this, name);
}

public GameObject(string name, params System.Type[] components)
{
Internal_CreateGameObject(this, name);
foreach (System.Type type in components)
{
this.AddComponent(type);
}
}

public T AddComponent<T>() where T: Component
{
return (this.AddComponent(typeof(T)) as T);
}

[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
public extern Component AddComponent(string className);
[TypeInferenceRule(TypeInferenceRules.TypeReferencedByFirstArgument)]
public Component AddComponent(System.Type componentType)
{
return this.Internal_AddComponentWithType(componentType);
}

[ExcludeFromDocs]
public void BroadcastMessage(string methodName)
{
SendMessageOptions requireReceiver = SendMessageOptions.RequireReceiver;
object parameter = null;
this.BroadcastMessage(methodName, parameter, requireReceiver);
}

[ExcludeFromDocs]
public void BroadcastMessage(string methodName, object parameter)
{
SendMessageOptions requireReceiver = SendMessageOptions.RequireReceiver;
this.BroadcastMessage(methodName, parameter, requireReceiver);
}

public void BroadcastMessage(string methodName, SendMessageOptions options)
{
this.BroadcastMessage(methodName, null, options);
}

[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
public extern void BroadcastMessage(string methodName, [DefaultValue("null")] object parameter, [DefaultValue("SendMessageOptions.RequireReceiver")] SendMessageOptions options);
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
public extern bool CompareTag(string tag);
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
public static extern GameObject CreatePrimitive(PrimitiveType type);
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
public static extern GameObject Find(string name);
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
public static extern GameObject[] FindGameObjectsWithTag(string tag);
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
public static extern GameObject FindGameObjectWithTag(string tag);
public static GameObject FindWithTag(string tag)
{
return FindGameObjectWithTag(tag);
}

public T GetComponent<T>() where T: Component
{
return (this.GetComponent(typeof(T)) as T);
}

public Component GetComponent(string type)
{
return this.GetComponentByName(type);
}

[MethodImpl(MethodImplOptions.InternalCall), TypeInferenceRule(TypeInferenceRules.TypeReferencedByFirstArgument), WrapperlessIcall]
public extern Component GetComponent(System.Type type);
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
private extern Component GetComponentByName(string type);
public T GetComponentInChildren<T>() where T: Component
{
return (this.GetComponentInChildren(typeof(T)) as T);
}

[TypeInferenceRule(TypeInferenceRules.TypeReferencedByFirstArgument)]
public Component GetComponentInChildren(System.Type type)
{
if (this.activeInHierarchy)
{
Component component = this.GetComponent(type);
if (component != null)
{
return component;
}
}
Transform transform = this.transform;
if (transform != null)
{
IEnumerator enumerator = transform.GetEnumerator();
try
{
while (enumerator.MoveNext())
{
Transform current = (Transform) enumerator.Current;
Component componentInChildren = current.gameObject.GetComponentInChildren(type);
if (componentInChildren != null)
{
return componentInChildren;
}
}
}
finally
{
IDisposable disposable = enumerator as IDisposable;
if (disposable == null)
{
}
disposable.Dispose();
}
}
return null;
}

public T GetComponentInParent<T>() where T: Component
{
return (this.GetComponentInParent(typeof(T)) as T);
}

[TypeInferenceRule(TypeInferenceRules.TypeReferencedByFirstArgument)]
public Component GetComponentInParent(System.Type type)
{
if (this.activeInHierarchy)
{
Component component = this.GetComponent(type);
if (component != null)
{
return component;
}
}
Transform parent = this.transform.parent;
if (parent != null)
{
while (parent != null)
{
if (parent.gameObject.activeInHierarchy)
{
Component component2 = parent.gameObject.GetComponent(type);
if (component2 != null)
{
return component2;
}
}
parent = parent.parent;
}
}
return null;
}

public T[] GetComponents<T>() where T: Component
{
return (T[]) this.GetComponentsInternal(typeof(T), true, false, true, false);
}

public void GetComponents<T>(List<T> results) where T: Component
{
this.GetComponentsForListInternal(typeof(T), typeof(T), false, true, false, results);
}

[CanConvertToFlash]
public Component[] GetComponents(System.Type type)
{
return this.GetComponentsInternal(type, false, false, true, false);
}

public void GetComponents(System.Type type, List<Component> results)
{
this.GetComponentsForListInternal(type, typeof(Component), false, true, false, results);
}

[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
private extern void GetComponentsForListInternal(System.Type searchType, System.Type listElementType, bool recursive, bool includeInactive, bool reverse, object resultList);
public T[] GetComponentsInChildren<T>() where T: Component
{
return this.GetComponentsInChildren<T>(false);
}

public T[] GetComponentsInChildren<T>(bool includeInactive) where T: Component
{
return (T[]) this.GetComponentsInternal(typeof(T), true, true, includeInactive, false);
}

[ExcludeFromDocs]
public Component[] GetComponentsInChildren(System.Type type)
{
bool includeInactive = false;
return this.GetComponentsInChildren(type, includeInactive);
}

public void GetComponentsInChildren<T>(List<T> results) where T: Component
{
this.GetComponentsInChildren<T>(false, results);
}

public void GetComponentsInChildren<T>(bool includeInactive, List<T> results) where T: Component
{
this.GetComponentsForListInternal(typeof(T), typeof(T), true, includeInactive, false, results);
}

public Component[] GetComponentsInChildren(System.Type type, [DefaultValue("false")] bool includeInactive)
{
return this.GetComponentsInternal(type, false, true, includeInactive, false);
}

public T[] GetComponentsInParent<T>() where T: Component
{
return this.GetComponentsInParent<T>(false);
}

public T[] GetComponentsInParent<T>(bool includeInactive) where T: Component
{
return (T[]) this.GetComponentsInternal(typeof(T), true, true, includeInactive, true);
}

[ExcludeFromDocs]
public Component[] GetComponentsInParent(System.Type type)
{
bool includeInactive = false;
return this.GetComponentsInParent(type, includeInactive);
}

public void GetComponentsInParent<T>(bool includeInactive, List<T> results) where T: Component
{
this.GetComponentsForListInternal(typeof(T), typeof(T), true, includeInactive, true, results);
}

public Component[] GetComponentsInParent(System.Type type, [DefaultValue("false")] bool includeInactive)
{
return this.GetComponentsInternal(type, false, true, includeInactive, true);
}

[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
private extern Component[] GetComponentsInternal(System.Type type, bool isGenericTypeArray, bool recursive, bool includeInactive, bool reverse);
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
private extern Component Internal_AddComponentWithType(System.Type componentType);
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
private static extern void Internal_CreateGameObject([Writable] GameObject mono, string name);
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall, Obsolete("gameObject.PlayAnimation is not supported anymore. Use animation.Play")]
public extern void PlayAnimation(AnimationClip animation);
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
public extern void SampleAnimation(AnimationClip animation, float time);
[ExcludeFromDocs]
public void SendMessage(string methodName)
{
SendMessageOptions requireReceiver = SendMessageOptions.RequireReceiver;
object obj2 = null;
this.SendMessage(methodName, obj2, requireReceiver);
}

[ExcludeFromDocs]
public void SendMessage(string methodName, object value)
{
SendMessageOptions requireReceiver = SendMessageOptions.RequireReceiver;
this.SendMessage(methodName, value, requireReceiver);
}

public void SendMessage(string methodName, SendMessageOptions options)
{
this.SendMessage(methodName, null, options);
}

[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
public extern void SendMessage(string methodName, [DefaultValue("null")] object value, [DefaultValue("SendMessageOptions.RequireReceiver")] SendMessageOptions options);
[ExcludeFromDocs]
public void SendMessageUpwards(string methodName)
{
SendMessageOptions requireReceiver = SendMessageOptions.RequireReceiver;
object obj2 = null;
this.SendMessageUpwards(methodName, obj2, requireReceiver);
}

[ExcludeFromDocs]
public void SendMessageUpwards(string methodName, object value)
{
SendMessageOptions requireReceiver = SendMessageOptions.RequireReceiver;
this.SendMessageUpwards(methodName, value, requireReceiver);
}

public void SendMessageUpwards(string methodName, SendMessageOptions options)
{
this.SendMessageUpwards(methodName, null, options);
}

[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
public extern void SendMessageUpwards(string methodName, [DefaultValue("null")] object value, [DefaultValue("SendMessageOptions.RequireReceiver")] SendMessageOptions options);
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
public extern void SetActive(bool value);
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall, Obsolete("gameObject.SetActiveRecursively() is obsolete. Use GameObject.SetActive(), which is now inherited by children.")]
public extern void SetActiveRecursively(bool state);
[MethodImpl(MethodImplOptions.InternalCall), Obsolete("gameObject.StopAnimation is not supported anymore. Use animation.Stop"), WrapperlessIcall]
public extern void StopAnimation();

[Obsolete("GameObject.active is obsolete. Use GameObject.SetActive(), GameObject.activeSelf or GameObject.activeInHierarchy.")]
public bool active { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] set; }

public bool activeInHierarchy { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; }

public bool activeSelf { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; }

public Animation animation { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; }

public AudioSource audio { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; }

public Camera camera { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; }

public Collider collider { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; }

public Collider2D collider2D { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; }

public ConstantForce constantForce { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; }

public GameObject gameObject
{
get
{
return this;
}
}

[Obsolete("Please use guiTexture instead")]
public GUIElement guiElement { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; }

public GUIText guiText { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; }

public GUITexture guiTexture { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; }

public HingeJoint hingeJoint { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; }

public bool isStatic { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] set; }

internal bool isStaticBatchable { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; }

public int layer { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] set; }

public Light light { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; }

public NetworkView networkView { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; }

public ParticleEmitter particleEmitter { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; }

public ParticleSystem particleSystem { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; }

public Renderer renderer { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; }

public Rigidbody rigidbody { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; }

public Rigidbody2D rigidbody2D { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; }

public string tag { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] set; }

public Transform transform { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; }
}
}

UnityEngine.Component

所有的Component,都会指向其所属的GameObject。

在脚本中用 this.renderer , this.transform , this.GetComponent(XXX) , this.gameObject 与 this.gameObject.renderer , this.gameObject.transform , this.gameObject.GetComponent(XXX) , this.gameObject.gameObject 的结果是完全一样的。这意味着,你用 this.renderer.transform.renderer.collider 这种写法,仍然可以得到 this.collider 。(在这些组件不是 null 的前提下)

the active property is deprecated on components. Please use gameObject.active instead. If you meant to enable / disable a single component use enabled instead.

GameObject.active is obsolete. Use GameObject.SetActive(), GameObject.activeSelf(read only) or GameObject.activeInHierarchy(read only) .

namespace UnityEngine
{
using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using UnityEngine.Internal;
using UnityEngineInternal;

public class Component : UnityEngine.Object
{
[ExcludeFromDocs]
public void BroadcastMessage(string methodName)
{
SendMessageOptions requireReceiver = SendMessageOptions.RequireReceiver;
object parameter = null;
this.BroadcastMessage(methodName, parameter, requireReceiver);
}

[ExcludeFromDocs]
public void BroadcastMessage(string methodName, object parameter)
{
SendMessageOptions requireReceiver = SendMessageOptions.RequireReceiver;
this.BroadcastMessage(methodName, parameter, requireReceiver);
}

public void BroadcastMessage(string methodName, SendMessageOptions options)
{
this.BroadcastMessage(methodName, null, options);
}

[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
public extern void BroadcastMessage(string methodName, [DefaultValue("null")] object parameter, [DefaultValue("SendMessageOptions.RequireReceiver")] SendMessageOptions options);
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
public extern bool CompareTag(string tag);
public T GetComponent<T>() where T: Component
{
return (this.GetComponent(typeof(T)) as T);
}

public Component GetComponent(string type)
{
return this.gameObject.GetComponent(type);
}

[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall, TypeInferenceRule(TypeInferenceRules.TypeReferencedByFirstArgument)]
public extern Component GetComponent(System.Type type);
public T GetComponentInChildren<T>() where T: Component
{
return (T) this.GetComponentInChildren(typeof(T));
}

[TypeInferenceRule(TypeInferenceRules.TypeReferencedByFirstArgument)]
public Component GetComponentInChildren(System.Type t)
{
return this.gameObject.GetComponentInChildren(t);
}

public T GetComponentInParent<T>() where T: Component
{
return (T) this.GetComponentInParent(typeof(T));
}

[TypeInferenceRule(TypeInferenceRules.TypeReferencedByFirstArgument)]
public Component GetComponentInParent(System.Type t)
{
return this.gameObject.GetComponentInParent(t);
}

public T[] GetComponents<T>() where T: Component
{
return (T[]) this.GetComponentsWithCorrectReturnType(typeof(T));
}

[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
public extern Component[] GetComponents(System.Type type);
public void GetComponents<T>(List<T> results) where T: Component
{
this.GetComponentsForListInternal(typeof(T), typeof(T), false, true, results);
}

public void GetComponents(System.Type type, List<Component> results)
{
this.GetComponentsForListInternal(type, typeof(Component), false, true, results);
}

[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
private extern void GetComponentsForListInternal(System.Type searchType, System.Type listElementType, bool recursive, bool includeInactive, object resultList);
public T[] GetComponentsInChildren<T>() where T: Component
{
return this.GetComponentsInChildren<T>(false);
}

public T[] GetComponentsInChildren<T>(bool includeInactive) where T: Component
{
return this.gameObject.GetComponentsInChildren<T>(includeInactive);
}

public void GetComponentsInChildren<T>(List<T> results) where T: Component
{
this.GetComponentsInChildren<T>(false, results);
}

[ExcludeFromDocs]
public Component[] GetComponentsInChildren(System.Type t)
{
bool includeInactive = false;
return this.GetComponentsInChildren(t, includeInactive);
}

public void GetComponentsInChildren<T>(bool includeInactive, List<T> result) where T: Component
{
this.gameObject.GetComponentsInChildren<T>(includeInactive, result);
}

public Component[] GetComponentsInChildren(System.Type t, [DefaultValue("false")] bool includeInactive)
{
return this.gameObject.GetComponentsInChildren(t, includeInactive);
}

public T[] GetComponentsInParent<T>() where T: Component
{
return this.GetComponentsInParent<T>(false);
}

public T[] GetComponentsInParent<T>(bool includeInactive) where T: Component
{
return this.gameObject.GetComponentsInParent<T>(includeInactive);
}

[ExcludeFromDocs]
public Component[] GetComponentsInParent(System.Type t)
{
bool includeInactive = false;
return this.GetComponentsInParent(t, includeInactive);
}

public Component[] GetComponentsInParent(System.Type t, [DefaultValue("false")] bool includeInactive)
{
return this.gameObject.GetComponentsInParent(t, includeInactive);
}

[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
private extern Component[] GetComponentsWithCorrectReturnType(System.Type type);
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
internal extern GameObject InternalGetGameObject();
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
internal extern Transform InternalGetTransform();
[ExcludeFromDocs]
public void SendMessage(string methodName)
{
SendMessageOptions requireReceiver = SendMessageOptions.RequireReceiver;
object obj2 = null;
this.SendMessage(methodName, obj2, requireReceiver);
}

[ExcludeFromDocs]
public void SendMessage(string methodName, object value)
{
SendMessageOptions requireReceiver = SendMessageOptions.RequireReceiver;
this.SendMessage(methodName, value, requireReceiver);
}

public void SendMessage(string methodName, SendMessageOptions options)
{
this.SendMessage(methodName, null, options);
}

[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
public extern void SendMessage(string methodName, [DefaultValue("null")] object value, [DefaultValue("SendMessageOptions.RequireReceiver")] SendMessageOptions options);
[ExcludeFromDocs]
public void SendMessageUpwards(string methodName)
{
SendMessageOptions requireReceiver = SendMessageOptions.RequireReceiver;
object obj2 = null;
this.SendMessageUpwards(methodName, obj2, requireReceiver);
}

[ExcludeFromDocs]
public void SendMessageUpwards(string methodName, object value)
{
SendMessageOptions requireReceiver = SendMessageOptions.RequireReceiver;
this.SendMessageUpwards(methodName, value, requireReceiver);
}

public void SendMessageUpwards(string methodName, SendMessageOptions options)
{
this.SendMessageUpwards(methodName, null, options);
}

[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
public extern void SendMessageUpwards(string methodName, [DefaultValue("null")] object value, [DefaultValue("SendMessageOptions.RequireReceiver")] SendMessageOptions options);

[Obsolete("the active property is deprecated on components. Please use gameObject.active instead. If you meant to enable / disable a single component use enabled instead.")]
public bool active { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] set; }

public Animation animation { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; }

public AudioSource audio { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; }

public Camera camera { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; }

public Collider collider { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; }

public Collider2D collider2D { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; }

public ConstantForce constantForce { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; }

public GameObject gameObject
{
get
{
return this.InternalGetGameObject();
}
}

[Obsolete("Please use guiTexture instead")]
public GUIElement guiElement { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; }

public GUIText guiText { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; }

public GUITexture guiTexture { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; }

public HingeJoint hingeJoint { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; }

public Light light { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; }

public NetworkView networkView { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; }

public ParticleEmitter particleEmitter { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; }

public ParticleSystem particleSystem { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; }

public Renderer renderer { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; }

public Rigidbody rigidbody { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; }

public Rigidbody2D rigidbody2D { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; }

public string tag { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] set; }

public Transform transform
{
get
{
return this.InternalGetTransform();
}
}
}
}
//this.gameObject.active = false;//GameObject.active is obselete
this.gameObject.SetActive(false);// ! use this to write
this.gameObject.activeSelf = false;//readonly
this.gameObject.activeInHierarchy = false;//readonly

//this.active = false;//Component.active is obsolete
this.transform.active = false;//cannot disable singly
this.particleSystem.active = false;//cannot disable singly
this.rigidbody.active = false;//cannot disable singly

this.GetComponent<TestEqual>().enabled = false;//work on single behaviour
this.renderer.enabled = false;//work on single renderer
this.collider.enabled = false;//work on single collider

UnityEngine.Texture

namespace UnityEngine
{
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

public class Texture : UnityEngine.Object
{
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
public extern int GetNativeTextureID();
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
public extern IntPtr GetNativeTexturePtr();
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
private static extern int Internal_GetHeight(Texture mono);
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
private static extern void Internal_GetTexelSize(Texture tex, out Vector2 output);
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
private static extern int Internal_GetWidth(Texture mono);
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
public static extern void SetGlobalAnisotropicFilteringLimits(int forcedMin, int globalMax);

public int anisoLevel { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] set; }

public static AnisotropicFiltering anisotropicFiltering { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] set; }

public FilterMode filterMode { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] set; }

public virtual int height
{
get
{
return Internal_GetHeight(this);
}
set
{
throw new Exception("not implemented");
}
}

public static int masterTextureLimit { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] set; }

public float mipMapBias { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] set; }

public Vector2 texelSize
{
get
{
Vector2 vector;
Internal_GetTexelSize(this, out vector);
return vector;
}
}

public virtual int width
{
get
{
return Internal_GetWidth(this);
}
set
{
throw new Exception("not implemented");
}
}

public TextureWrapMode wrapMode { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] set; }
}
}

UnityEngine.Mesh

namespace UnityEngine
{
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using UnityEngine.Internal;

public sealed class Mesh : UnityEngine.Object
{
public Mesh()
{
Internal_Create(this);
}

[ExcludeFromDocs]
public void Clear()
{
bool keepVertexLayout = true;
this.Clear(keepVertexLayout);
}

[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
public extern void Clear([DefaultValue("true")] bool keepVertexLayout);
[ExcludeFromDocs]
public void CombineMeshes(CombineInstance[] combine)
{
bool useMatrices = true;
bool mergeSubMeshes = true;
this.CombineMeshes(combine, mergeSubMeshes, useMatrices);
}

[ExcludeFromDocs]
public void CombineMeshes(CombineInstance[] combine, bool mergeSubMeshes)
{
bool useMatrices = true;
this.CombineMeshes(combine, mergeSubMeshes, useMatrices);
}

[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
public extern void CombineMeshes(CombineInstance[] combine, [DefaultValue("true")] bool mergeSubMeshes, [DefaultValue("true")] bool useMatrices);
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
public extern int GetBlendShapeIndex(string blendShapeName);
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
public extern string GetBlendShapeName(int index);
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
public extern int[] GetIndices(int submesh);
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
public extern MeshTopology GetTopology(int submesh);
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
public extern int[] GetTriangles(int submesh);
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall, Obsolete("Use GetTriangles instead. Internally this function converts a list of triangles to a strip, so it might be slow, it might be a mess.")]
public extern int[] GetTriangleStrip(int submesh);
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
private static extern void Internal_Create([Writable] Mesh mono);
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
private extern void INTERNAL_get_bounds(out Bounds value);
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
private extern void INTERNAL_set_bounds(ref Bounds value);
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
public extern void MarkDynamic();
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
public extern void Optimize();
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
public extern void RecalculateBounds();
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
public extern void RecalculateNormals();
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
public extern void SetIndices(int[] indices, MeshTopology topology, int submesh);
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
public extern void SetTriangles(int[] triangles, int submesh);
[MethodImpl(MethodImplOptions.InternalCall), Obsolete("Use SetTriangles instead. Internally this function will convert the triangle strip to a list of triangles anyway."), WrapperlessIcall]
public extern void SetTriangleStrip(int[] triangles, int submesh);
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
public extern void UploadMeshData(bool markNoLogerReadable);

public Matrix4x4[] bindposes { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] set; }

public int blendShapeCount { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; }

public BoneWeight[] boneWeights { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] set; }

public Bounds bounds
{
get
{
Bounds bounds;
this.INTERNAL_get_bounds(out bounds);
return bounds;
}
set
{
this.INTERNAL_set_bounds(ref value);
}
}

internal bool canAccess { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; }

public Color[] colors { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] set; }

public Color32[] colors32 { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] set; }

public bool isReadable { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; }

public Vector3[] normals { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] set; }

public int subMeshCount { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] set; }

public Vector4[] tangents { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] set; }

public int[] triangles { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] set; }

public Vector2[] uv { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] set; }

public Vector2[] uv1
{
get
{
return this.uv2;
}
set
{
this.uv2 = value;
}
}

public Vector2[] uv2 { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] set; }

public int vertexCount { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; }

public Vector3[] vertices { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] set; }
}
}

UnityEngine.Material

namespace UnityEngine
{
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using UnityEngine.Internal;

public class Material : UnityEngine.Object
{
public Material(string contents)
{
Internal_CreateWithString(this, contents);
}

public Material(Material source)
{
Internal_CreateWithMaterial(this, source);
}

public Material(Shader shader)
{
Internal_CreateWithShader(this, shader);
}

[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
public extern void CopyPropertiesFromMaterial(Material mat);
[Obsolete("Use the Material constructor instead.")]
public static Material Create(string scriptContents)
{
return new Material(scriptContents);
}

[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
public extern void DisableKeyword(string keyword);
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
public extern void EnableKeyword(string keyword);
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
public extern Color GetColor(int nameID);
public Color GetColor(string propertyName)
{
return this.GetColor(Shader.PropertyToID(propertyName));
}

[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
public extern float GetFloat(int nameID);
public float GetFloat(string propertyName)
{
return this.GetFloat(Shader.PropertyToID(propertyName));
}

public int GetInt(int nameID)
{
return (int) this.GetFloat(nameID);
}

public int GetInt(string propertyName)
{
return (int) this.GetFloat(propertyName);
}

[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
public extern Matrix4x4 GetMatrix(int nameID);
public Matrix4x4 GetMatrix(string propertyName)
{
return this.GetMatrix(Shader.PropertyToID(propertyName));
}

[ExcludeFromDocs]
public string GetTag(string tag, bool searchFallbacks)
{
string defaultValue = string.Empty;
return this.GetTag(tag, searchFallbacks, defaultValue);
}

[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
public extern string GetTag(string tag, bool searchFallbacks, [DefaultValue("\"\"")] string defaultValue);
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
public extern Texture GetTexture(int nameID);
public Texture GetTexture(string propertyName)
{
return this.GetTexture(Shader.PropertyToID(propertyName));
}

public Vector2 GetTextureOffset(string propertyName)
{
Vector2 vector;
Internal_GetTextureOffset(this, propertyName, out vector);
return vector;
}

public Vector2 GetTextureScale(string propertyName)
{
Vector2 vector;
Internal_GetTextureScale(this, propertyName, out vector);
return vector;
}

public Vector4 GetVector(int nameID)
{
Color color = this.GetColor(nameID);
return new Vector4(color.r, color.g, color.b, color.a);
}

public Vector4 GetVector(string propertyName)
{
Color color = this.GetColor(propertyName);
return new Vector4(color.r, color.g, color.b, color.a);
}

[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
public extern bool HasProperty(int nameID);
public bool HasProperty(string propertyName)
{
return this.HasProperty(Shader.PropertyToID(propertyName));
}

[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
private static extern void INTERNAL_CALL_SetColor(Material self, int nameID, ref Color color);
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
private static extern void INTERNAL_CALL_SetMatrix(Material self, int nameID, ref Matrix4x4 matrix);
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
private static extern void INTERNAL_CALL_SetTextureOffset(Material self, string propertyName, ref Vector2 offset);
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
private static extern void INTERNAL_CALL_SetTextureScale(Material self, string propertyName, ref Vector2 scale);
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
private static extern void Internal_CreateWithMaterial([Writable] Material mono, Material source);
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
private static extern void Internal_CreateWithShader([Writable] Material mono, Shader shader);
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
private static extern void Internal_CreateWithString([Writable] Material mono, string contents);
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
private static extern void Internal_GetTextureOffset(Material mat, string name, out Vector2 output);
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
private static extern void Internal_GetTextureScale(Material mat, string name, out Vector2 output);
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
public extern void Lerp(Material start, Material end, float t);
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
public extern void SetBuffer(string propertyName, ComputeBuffer buffer);
public void SetColor(int nameID, Color color)
{
INTERNAL_CALL_SetColor(this, nameID, ref color);
}

public void SetColor(string propertyName, Color color)
{
this.SetColor(Shader.PropertyToID(propertyName), color);
}

[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
public extern void SetFloat(int nameID, float value);
public void SetFloat(string propertyName, float value)
{
this.SetFloat(Shader.PropertyToID(propertyName), value);
}

public void SetInt(int nameID, int value)
{
this.SetFloat(nameID, (float) value);
}

public void SetInt(string propertyName, int value)
{
this.SetFloat(propertyName, (float) value);
}

public void SetMatrix(int nameID, Matrix4x4 matrix)
{
INTERNAL_CALL_SetMatrix(this, nameID, ref matrix);
}

public void SetMatrix(string propertyName, Matrix4x4 matrix)
{
this.SetMatrix(Shader.PropertyToID(propertyName), matrix);
}

[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
public extern bool SetPass(int pass);
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
public extern void SetTexture(int nameID, Texture texture);
public void SetTexture(string propertyName, Texture texture)
{
this.SetTexture(Shader.PropertyToID(propertyName), texture);
}

public void SetTextureOffset(string propertyName, Vector2 offset)
{
INTERNAL_CALL_SetTextureOffset(this, propertyName, ref offset);
}

public void SetTextureScale(string propertyName, Vector2 scale)
{
INTERNAL_CALL_SetTextureScale(this, propertyName, ref scale);
}

public void SetVector(int nameID, Vector4 vector)
{
this.SetColor(nameID, new Color(vector.x, vector.y, vector.z, vector.w));
}

public void SetVector(string propertyName, Vector4 vector)
{
this.SetColor(propertyName, new Color(vector.x, vector.y, vector.z, vector.w));
}

public Color color
{
get
{
return this.GetColor("_Color");
}
set
{
this.SetColor("_Color", value);
}
}

public Texture mainTexture
{
get
{
return this.GetTexture("_MainTex");
}
set
{
this.SetTexture("_MainTex", value);
}
}

public Vector2 mainTextureOffset
{
get
{
return this.GetTextureOffset("_MainTex");
}
set
{
this.SetTextureOffset("_MainTex", value);
}
}

public Vector2 mainTextureScale
{
get
{
return this.GetTextureScale("_MainTex");
}
set
{
this.SetTextureScale("_MainTex", value);
}
}

public int passCount { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; }

public int renderQueue { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] set; }

public Shader shader { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] set; }

public string[] shaderKeywords { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] set; }
}
}

UnityEngine.Transform

namespace UnityEngine
{
using System;
using System.Collections;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using UnityEngine.Internal;

public class Transform : Component, IEnumerable
{
protected Transform()
{
}

[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
public extern void DetachChildren();
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
public extern Transform Find(string name);
public Transform FindChild(string name)
{
return this.Find(name);
}

[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
public extern Transform GetChild(int index);
[MethodImpl(MethodImplOptions.InternalCall), Obsolete("use Transform.childCount instead."), WrapperlessIcall]
public extern int GetChildCount();
public IEnumerator GetEnumerator()
{
return new Enumerator(this);
}

[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
public extern int GetSiblingIndex();
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
private static extern Vector3 INTERNAL_CALL_InverseTransformDirection(Transform self, ref Vector3 direction);
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
private static extern Vector3 INTERNAL_CALL_InverseTransformPoint(Transform self, ref Vector3 position);
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
private static extern Vector3 INTERNAL_CALL_InverseTransformVector(Transform self, ref Vector3 vector);
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
private static extern void INTERNAL_CALL_LookAt(Transform self, ref Vector3 worldPosition, ref Vector3 worldUp);
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
private static extern void INTERNAL_CALL_RotateAround(Transform self, ref Vector3 axis, float angle);
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
private static extern void INTERNAL_CALL_RotateAroundInternal(Transform self, ref Vector3 axis, float angle);
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
private static extern void INTERNAL_CALL_RotateAroundLocal(Transform self, ref Vector3 axis, float angle);
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
private static extern Vector3 INTERNAL_CALL_TransformDirection(Transform self, ref Vector3 direction);
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
private static extern Vector3 INTERNAL_CALL_TransformPoint(Transform self, ref Vector3 position);
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
private static extern Vector3 INTERNAL_CALL_TransformVector(Transform self, ref Vector3 vector);
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
private extern void INTERNAL_get_localEulerAngles(out Vector3 value);
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
private extern void INTERNAL_get_localPosition(out Vector3 value);
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
private extern void INTERNAL_get_localRotation(out Quaternion value);
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
private extern void INTERNAL_get_localScale(out Vector3 value);
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
private extern void INTERNAL_get_localToWorldMatrix(out Matrix4x4 value);
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
private extern void INTERNAL_get_lossyScale(out Vector3 value);
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
private extern void INTERNAL_get_position(out Vector3 value);
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
private extern void INTERNAL_get_rotation(out Quaternion value);
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
private extern void INTERNAL_get_worldToLocalMatrix(out Matrix4x4 value);
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
private extern void INTERNAL_set_localEulerAngles(ref Vector3 value);
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
private extern void INTERNAL_set_localPosition(ref Vector3 value);
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
private extern void INTERNAL_set_localRotation(ref Quaternion value);
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
private extern void INTERNAL_set_localScale(ref Vector3 value);
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
private extern void INTERNAL_set_position(ref Vector3 value);
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
private extern void INTERNAL_set_rotation(ref Quaternion value);
public Vector3 InverseTransformDirection(Vector3 direction)
{
return INTERNAL_CALL_InverseTransformDirection(this, ref direction);
}

public Vector3 InverseTransformDirection(float x, float y, float z)
{
return this.InverseTransformDirection(new Vector3(x, y, z));
}

public Vector3 InverseTransformPoint(Vector3 position)
{
return INTERNAL_CALL_InverseTransformPoint(this, ref position);
}

public Vector3 InverseTransformPoint(float x, float y, float z)
{
return this.InverseTransformPoint(new Vector3(x, y, z));
}

public Vector3 InverseTransformVector(Vector3 vector)
{
return INTERNAL_CALL_InverseTransformVector(this, ref vector);
}

public Vector3 InverseTransformVector(float x, float y, float z)
{
return this.InverseTransformVector(new Vector3(x, y, z));
}

[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
public extern bool IsChildOf(Transform parent);
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
internal extern bool IsNonUniformScaleTransform();
[ExcludeFromDocs]
public void LookAt(Transform target)
{
Vector3 up = Vector3.up;
this.LookAt(target, up);
}

[ExcludeFromDocs]
public void LookAt(Vector3 worldPosition)
{
Vector3 up = Vector3.up;
INTERNAL_CALL_LookAt(this, ref worldPosition, ref up);
}

public void LookAt(Transform target, [DefaultValue("Vector3.up")] Vector3 worldUp)
{
if (target != null)
{
this.LookAt(target.position, worldUp);
}
}

public void LookAt(Vector3 worldPosition, [DefaultValue("Vector3.up")] Vector3 worldUp)
{
INTERNAL_CALL_LookAt(this, ref worldPosition, ref worldUp);
}

[ExcludeFromDocs]
public void Rotate(Vector3 eulerAngles)
{
Space self = Space.Self;
this.Rotate(eulerAngles, self);
}

[ExcludeFromDocs]
public void Rotate(Vector3 axis, float angle)
{
Space self = Space.Self;
this.Rotate(axis, angle, self);
}

public void Rotate(Vector3 eulerAngles, [DefaultValue("Space.Self")] Space relativeTo)
{
Quaternion quaternion = Quaternion.Euler(eulerAngles.x, eulerAngles.y, eulerAngles.z);
if (relativeTo == Space.Self)
{
this.localRotation *= quaternion;
}
else
{
this.rotation *= (Quaternion.Inverse(this.rotation) * quaternion) * this.rotation;
}
}

[ExcludeFromDocs]
public void Rotate(float xAngle, float yAngle, float zAngle)
{
Space self = Space.Self;
this.Rotate(xAngle, yAngle, zAngle, self);
}

public void Rotate(Vector3 axis, float angle, [DefaultValue("Space.Self")] Space relativeTo)
{
if (relativeTo == Space.Self)
{
this.RotateAroundInternal(base.transform.TransformDirection(axis), angle * 0.01745329f);
}
else
{
this.RotateAroundInternal(axis, angle * 0.01745329f);
}
}

public void Rotate(float xAngle, float yAngle, float zAngle, [DefaultValue("Space.Self")] Space relativeTo)
{
this.Rotate(new Vector3(xAngle, yAngle, zAngle), relativeTo);
}

[Obsolete("use Transform.Rotate instead.")]
public void RotateAround(Vector3 axis, float angle)
{
INTERNAL_CALL_RotateAround(this, ref axis, angle);
}

public void RotateAround(Vector3 point, Vector3 axis, float angle)
{
Vector3 position = this.position;
Quaternion quaternion = Quaternion.AngleAxis(angle, axis);
Vector3 vector2 = position - point;
vector2 = (Vector3) (quaternion * vector2);
position = point + vector2;
this.position = position;
this.RotateAroundInternal(axis, angle * 0.01745329f);
}

internal void RotateAroundInternal(Vector3 axis, float angle)
{
INTERNAL_CALL_RotateAroundInternal(this, ref axis, angle);
}

[Obsolete("use Transform.Rotate instead.")]
public void RotateAroundLocal(Vector3 axis, float angle)
{
INTERNAL_CALL_RotateAroundLocal(this, ref axis, angle);
}

[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
internal extern void SendTransformChangedScale();
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
public extern void SetAsFirstSibling();
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
public extern void SetAsLastSibling();
public void SetParent(Transform parent)
{
this.SetParent(parent, true);
}

[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
public extern void SetParent(Transform parent, bool worldPositionStays);
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
public extern void SetSiblingIndex(int index);
public Vector3 TransformDirection(Vector3 direction)
{
return INTERNAL_CALL_TransformDirection(this, ref direction);
}

public Vector3 TransformDirection(float x, float y, float z)
{
return this.TransformDirection(new Vector3(x, y, z));
}

public Vector3 TransformPoint(Vector3 position)
{
return INTERNAL_CALL_TransformPoint(this, ref position);
}

public Vector3 TransformPoint(float x, float y, float z)
{
return this.TransformPoint(new Vector3(x, y, z));
}

public Vector3 TransformVector(Vector3 vector)
{
return INTERNAL_CALL_TransformVector(this, ref vector);
}

public Vector3 TransformVector(float x, float y, float z)
{
return this.TransformVector(new Vector3(x, y, z));
}

[ExcludeFromDocs]
public void Translate(Vector3 translation)
{
Space self = Space.Self;
this.Translate(translation, self);
}

public void Translate(Vector3 translation, [DefaultValue("Space.Self")] Space relativeTo)
{
if (relativeTo == Space.World)
{
this.position += translation;
}
else
{
this.position += this.TransformDirection(translation);
}
}

public void Translate(Vector3 translation, Transform relativeTo)
{
if (relativeTo != null)
{
this.position += relativeTo.TransformDirection(translation);
}
else
{
this.position += translation;
}
}

[ExcludeFromDocs]
public void Translate(float x, float y, float z)
{
Space self = Space.Self;
this.Translate(x, y, z, self);
}

public void Translate(float x, float y, float z, [DefaultValue("Space.Self")] Space relativeTo)
{
this.Translate(new Vector3(x, y, z), relativeTo);
}

public void Translate(float x, float y, float z, Transform relativeTo)
{
this.Translate(new Vector3(x, y, z), relativeTo);
}

public int childCount { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; }

public Vector3 eulerAngles
{
get
{
return this.rotation.eulerAngles;
}
set
{
this.rotation = Quaternion.Euler(value);
}
}

public Vector3 forward
{
get
{
return (Vector3) (this.rotation * Vector3.forward);
}
set
{
this.rotation = Quaternion.LookRotation(value);
}
}

public bool hasChanged { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] set; }

public Vector3 localEulerAngles
{
get
{
Vector3 vector;
this.INTERNAL_get_localEulerAngles(out vector);
return vector;
}
set
{
this.INTERNAL_set_localEulerAngles(ref value);
}
}

public Vector3 localPosition
{
get
{
Vector3 vector;
this.INTERNAL_get_localPosition(out vector);
return vector;
}
set
{
this.INTERNAL_set_localPosition(ref value);
}
}

public Quaternion localRotation
{
get
{
Quaternion quaternion;
this.INTERNAL_get_localRotation(out quaternion);
return quaternion;
}
set
{
this.INTERNAL_set_localRotation(ref value);
}
}

public Vector3 localScale
{
get
{
Vector3 vector;
this.INTERNAL_get_localScale(out vector);
return vector;
}
set
{
this.INTERNAL_set_localScale(ref value);
}
}

public Matrix4x4 localToWorldMatrix
{
get
{
Matrix4x4 matrixx;
this.INTERNAL_get_localToWorldMatrix(out matrixx);
return matrixx;
}
}

public Vector3 lossyScale
{
get
{
Vector3 vector;
this.INTERNAL_get_lossyScale(out vector);
return vector;
}
}

public Transform parent
{
get
{
return this.parentInternal;
}
set
{
if (this is RectTransform)
{
Debug.LogWarning("Parent of RectTransform is being set with parent property. Consider using the SetParent method instead, with the worldPositionStays argument set to false. This will retain local orientation and scale rather than world orientation and scale, which can prevent common UI scaling issues.", this);
}
this.parentInternal = value;
}
}

internal Transform parentInternal { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] set; }

public Vector3 position
{
get
{
Vector3 vector;
this.INTERNAL_get_position(out vector);
return vector;
}
set
{
this.INTERNAL_set_position(ref value);
}
}

public Vector3 right
{
get
{
return (Vector3) (this.rotation * Vector3.right);
}
set
{
this.rotation = Quaternion.FromToRotation(Vector3.right, value);
}
}

public Transform root { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; }

public Quaternion rotation
{
get
{
Quaternion quaternion;
this.INTERNAL_get_rotation(out quaternion);
return quaternion;
}
set
{
this.INTERNAL_set_rotation(ref value);
}
}

public Vector3 up
{
get
{
return (Vector3) (this.rotation * Vector3.up);
}
set
{
this.rotation = Quaternion.FromToRotation(Vector3.up, value);
}
}

public Matrix4x4 worldToLocalMatrix
{
get
{
Matrix4x4 matrixx;
this.INTERNAL_get_worldToLocalMatrix(out matrixx);
return matrixx;
}
}

private sealed class Enumerator : IEnumerator
{
private int currentIndex = -1;
private Transform outer;

internal Enumerator(Transform outer)
{
this.outer = outer;
}

public bool MoveNext()
{
int childCount = this.outer.childCount;
return (++this.currentIndex < childCount);
}

public void Reset()
{
this.currentIndex = -1;
}

public object Current
{
get
{
return this.outer.GetChild(this.currentIndex);
}
}
}
}
}

UnityEngine.Renderer

namespace UnityEngine
{
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

public class Renderer : Component
{
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
public extern void GetPropertyBlock(MaterialPropertyBlock dest);
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
private extern void INTERNAL_get_lightmapTilingOffset(out Vector4 value);
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
private extern void INTERNAL_get_localToWorldMatrix(out Matrix4x4 value);
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
private extern void INTERNAL_get_worldToLocalMatrix(out Matrix4x4 value);
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
private extern void INTERNAL_set_lightmapTilingOffset(ref Vector4 value);
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
public extern void Render(int material);
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
public extern void SetPropertyBlock(MaterialPropertyBlock properties);
[MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
internal extern void SetSubsetIndex(int index, int subSetIndexForMaterial);

public Bounds bounds { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; }

public bool castShadows { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] set; }

public bool enabled { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] set; }

public bool isPartOfStaticBatch { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; }

public bool isVisible { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; }

public int lightmapIndex { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] set; }

public Vector4 lightmapTilingOffset
{
get
{
Vector4 vector;
this.INTERNAL_get_lightmapTilingOffset(out vector);
return vector;
}
set
{
this.INTERNAL_set_lightmapTilingOffset(ref value);
}
}

public Transform lightProbeAnchor { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] set; }

public Matrix4x4 localToWorldMatrix
{
get
{
Matrix4x4 matrixx;
this.INTERNAL_get_localToWorldMatrix(out matrixx);
return matrixx;
}
}

public Material material { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] set; }

public Material[] materials { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] set; }

public bool receiveShadows { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] set; }

public Material sharedMaterial { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] set; }

public Material[] sharedMaterials { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] set; }

public int sortingLayerID { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] set; }

public string sortingLayerName { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] set; }

public int sortingOrder { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] set; }

internal int staticBatchIndex { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; }

internal Transform staticBatchRootTransform { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]