启动参数
This commit is contained in:
parent
356d6e316b
commit
f65fcc3ef3
|
@ -17,6 +17,7 @@ public class CallForTest : MonoBehaviour
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[HideInInspector]
|
[HideInInspector]
|
||||||
public List<string> infos = null;
|
public List<string> infos = null;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 启动器传过来的关区编号
|
/// 启动器传过来的关区编号
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -51,9 +52,24 @@ public class CallForTest : MonoBehaviour
|
||||||
{
|
{
|
||||||
//获取启动参数
|
//获取启动参数
|
||||||
infos = Environment.GetCommandLineArgs().ToList();
|
infos = Environment.GetCommandLineArgs().ToList();
|
||||||
customCode = infos.Find(a => a.StartsWith("code="));
|
string code = infos.Find(a => a.StartsWith("code="));
|
||||||
MONITOR_ID= infos.Find(a => a.StartsWith("MONITOR_ID="));
|
string enterprise_code = infos.Find(a => a.StartsWith("enterprise_code="));
|
||||||
ServerIP= infos.Find(a => a.StartsWith("serverIP"));
|
string config_value = infos.Find(a => a.StartsWith("config_value="));
|
||||||
|
if(!string.IsNullOrEmpty(code))
|
||||||
|
{
|
||||||
|
customCode = code.Replace("code=","");
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!string.IsNullOrEmpty(enterprise_code))
|
||||||
|
{
|
||||||
|
MONITOR_ID = enterprise_code.Replace("enterprise_code=","");
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!string.IsNullOrEmpty(config_value))
|
||||||
|
{
|
||||||
|
ServerIP=config_value.Replace("config_value=","");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (customCode=="3501")
|
if (customCode=="3501")
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue