02 2024 档案
摘要:利用Editor.finishedDefaultHeaderGUI这个回调可以实现自定义Header菜单 using UnityEditor; using UnityEngine; namespace Yaojz { [InitializeOnLoad] public static class De
阅读全文
摘要:假设我们希望为材质右键弹出按钮增加新的功能,应该怎么做呢 我们可以通过注册EditorApplication.contextualPropertyMenu全局回调方法,增加自定义的MenuItem using UnityEditor; using UnityEngine; namespace Yao
阅读全文
摘要:如果使用常规的扩展编辑器方法,为ParticleSystem增加一个自定义按钮 [CustomEditor(typeof(ParticleSystem))] public class MyParticleSystemEditor:UnityEditor.Editor { private List<M
阅读全文