19 lines
493 B
C#
19 lines
493 B
C#
using System.Globalization;
|
|
using Unity.Netcode;
|
|
using UnityEngine;
|
|
|
|
// Hilfs-Skript um bestimmte Objekte für den lokalen Spieler unsichtbar zu machen. Findet momentan keine Anwendung.
|
|
|
|
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;
|
|
}
|
|
|
|
}
|
|
}
|