Playmaker 支持Odin绘制
https://hutonggames.fogbugz.com/default.asp?W1104
参考代码
using Assets.Scripts.PlayMaker.Action;
using HutongGames.PlayMaker;
using HutongGames.PlayMakerEditor;
using Sirenix.OdinInspector.Editor;
[CustomActionEditor(typeof(DrawCompontent))]
public class PlayMakerEditor : CustomActionEditor
{
PropertyTree tree;
public override void OnEnable()
{
tree = PropertyTree.Create(target);
}
public override bool OnGUI()
{
tree.Draw(false);
return true;
}
}
文件要放到Editor中,因为Playmaker的绘制没有处理父子类(比如所有子类自动使用父类绘制),所以每个要使用Odin绘制的Playmaker脚本都要在typeof里重写
Odin绘制效果