Model.LayerNames.GetLayerInt C# (CSharp) Method

GetLayerInt() public static method

通过Layers名字得到对应层
public static GetLayerInt ( string name ) : int
name string
return int
		public static int GetLayerInt(string name)
		{
			return LayerMask.NameToLayer(name);
		}

Usage Example

Esempio n. 1
0
        public ObjectPool()
        {
#if !SERVER
            this.ViewGO       = new GameObject();
            this.ViewGO.name  = this.GetType().Name;
            this.ViewGO.layer = LayerNames.GetLayerInt(LayerNames.HIDDEN);
            this.ViewGO.transform.SetParent(Global.transform, false);
//			this.ViewGO.AddComponent<ComponentView>().Component = this;
#endif
        }
All Usage Examples Of Model.LayerNames::GetLayerInt