修改一些问题
This commit is contained in:
parent
dea01887b4
commit
eb10c13929
|
@ -248,6 +248,7 @@ GameObject:
|
|||
- component: {fileID: 7841566712123838780}
|
||||
- component: {fileID: 7841566712123838781}
|
||||
- component: {fileID: 7841566712123838783}
|
||||
- component: {fileID: -7945763279749003775}
|
||||
m_Layer: 5
|
||||
m_Name: OptionItem
|
||||
m_TagString: Untagged
|
||||
|
@ -330,3 +331,48 @@ MonoBehaviour:
|
|||
m_EditorClassIdentifier:
|
||||
ID: {fileID: 7841566711167579075}
|
||||
info: {fileID: 7841566711052037343}
|
||||
selfBtn: {fileID: -7945763279749003775}
|
||||
--- !u!114 &-7945763279749003775
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7841566712123838755}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Navigation:
|
||||
m_Mode: 3
|
||||
m_WrapAround: 0
|
||||
m_SelectOnUp: {fileID: 0}
|
||||
m_SelectOnDown: {fileID: 0}
|
||||
m_SelectOnLeft: {fileID: 0}
|
||||
m_SelectOnRight: {fileID: 0}
|
||||
m_Transition: 1
|
||||
m_Colors:
|
||||
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
|
||||
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
|
||||
m_ColorMultiplier: 1
|
||||
m_FadeDuration: 0.1
|
||||
m_SpriteState:
|
||||
m_HighlightedSprite: {fileID: 0}
|
||||
m_PressedSprite: {fileID: 0}
|
||||
m_SelectedSprite: {fileID: 0}
|
||||
m_DisabledSprite: {fileID: 0}
|
||||
m_AnimationTriggers:
|
||||
m_NormalTrigger: Normal
|
||||
m_HighlightedTrigger: Highlighted
|
||||
m_PressedTrigger: Pressed
|
||||
m_SelectedTrigger: Selected
|
||||
m_DisabledTrigger: Disabled
|
||||
m_Interactable: 1
|
||||
m_TargetGraphic: {fileID: 7841566712123838781}
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -55,6 +55,7 @@ namespace Adam
|
|||
closeBtn.gameObject.SetActive(true);
|
||||
SwitchPanel(false);
|
||||
SceneLoad.Instance.SceneChange("工具间场景");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,6 +18,7 @@ namespace Adam
|
|||
public GameObject[] panels;
|
||||
public GameObject buttomPanel;
|
||||
public Toggle BirdEyeView;
|
||||
public FirstPersonController firstPersonController;
|
||||
// Use this for initialization
|
||||
private void Start()
|
||||
{
|
||||
|
@ -31,6 +32,9 @@ namespace Adam
|
|||
toggles[index].onValueChanged.AddListener((isOn) =>
|
||||
{
|
||||
panels[index].SetActive(isOn);
|
||||
if (firstPersonController == null)
|
||||
firstPersonController = GameObject.FindGameObjectWithTag("Player").GetComponent<FirstPersonController>();
|
||||
firstPersonController.enabled = !isOn;
|
||||
});
|
||||
}
|
||||
SwitchPanel(false);
|
||||
|
|
|
@ -16,6 +16,7 @@ namespace Components
|
|||
{
|
||||
public Text ID;
|
||||
public Text info;
|
||||
public Button selfBtn;
|
||||
public void SetValue(string _id, string _info)
|
||||
{
|
||||
ID.text = _id;
|
||||
|
|
|
@ -13,7 +13,7 @@ using UnityEngine.UI;
|
|||
//@description:
|
||||
//============================================================
|
||||
|
||||
public class ToolItem : MonoBehaviour,IPointerEnterHandler,IPointerExitHandler
|
||||
public class ToolItem : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler
|
||||
{
|
||||
public string toolName;
|
||||
public Button closeButton;
|
||||
|
@ -39,7 +39,7 @@ public class ToolItem : MonoBehaviour,IPointerEnterHandler,IPointerExitHandler
|
|||
{
|
||||
toolName = name;
|
||||
closeButton.onClick.AddListener(OnClose);
|
||||
|
||||
|
||||
Texture2D icon = Resources.Load<Texture2D>("New/UI/" + name);
|
||||
showIcon.sprite = ToSprite(icon);
|
||||
originPos = modelTransform.localPosition;
|
||||
|
@ -51,7 +51,10 @@ public class ToolItem : MonoBehaviour,IPointerEnterHandler,IPointerExitHandler
|
|||
public void SetState(bool isActive)
|
||||
{
|
||||
closeButton.gameObject.SetActive(isActive);
|
||||
selfButton.interactable = !isActive;
|
||||
if (toolName == "工作卡")
|
||||
selfButton.interactable = isActive;
|
||||
else
|
||||
selfButton.interactable = !isActive;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -74,7 +77,7 @@ public class ToolItem : MonoBehaviour,IPointerEnterHandler,IPointerExitHandler
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
private Sprite ToSprite(Texture2D t)
|
||||
{
|
||||
|
@ -96,7 +99,7 @@ public class ToolItem : MonoBehaviour,IPointerEnterHandler,IPointerExitHandler
|
|||
public void OnPointerEnter(PointerEventData eventData)
|
||||
{
|
||||
showName.text = toolName;
|
||||
tips.transform.position = transform.position + new Vector3(0,35 , 0);
|
||||
tips.transform.position = transform.position + new Vector3(0, 35, 0);
|
||||
tips.SetActive(true);
|
||||
}
|
||||
|
||||
|
|
|
@ -50,7 +50,6 @@ public enum RightAndWrong
|
|||
|
||||
public class ToolModelClick : MonoBehaviour
|
||||
{
|
||||
|
||||
public Attribute attribute = Attribute.defaultModel;
|
||||
public RightAndWrong rightAndWrong = RightAndWrong.defaultModel;
|
||||
|
||||
|
@ -64,13 +63,6 @@ public class ToolModelClick : MonoBehaviour
|
|||
|
||||
public Highlighter selfHighlighter;
|
||||
|
||||
//public GameObject tipPrefab;
|
||||
//public GameObject tip;
|
||||
//[ContextMenu("Set")]
|
||||
//public void TTTTT()
|
||||
//{
|
||||
// tipPrefab = Resources.Load<GameObject>("ModelTips");
|
||||
//}
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
|
@ -92,18 +84,14 @@ public class ToolModelClick : MonoBehaviour
|
|||
var current = SceneManager.GetActiveScene();
|
||||
if (current.name == "工具间场景")
|
||||
UIManager.Instance.SetThreeDTip(gameObject.name);
|
||||
//tip = Instantiate(tipPrefab);
|
||||
//tip.GetComponentInChildren<TextMesh>().text = gameObject.name;
|
||||
//tip.transform.localPosition = transform.localPosition;
|
||||
//tip.transform.localScale = Vector3.one;
|
||||
//tip.transform.LookAt(Camera.main.transform.position);
|
||||
//tip.transform.localEulerAngles = new Vector3(90f, 0, 0);
|
||||
}
|
||||
|
||||
private void OnMouseDown()
|
||||
{
|
||||
if (EventSystem.current.IsPointerOverGameObject())
|
||||
return;
|
||||
var current = SceneManager.GetActiveScene();
|
||||
if (current.name != "工具间场景") return;
|
||||
onDown?.Invoke();
|
||||
ToolsItemManager.Instance.CreatToolItem(gameObject);
|
||||
UIManager.Instance.SetThreeDTip("");
|
||||
|
@ -124,6 +112,5 @@ public class ToolModelClick : MonoBehaviour
|
|||
return;
|
||||
onExit?.Invoke();
|
||||
UIManager.Instance.SetThreeDTip("");
|
||||
//Destroy(tip);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,181 +18,182 @@ namespace MobileTerminal
|
|||
{
|
||||
public string state;
|
||||
public string message;
|
||||
public Data data;
|
||||
}
|
||||
[Serializable]
|
||||
public class Data
|
||||
{
|
||||
public JBSX[] jbsx;
|
||||
public JBXX[] jbxx;
|
||||
public JLZZXX[] jlzzxx;
|
||||
}
|
||||
[Serializable]
|
||||
public class JBSX
|
||||
{
|
||||
/// <summary>
|
||||
/// 周保林 用电户:3209600004110
|
||||
/// </summary>
|
||||
public string 名称;
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string 用户编号;
|
||||
/// <summary>
|
||||
/// 仪征市供电公司
|
||||
/// </summary>
|
||||
public string 供电单位;
|
||||
/// <summary>
|
||||
/// 考核
|
||||
/// </summary>
|
||||
public string 用户分类;
|
||||
/// <summary>
|
||||
/// 否
|
||||
/// </summary>
|
||||
public string 是否专线;
|
||||
/// <summary>
|
||||
/// 正常用电客户
|
||||
/// </summary>
|
||||
public string 用户状态;
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string 合同容量;
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string 运行容量;
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string 首次建档日期;
|
||||
/// <summary>
|
||||
/// 江苏省扬州市仪征市真州镇(仪征市区)镇解放东路12号
|
||||
/// </summary>
|
||||
public string 用电地址;
|
||||
/// <summary>
|
||||
/// 无转供
|
||||
/// </summary>
|
||||
public string 转供户信息;
|
||||
}
|
||||
[Serializable]
|
||||
public class JBXX
|
||||
{
|
||||
/// <summary>
|
||||
/// 周保林
|
||||
/// </summary>
|
||||
public string 用户名称;
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string 用户编号;
|
||||
/// <summary>
|
||||
/// 正常用电客户
|
||||
/// </summary>
|
||||
public string 用户状态;
|
||||
/// <summary>
|
||||
/// 考核
|
||||
/// </summary>
|
||||
public string 用户分类;
|
||||
/// <summary>
|
||||
/// 仪征市供电公司
|
||||
/// </summary>
|
||||
public string 供电单位;
|
||||
/// <summary>
|
||||
/// 太阳能发电
|
||||
/// </summary>
|
||||
public string 所属行业;
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string 合同容量;
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string 运行容量;
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string 电压等级;
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string 重要等级;
|
||||
/// <summary>
|
||||
/// 考核
|
||||
/// </summary>
|
||||
public string 用电类别;
|
||||
/// <summary>
|
||||
/// 否
|
||||
/// </summary>
|
||||
public string 是否重点用户;
|
||||
/// <summary>
|
||||
/// 否
|
||||
/// </summary>
|
||||
public string 是否专线;
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string 首次建档;
|
||||
/// <summary>
|
||||
/// 否
|
||||
/// </summary>
|
||||
public string 是否双电源;
|
||||
/// <summary>
|
||||
/// PMS_石桥146线
|
||||
/// </summary>
|
||||
public string 线路名称;
|
||||
/// <summary>
|
||||
/// 江苏省扬州市仪征市真州镇(仪征市区)镇解放东路12号
|
||||
/// </summary>
|
||||
public string 用电地址;
|
||||
}
|
||||
[Serializable]
|
||||
public class JLZZXX
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string 序号;
|
||||
/// <summary>
|
||||
/// 上网计量点1
|
||||
/// </summary>
|
||||
public string 计量点名称;
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string 计量点ID;
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string 电表ID;
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string 电表资产编号;
|
||||
/// <summary>
|
||||
/// 否
|
||||
/// </summary>
|
||||
public string 是否参考表;
|
||||
/// <summary>
|
||||
/// 否
|
||||
/// </summary>
|
||||
public string 是否专线;
|
||||
/// <summary>
|
||||
/// 上网关口
|
||||
/// </summary>
|
||||
public string 主用途类型;
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string 计量点级数;
|
||||
/// <summary>
|
||||
/// 在用
|
||||
/// </summary>
|
||||
public string 状态;
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string 倍率;
|
||||
public List<string> data;
|
||||
}
|
||||
|
||||
//[Serializable]
|
||||
//public class Data
|
||||
//{
|
||||
// public JBSX[] jbsx;
|
||||
// public JBXX[] jbxx;
|
||||
// public JLZZXX[] jlzzxx;
|
||||
//}
|
||||
//[Serializable]
|
||||
//public class JBSX
|
||||
//{
|
||||
// /// <summary>
|
||||
// /// 周保林 用电户:3209600004110
|
||||
// /// </summary>
|
||||
// public string 名称;
|
||||
// /// <summary>
|
||||
// ///
|
||||
// /// </summary>
|
||||
// public string 用户编号;
|
||||
// /// <summary>
|
||||
// /// 仪征市供电公司
|
||||
// /// </summary>
|
||||
// public string 供电单位;
|
||||
// /// <summary>
|
||||
// /// 考核
|
||||
// /// </summary>
|
||||
// public string 用户分类;
|
||||
// /// <summary>
|
||||
// /// 否
|
||||
// /// </summary>
|
||||
// public string 是否专线;
|
||||
// /// <summary>
|
||||
// /// 正常用电客户
|
||||
// /// </summary>
|
||||
// public string 用户状态;
|
||||
// /// <summary>
|
||||
// ///
|
||||
// /// </summary>
|
||||
// public string 合同容量;
|
||||
// /// <summary>
|
||||
// ///
|
||||
// /// </summary>
|
||||
// public string 运行容量;
|
||||
// /// <summary>
|
||||
// ///
|
||||
// /// </summary>
|
||||
// public string 首次建档日期;
|
||||
// /// <summary>
|
||||
// /// 江苏省扬州市仪征市真州镇(仪征市区)镇解放东路12号
|
||||
// /// </summary>
|
||||
// public string 用电地址;
|
||||
// /// <summary>
|
||||
// /// 无转供
|
||||
// /// </summary>
|
||||
// public string 转供户信息;
|
||||
//}
|
||||
//[Serializable]
|
||||
//public class JBXX
|
||||
//{
|
||||
// /// <summary>
|
||||
// /// 周保林
|
||||
// /// </summary>
|
||||
// public string 用户名称;
|
||||
// /// <summary>
|
||||
// ///
|
||||
// /// </summary>
|
||||
// public string 用户编号;
|
||||
// /// <summary>
|
||||
// /// 正常用电客户
|
||||
// /// </summary>
|
||||
// public string 用户状态;
|
||||
// /// <summary>
|
||||
// /// 考核
|
||||
// /// </summary>
|
||||
// public string 用户分类;
|
||||
// /// <summary>
|
||||
// /// 仪征市供电公司
|
||||
// /// </summary>
|
||||
// public string 供电单位;
|
||||
// /// <summary>
|
||||
// /// 太阳能发电
|
||||
// /// </summary>
|
||||
// public string 所属行业;
|
||||
// /// <summary>
|
||||
// ///
|
||||
// /// </summary>
|
||||
// public string 合同容量;
|
||||
// /// <summary>
|
||||
// ///
|
||||
// /// </summary>
|
||||
// public string 运行容量;
|
||||
// /// <summary>
|
||||
// ///
|
||||
// /// </summary>
|
||||
// public string 电压等级;
|
||||
// /// <summary>
|
||||
// ///
|
||||
// /// </summary>
|
||||
// public string 重要等级;
|
||||
// /// <summary>
|
||||
// /// 考核
|
||||
// /// </summary>
|
||||
// public string 用电类别;
|
||||
// /// <summary>
|
||||
// /// 否
|
||||
// /// </summary>
|
||||
// public string 是否重点用户;
|
||||
// /// <summary>
|
||||
// /// 否
|
||||
// /// </summary>
|
||||
// public string 是否专线;
|
||||
// /// <summary>
|
||||
// ///
|
||||
// /// </summary>
|
||||
// public string 首次建档;
|
||||
// /// <summary>
|
||||
// /// 否
|
||||
// /// </summary>
|
||||
// public string 是否双电源;
|
||||
// /// <summary>
|
||||
// /// PMS_石桥146线
|
||||
// /// </summary>
|
||||
// public string 线路名称;
|
||||
// /// <summary>
|
||||
// /// 江苏省扬州市仪征市真州镇(仪征市区)镇解放东路12号
|
||||
// /// </summary>
|
||||
// public string 用电地址;
|
||||
//}
|
||||
//[Serializable]
|
||||
//public class JLZZXX
|
||||
//{
|
||||
// /// <summary>
|
||||
// ///
|
||||
// /// </summary>
|
||||
// public string 序号;
|
||||
// /// <summary>
|
||||
// /// 上网计量点1
|
||||
// /// </summary>
|
||||
// public string 计量点名称;
|
||||
// /// <summary>
|
||||
// ///
|
||||
// /// </summary>
|
||||
// public string 计量点ID;
|
||||
// /// <summary>
|
||||
// ///
|
||||
// /// </summary>
|
||||
// public string 电表ID;
|
||||
// /// <summary>
|
||||
// ///
|
||||
// /// </summary>
|
||||
// public string 电表资产编号;
|
||||
// /// <summary>
|
||||
// /// 否
|
||||
// /// </summary>
|
||||
// public string 是否参考表;
|
||||
// /// <summary>
|
||||
// /// 否
|
||||
// /// </summary>
|
||||
// public string 是否专线;
|
||||
// /// <summary>
|
||||
// /// 上网关口
|
||||
// /// </summary>
|
||||
// public string 主用途类型;
|
||||
// /// <summary>
|
||||
// ///
|
||||
// /// </summary>
|
||||
// public string 计量点级数;
|
||||
// /// <summary>
|
||||
// /// 在用
|
||||
// /// </summary>
|
||||
// public string 状态;
|
||||
// /// <summary>
|
||||
// ///
|
||||
// /// </summary>
|
||||
// public string 倍率;
|
||||
//}
|
||||
}
|
||||
|
|
|
@ -103,15 +103,28 @@ namespace Adam
|
|||
for (int i = 0; i < af.data.Length; i++)
|
||||
{
|
||||
int index = i;
|
||||
string infoTemp = af.data[index];
|
||||
OptionItem optionItemTemp = Instantiate(optionItemPrefab, optionItemContent);
|
||||
optionItemTemp.SetValue(index.ToString(), af.data[i]);
|
||||
optionItemTemp.SetValue(index.ToString(), infoTemp);
|
||||
optionItemTemp.selfBtn.onClick.AddListener(() =>
|
||||
{
|
||||
OnOptionItemClick(index, infoTemp, name);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void OnOptionItemClick(int index,string info)
|
||||
private void OnOptionItemClick(int index, string info,string name)
|
||||
{
|
||||
aqcss[index].text = info;
|
||||
if (name == "FXDFX")
|
||||
{
|
||||
fxdfx[index].text = info;
|
||||
}
|
||||
else if (name == "AQCS")
|
||||
{
|
||||
aqcss[index].text = info;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,8 +18,8 @@ using UnityEngine.UI;
|
|||
|
||||
public class MobileTerminalController : MonoBehaviour
|
||||
{
|
||||
public string userViewUrl = "http://111.229.30.246:10013/Handler/Taiqu.ashx?action=dianbianhao&bianhao=";
|
||||
public string tabelViewUrl = "http://111.229.30.246:10013/Handler/Taiqu.ashx?action=bianhaobiaoji&bianhao=";
|
||||
public string userViewUrl;
|
||||
public string tabelViewUrl;
|
||||
public InputField number;
|
||||
/// <summary>
|
||||
/// 表记数据
|
||||
|
@ -68,32 +68,37 @@ public class MobileTerminalController : MonoBehaviour
|
|||
isOnLoad = true;
|
||||
string url = userViewUrl + number.text;
|
||||
mData = await AsyncWebReq.Get<UserViewData>(url);
|
||||
string jsonData = JsonConvert.SerializeObject(mData);
|
||||
AsyncWebReq.SetValue(jsonData, out jbsx, out jbxx, out jlzzxx);
|
||||
|
||||
foreach (var item in jbsx)
|
||||
for (int i = 0; i < mData.data.Count; i++)
|
||||
{
|
||||
MobileTerminalTipsItem itemTip = Instantiate(itemPrfab, userContent);
|
||||
string info = item.Key + ": " + item.Value;
|
||||
itemTip.SetValue(info);
|
||||
itemTip.SetValue(mData.data[i]);
|
||||
}
|
||||
//string jsonData = JsonConvert.SerializeObject(mData);
|
||||
//AsyncWebReq.SetValue(jsonData, out jbsx, out jbxx, out jlzzxx);
|
||||
|
||||
foreach (var item in jbxx)
|
||||
{
|
||||
MobileTerminalTipsItem itemTip = Instantiate(itemPrfab, userContent);
|
||||
string info = item.Key + ": " + item.Value;
|
||||
itemTip.SetValue(info);
|
||||
}
|
||||
//foreach (var item in jbsx)
|
||||
//{
|
||||
// MobileTerminalTipsItem itemTip = Instantiate(itemPrfab, userContent);
|
||||
// string info = item.Key + ": " + item.Value;
|
||||
// itemTip.SetValue(info);
|
||||
//}
|
||||
|
||||
for (int i = 0; i < jlzzxx.Count; i++)
|
||||
{
|
||||
foreach (var item in jlzzxx[i])
|
||||
{
|
||||
MobileTerminalTipsItem itemTip = Instantiate(itemPrfab, userContent);
|
||||
string info = item.Key + ": " + item.Value;
|
||||
itemTip.SetValue(info);
|
||||
}
|
||||
}
|
||||
//foreach (var item in jbxx)
|
||||
//{
|
||||
// MobileTerminalTipsItem itemTip = Instantiate(itemPrfab, userContent);
|
||||
// string info = item.Key + ": " + item.Value;
|
||||
// itemTip.SetValue(info);
|
||||
//}
|
||||
|
||||
//for (int i = 0; i < jlzzxx.Count; i++)
|
||||
//{
|
||||
// foreach (var item in jlzzxx[i])
|
||||
// {
|
||||
// MobileTerminalTipsItem itemTip = Instantiate(itemPrfab, userContent);
|
||||
// string info = item.Key + ": " + item.Value;
|
||||
// itemTip.SetValue(info);
|
||||
// }
|
||||
//}
|
||||
SwitchView(0);
|
||||
isOnLoad = false;
|
||||
}
|
||||
|
@ -125,7 +130,7 @@ public class MobileTerminalController : MonoBehaviour
|
|||
/// </summary>
|
||||
public void OnElectricitView()
|
||||
{
|
||||
if(isOnLoad ) return;
|
||||
if (isOnLoad) return;
|
||||
if (number.text == "") return;
|
||||
OnUser();
|
||||
|
||||
|
|
|
@ -12,5 +12,12 @@ using UnityEngine;
|
|||
|
||||
public class ToolModelManager : MonoBehaviour
|
||||
{
|
||||
|
||||
public ToolModelClick[] toolModelClicks;
|
||||
|
||||
public void GetAllToolModels()
|
||||
{
|
||||
GameObject toolContent = GameObject.FindGameObjectWithTag("AllTools");
|
||||
toolModelClicks = toolContent.transform.GetComponentsInChildren<ToolModelClick>();
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -128,6 +128,15 @@ public class ToolsItemManager : MonoSingleton<ToolsItemManager>
|
|||
}
|
||||
}
|
||||
|
||||
public void ResetState()
|
||||
{
|
||||
for (int i = 0; i < toolItems.Count; i++)
|
||||
{
|
||||
toolItems[i].SetState(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public IEnumerator WaitShowServerRecorderPanel()
|
||||
{
|
||||
ServerRecorderPanel.gameObject.SetActive(true);
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
using Adam;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
//============================================================
|
||||
|
@ -20,6 +21,7 @@ public class UIManager : MonoSingleton<UIManager>
|
|||
public BottomController bottomCotroller;
|
||||
public JobCardController jobCardController;
|
||||
public ExitCheckController exitCheckController;
|
||||
public ToolModelManager toolModelManager;
|
||||
public Button exitBtn;
|
||||
public Button backToToolBtn;
|
||||
public Text threeDTip;
|
||||
|
@ -39,14 +41,34 @@ public class UIManager : MonoSingleton<UIManager>
|
|||
}
|
||||
});
|
||||
exitBtn.gameObject.SetActive(false);
|
||||
backToToolBtn.onClick.AddListener(BackToTool);
|
||||
backToToolBtn.onClick.AddListener(() =>
|
||||
{
|
||||
ToolsItemManager.recoverEvent.RemoveAllListeners();
|
||||
ToolsItemManager.ResetState();
|
||||
backToToolBtn.gameObject.SetActive(false);
|
||||
bottomCotroller.BirdEyeView.gameObject.SetActive(false);
|
||||
BackToTool();
|
||||
});
|
||||
backToToolBtn.gameObject.SetActive(false);
|
||||
DontDestroyOnLoad(this);
|
||||
}
|
||||
|
||||
private void BackToTool()
|
||||
private async void BackToTool()
|
||||
{
|
||||
SceneLoad.Instance.SceneChange("工具间场景");
|
||||
await Task.Delay(500);
|
||||
toolModelManager.GetAllToolModels();
|
||||
for (int i = 0; i < ToolsItemManager.toolItems.Count; i++)
|
||||
{
|
||||
for (int j = 0; j < toolModelManager.toolModelClicks.Length; j++)
|
||||
{
|
||||
if (ToolsItemManager.toolItems[i].originPos == toolModelManager.toolModelClicks[j].transform.localPosition)
|
||||
{
|
||||
Destroy(toolModelManager.toolModelClicks[j].gameObject);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void SetThreeDTip(string name)
|
||||
|
|
|
@ -185,6 +185,39 @@ Transform:
|
|||
m_CorrespondingSourceObject: {fileID: 3822654451255398218, guid: 2ac06dd92c2069f4db98276a4465b943, type: 3}
|
||||
m_PrefabInstance: {fileID: 1875591}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1 &2400468
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2400469}
|
||||
m_Layer: 0
|
||||
m_Name: "All\u5DE5\u5177\u5668"
|
||||
m_TagString: AllTools
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &2400469
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2400468}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 1873, y: 1024.4, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 865266376}
|
||||
- {fileID: 1233633457}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 8
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &15887556
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -845,7 +878,7 @@ Transform:
|
|||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 6
|
||||
m_RootOrder: 4
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &214298342
|
||||
GameObject:
|
||||
|
@ -2966,7 +2999,6 @@ GameObject:
|
|||
- component: {fileID: 333646760}
|
||||
- component: {fileID: 333646759}
|
||||
- component: {fileID: 333646758}
|
||||
- component: {fileID: 333646762}
|
||||
m_Layer: 5
|
||||
m_Name: Canvas
|
||||
m_TagString: Untagged
|
||||
|
@ -3007,7 +3039,7 @@ MonoBehaviour:
|
|||
m_ReferencePixelsPerUnit: 100
|
||||
m_ScaleFactor: 1
|
||||
m_ReferenceResolution: {x: 1920, y: 1080}
|
||||
m_ScreenMatchMode: 1
|
||||
m_ScreenMatchMode: 0
|
||||
m_MatchWidthOrHeight: 0
|
||||
m_PhysicalUnit: 3
|
||||
m_FallbackScreenDPI: 96
|
||||
|
@ -3033,7 +3065,7 @@ Canvas:
|
|||
m_SortingBucketNormalizedSize: 0
|
||||
m_AdditionalShaderChannelsFlag: 0
|
||||
m_SortingLayerID: 0
|
||||
m_SortingOrder: 0
|
||||
m_SortingOrder: 3
|
||||
m_TargetDisplay: 0
|
||||
--- !u!224 &333646761
|
||||
RectTransform:
|
||||
|
@ -3046,29 +3078,15 @@ RectTransform:
|
|||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 0, y: 0, z: 0}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 1214987529}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 5
|
||||
m_RootOrder: 3
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0, y: 0}
|
||||
--- !u!114 &333646762
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 333646757}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 2ef62ef58861f594ca67aff0391b0765, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
browser: {fileID: 0}
|
||||
--- !u!1001 &379696848
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -4814,11 +4832,6 @@ MeshCollider:
|
|||
m_Convex: 0
|
||||
m_CookingOptions: 30
|
||||
m_Mesh: {fileID: 7974993928628611473, guid: 20ffa010543df1a46896595ac300588e, type: 3}
|
||||
--- !u!1 &786522454 stripped
|
||||
GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: 324364665315715516, guid: 99da977971c2c1343a37bbcc6d10f2ef, type: 3}
|
||||
m_PrefabInstance: {fileID: 1214987528}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1 &809465737
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -5069,7 +5082,7 @@ Transform:
|
|||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 865266375}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalPosition: {x: -1873, y: -1024.4, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
|
@ -5115,8 +5128,8 @@ Transform:
|
|||
- {fileID: 6166402648483344093}
|
||||
- {fileID: 3190690649765978568}
|
||||
- {fileID: 485612229}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 1
|
||||
m_Father: {fileID: 2400469}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1001 &1039716617
|
||||
PrefabInstance:
|
||||
|
@ -5127,7 +5140,7 @@ PrefabInstance:
|
|||
m_Modifications:
|
||||
- target: {fileID: 3350233854110697392, guid: 5a7d7e9bd76f93b418b1f916781feb6a, type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 7
|
||||
value: 5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3350233854110697392, guid: 5a7d7e9bd76f93b418b1f916781feb6a, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
|
@ -5333,7 +5346,7 @@ Transform:
|
|||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 4
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 4.747, y: 249.743, z: 439.425}
|
||||
--- !u!1 &1096617073
|
||||
GameObject:
|
||||
|
@ -5680,76 +5693,6 @@ Transform:
|
|||
m_CorrespondingSourceObject: {fileID: 8218745123122009150, guid: 4b06ca5b0865ade40b27cf11a123ba5c, type: 3}
|
||||
m_PrefabInstance: {fileID: 1172275066}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1001 &1214987528
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 333646761}
|
||||
m_Modifications:
|
||||
- target: {fileID: 324364665315715489, guid: 99da977971c2c1343a37bbcc6d10f2ef, type: 3}
|
||||
propertyPath: InstructionMessage
|
||||
value:
|
||||
objectReference: {fileID: 333646757}
|
||||
- target: {fileID: 324364665315715491, guid: 99da977971c2c1343a37bbcc6d10f2ef, type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 324364665315715491, guid: 99da977971c2c1343a37bbcc6d10f2ef, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: -960
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 324364665315715491, guid: 99da977971c2c1343a37bbcc6d10f2ef, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: -538.8
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 324364665315715491, guid: 99da977971c2c1343a37bbcc6d10f2ef, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 324364665315715491, guid: 99da977971c2c1343a37bbcc6d10f2ef, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 324364665315715491, guid: 99da977971c2c1343a37bbcc6d10f2ef, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 324364665315715491, guid: 99da977971c2c1343a37bbcc6d10f2ef, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 324364665315715491, guid: 99da977971c2c1343a37bbcc6d10f2ef, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 324364665315715491, guid: 99da977971c2c1343a37bbcc6d10f2ef, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 324364665315715491, guid: 99da977971c2c1343a37bbcc6d10f2ef, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 324364665315715491, guid: 99da977971c2c1343a37bbcc6d10f2ef, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 324364665315715516, guid: 99da977971c2c1343a37bbcc6d10f2ef, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: SceneManager
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 324364665315715516, guid: 99da977971c2c1343a37bbcc6d10f2ef, type: 3}
|
||||
propertyPath: m_IsActive
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 99da977971c2c1343a37bbcc6d10f2ef, type: 3}
|
||||
--- !u!4 &1214987529 stripped
|
||||
Transform:
|
||||
m_CorrespondingSourceObject: {fileID: 324364665315715491, guid: 99da977971c2c1343a37bbcc6d10f2ef, type: 3}
|
||||
m_PrefabInstance: {fileID: 1214987528}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1 &1233633456
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -5761,7 +5704,7 @@ GameObject:
|
|||
- component: {fileID: 1233633457}
|
||||
m_Layer: 0
|
||||
m_Name: "\u5DE5\u5668\u5177"
|
||||
m_TagString: Untagged
|
||||
m_TagString: AllTools
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
|
@ -5773,8 +5716,8 @@ Transform:
|
|||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1233633456}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: -1873, y: -1024.4, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
|
@ -5807,8 +5750,8 @@ Transform:
|
|||
- {fileID: 1284012090}
|
||||
- {fileID: 1850070997}
|
||||
- {fileID: 643759145}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 2
|
||||
m_Father: {fileID: 2400469}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1234414489
|
||||
GameObject:
|
||||
|
@ -6053,7 +5996,7 @@ Transform:
|
|||
m_Children:
|
||||
- {fileID: 2059769794}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 8
|
||||
m_RootOrder: 6
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &1265359521
|
||||
MonoBehaviour:
|
||||
|
@ -6129,9 +6072,9 @@ MonoBehaviour:
|
|||
m_Script: {fileID: 11500000, guid: 936e1a57cc0a2944a89d7b1617875726, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
game: {fileID: 786522454}
|
||||
name: Computer
|
||||
url: http://192.168.0.104:8089/
|
||||
_name: Computer
|
||||
_focusedPrefab: {fileID: 0}
|
||||
_canvas: {fileID: 333646757}
|
||||
--- !u!1001 &1266954248
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -7137,7 +7080,7 @@ PrefabInstance:
|
|||
m_Modifications:
|
||||
- target: {fileID: 962704353483637904, guid: eba75dd16d820074fbba9f43892bc9a8, type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 9
|
||||
value: 7
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 962704353483637904, guid: eba75dd16d820074fbba9f43892bc9a8, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
|
@ -7329,7 +7272,7 @@ Transform:
|
|||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 3
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1001 &1532770825
|
||||
PrefabInstance:
|
||||
|
|
|
@ -1,20 +1,16 @@
|
|||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
using Vuplex.WebView;
|
||||
|
||||
public class newfollow : MonoBehaviour
|
||||
{
|
||||
[SerializeField] GameObject game;
|
||||
[SerializeField] string name;
|
||||
public string url;
|
||||
//[SerializeField] Dialogue dialogue;
|
||||
// Start is called before the first frame update
|
||||
//void Start()
|
||||
//{
|
||||
// //EventTriggerListener.Get(transform.gameObject).onClick += g =>
|
||||
// //{
|
||||
[SerializeField] string _name;
|
||||
public CanvasWebViewPrefab _focusedPrefab;
|
||||
public GameObject _canvas;
|
||||
private void Start()
|
||||
{
|
||||
|
||||
// //};
|
||||
//}
|
||||
}
|
||||
private void Update()
|
||||
{
|
||||
// 鼠标左键按下
|
||||
|
@ -31,18 +27,113 @@ public class newfollow : MonoBehaviour
|
|||
if (res)
|
||||
{
|
||||
// 如果产生了碰撞
|
||||
if (hit.transform.name.Equals(name))
|
||||
if (hit.transform.name.Equals(_name))
|
||||
{
|
||||
Debug.Log(hit.transform.name);
|
||||
game.SetActive(true);
|
||||
//game.init(url);
|
||||
CreatView();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.Escape))
|
||||
{
|
||||
if (_focusedPrefab != null)
|
||||
Destroy(_focusedPrefab.gameObject);
|
||||
}
|
||||
}
|
||||
//// Update is called once per frame
|
||||
//private void FixedUpdate()
|
||||
//{
|
||||
// transform.LookAt(game);
|
||||
//}
|
||||
|
||||
private void CreatView()
|
||||
{
|
||||
// Enable the native touch screen keyboard for Android and iOS.
|
||||
Web.SetTouchScreenKeyboardEnabled(true);
|
||||
|
||||
//_canvas = GameObject.Find("Canvas");
|
||||
// Create a webview for the main content.
|
||||
var mainWebViewPrefab = CanvasWebViewPrefab.Instantiate();
|
||||
mainWebViewPrefab.transform.SetParent(_canvas.transform, false);
|
||||
var rectTransform = mainWebViewPrefab.transform as RectTransform;
|
||||
rectTransform.anchoredPosition3D = Vector3.zero;
|
||||
rectTransform.offsetMin = Vector2.zero;
|
||||
rectTransform.offsetMax = Vector2.zero;
|
||||
mainWebViewPrefab.transform.localScale = Vector3.one;
|
||||
|
||||
_focusedPrefab = mainWebViewPrefab;
|
||||
mainWebViewPrefab.Initialized += (s, e) =>
|
||||
{
|
||||
var webViewWithPopups = mainWebViewPrefab.WebView as IWithPopups;
|
||||
if (webViewWithPopups == null)
|
||||
{
|
||||
mainWebViewPrefab.WebView.LoadHtml(NOT_SUPPORTED_HTML);
|
||||
return;
|
||||
}
|
||||
|
||||
WebViewLogger.Log("Loading Pinterest as an example because it uses popups for third party login. Click 'Login', then select Facebook or Google to open a popup for authentication.");
|
||||
mainWebViewPrefab.WebView.LoadUrl("http://111.229.30.246:10015/");
|
||||
|
||||
webViewWithPopups.SetPopupMode(PopupMode.LoadInNewWebView);
|
||||
webViewWithPopups.PopupRequested += (webView, eventArgs) =>
|
||||
{
|
||||
WebViewLogger.Log("Popup opened with URL: " + eventArgs.Url);
|
||||
var popupPrefab = CanvasWebViewPrefab.Instantiate(eventArgs.WebView);
|
||||
_focusedPrefab = popupPrefab;
|
||||
|
||||
popupPrefab.transform.SetParent(_canvas.transform, false);
|
||||
var popupRectTransform = popupPrefab.transform as RectTransform;
|
||||
popupRectTransform.anchoredPosition3D = Vector3.zero;
|
||||
popupRectTransform.offsetMin = Vector2.zero;
|
||||
popupRectTransform.offsetMax = Vector2.zero;
|
||||
popupPrefab.transform.localScale = Vector3.one;
|
||||
// Place the popup in front of the main webview.
|
||||
var localPosition = popupPrefab.transform.localPosition;
|
||||
localPosition.z = 0.1f;
|
||||
popupPrefab.transform.localPosition = localPosition;
|
||||
|
||||
popupPrefab.Initialized += (sender, initializedEventArgs) =>
|
||||
{
|
||||
popupPrefab.WebView.CloseRequested += (popupWebView, closeEventArgs) =>
|
||||
{
|
||||
WebViewLogger.Log("Closing the popup");
|
||||
_focusedPrefab = mainWebViewPrefab;
|
||||
popupPrefab.Destroy();
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
const string NOT_SUPPORTED_HTML = @"
|
||||
<body>
|
||||
<style>
|
||||
body {
|
||||
font-family: sans-serif;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
line-height: 1.25;
|
||||
}
|
||||
div {
|
||||
max-width: 80%;
|
||||
}
|
||||
li {
|
||||
margin: 10px 0;
|
||||
}
|
||||
</style>
|
||||
<div>
|
||||
<p>
|
||||
Sorry, but this 3D WebView package doesn't support yet the <a href='https://developer.vuplex.com/webview/IWithPopups'>IWithPopups</a> interface. Current packages that support popups:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<a href='https://developer.vuplex.com/webview/StandaloneWebView'>3D WebView for Windows and macOS</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href='https://developer.vuplex.com/webview/AndroidWebView'>3D WebView for Android</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href='https://developer.vuplex.com/webview/AndroidGeckoWebView'>3D WebView for Android with Gecko Engine</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
";
|
||||
}
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 23 KiB |
|
@ -0,0 +1,147 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 82ea5eb356a6ccf4689b59042739154a
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 12
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMasterTextureLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Server
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: WebGL
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
spritePackingTag:
|
||||
pSDRemoveMatte: 0
|
||||
pSDShowRemoveMatteOption: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Binary file not shown.
After Width: | Height: | Size: 23 KiB |
|
@ -0,0 +1,147 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 6bdaa1e1cf231284685da170dba13ee9
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 12
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMasterTextureLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Server
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: WebGL
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
spritePackingTag:
|
||||
pSDRemoveMatte: 0
|
||||
pSDShowRemoveMatteOption: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -7,7 +7,6 @@
|
|||
"com.unity.ide.visualstudio": "2.0.16",
|
||||
"com.unity.ide.vscode": "1.2.5",
|
||||
"com.unity.postprocessing": "3.2.2",
|
||||
"com.unity.shadergraph": "12.1.8",
|
||||
"com.unity.test-framework": "1.1.31",
|
||||
"com.unity.textmeshpro": "3.0.6",
|
||||
"com.unity.timeline": "1.6.4",
|
||||
|
|
|
@ -91,23 +91,6 @@
|
|||
},
|
||||
"url": "https://packages.unity.cn"
|
||||
},
|
||||
"com.unity.render-pipelines.core": {
|
||||
"version": "12.1.8",
|
||||
"depth": 1,
|
||||
"source": "builtin",
|
||||
"dependencies": {
|
||||
"com.unity.ugui": "1.0.0",
|
||||
"com.unity.modules.physics": "1.0.0",
|
||||
"com.unity.modules.jsonserialize": "1.0.0"
|
||||
}
|
||||
},
|
||||
"com.unity.searcher": {
|
||||
"version": "4.9.1",
|
||||
"depth": 1,
|
||||
"source": "registry",
|
||||
"dependencies": {},
|
||||
"url": "https://packages.unity.cn"
|
||||
},
|
||||
"com.unity.services.core": {
|
||||
"version": "1.4.2",
|
||||
"depth": 1,
|
||||
|
@ -126,15 +109,6 @@
|
|||
"dependencies": {},
|
||||
"url": "https://packages.unity.cn"
|
||||
},
|
||||
"com.unity.shadergraph": {
|
||||
"version": "12.1.8",
|
||||
"depth": 0,
|
||||
"source": "builtin",
|
||||
"dependencies": {
|
||||
"com.unity.render-pipelines.core": "12.1.8",
|
||||
"com.unity.searcher": "4.9.1"
|
||||
}
|
||||
},
|
||||
"com.unity.test-framework": {
|
||||
"version": "1.1.31",
|
||||
"depth": 0,
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
m_EditorVersion: 2021.3.15f1c1
|
||||
m_EditorVersionWithRevision: 2021.3.15f1c1 (080beb55ecda)
|
||||
m_EditorVersion: 2021.3.10f1c2
|
||||
m_EditorVersionWithRevision: 2021.3.10f1c2 (5a059dbcdda5)
|
||||
|
|
|
@ -14,6 +14,7 @@ TagManager:
|
|||
- Line
|
||||
- "\u65CB\u8F6C"
|
||||
- FuAnBiao
|
||||
- AllTools
|
||||
layers:
|
||||
- Default
|
||||
- TransparentFX
|
||||
|
|
Loading…
Reference in New Issue