invoke a method from a Unity Inspector
カスタムアトリビュートを作る?
using System; // Place this file in any folder that is or is a descendant of a folder named "Scripts" namespace CatchCo { // Restrict to methods only [AttributeUsage(AttributeTargets.Method)] public class ExposeMethodInEditorAttribute : Attribute { } }
これだが、System.Attribute
にした。
あと、CatchCo
は作者名なので・・。
ハングル版もある。 http://rapapa.net/?p=2550
そんなことしなくても、
((MonoBehaviour)target).Invoke(“privateなメソッド名”, 0f); でOKだった。