public void Init(string dataName)
 {
     taskSceneEditorData = ST_TaskSceneEditorData.GetData(dataName);
     if (taskSceneEditorData != null)
     {
         new TaskSceneEditor(taskSceneEditorData.taskSceneData, this);
     }
 }
예제 #2
0
        public static ST_TaskSceneEditorData GetData(string name)
        {
            ST_TaskSceneEditorData data = Resources.Load <ST_TaskSceneEditorData>(PathDataResources + name);

            if (data == null)
            {
#if UNITY_EDITOR
                UnityEditor.AssetDatabase.CreateAsset(ScriptableObject.CreateInstance <ST_TaskSceneEditorData>(), PathData + name + ".asset");
                data = Resources.Load <ST_TaskSceneEditorData>(PathDataResources + name);
#endif
            }
            return(data);
        }