Horje
unity find gameobject with layer Code Example
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")
unity find gameobject with layer
void Start()
{
    GameObject objByName = FindInActiveObjectByName("Cube");
    GameObject objByTag = FindInActiveObjectByTag("CubeTag");
    GameObject objByLayer = FindInActiveObjectByLayer(LayerMask.NameToLayer("CubeLayer"));
}




Csharp

Related
creating a streamwiter file C# Code Example creating a streamwiter file C# Code Example
get text unity Code Example get text unity Code Example
parent unity Code Example parent unity Code Example
pop up element from specific index in array Code Example pop up element from specific index in array Code Example
c# add string to array Code Example c# add string to array Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
11