12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- //------------------------------------------------------------
- // Game Framework
- // Copyright © 2013-2021 Jiang Yin. All rights reserved.
- // Homepage: https://gameframework.cn/
- // Feedback: mailto:ellan@gameframework.cn
- //------------------------------------------------------------
- using System;
- using UnityEngine;
- using UnityEngine.UI;
- namespace UnityGameFramework.Runtime
- {
- /// <summary>
- /// 默认界面组辅助器。
- /// </summary>
- public class DefaultUIGroupHelper : UIGroupHelperBase
- {
- private Canvas _canvas;
-
- private void Awake()
- {
- _canvas=this.gameObject.AddComponent<Canvas>();
- _canvas.renderMode = RenderMode.ScreenSpaceOverlay;
- RectTransform rect=this.gameObject.GetOrAddComponent<RectTransform>();
- rect.anchoredPosition = new Vector2(0, 0);
- gameObject.AddComponent<GraphicRaycaster>();
- }
- private void Start()
- {
- }
- /// <summary>
- /// 设置界面组深度。
- /// </summary>
- /// <param name="depth">界面组深度。</param>
- public override void SetDepth(int depth)
- {
-
- }
- }
- }
|