mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-07 16:45:10 +00:00
Update
Update
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -11,6 +11,8 @@
|
|||||||
/[Mm]emoryCaptures/
|
/[Mm]emoryCaptures/
|
||||||
/EditorBuild/
|
/EditorBuild/
|
||||||
# /[Aa]ssets/TResources/DLL/
|
# /[Aa]ssets/TResources/DLL/
|
||||||
|
/[Aa]ssets/StreamingAssets
|
||||||
|
/BuildBundleInfo/
|
||||||
|
|
||||||
# Asset meta data should only be ignored when the corresponding asset is also ignored
|
# Asset meta data should only be ignored when the corresponding asset is also ignored
|
||||||
!/[Aa]ssets/**/*.meta
|
!/[Aa]ssets/**/*.meta
|
||||||
|
@@ -126,5 +126,28 @@ namespace TEngine
|
|||||||
return File.OpenRead(filePath);
|
return File.OpenRead(filePath);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 从指定文件中读取字节串
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="filePath">文件路径</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static byte[] ReadAllBytesFromOutOrInnerFolder(string filePath)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(filePath))
|
||||||
|
return null;
|
||||||
|
|
||||||
|
return ReadAllBytesFromOutFolder(filePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static byte[] ReadAllBytesFromOutFolder(string filePath)
|
||||||
|
{
|
||||||
|
if (!File.Exists(filePath))
|
||||||
|
{
|
||||||
|
TLogger.LogError("file:[{0}] is not exist!, please check!", filePath);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return File.ReadAllBytes(filePath);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -4,5 +4,8 @@
|
|||||||
EditorBuildSettings:
|
EditorBuildSettings:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_Scenes: []
|
m_Scenes:
|
||||||
|
- enabled: 1
|
||||||
|
path: Assets/NetDemo/TEngine-NetDemo.unity
|
||||||
|
guid: 961c85cf7d9a44549a13b94e9931e037
|
||||||
m_configObjects: {}
|
m_configObjects: {}
|
||||||
|
@@ -126,5 +126,28 @@ namespace TEngineCore
|
|||||||
return File.OpenRead(filePath);
|
return File.OpenRead(filePath);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 从指定文件中读取字节串
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="filePath">文件路径</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static byte[] ReadAllBytesFromOutOrInnerFolder(string filePath)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(filePath))
|
||||||
|
return null;
|
||||||
|
|
||||||
|
return ReadAllBytesFromOutFolder(filePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static byte[] ReadAllBytesFromOutFolder(string filePath)
|
||||||
|
{
|
||||||
|
if (!File.Exists(filePath))
|
||||||
|
{
|
||||||
|
TLogger.LogError("file:[{0}] is not exist!, please check!", filePath);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return File.ReadAllBytes(filePath);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Reference in New Issue
Block a user