AkiraPixelWind/Assets/Scripts/Main/BuiltinData/BuiltinDataComponent.cs

51 lines
1.1 KiB
C#
Raw Permalink Normal View History

2022-12-29 18:20:40 +08:00
using Axibug;
using Axibug.Runtime;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using static Axibug.Utility;
namespace Game
{
public class BuiltinDataComponent : GameComponent
{
[SerializeField]
private TextAsset _buildInfoTextAsset = null;
private BuildInfo m_BuildInfo = null;
public BuildInfo BuildInfo
{
get
{
return m_BuildInfo;
}
}
public void InitBuildInfo()
{
if (_buildInfoTextAsset == null || string.IsNullOrEmpty(_buildInfoTextAsset.text))
{
Log.Info("Build info can not be found or empty.");
return;
}
m_BuildInfo = Json.ToObject<BuildInfo>(_buildInfoTextAsset.text);
if (m_BuildInfo == null)
{
Log.Warning("Parse build info failure.");
return;
}
if (m_BuildInfo.CheckVersionUrl == null)
{
Log.Warning("BuildInfo<66><6F>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>ʧ<EFBFBD><CAA7>.");
return;
}
}
}
}