mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
NetworkManagerHUD.showGUI obsoleted (#2596)
This commit is contained in:
parent
62b99ed9a7
commit
1f0d9e73e1
@ -1,5 +1,7 @@
|
|||||||
// vis2k: GUILayout instead of spacey += ...; removed Update hotkeys to avoid
|
// vis2k: GUILayout instead of spacey += ...; removed Update hotkeys to avoid
|
||||||
// confusion if someone accidentally presses one.
|
// confusion if someone accidentally presses one.
|
||||||
|
|
||||||
|
using System;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace Mirror
|
namespace Mirror
|
||||||
@ -19,6 +21,7 @@ public class NetworkManagerHUD : MonoBehaviour
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Whether to show the default control HUD at runtime.
|
/// Whether to show the default control HUD at runtime.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[Obsolete("showGUI will be removed unless someone has a valid use case. Simply use or don't use the HUD component.")]
|
||||||
public bool showGUI = true;
|
public bool showGUI = true;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -38,8 +41,9 @@ void Awake()
|
|||||||
|
|
||||||
void OnGUI()
|
void OnGUI()
|
||||||
{
|
{
|
||||||
if (!showGUI)
|
#pragma warning disable 618
|
||||||
return;
|
if (!showGUI) return;
|
||||||
|
#pragma warning restore 618
|
||||||
|
|
||||||
GUILayout.BeginArea(new Rect(10 + offsetX, 40 + offsetY, 215, 9999));
|
GUILayout.BeginArea(new Rect(10 + offsetX, 40 + offsetY, 215, 9999));
|
||||||
if (!NetworkClient.isConnected && !NetworkServer.active)
|
if (!NetworkClient.isConnected && !NetworkServer.active)
|
||||||
|
Loading…
Reference in New Issue
Block a user