- Unity快速创建的小技巧
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class AttributeSpan : MonoBehaviour
{
private void Reset()
{
for (int i = 0; i < transform.childCount; i++)
{
GameObject g = GameObject.CreatePrimitive(PrimitiveType.Sphere);
g.transform.SetParent(transform.GetChild(i).gameObject.transform);
g.transform.localPosition = Vector3.zero;
}
}
}