Unity限制某个物体必须拥有某个脚本


[RequireComponent(typeof(限制的脚本名称))]
public class PlayerControl : MonoBehaviour
{

}

//============================广告分界线=========================================

猜你喜欢

转载自blog.csdn.net/weixin_42596385/article/details/89020431