赞
踩
public string a="sdf";
public string a="sdf";
public float/int a=0;
Prevents MonoBehaviour of same type (or subtype) to be added more than once to a GameObject.
[Header("Health Settings")] public int health = 0;
Attribute to make a string be edited with a multi-line textfield.
[NotConverted]//防止被覆盖 [NotRenamed]//防止被重命名 public class Dictionary { public object this[object key] { get { throw new System.NotSupportedException(); } set { throw new System.NotSupportedException(); } } }
Allow an runtime class method to be initialized when Unity game loads runtime without action from the user.
允许运行时类方法统一游戏时要初始化加载运行时从用户没有行动。
using UnityEngine; class MyClass { [RuntimeInitializeOnLoadMethod] static void OnRuntimeMethodLoad () { Debug.Log("Game loaded and is running"); } }
SharedBetweenAnimatorsAttribute is an attribute that specify that this StateMachineBehaviour should be instantiate only once and shared among all Animator instance. This attribute reduce the memory footprint for each controller instance.
It's up to the programmer to choose which StateMachineBehaviour could use this attribute. Be aware that if your StateMachineBehaviour change some member variable it will affect all other Animator instance using it. See Also: StateMachineBehaviour class.
using UnityEngine; [SharedBetweenAnimators] public class AttackBehaviour : StateMachineBehaviour { public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) { Debug.Log("OnStateEnter"); } }
Declares an assembly to be compatible (API wise) with a specific Unity API. Used by internal tools to avoid processing the assembly in order to decide whether assemblies may be using old Unity API.
、、--------------------------------- 下面的来自于 http://blog.sina.com.cn/s/blog_5b6cb9500101857b.html
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。