This commit is contained in:
陈向学 2024-06-25 13:26:31 +08:00
parent c23a8cff6a
commit 0256cd9bb4
3 changed files with 20 additions and 42 deletions

View File

@ -1370,7 +1370,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 4
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &802089282
PrefabInstance:
@ -3420,7 +3420,7 @@ RectTransform:
m_Children:
- {fileID: 1630019883}
m_Father: {fileID: 0}
m_RootOrder: 3
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
@ -4249,36 +4249,6 @@ RectTransform:
type: 3}
m_PrefabInstance: {fileID: 2081707619}
m_PrefabAsset: {fileID: 0}
--- !u!1 &2123277917
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2123277918}
m_Layer: 0
m_Name: manager
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &2123277918
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2123277917}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &2123684705
GameObject:
m_ObjectHideFlags: 0
@ -4749,6 +4719,8 @@ MonoBehaviour:
nameText: {fileID: 2403617721991577379}
nochoseSprite: {fileID: 21300000, guid: 38e974ed426be9a468ecc732dec5e66c, type: 3}
choseSprite: {fileID: 21300000, guid: 4ced2e7e9bfb6264c8d023a85800ac43, type: 3}
nochoseFont: {fileID: 0}
choseFont: {fileID: 0}
--- !u!114 &2403617721991577379
MonoBehaviour:
m_ObjectHideFlags: 0

View File

@ -14,28 +14,30 @@ public class CityPanel : MonoBehaviour
{
//获取关区下所有企业信息
string url = "http://"+FirstPanel.instance.serverIP+":4000/api/Corporation/GetAllPosition?customCodes="+custCodes;
FirstPanel.instance.CallGet(url, (isok,result) =>
Debug.Log("获取企业模型:"+url);
StartCoroutine(FirstPanel.instance.CallGet(url, (isok, result) =>
{
if(isok)
if (isok)
{
JsonData data = new JsonData(result);
string tmp=data["data"].ToString();
var models = JsonMapper.ToObject<List<v_model_version>>(tmp);
models.ForEach(a =>
Debug.Log(result);
JsonData data = JsonMapper.ToObject(result);
var tmp = data["data"];
foreach (JsonData item in tmp)
{
v_model_version v= JsonMapper.ToObject<v_model_version>(item.ToJson());
if (ModelItem.modelItemPrefb == null)
{
ModelItem.modelItemPrefb = Resources.Load<GameObject>("prefeb/modelItem");
}
GameObject go = Instantiate<GameObject>(ModelItem.modelItemPrefb, transform);
go.GetComponent<ModelItem>().Init(a);
});
go.GetComponent<ModelItem>().Init(v);
}
}
else
{
Debug.LogError(result);
}
});
}));
}
}

View File

@ -57,6 +57,9 @@ public class FirstPanel : MonoBehaviour
});
});
//初始化
Application.ExternalCall("OnWake");
#if UNITY_EDITOR
serverIP = "172.16.1.164";
#endif
@ -69,6 +72,7 @@ public class FirstPanel : MonoBehaviour
public void InitUnity(string serverIP)
{
this.serverIP= serverIP;
Debug.Log("接收IP"+serverIP);
}