using UnityEngine;
using UnityEngine;
using UnityEditor;
using System.Collections;
 
 
public class AddChild : ScriptableObject
{
 
    [MenuItem ("GameObject/+Add Child")]
    static void MenuAddChild()
    {
        Transform[] transforms = Selection.GetTransforms(SelectionMode.TopLevel | SelectionMode.OnlyUserModifiable);
 
        foreach(Transform transform in transforms)
        {
            GameObject newChild = new GameObject("_null");
            newChild.transform.parent = transform;
        newChild.transform.localPosition = Vector3.zero;
        }
 
    }
 
}

 

相关文章:

  • 2022-12-23
  • 2021-06-10
  • 2022-03-03
  • 2021-06-14
  • 2022-12-23
  • 2021-06-15
  • 2022-12-23
猜你喜欢
  • 2021-08-31
  • 2022-12-23
  • 2021-10-14
  • 2022-12-23
  • 2021-12-29
  • 2022-02-27
  • 2021-12-08
相关资源
相似解决方案