Playmaker 支持Odin绘制
参考代码
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绘制效果
因篇幅问题不能全部显示,请点此查看更多更全内容
Copyright © 2019- haog.cn 版权所有 赣ICP备2024042798号-2
违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com
本站由北京市万商天勤律师事务所王兴未律师提供法律服务