fgm24/Assets/Scripts/Multiplayer/SteamVsLocalUI.cs

28 lines
680 B
C#

using System.Collections;
using System.Collections.Generic;
using Unity.Netcode;
using Unity.Netcode.Transports.UTP;
using UnityEngine;
public class SteamVsLocalUI : MonoBehaviour
{
[SerializeField] private GameObject LocalUiHolder;
[SerializeField] private GameObject SteamUiHolder;
private void Start()
{
bool isLocal = NetworkManager.Singleton.NetworkConfig.NetworkTransport is UnityTransport;
if (isLocal)
{
LocalUiHolder.SetActive(true);
SteamUiHolder.SetActive(false);
}
else
{
LocalUiHolder.SetActive(false);
SteamUiHolder.SetActive(true);
}
}
}