Unity里的标签 Posted on 2019-05-30 Edited on 2023-02-17 123//只允许一个同样的Component[DisallowMultipleComponent]public class Sample:MonoBehaviour{} 12[Header("头标题")][RequireComponent(Type of("必须加上的组件"))]