📜  unity get layer of gameobject - C# 代码示例

📅  最后修改于: 2022-03-11 14:48:43.731000             🧑  作者: Mango

代码示例1
// This will retrun the layer mask of the specified gameObject
gameObject.layer

// You can as well modify this value through code
gameObject.layer = LayerMask.NameToLayer("SomeOtherLayer")