底层数据获取修改完成
This commit is contained in:
parent
7d078a1adb
commit
ee9465b86b
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 95003e58d4f04e16a5f88713d66099e8
|
||||
timeCreated: 1743045657
|
@ -0,0 +1,11 @@
|
||||
using Sirenix.OdinInspector;
|
||||
|
||||
namespace GameLogic
|
||||
{
|
||||
public enum EARTrackType
|
||||
{
|
||||
[LabelText("模型")]model,
|
||||
[LabelText("图片")]pic,
|
||||
[LabelText("视频")]video,
|
||||
}
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e16fb4c5dbb34f3eaa74e6cc74fefa29
|
||||
timeCreated: 1743045683
|
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4797d79ff20f46798a80d142445f17a7
|
||||
timeCreated: 1743038446
|
@ -2,6 +2,7 @@ using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Serialization;
|
||||
|
||||
namespace GameLogic
|
||||
{
|
||||
@ -39,14 +40,7 @@ namespace GameLogic
|
||||
public string _coverUrl;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class ARTrackData
|
||||
{
|
||||
public string _trackObjectUrl;
|
||||
public string _modelName;
|
||||
public string _coverUrl;
|
||||
public string _trackImageUrl;
|
||||
}
|
||||
|
||||
|
||||
[Serializable]
|
||||
public class PlayerData
|
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a69d4a0754f2468087ff28a7f4e97835
|
||||
timeCreated: 1743046032
|
@ -0,0 +1,20 @@
|
||||
using System;
|
||||
|
||||
namespace GameLogic
|
||||
{
|
||||
[Serializable]
|
||||
public class ARTrackData
|
||||
{
|
||||
public string trackImageUrl; //识别图
|
||||
public ARTrackChildrenData trackChildren; //识别显示的子物体
|
||||
}
|
||||
[Serializable]
|
||||
public class ARTrackChildrenData
|
||||
{
|
||||
public EARTrackType trackResType; //识别类型
|
||||
public string name; //名称
|
||||
public string showGlbModelUrl; // 识别现实的模型
|
||||
public string showVideoUrl;// 识别现实的视频
|
||||
public string showImageUrl;// 识别现实的图片
|
||||
}
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 61440eef1f6f4a38aec01b4b7b772ccd
|
||||
timeCreated: 1743046041
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 802b201bb2edbe142a8b73b446c7832a
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e26c61c9993641e68f777d06798d1e2c
|
||||
timeCreated: 1743038440
|
@ -0,0 +1,29 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace GameLogic
|
||||
{
|
||||
|
||||
[System.Serializable]
|
||||
public class CompanyConfigDataItem
|
||||
{
|
||||
public int userId; // 用户ID
|
||||
public int sortId; // 排序ID
|
||||
public string userCode; // 用户代码
|
||||
public string userAccount; // 用户账号
|
||||
public string userName; // 用户名称
|
||||
public string mobile; // 手机号码
|
||||
public string status; // 状态
|
||||
public string companyName; // 公司名称
|
||||
public string logoPath; // 标志路径
|
||||
public int industry; // 行业
|
||||
}
|
||||
|
||||
|
||||
[System.Serializable]
|
||||
public class CompanyConfigRoot
|
||||
{
|
||||
public int code; // 状态码
|
||||
public string message; // 消息
|
||||
public List<CompanyConfigDataItem> data; // 数据列表
|
||||
}
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5ade4a60ad124099b8301ba120ae0616
|
||||
timeCreated: 1743041394
|
@ -2,12 +2,9 @@ using System.Collections.Generic;
|
||||
|
||||
namespace GameLogic
|
||||
{
|
||||
public class ProjectDataConfig
|
||||
{
|
||||
}
|
||||
|
||||
//如果好用,请收藏地址,帮忙分享。
|
||||
public class UserInfoVo
|
||||
[System.Serializable]
|
||||
public class ProjectConfigUserInfoVo
|
||||
{
|
||||
public string userCode;// 用户代码
|
||||
public int memberType;// 会员类型
|
||||
@ -16,7 +13,9 @@ namespace GameLogic
|
||||
public string logoPath;// 标志路径
|
||||
}
|
||||
|
||||
public class ChildrenItem
|
||||
|
||||
[System.Serializable]
|
||||
public class ProjectConfigChildrenItem
|
||||
{
|
||||
public int id;// ID
|
||||
public int parentId;// 父ID
|
||||
@ -72,11 +71,14 @@ namespace GameLogic
|
||||
public List<string> childrenGroupedByPlaneCategoryParentPathVos;// 按平面类别父路径分组的子项Vos
|
||||
}
|
||||
|
||||
public class ChildrenGroupedByPlaneCategoryId
|
||||
[System.Serializable]
|
||||
public class ProjectChildrenGroupedByPlaneCategoryId
|
||||
{
|
||||
}
|
||||
|
||||
public class ProjectListVoItem
|
||||
|
||||
[System.Serializable]
|
||||
public class ProjectConfigListVoItem
|
||||
{
|
||||
public int id;// ID
|
||||
public int parentId;// 父ID
|
||||
@ -126,19 +128,22 @@ namespace GameLogic
|
||||
public string companyName;// 基础案例
|
||||
public int industry;// 行业
|
||||
public string logoPath;// 标志路径
|
||||
public List<ChildrenItem> children;// 子项
|
||||
public ChildrenGroupedByPlaneCategoryId childrenGroupedByPlaneCategoryId;// 按平面类别ID分组的子项
|
||||
public List<ProjectConfigChildrenItem> children;// 子项
|
||||
public ProjectChildrenGroupedByPlaneCategoryId childrenGroupedByPlaneCategoryId;// 按平面类别ID分组的子项
|
||||
public string groupName;// 组名
|
||||
public string showRes;// 显示资源
|
||||
public List<string> childrenGroupedByPlaneCategoryParentPathVos;// 按平面类别父路径分组的子项Vos
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
public class ProjectConfigDataListItem
|
||||
{
|
||||
public UserInfoVo userInfoVo;// 用户信息Vo
|
||||
public List<ProjectListVoItem> projectListVo;// 项目列表Vo
|
||||
public ProjectConfigUserInfoVo userInfoVo;// 用户信息Vo
|
||||
public List<ProjectConfigListVoItem> projectListVo;// 项目列表Vo
|
||||
}
|
||||
|
||||
|
||||
[System.Serializable]
|
||||
public class ProjectConfigData
|
||||
{
|
||||
public int total;// 总数
|
||||
@ -160,7 +165,8 @@ namespace GameLogic
|
||||
public int navigateFirstPage;// 导航第一页
|
||||
public int navigateLastPage;// 导航最后一页
|
||||
}
|
||||
|
||||
|
||||
[System.Serializable]
|
||||
public class ProjectConfigRoot
|
||||
{
|
||||
public int code;// 代码
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8e5085619dc0c7441840c65a95391d7f
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,10 @@
|
||||
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace GameLogic
|
||||
{
|
||||
public static class ARRuntimeData
|
||||
{
|
||||
public static List<string> m_listCompanyUseCode = new List<string>();
|
||||
}
|
||||
}
|
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: be0d0baa7ee0f7447b002382fa9e9296
|
@ -77,8 +77,8 @@ namespace GameLogic
|
||||
await UniTask.Yield();
|
||||
Debug.Log("Waiting for AR system to initialize...");
|
||||
}*/
|
||||
var trackImageUrl = arModelData._trackImageUrl;
|
||||
var objectUrl = arModelData._trackObjectUrl;
|
||||
var trackImageUrl = string.Empty;
|
||||
var objectUrl = string.Empty;
|
||||
ImageTrackData imageData = new ImageTrackData();
|
||||
if (string.IsNullOrEmpty(trackImageUrl) || string.IsNullOrEmpty(objectUrl))
|
||||
{
|
||||
|
@ -4,6 +4,9 @@ namespace GameLogic
|
||||
{
|
||||
public static class SettingCompanyData
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 四个公司
|
||||
/// </summary>
|
||||
public static readonly string _CompanyFourTopRquestUrl ="https://www.arsnowslide.com/brounche/api/brochureUserTop4/queryTop4";
|
||||
}
|
||||
}
|
||||
|
@ -10,10 +10,7 @@
|
||||
public static readonly string _CompanyAllpRquestUrl = "https://www.arsnowslide.com/brounche/api/brochureUserDisplay/queryDisplayUserByPage";
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 四个公司
|
||||
/// </summary>
|
||||
public static readonly string _CompanyFourTopRquestUrl ="https://www.arsnowslide.com/brounche/api/brochureUserTop4/queryTop4";
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -33,15 +33,10 @@ namespace GameLogic
|
||||
Log.Info(_projectToSceneSavedData._projectData.List_arTrackData.Count);
|
||||
foreach (var arModelData in _projectToSceneSavedData._projectData.List_arTrackData)
|
||||
{
|
||||
Log.Debug($"{arModelData._trackImageUrl}");
|
||||
Log.Debug($"{arModelData.trackImageUrl}");
|
||||
//Log.Debug($"{arModelData._trackImageUrl}");
|
||||
//await m_arTrackImageLibraryManager.AddTrackImage(arModelData);
|
||||
}
|
||||
//Log.Debug("ARBrochureSceneSystem Load");
|
||||
// if (m_arTrackImageLibraryManager !=null)
|
||||
// {
|
||||
//
|
||||
// }
|
||||
|
||||
GameModule.UI.ShowUI<UIWindARTrace>();
|
||||
GameEvent.Send<ProjectToSceneSavedData>(UIProjectEventDefined.SettingProject, _projectToSceneSavedData);
|
||||
GameModule.UI.CloseUI<UITransitionLoad>();
|
||||
|
@ -1,3 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Security.Cryptography;
|
||||
using Cysharp.Threading.Tasks;
|
||||
@ -5,78 +6,91 @@ using TEngine;
|
||||
using UnityEngine;
|
||||
|
||||
|
||||
|
||||
namespace GameLogic
|
||||
{
|
||||
public partial class DataConfigSystem
|
||||
{
|
||||
|
||||
|
||||
public async UniTask<ProjectData> GetSingleProjectAllData(string page,string userCode)
|
||||
public async UniTask<ProjectData> GetSingleProjectAllData(string page, string userCode)
|
||||
{
|
||||
|
||||
if (m_dictallProject.TryGetValue(userCode,out var projectData))
|
||||
{
|
||||
return projectData;
|
||||
}
|
||||
var jsonData = await HttpHandleTool.UnityWebRequestPostJsonByUserCode(page, userCode);
|
||||
var projectConfigRoot = JsonUtility.FromJson<ProjectConfigRoot>(jsonData);
|
||||
|
||||
return GetProjectData(projectConfigRoot.data);
|
||||
return GetProjectData(projectConfigRoot.data,userCode);
|
||||
}
|
||||
public async UniTask<ProjectData> GetSingleCompanyAllData(string page, string userCode)
|
||||
{
|
||||
|
||||
if (m_dictallProject.TryGetValue(userCode,out var projectData))
|
||||
{
|
||||
return projectData;
|
||||
}
|
||||
var jsonData = await HttpHandleTool.UnityWebRequestPostJsonByUserCode(page, userCode);
|
||||
var projectConfigRoot = JsonUtility.FromJson<ProjectConfigRoot>(jsonData);
|
||||
|
||||
return GetProjectData(projectConfigRoot.data,userCode);
|
||||
}
|
||||
|
||||
#region 场景数据
|
||||
|
||||
public ProjectData GetProjectData(string company = null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
#region 场景数据
|
||||
|
||||
public ProjectData GetProjectData(string company = null)
|
||||
{
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
public ProjectData GetProjectData(ProjectConfigData projectConfigData)
|
||||
public ProjectData GetProjectData(ProjectConfigData projectConfigData,string userCode)
|
||||
{
|
||||
|
||||
if(projectConfigData.list == null || projectConfigData.list.Count <= 0)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
var companyUnitData = projectConfigData.list[0];
|
||||
if (projectConfigData.list == null || projectConfigData.list.Count <= 0)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
var companyUnitData = projectConfigData.list[0];
|
||||
var projectListVo = companyUnitData.projectListVo;
|
||||
|
||||
|
||||
|
||||
|
||||
var projectData = new ProjectData();
|
||||
// //projectData._currentProjectType = currentProjectType;
|
||||
// projectData._companyName = companyUnitData.userInfoVo.companyName;
|
||||
// projectData._coverAddressNameUrl = companyUnitData.userInfoVo.logoPath;
|
||||
//
|
||||
// // 筛选出 wxProjectType 为 "wxVirtualHall" 的项目
|
||||
// SetVirtualSceneData(ProjectType.wxVirtualHall, projectListVo,ref projectData);
|
||||
// SetARData(ProjectType.wxPlane, projectListVo,ref projectData);
|
||||
// SetARTrackData(ProjectType.wxTrack, projectListVo,ref projectData);
|
||||
// SetARVirtualHumanData(ProjectType.wxVirtualHumans, projectListVo, ref projectData);
|
||||
// if (!m_dictallProject.ContainsKey(companyName))
|
||||
// {
|
||||
// m_dictallProject.Add(companyName,projectData);
|
||||
// }
|
||||
//
|
||||
// return projectData;
|
||||
|
||||
//projectData._currentProjectType = currentProjectType;
|
||||
projectData._companyName = companyUnitData.userInfoVo.companyName;
|
||||
projectData._coverAddressNameUrl = companyUnitData.userInfoVo.logoPath;
|
||||
|
||||
// 筛选出 wxProjectType 为 "wxVirtualHall" 的项目
|
||||
SetVirtualSceneData(ProjectType.wxVirtualHall, projectListVo, ref projectData);
|
||||
SetARData(ProjectType.wxPlane, projectListVo, ref projectData);
|
||||
SetARTrackData(projectData._companyName,ProjectType.wxTrack, projectListVo, ref projectData);
|
||||
SetARVirtualHumanData(ProjectType.wxVirtualHumans, projectListVo, ref projectData);
|
||||
if (!m_dictallProject.ContainsKey(userCode))
|
||||
{
|
||||
m_dictallProject.Add(userCode,projectData);
|
||||
}
|
||||
|
||||
return projectData;
|
||||
|
||||
return projectData;
|
||||
}
|
||||
|
||||
private static void SetVirtualSceneData(ProjectType currentProjectType, List<ProjectListVo> projectListVo,ref ProjectData projectData)
|
||||
private static void SetVirtualSceneData(ProjectType currentProjectType,
|
||||
List<ProjectConfigListVoItem> projectListVo, ref ProjectData projectData)
|
||||
{
|
||||
var virtualHallProjects = projectListVo
|
||||
.FindAll(p => p.wxProjectType == currentProjectType.ToString());
|
||||
|
||||
// 初始化一个空的子项目列表 wxProjectType == "wxVirtualHall", "wxProjectType": "wxvirtualHumans", "wxProjectType": "wxPlane", "wxProjectType": "wxTrack",
|
||||
if (virtualHallProjects == null || virtualHallProjects.Count <=0)
|
||||
if (virtualHallProjects == null || virtualHallProjects.Count <= 0)
|
||||
{
|
||||
Log.Debug("没有该类型项目");
|
||||
//return null;
|
||||
}
|
||||
|
||||
if (virtualHallProjects != null)
|
||||
{
|
||||
List<SceneData> sceneDataList = new List<SceneData>();
|
||||
|
||||
|
||||
foreach (var vProject in virtualHallProjects)
|
||||
{
|
||||
foreach (var sceneChild in vProject.children)
|
||||
@ -84,29 +98,37 @@ namespace GameLogic
|
||||
SceneData sceneData = new SceneData();
|
||||
sceneData._sceneglbhttpName = sceneChild.virtualHallSrc;
|
||||
sceneData._sceneCoverhttpName = sceneChild.thumbnailUrl;
|
||||
sceneData.list_players.Add(new PlayerData(){ _playerAddressName = "Player_female", _playerCoverAddressName = "show_car_player_female"});
|
||||
sceneData.list_players.Add(new PlayerData(){ _playerAddressName = "Player_man", _playerCoverAddressName = "show_car_player_man"});
|
||||
sceneData.list_players.Add(new PlayerData()
|
||||
{
|
||||
_playerAddressName = "Player_female", _playerCoverAddressName = "show_car_player_female"
|
||||
});
|
||||
sceneData.list_players.Add(new PlayerData()
|
||||
{ _playerAddressName = "Player_man", _playerCoverAddressName = "show_car_player_man" });
|
||||
sceneDataList.Add(sceneData);
|
||||
}
|
||||
}
|
||||
|
||||
projectData.list_virtualShowRoomScenesName = sceneDataList;
|
||||
}
|
||||
}
|
||||
private static void SetARData(ProjectType currentProjectType, List<ProjectListVo> projectListVo,ref ProjectData projectData)
|
||||
|
||||
private static void SetARData(ProjectType currentProjectType, List<ProjectConfigListVoItem> projectListVo,
|
||||
ref ProjectData projectData)
|
||||
{
|
||||
var projects = projectListVo
|
||||
.FindAll(p => p.wxProjectType == currentProjectType.ToString());
|
||||
|
||||
// 初始化一个空的子项目列表 wxProjectType == "wxVirtualHall", "wxProjectType": "wxvirtualHumans", "wxProjectType": "wxPlane", "wxProjectType": "wxTrack",
|
||||
if (projects == null || projects.Count <=0)
|
||||
if (projects == null || projects.Count <= 0)
|
||||
{
|
||||
Log.Debug("没有该类型项目");
|
||||
//return null;
|
||||
}
|
||||
|
||||
if (projects != null)
|
||||
{
|
||||
List<ARModelData> arplacelist = new List<ARModelData>();
|
||||
|
||||
|
||||
foreach (var arProject in projects)
|
||||
{
|
||||
foreach (var armodel in arProject.children)
|
||||
@ -119,87 +141,89 @@ namespace GameLogic
|
||||
arplacelist.Add(arModelData);
|
||||
}
|
||||
}
|
||||
projectData.List_arModelData = arplacelist ;
|
||||
|
||||
projectData.List_arModelData = arplacelist;
|
||||
}
|
||||
}
|
||||
|
||||
private static void SetARTrackData(ProjectType currentProjectType, List<ProjectListVo> projectListVo,ref ProjectData projectData)
|
||||
|
||||
private static void SetARTrackData(string userCode,ProjectType currentProjectType, List<ProjectConfigListVoItem> projectListVo,
|
||||
ref ProjectData projectData)
|
||||
{
|
||||
var projects = projectListVo
|
||||
.FindAll(p => p.wxProjectType == currentProjectType.ToString());
|
||||
|
||||
// 初始化一个空的子项目列表 wxProjectType == "wxVirtualHall", "wxProjectType": "wxvirtualHumans", "wxProjectType": "wxPlane", "wxProjectType": "wxTrack",
|
||||
if (projects == null || projects.Count <=0)
|
||||
{
|
||||
Log.Debug("没有该类型项目");
|
||||
//return null;
|
||||
}
|
||||
// Log.Warning($"userCode{userCode} type :{currentProjectType.ToString()} 数量 {projects.Count} ");
|
||||
if (projects != null)
|
||||
{
|
||||
|
||||
List<ARTrackData> arplacelist = new List<ARTrackData>();
|
||||
|
||||
List<ARTrackData> arTrackList = new List<ARTrackData>();
|
||||
foreach (var arProject in projects)
|
||||
{
|
||||
string trackSrc = arProject.trackImageSrc;
|
||||
foreach (var armodel in arProject.children)
|
||||
ARTrackData arTrackData = new ARTrackData();
|
||||
arTrackData.trackImageUrl = arProject.trackImageSrc;
|
||||
foreach (var children in arProject.children)
|
||||
{
|
||||
ARTrackData arModelData = new ARTrackData();
|
||||
arModelData._trackObjectUrl = armodel.resSrc;
|
||||
if (string.IsNullOrEmpty(armodel.trackImageSrc))
|
||||
ARTrackChildrenData arTrackChildrenData = new ARTrackChildrenData();
|
||||
arTrackChildrenData.trackResType = Enum.Parse<EARTrackType>(children.resType);
|
||||
switch (arTrackChildrenData.trackResType)
|
||||
{
|
||||
arModelData._trackImageUrl = trackSrc;
|
||||
case EARTrackType.model:
|
||||
arTrackChildrenData.showGlbModelUrl = children.resSrc;
|
||||
break;
|
||||
case EARTrackType.pic:
|
||||
arTrackChildrenData.showImageUrl = children.resSrc;
|
||||
break;
|
||||
case EARTrackType.video:
|
||||
arTrackChildrenData.showVideoUrl = children.resSrc;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
arModelData._trackImageUrl = armodel.trackImageSrc;
|
||||
}
|
||||
arModelData._modelName = armodel.resName;
|
||||
//Log.Debug(arModelData._modelName+ arModelData._glbUrl);
|
||||
arplacelist.Add(arModelData);
|
||||
}
|
||||
arTrackList.Add(arTrackData);
|
||||
}
|
||||
projectData.List_arTrackData = arplacelist ;
|
||||
projectData.List_arTrackData = arTrackList;
|
||||
}
|
||||
}
|
||||
|
||||
private static void SetARVirtualHumanData(ProjectType currentProjectType, List<ProjectListVo> projectListVo,ref ProjectData projectData)
|
||||
|
||||
private static void SetARVirtualHumanData(ProjectType currentProjectType,
|
||||
List<ProjectConfigListVoItem> projectListVo, ref ProjectData projectData)
|
||||
{
|
||||
var projects = projectListVo
|
||||
.FindAll(p => p.wxProjectType == currentProjectType.ToString());
|
||||
|
||||
// 初始化一个空的子项目列表 wxProjectType == "wxVirtualHall", "wxProjectType": "wxvirtualHumans", "wxProjectType": "wxPlane", "wxProjectType": "wxTrack",
|
||||
if (projects == null || projects.Count <=0)
|
||||
if (projects == null || projects.Count <= 0)
|
||||
{
|
||||
Log.Debug("没有该类型项目");
|
||||
//Log.Debug("没有该类型项目");
|
||||
//return null;
|
||||
}
|
||||
|
||||
if (projects != null)
|
||||
{
|
||||
List<ARVirtualHUmanModelData> arplacelist = new List<ARVirtualHUmanModelData>();
|
||||
|
||||
|
||||
foreach (var arProject in projects)
|
||||
{
|
||||
var tutuglbUrl = arProject.virtualHumanSrc;
|
||||
var tutuglbCoverUrl = arProject.projectCoverSrc;
|
||||
|
||||
|
||||
foreach (var armodel in arProject.children)
|
||||
{
|
||||
ARVirtualHUmanModelData arModelData = new ARVirtualHUmanModelData();
|
||||
|
||||
|
||||
arModelData._virtualHumanglbUrl = tutuglbUrl;
|
||||
arModelData._virtualHumanglbCoverUrl = tutuglbCoverUrl;
|
||||
arModelData._glbUrl = armodel.resSrc;
|
||||
arModelData._coverUrl = armodel.thumbnailUrl;
|
||||
arModelData._modelName = armodel.resName;
|
||||
//Log.Debug(arModelData._glbUrl);
|
||||
arplacelist.Add(arModelData);
|
||||
}
|
||||
}
|
||||
projectData.List_arHumanModelData = arplacelist ;
|
||||
projectData.List_arHumanModelData = arplacelist;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 私有方法
|
||||
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
@ -75,13 +75,13 @@ namespace GameLogic
|
||||
true);
|
||||
}
|
||||
|
||||
if (m_companyFourTopData == null)
|
||||
{
|
||||
GameEvent.Send(LoadEventDefine.InitSceneAndData, "置顶公司数据加载欧中...");
|
||||
m_companyFourTopData =
|
||||
await JsonHandleTool.HandleJsonToType<JsonData.CompanyFourTopData>(
|
||||
WebSettings._CompanyFourTopRquestUrl, false);
|
||||
}
|
||||
// if (m_companyFourTopData == null)
|
||||
// {
|
||||
// GameEvent.Send(LoadEventDefine.InitSceneAndData, "置顶公司数据加载欧中...");
|
||||
// m_companyFourTopData =
|
||||
// await JsonHandleTool.HandleJsonToType<JsonData.CompanyFourTopData>(
|
||||
// WebSettings._CompanyFourTopRquestUrl, false);
|
||||
// }
|
||||
|
||||
//GameEvent.Send(LoadEventDefine.InitSceneAndData, "公司数据加载欧中...");
|
||||
/*m_dataQueryAllCompany =
|
||||
|
@ -8,12 +8,11 @@ namespace GameLogic
|
||||
{
|
||||
//public JsonData.IndustryAllCompanyData data1;
|
||||
public JsonData.QueryAllCompanyData data2;
|
||||
public JsonData.CompanyFourTopData data3;
|
||||
|
||||
// Start is called before the first frame update
|
||||
async void Start()
|
||||
{
|
||||
data3 = await JsonHandleTool.HandleJsonToType<JsonData.CompanyFourTopData>(
|
||||
WebSettings._CompanyFourTopRquestUrl, false);
|
||||
|
||||
data2 = await JsonHandleTool.HandleJsonToType<JsonData.QueryAllCompanyData>(
|
||||
WebSettings._QueryAllCompany, false);
|
||||
// data1 = await JsonHandleTool.HandleJsonToType<JsonData.IndustryAllCompanyData >(WebSettings._CompanyAllProjectRequestUrl,false,1,14,"{}");
|
||||
@ -21,7 +20,7 @@ namespace GameLogic
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -170,19 +170,19 @@ namespace GameLogic
|
||||
new Rect(0, 0, texture.width, texture.height),
|
||||
new Vector2(0.5f, 0.5f)
|
||||
);
|
||||
Debug.LogWarning($"Actual downloaded Sprite size: {sizeInMB:F2} MB");
|
||||
//Debug.LogWarning($"Actual downloaded Sprite size: {sizeInMB:F2} MB");
|
||||
return sprite;
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogWarning(
|
||||
$"Server sent an error: {requestPost.Response.StatusCode}-{requestPost.Response.Message}");
|
||||
// Debug.LogWarning(
|
||||
// $"Server sent an error: {requestPost.Response.StatusCode}-{requestPost.Response.Message}");
|
||||
}
|
||||
break;
|
||||
|
||||
// 6. Error handling
|
||||
default:
|
||||
Debug.LogWarning($"Request finished with error! Request state: {requestPost.State}");
|
||||
//ebug.LogWarning($"Request finished with error! Request state: {requestPost.State}");
|
||||
break;
|
||||
}
|
||||
return null;
|
||||
|
@ -55,7 +55,7 @@ namespace GameLogic
|
||||
|
||||
private async UniTaskVoid UpdateComByData(CancellationToken token)
|
||||
{
|
||||
Log.Warning(token.IsCancellationRequested);
|
||||
//Log.Warning(token.IsCancellationRequested);
|
||||
if (token.IsCancellationRequested)
|
||||
{
|
||||
|
||||
|
@ -7,6 +7,7 @@ using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using TEngine;
|
||||
using TMPro;
|
||||
using dnlib.DotNet;
|
||||
|
||||
namespace GameLogic
|
||||
{
|
||||
@ -109,10 +110,11 @@ namespace GameLogic
|
||||
protected override void OnCreate()
|
||||
{
|
||||
base.OnCreate();
|
||||
|
||||
FourTopProjectDataSO fourTopProjectDataSo = GameModule.Resource.LoadAsset<FourTopProjectDataSO>("FourTopProjectDataSO");
|
||||
if (fourTopProjectDataSo == null) return;
|
||||
CreateSceneProject(fourTopProjectDataSo).Forget();
|
||||
CreateCompanyProject();
|
||||
CreateCompanyProject().Forget();
|
||||
HideTimeToClose = 99999;
|
||||
GameModule.UI.ShowUI<UIBottomSelectBox>();
|
||||
|
||||
@ -191,18 +193,18 @@ namespace GameLogic
|
||||
for (int i = 0; i < fourTopProjectDataSo.fourTopCompanyName.Count; i++)
|
||||
{
|
||||
TopCompanyConfig cfg = fourTopProjectDataSo.fourTopCompanyName[i];
|
||||
await DataConfigSystem.Instance.GetSingleProjectAllData(cfg.page, cfg.userCode);
|
||||
ProjectData projectData = await DataConfigSystem.Instance.GetSingleProjectAllData(cfg.page, cfg.userCode);
|
||||
if(projectData == null) continue;
|
||||
// = DataConfigSystem.Instance.GetProjectData(fourTopProjectDataSo.fourTopCompanyName[i]) ;
|
||||
|
||||
// ProjectData projectData = DataConfigSystem.Instance.GetProjectData(fourTopProjectDataSo.fourTopCompanyName[i]) ;
|
||||
// if(projectData == null) continue;
|
||||
//
|
||||
// GameObject arprojectGo = GameModule.Resource.LoadGameObject("UIARProjectExampleCom");
|
||||
// arprojectGo.transform.SetParent(m_scrollRectScene.content);
|
||||
// arprojectGo.transform.localPosition = Vector3.zero;
|
||||
// arprojectGo.transform.localScale = Vector3.one;
|
||||
// UIWidgetComARProjectExample arProjectExample = arprojectGo.AddComponent<UIWidgetComARProjectExample>();
|
||||
// arProjectExample.SetUp(projectData);
|
||||
// m_listSceneObjects.Add(arprojectGo);
|
||||
GameObject arprojectGo = GameModule.Resource.LoadGameObject("UIARProjectExampleCom");
|
||||
arprojectGo.transform.SetParent(m_scrollRectScene.content);
|
||||
arprojectGo.transform.localPosition = Vector3.zero;
|
||||
arprojectGo.transform.localScale = Vector3.one;
|
||||
UIWidgetComARProjectExample arProjectExample = arprojectGo.AddComponent<UIWidgetComARProjectExample>();
|
||||
arProjectExample.SetUp(projectData);
|
||||
m_listSceneObjects.Add(arprojectGo);
|
||||
}
|
||||
|
||||
}
|
||||
@ -213,22 +215,25 @@ namespace GameLogic
|
||||
GameModule.UI?.CloseUI<UIBottomSelectBox>();
|
||||
}
|
||||
|
||||
private void CreateCompanyProject()
|
||||
private async UniTaskVoid CreateCompanyProject()
|
||||
{
|
||||
List<JsonData.CompanyTopData> projectdataList = DataConfigSystem.Instance.GetDataListFromJson<JsonData.CompanyTopData>();
|
||||
if(projectdataList ==null) return;
|
||||
if (projectdataList.Count <= 0) return;
|
||||
for (int i = 0; i < projectdataList.Count; i++)
|
||||
{
|
||||
var json = await HttpHandleTool.UnityWebRequestPostText(SettingCompanyData._CompanyFourTopRquestUrl);
|
||||
Log.Debug(json);
|
||||
CompanyConfigRoot companyConfigRoot = JsonUtility.FromJson<CompanyConfigRoot>(json);
|
||||
List<CompanyConfigDataItem> companyDataList = companyConfigRoot.data;
|
||||
|
||||
ProjectData projectData = DataConfigSystem.Instance.GetProjectData(projectdataList[i].companyName);
|
||||
|
||||
if(companyDataList == null) return;
|
||||
if (companyDataList.Count <= 0) return;
|
||||
for (int i = 0; i < companyDataList.Count; i++)
|
||||
{
|
||||
var userCode = companyDataList[i].userCode;
|
||||
Log.Debug(userCode);
|
||||
ProjectData projectData = await DataConfigSystem.Instance.GetSingleCompanyAllData("1/14",userCode);
|
||||
GameObject arprojectGo = GameModule.Resource.LoadGameObject("UIARCompanyExampleCom");
|
||||
arprojectGo.transform.SetParent(m_scrollCompanyRect.content);
|
||||
arprojectGo.transform.localPosition = Vector3.zero;
|
||||
arprojectGo.transform.localScale = Vector3.one;
|
||||
UIWidgetComARCompanyExample arCompanyProjectExample = arprojectGo.AddComponent<UIWidgetComARCompanyExample>();
|
||||
|
||||
arCompanyProjectExample.SetUp(projectData);
|
||||
m_listCompanyObjects.Add(arprojectGo);
|
||||
}
|
||||
|
@ -119,7 +119,7 @@ MonoBehaviour:
|
||||
m_MinSize: {x: 400, y: 100}
|
||||
m_MaxSize: {x: 32384, y: 16192}
|
||||
vertical: 0
|
||||
controlID: 244
|
||||
controlID: 245
|
||||
draggingID: 0
|
||||
--- !u!114 &6
|
||||
MonoBehaviour:
|
||||
@ -145,7 +145,7 @@ MonoBehaviour:
|
||||
m_MinSize: {x: 300, y: 100}
|
||||
m_MaxSize: {x: 24288, y: 16192}
|
||||
vertical: 1
|
||||
controlID: 16
|
||||
controlID: 48
|
||||
draggingID: 0
|
||||
--- !u!114 &7
|
||||
MonoBehaviour:
|
||||
@ -168,11 +168,11 @@ MonoBehaviour:
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1429
|
||||
height: 342
|
||||
height: 486
|
||||
m_MinSize: {x: 300, y: 50}
|
||||
m_MaxSize: {x: 24288, y: 8096}
|
||||
vertical: 0
|
||||
controlID: 17
|
||||
controlID: 49
|
||||
draggingID: 0
|
||||
--- !u!114 &8
|
||||
MonoBehaviour:
|
||||
@ -192,7 +192,7 @@ MonoBehaviour:
|
||||
x: 0
|
||||
y: 0
|
||||
width: 390
|
||||
height: 342
|
||||
height: 486
|
||||
m_MinSize: {x: 201, y: 226}
|
||||
m_MaxSize: {x: 4001, y: 4026}
|
||||
m_ActualView: {fileID: 17}
|
||||
@ -218,7 +218,7 @@ MonoBehaviour:
|
||||
x: 390
|
||||
y: 0
|
||||
width: 302
|
||||
height: 342
|
||||
height: 486
|
||||
m_MinSize: {x: 202, y: 226}
|
||||
m_MaxSize: {x: 4002, y: 4026}
|
||||
m_ActualView: {fileID: 18}
|
||||
@ -244,7 +244,7 @@ MonoBehaviour:
|
||||
x: 692
|
||||
y: 0
|
||||
width: 737
|
||||
height: 342
|
||||
height: 486
|
||||
m_MinSize: {x: 52, y: 76}
|
||||
m_MaxSize: {x: 4002, y: 4026}
|
||||
m_ActualView: {fileID: 16}
|
||||
@ -271,9 +271,9 @@ MonoBehaviour:
|
||||
m_Position:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 342
|
||||
y: 486
|
||||
width: 1429
|
||||
height: 591
|
||||
height: 447
|
||||
m_MinSize: {x: 300, y: 50}
|
||||
m_MaxSize: {x: 24288, y: 8096}
|
||||
vertical: 0
|
||||
@ -296,8 +296,8 @@ MonoBehaviour:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 937
|
||||
height: 591
|
||||
width: 705
|
||||
height: 447
|
||||
m_MinSize: {x: 101, y: 126}
|
||||
m_MaxSize: {x: 4001, y: 4026}
|
||||
m_ActualView: {fileID: 19}
|
||||
@ -320,10 +320,10 @@ MonoBehaviour:
|
||||
m_Children: []
|
||||
m_Position:
|
||||
serializedVersion: 2
|
||||
x: 937
|
||||
x: 705
|
||||
y: 0
|
||||
width: 202
|
||||
height: 591
|
||||
width: 434
|
||||
height: 447
|
||||
m_MinSize: {x: 232, y: 276}
|
||||
m_MaxSize: {x: 10002, y: 10026}
|
||||
m_ActualView: {fileID: 20}
|
||||
@ -349,7 +349,7 @@ MonoBehaviour:
|
||||
x: 1139
|
||||
y: 0
|
||||
width: 290
|
||||
height: 591
|
||||
height: 447
|
||||
m_MinSize: {x: 232, y: 276}
|
||||
m_MaxSize: {x: 10002, y: 10026}
|
||||
m_ActualView: {fileID: 21}
|
||||
@ -407,7 +407,7 @@ MonoBehaviour:
|
||||
x: 693
|
||||
y: 24
|
||||
width: 735
|
||||
height: 316
|
||||
height: 460
|
||||
m_SerializedDataModeController:
|
||||
m_DataMode: 0
|
||||
m_PreferredDataMode: 0
|
||||
@ -464,22 +464,22 @@ MonoBehaviour:
|
||||
x: 0
|
||||
y: 21
|
||||
width: 735
|
||||
height: 295
|
||||
m_Scale: {x: 0.22113943, y: 0.22113943}
|
||||
m_Translation: {x: 367.5, y: 147.5}
|
||||
height: 439
|
||||
m_Scale: {x: 0.32908547, y: 0.32908547}
|
||||
m_Translation: {x: 367.5, y: 219.50002}
|
||||
m_MarginLeft: 0
|
||||
m_MarginRight: 0
|
||||
m_MarginTop: 0
|
||||
m_MarginBottom: 0
|
||||
m_LastShownAreaInsideMargins:
|
||||
serializedVersion: 2
|
||||
x: -1661.8474
|
||||
x: -1116.7312
|
||||
y: -667
|
||||
width: 3323.6948
|
||||
width: 2233.4624
|
||||
height: 1334
|
||||
m_MinimalGUI: 1
|
||||
m_defaultScale: 0.22113943
|
||||
m_LastWindowPixelSize: {x: 735, y: 316}
|
||||
m_defaultScale: 0.32908547
|
||||
m_LastWindowPixelSize: {x: 735, y: 460}
|
||||
m_ClearInEditMode: 1
|
||||
m_NoCameraWarning: 1
|
||||
m_LowResolutionForAspectRatios: 01000101000000000000
|
||||
@ -509,7 +509,7 @@ MonoBehaviour:
|
||||
x: 0
|
||||
y: 24
|
||||
width: 389
|
||||
height: 316
|
||||
height: 460
|
||||
m_SerializedDataModeController:
|
||||
m_DataMode: 0
|
||||
m_PreferredDataMode: 0
|
||||
@ -526,7 +526,7 @@ MonoBehaviour:
|
||||
scrollPos: {x: 0, y: 0}
|
||||
m_SelectedIDs:
|
||||
m_LastClickedID: 0
|
||||
m_ExpandedIDs: 5a29fdffcc75ffff4084ffff8888ffffea88fffff488fffffe88ffff0e89ffff9289ffff84faffff86fafffff4ffffff3a0501008e050100920501004ecd0100
|
||||
m_ExpandedIDs: a0f5ffff
|
||||
m_RenameOverlay:
|
||||
m_UserAcceptedRename: 0
|
||||
m_Name:
|
||||
@ -575,7 +575,7 @@ MonoBehaviour:
|
||||
x: 391
|
||||
y: 24
|
||||
width: 300
|
||||
height: 316
|
||||
height: 460
|
||||
m_SerializedDataModeController:
|
||||
m_DataMode: 0
|
||||
m_PreferredDataMode: 0
|
||||
@ -1238,8 +1238,8 @@ MonoBehaviour:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 24
|
||||
width: 936
|
||||
height: 565
|
||||
width: 704
|
||||
height: 421
|
||||
m_SerializedDataModeController:
|
||||
m_DataMode: 0
|
||||
m_PreferredDataMode: 0
|
||||
@ -1272,10 +1272,10 @@ MonoBehaviour:
|
||||
m_TextWithWhitespace: "Project\u200B"
|
||||
m_Pos:
|
||||
serializedVersion: 2
|
||||
x: 938
|
||||
x: 706
|
||||
y: 24
|
||||
width: 200
|
||||
height: 565
|
||||
width: 432
|
||||
height: 421
|
||||
m_SerializedDataModeController:
|
||||
m_DataMode: 0
|
||||
m_PreferredDataMode: 0
|
||||
@ -1314,10 +1314,10 @@ MonoBehaviour:
|
||||
m_LockTracker:
|
||||
m_IsLocked: 1
|
||||
m_FolderTreeState:
|
||||
scrollPos: {x: 0, y: 229}
|
||||
m_SelectedIDs: d8310100
|
||||
m_LastClickedID: 78296
|
||||
m_ExpandedIDs: 000000002425010026250100282501002a2501002c2501002e25010030250100322501003425010036250100382501003a2501003c2501003e25010040250100422501004425010046250100482501004a2501004c2501004e25010050250100522501005425010056250100582501005a2501005c2501005e25010060250100622501006425010066250100682501006a2501006c2501006e25010070250100722501007425010076250100782501007a2501007c250100
|
||||
scrollPos: {x: 0, y: 655}
|
||||
m_SelectedIDs: 4c260100
|
||||
m_LastClickedID: 75340
|
||||
m_ExpandedIDs: 0000000026090100280901002a0901002c0901002e09010030090100320901003409010036090100380901003a0901003c0901003e09010040090100420901004409010046090100480901004a0901004c0901004e09010050090100520901005409010056090100580901005a0901005c0901005e09010060090100620901006409010066090100680901006a0901006c0901006e09010070090100720901007409010076090100780901007a0901007c0901007e090100
|
||||
m_RenameOverlay:
|
||||
m_UserAcceptedRename: 0
|
||||
m_Name:
|
||||
@ -1346,7 +1346,7 @@ MonoBehaviour:
|
||||
scrollPos: {x: 0, y: 0}
|
||||
m_SelectedIDs:
|
||||
m_LastClickedID: 0
|
||||
m_ExpandedIDs: 000000002425010026250100282501002a2501002c2501002e25010030250100322501003425010036250100382501003a2501003c2501003e25010040250100422501004425010046250100482501004a2501004c2501004e25010050250100522501005425010056250100582501005a2501005c2501005e25010060250100622501006425010066250100682501006a2501006c2501006e25010070250100722501007425010076250100782501007a2501007c250100
|
||||
m_ExpandedIDs: 0000000026090100280901002a0901002c0901002e09010030090100320901003409010036090100380901003a0901003c0901003e09010040090100420901004409010046090100480901004a0901004c0901004e09010050090100520901005409010056090100580901005a0901005c0901005e09010060090100620901006409010066090100680901006a0901006c0901006e09010070090100720901007409010076090100780901007a0901007c0901007e090100
|
||||
m_RenameOverlay:
|
||||
m_UserAcceptedRename: 0
|
||||
m_Name:
|
||||
@ -1374,7 +1374,7 @@ MonoBehaviour:
|
||||
m_ListAreaState:
|
||||
m_SelectedInstanceIDs:
|
||||
m_LastClickedInstanceID: 0
|
||||
m_HadKeyboardFocusLastEvent: 1
|
||||
m_HadKeyboardFocusLastEvent: 0
|
||||
m_ExpandedInstanceIDs: c62300009e44060000000000bc4f0100
|
||||
m_RenameOverlay:
|
||||
m_UserAcceptedRename: 0
|
||||
@ -1428,7 +1428,7 @@ MonoBehaviour:
|
||||
x: 1140
|
||||
y: 24
|
||||
width: 288
|
||||
height: 565
|
||||
height: 421
|
||||
m_SerializedDataModeController:
|
||||
m_DataMode: 0
|
||||
m_PreferredDataMode: 0
|
||||
@ -1468,9 +1468,9 @@ MonoBehaviour:
|
||||
m_IsLocked: 1
|
||||
m_FolderTreeState:
|
||||
scrollPos: {x: 0, y: 37}
|
||||
m_SelectedIDs: 1c070100
|
||||
m_LastClickedID: 67356
|
||||
m_ExpandedIDs: 000000002425010026250100282501002a2501002c2501002e25010030250100322501003425010036250100382501003a2501003c2501003e25010040250100422501004425010046250100482501004a2501004c2501004e25010050250100522501005425010056250100582501005a2501005c2501005e25010060250100622501006425010066250100682501006a2501006c2501006e25010070250100722501007425010076250100782501007a2501007c250100
|
||||
m_SelectedIDs: fc250100
|
||||
m_LastClickedID: 75260
|
||||
m_ExpandedIDs: 0000000026090100280901002a0901002c0901002e09010030090100320901003409010036090100380901003a0901003c0901003e09010040090100420901004409010046090100480901004a0901004c0901004e09010050090100520901005409010056090100580901005a0901005c0901005e09010060090100620901006409010066090100680901006a0901006c0901006e09010070090100720901007409010076090100780901007a0901007c0901007e090100
|
||||
m_RenameOverlay:
|
||||
m_UserAcceptedRename: 0
|
||||
m_Name:
|
||||
@ -1499,7 +1499,7 @@ MonoBehaviour:
|
||||
scrollPos: {x: 0, y: 0}
|
||||
m_SelectedIDs:
|
||||
m_LastClickedID: 0
|
||||
m_ExpandedIDs: 000000002425010026250100282501002a2501002c2501002e25010030250100322501003425010036250100382501003a2501003c2501003e25010040250100422501004425010046250100482501004a2501004c2501004e25010050250100522501005425010056250100582501005a2501005c2501005e25010060250100622501006425010066250100682501006a2501006c2501006e25010070250100722501007425010076250100782501007a2501007c250100
|
||||
m_ExpandedIDs: 0000000026090100280901002a0901002c0901002e09010030090100320901003409010036090100380901003a0901003c0901003e09010040090100420901004409010046090100480901004a0901004c0901004e09010050090100520901005409010056090100580901005a0901005c0901005e09010060090100620901006409010066090100680901006a0901006c0901006e09010070090100720901007409010076090100780901007a0901007c0901007e090100
|
||||
m_RenameOverlay:
|
||||
m_UserAcceptedRename: 0
|
||||
m_Name:
|
||||
|
Loading…
x
Reference in New Issue
Block a user