- 引入 UnityGameFramework

- 使用 Luban 替代原来的 UGF 的数据表
This commit is contained in:
huangjun
2026-08-30 18:08:55 +08:00
parent 42ad134759
commit 92bf3e9097
1925 changed files with 362268 additions and 4859 deletions
@@ -0,0 +1,54 @@
using SepCore.Definition;
using SepCore.UI;
using UnityEngine;
using UnityEngine.Serialization;
using UnityGameFramework.Runtime;
namespace SepCore.CustomComponent
{
public class BuiltinDataComponent : GameFrameworkComponent
{
[FormerlySerializedAs("m_BuildInfoTextAsset")] [SerializeField] private TextAsset _buildInfoTextAsset = null;
[FormerlySerializedAs("m_DefaultDictionaryTextAsset")] [SerializeField] private TextAsset _defaultDictionaryTextAsset = null;
[FormerlySerializedAs("m_UpdateResourceFormTemplate")] [SerializeField] private GameObject _updateResourceFormTemplate = null;
private BuildInfo _buildInfo = null;
public BuildInfo BuildInfo => _buildInfo;
public GameObject UpdateResourceFormTemplate => _updateResourceFormTemplate;
public void InitBuildInfo()
{
if (_buildInfoTextAsset == null || string.IsNullOrEmpty(_buildInfoTextAsset.text))
{
Log.Info("Build info can not be found or empty.");
return;
}
_buildInfo = GameFramework.Utility.Json.ToObject<BuildInfo>(_buildInfoTextAsset.text);
if (_buildInfo == null)
{
Log.Warning("Parse build info failure.");
return;
}
}
public void InitDefaultDictionary()
{
if (_defaultDictionaryTextAsset == null || string.IsNullOrEmpty(_defaultDictionaryTextAsset.text))
{
Log.Info("Default dictionary can not be found or empty.");
return;
}
if (!GameEntry.Localization.ParseData(_defaultDictionaryTextAsset.text))
{
Log.Warning("Parse default dictionary failure.");
return;
}
}
}
}
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: cfb0b001fcb30fe45ac95ddb8c28ba57
timeCreated: 1528026146
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: