Esempio n. 1
0
        private void OnEnable()
        {
            var temp = _storageObjectPath + "MeshData.asset";

            _meshData           = (MeshData)EditorGUIUtility.Load("Assets/Editor/MeshTools/ObjectStorage/MeshData.asset");
            _serializedMeshData = new SerializedObject(_meshData);

            temp                = _storageObjectPath + "CaveData.asset";
            _caveData           = (CaveData)EditorGUIUtility.Load("Assets/Editor/MeshTools/ObjectStorage/CaveData.asset");
            _serializedCaveData = new SerializedObject(_caveData);

            if (_tabs == null)
            {
                InitTabs();
            }

            if (_planeMesh == null)
            {
                _planeMesh = ScriptableObject.CreateInstance <MeshCreator>();
            }

            if (_caveMapCreator == null)
            {
                _caveMapCreator = ScriptableObject.CreateInstance <CaveMapCreator>();
            }
        }
 private void OnEnable()
 {
     _caveData = (CaveData)EditorGUIUtility.Load(_storageObjectPath + _caveName + "Data" + MeshCommon.DefaultExtension);
     if (_caveMeshCreator == null)
     {
         _caveMeshCreator = ScriptableObject.CreateInstance <CaveMeshCreator>();
     }
     GetCaveData();
 }