【UI】更换主界面图标
parent
b56c54c7a8
commit
0886f14d17
Binary file not shown.
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 50 KiB |
|
@ -1,5 +1,5 @@
|
||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: e6d4efff9fa93428aa59dfaaf9326a03
|
guid: 7f0f00ceb6ba24be7bf9d9d7b8d33e64
|
||||||
TextureImporter:
|
TextureImporter:
|
||||||
internalIDToNameTable: []
|
internalIDToNameTable: []
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 47 KiB |
|
@ -1,5 +1,5 @@
|
||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 713bf4270231a47a0ac4fdb8d40d67a4
|
guid: 704c7558ebe744c52b5c37d9327860a5
|
||||||
TextureImporter:
|
TextureImporter:
|
||||||
internalIDToNameTable: []
|
internalIDToNameTable: []
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
|
|
|
@ -404,7 +404,7 @@ MonoBehaviour:
|
||||||
m_OnCullStateChanged:
|
m_OnCullStateChanged:
|
||||||
m_PersistentCalls:
|
m_PersistentCalls:
|
||||||
m_Calls: []
|
m_Calls: []
|
||||||
m_Sprite: {fileID: 21300000, guid: 713bf4270231a47a0ac4fdb8d40d67a4, type: 3}
|
m_Sprite: {fileID: 21300000, guid: 704c7558ebe744c52b5c37d9327860a5, type: 3}
|
||||||
m_Type: 0
|
m_Type: 0
|
||||||
m_PreserveAspect: 0
|
m_PreserveAspect: 0
|
||||||
m_FillCenter: 1
|
m_FillCenter: 1
|
||||||
|
@ -1043,7 +1043,7 @@ MonoBehaviour:
|
||||||
m_OnCullStateChanged:
|
m_OnCullStateChanged:
|
||||||
m_PersistentCalls:
|
m_PersistentCalls:
|
||||||
m_Calls: []
|
m_Calls: []
|
||||||
m_Sprite: {fileID: 21300000, guid: e6d4efff9fa93428aa59dfaaf9326a03, type: 3}
|
m_Sprite: {fileID: 21300000, guid: 7f0f00ceb6ba24be7bf9d9d7b8d33e64, type: 3}
|
||||||
m_Type: 0
|
m_Type: 0
|
||||||
m_PreserveAspect: 0
|
m_PreserveAspect: 0
|
||||||
m_FillCenter: 1
|
m_FillCenter: 1
|
||||||
|
|
|
@ -669,7 +669,7 @@ Canvas:
|
||||||
m_AdditionalShaderChannelsFlag: 25
|
m_AdditionalShaderChannelsFlag: 25
|
||||||
m_UpdateRectTransformForStandalone: 0
|
m_UpdateRectTransformForStandalone: 0
|
||||||
m_SortingLayerID: 0
|
m_SortingLayerID: 0
|
||||||
m_SortingOrder: 100
|
m_SortingOrder: 101
|
||||||
m_TargetDisplay: 0
|
m_TargetDisplay: 0
|
||||||
--- !u!1 &403430398
|
--- !u!1 &403430398
|
||||||
GameObject:
|
GameObject:
|
||||||
|
|
|
@ -69,7 +69,7 @@ public class GuideController : MonoBehaviour
|
||||||
_imgFinger.SetActive(false);
|
_imgFinger.SetActive(false);
|
||||||
_canvas = GameObject.Find(BuildCanvas) != null
|
_canvas = GameObject.Find(BuildCanvas) != null
|
||||||
? GameObject.Find(BuildCanvas).GetComponent<Canvas>()
|
? GameObject.Find(BuildCanvas).GetComponent<Canvas>()
|
||||||
: UIRoot.Instance.root.GetComponent<Canvas>();
|
: UIRoot.Instance.rootMatch.GetComponent<Canvas>();
|
||||||
|
|
||||||
var targetPath = GuideMananger.Instance.GetGuideMaskTarget();
|
var targetPath = GuideMananger.Instance.GetGuideMaskTarget();
|
||||||
target = GameObject.Find(targetPath);
|
target = GameObject.Find(targetPath);
|
||||||
|
@ -180,7 +180,7 @@ public class GuideController : MonoBehaviour
|
||||||
var newPos = new Vector2(canvasPos.x + _diameter, canvasPos.y - _diameter);
|
var newPos = new Vector2(canvasPos.x + _diameter, canvasPos.y - _diameter);
|
||||||
|
|
||||||
// 获取 Canvas 的 RectTransform
|
// 获取 Canvas 的 RectTransform
|
||||||
RectTransform canvasRect = _canvas.GetComponent<RectTransform>();
|
RectTransform canvasRect = _canvas.GetComponent<RectTransform>();
|
||||||
|
|
||||||
// 计算屏幕边缘的范围
|
// 计算屏幕边缘的范围
|
||||||
Vector2 minScreenPos = canvasRect.rect.min;
|
Vector2 minScreenPos = canvasRect.rect.min;
|
||||||
|
|
|
@ -87,7 +87,7 @@ public class GuideMananger : Singlenton<GuideMananger>, IInitable
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private async UniTask InitGuideMaskUI()
|
private async UniTask InitGuideMaskUI()
|
||||||
{
|
{
|
||||||
var targetCanvas = UIRoot.Instance.root;
|
var targetCanvas = UIRoot.Instance.rootMatch;
|
||||||
var obj = await AssetManager.Instance.LoadAssetAsync<GameObject>(Constants.GuideMaskObj);
|
var obj = await AssetManager.Instance.LoadAssetAsync<GameObject>(Constants.GuideMaskObj);
|
||||||
_guideMask = Object.Instantiate(obj, targetCanvas.transform);
|
_guideMask = Object.Instantiate(obj, targetCanvas.transform);
|
||||||
_guideMask.SetActive(false);
|
_guideMask.SetActive(false);
|
||||||
|
|
Loading…
Reference in New Issue