コード例 #1
0
        public void OnEnable()
        {
            //BehaviorTreeSerializer.Initialize(new FlatBuffersSerializer());

            asset = (BehaviorTreeAsset)target;
            asset.Deserialize();

            BehaviorTreeEditorWindow.CreateWindow(asset);
        }
コード例 #2
0
        public static void CreateWindow(BehaviorTreeAsset asset)
        {
            if (current != null && current.asset == asset)
            {
                return;
            }

            current = GetWindow <BehaviorTreeEditorWindow>(I18n._("BehaveAsSakura Editor"), typeof(SceneView));

            current.minSize = EditorConfiguration.MinWindowSize;
            current.asset   = asset;
            current.domain  = asset.Domain;
            current.view    = new BehaviorTreeView(current.domain, asset.Tree, current.position.size);

            return;
        }