BS 0.1 基础构建完成 / 0.2 Visual 同为Unity UI控件部分

This commit is contained in:
2025-07-21 15:49:39 +08:00
parent e400c616f4
commit f6750189d0
1768 changed files with 184236 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
using System.IO;
using UnityEngine;
namespace ES3Internal
{
internal class ES3ResourcesStream : MemoryStream
{
// Check that data exists by checking stream is not empty.
public bool Exists{ get{ return this.Length > 0; } }
// Used when creating
public ES3ResourcesStream(string path) : base(GetData(path))
{
}
private static byte[] GetData(string path)
{
var textAsset = Resources.Load(path) as TextAsset;
// If data doesn't exist in Resources, return an empty byte array.
if(textAsset == null)
return new byte[0];
return textAsset.bytes;
}
protected override void Dispose (bool disposing)
{
base.Dispose(disposing);
}
}
}