CanvasUI.cs 554 B

123456789101112131415161718192021
  1. using UnityEngine;
  2. namespace Mirror.Examples.Basic
  3. {
  4. public class CanvasUI : MonoBehaviour
  5. {
  6. [Tooltip("Assign Main Panel so it can be turned on from Player:OnStartClient")]
  7. public RectTransform mainPanel;
  8. [Tooltip("Assign Players Panel for instantiating PlayerUI as child")]
  9. public RectTransform playersPanel;
  10. // static instance that can be referenced directly from Player script
  11. public static CanvasUI instance;
  12. void Awake()
  13. {
  14. instance = this;
  15. }
  16. }
  17. }