Files
RoomAwareVR/Assets/_Scripts/Utility/InvisibleForLocalPlayer.cs

17 lines
376 B
C#

using System.Globalization;
using Unity.Netcode;
using UnityEngine;
public class InvisibleForLocalPlayer : NetworkBehaviour
{
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
foreach (var r in GetComponentsInChildren<Renderer>())
{
r.enabled = !IsOwner;
}
}
}