mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-07 16:45:10 +00:00
TEngine全面更新,升级YooAsset2.1.1、UniTask、UIWindow、I2Localization
TEngine全面更新,升级YooAsset2.1.1、UniTask、UIWindow、I2Localization
This commit is contained in:
@@ -42,16 +42,9 @@ public class ConfigSystem : Singleton<ConfigSystem>
|
||||
/// <returns>ByteBuf</returns>
|
||||
private ByteBuf LoadByteBuf(string file)
|
||||
{
|
||||
TextAsset textAsset = null;
|
||||
textAsset = GameModule.Resource.GetPreLoadAsset<TextAsset>(file);
|
||||
if (textAsset != null)
|
||||
{
|
||||
return new ByteBuf(textAsset.bytes);
|
||||
}
|
||||
else
|
||||
{
|
||||
textAsset = GameModule.Resource.LoadAsset<TextAsset>(file);
|
||||
return new ByteBuf(textAsset.bytes);
|
||||
}
|
||||
TextAsset textAsset = GameModule.Resource.LoadAsset<TextAsset>(file);
|
||||
byte[] bytes = textAsset.bytes;
|
||||
GameModule.Resource.UnloadAsset(textAsset);
|
||||
return new ByteBuf(bytes);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user