Compare commits

..

No commits in common. "bf40dd4732ddd50205d663f58e48782868f604c2" and "cbd4e1822af86270de08ecfd55ed810a99fee6c6" have entirely different histories.

3 changed files with 42 additions and 20 deletions

View File

@ -1370,7 +1370,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 3 m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &802089282 --- !u!1001 &802089282
PrefabInstance: PrefabInstance:
@ -3420,7 +3420,7 @@ RectTransform:
m_Children: m_Children:
- {fileID: 1630019883} - {fileID: 1630019883}
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 2 m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0}
@ -4249,6 +4249,36 @@ RectTransform:
type: 3} type: 3}
m_PrefabInstance: {fileID: 2081707619} m_PrefabInstance: {fileID: 2081707619}
m_PrefabAsset: {fileID: 0} 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 --- !u!1 &2123684705
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -4719,8 +4749,6 @@ MonoBehaviour:
nameText: {fileID: 2403617721991577379} nameText: {fileID: 2403617721991577379}
nochoseSprite: {fileID: 21300000, guid: 38e974ed426be9a468ecc732dec5e66c, type: 3} nochoseSprite: {fileID: 21300000, guid: 38e974ed426be9a468ecc732dec5e66c, type: 3}
choseSprite: {fileID: 21300000, guid: 4ced2e7e9bfb6264c8d023a85800ac43, type: 3} choseSprite: {fileID: 21300000, guid: 4ced2e7e9bfb6264c8d023a85800ac43, type: 3}
nochoseFont: {fileID: 0}
choseFont: {fileID: 0}
--- !u!114 &2403617721991577379 --- !u!114 &2403617721991577379
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

View File

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

View File

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