DisallowMultipleComponent

class in UnityEngine

Switch to Manual

Description

防止将相同类型(或子类型)的 MonoBehaviour 多次添加到 GameObject。