Example #1
0
        public static EditorCache NewCache()
        {
            EditorCache cache = CreateInstance <EditorCache> ();

            cache.CanvasName = "New Canvas";
            cache.Actors     = ActorDatabase.CreateNew <ActorDatabase> (cache.CanvasName);
            cache.Conditions = ConditionDatabase.CreateNew <ConditionDatabase> (cache.CanvasName);
            cache.Nodes      = NodeDatabase.CreateNew <NodeDatabase> (cache.CanvasName);
            cache.States     = new EditorStates(cache);

            cache.Init();
            SaveManager.SaveCanvas(ResourceManager.TEMPFILEPATH, false, cache);
            return(cache);
        }
Example #2
0
 public void ReplaceAllReferences(Func <ScriptableObject, ScriptableObject> ReplacedSO)
 {
     nodes      = ReplacedSO(nodes) as NodeDatabase;
     actors     = ReplacedSO(actors) as ActorDatabase;
     conditions = ReplacedSO(conditions) as ConditionDatabase;
 }