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