Cleaned up and commented version.
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
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;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user