Horje
get parent name unity for inspector Code Example
get parent name unity for inspector
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
using TMPro;
[ExecuteInEditMode]
public class getParentName : MonoBehaviour
{

    void LateUpdate()
    {
        var parentName = transform.parent.name;
        TextMeshProUGUI textmeshPro = GetComponent<TextMeshProUGUI>();
        textmeshPro.SetText(parentName);
    }
}




Csharp

Related
c# convert linq jValue to int Code Example c# convert linq jValue to int Code Example
dynamic add event control c# Code Example dynamic add event control c# Code Example
Prime Numbers Code Example Prime Numbers Code Example
c# Color Convert Code Example c# Color Convert Code Example
remove numericUpDown white space Code Example remove numericUpDown white space Code Example

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