//public static BTNode<T> CreateNode( T state ) //{ // var t = CreateInstance(typeof( BTNode<T> )) as BTNode<T>; // if( typeof(T).GetCustomAttributes( typeof( StateTitleAttribute ), true ).Length > 0 ) // { // t.isCustomState = true; // } // return t; //} public BTNode(BTState btState) { this.BtState = btState; if (btState.GetType().GetCustomAttributes(typeof(StateTitleAttribute), true).Length > 0) { isCustomState = true; } }
public void OpenScript() { BTEditorWindow.OpenTypeScript(BtState.GetType()); }