public static FlowReactor.BlackboardSystem.BlackBoard CreateNewBlackboard() { var _path = EditorUtility.SaveFilePanel("Create new blackboard", Application.dataPath, "blackboard", "asset"); if (string.IsNullOrEmpty(_path)) { return(null); } var _name = System.IO.Path.GetFileName(_path); if (_path.StartsWith(Application.dataPath)) { _path = "Assets" + _path.Substring(Application.dataPath.Length); } FlowReactor.BlackboardSystem.BlackBoard bbasset = ScriptableObject.CreateInstance <FlowReactor.BlackboardSystem.BlackBoard>(); AssetDatabase.CreateAsset(bbasset, _path); AssetDatabase.SaveAssets(); EditorUtility.FocusProjectWindow(); Selection.activeObject = bbasset; return(bbasset); }
public void OnEnable() { try { data = (FlowReactor.BlackboardSystem.BlackBoard)target; if (variableSceneTypes.Keys.Count == 0 || variableSceneTypes == null) { GetAvailableVariableTypes.GetFlowReactorVariableTypes(out variableSceneTypes); } SetupList(); } catch {} }
public Blackboards() { blackboard = null; lastBlackboard = null; }