Mesh_VoxelChunk Load(string filename) { string filepath = s_Path + filename; TextAsset textAsset = Resources.Load(filepath) as TextAsset; if (!textAsset) { GlobalSingleton.ERROR("Load file failed : " + filepath); return(null); } return(new Mesh_VoxelChunk(textAsset.text)); }
public void ChangeModel(string chunk, string model) { Chunk c; if (m_ChunkMap.TryGetValue(chunk, out c)) { AttachModel(chunk, model, c); } else { GlobalSingleton.ERROR("Find no model:" + chunk + "," + model); } }
UnitData Load(string _FilePathName) { string filepath = s_Path + _FilePathName; TextAsset textAsset = Resources.Load(filepath) as TextAsset; if (!textAsset) { GlobalSingleton.ERROR("Load unit data failed : " + filepath); return(null); } UnitData data = new UnitData(); if (false == data.DoParse(textAsset.text)) { GlobalSingleton.ERROR("Parse unit data failed : " + textAsset.text); return(null); } return(data); }