Answers for "unity get layer of gameobject"

C#
9

unity get layer of gameobject

// 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")
Posted by: Guest on September-16-2020

Code answers related to "unity get layer of gameobject"

C# Answers by Framework

Browse Popular Code Answers by Language