1.1.0 未驗證
This commit is contained in:
1 parent
2638c5929d
commit
4a72bd132a
31 files changed
+790
-123
No files matched your search
@@ -0,0 +1,21 @@
|
||||
using UnityEngine;
|
||||
|
||||
// 出包時的 git commit 短碼 (由 Editor/BuildIdWriter 在 Build 前寫進 Assets/BuildInfo/Resources/build_id.txt)
|
||||
// config 的 buildId 用它分辨同一個版號的不同 build ; 編輯器裡一律是 "editor"
|
||||
public static class BuildInfo
|
||||
{
|
||||
private static string id;
|
||||
|
||||
public static string Id
|
||||
{
|
||||
get
|
||||
{
|
||||
if (id == null)
|
||||
{
|
||||
TextAsset asset = Application.isEditor ? null : Resources.Load<TextAsset>("build_id");
|
||||
id = asset != null && !string.IsNullOrWhiteSpace(asset.text) ? asset.text.Trim() : "editor";
|
||||
}
|
||||
return id;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user