public void LoadDatabin(string name, ResourceLoader.BinLoadCompletedDelegate finishDelegate) { BinaryObject binaryObject = Singleton <ResourceManager> .GetInstance().GetResource(name, typeof(TextAsset), enResourceType.Numeric, false, false).content as BinaryObject; //DebugHelper.Assert(cBinaryObject != null, "load databin fail {0}", new object[] //{ // name //}); byte[] data = binaryObject.data; if (finishDelegate != null) { finishDelegate(ref data); } Singleton <ResourceManager> .GetInstance().RemoveCachedResource(name); }
public void LoadDatabin(string name, ResourceLoader.BinLoadCompletedDelegate finishDelegate) { CBinaryObject cBinaryObject = Singleton <CResourceManager> .GetInstance().GetResource(name, typeof(TextAsset), 1, false, false).m_content as CBinaryObject; DebugHelper.Assert(cBinaryObject != null, "load databin fail {0}", new object[] { name }); byte[] data = cBinaryObject.m_data; if (finishDelegate != null) { finishDelegate(ref data); } Singleton <CResourceManager> .GetInstance().RemoveCachedResource(name); }