using UnityEngine;
using System.Collections;
using UnityEditor ;
[AddComponentMenu("MyComponent/ComponentTest")]
public class ComponentTest : MonoBehaviour{
public void CreateComponent(){
}
using System.Collections;
using UnityEditor ;
[AddComponentMenu("MyComponent/ComponentTest")]
public class ComponentTest : MonoBehaviour{
public void CreateComponent(){
}
}
注意:与其他editor 拓展 操作不同的是,该脚本要放在Asset里
本文介绍如何在Unity环境中创建并集成自定义组件,详细解释了脚本编写、组件菜单添加及放置资产的重要性。
1766

被折叠的 条评论
为什么被折叠?



