CarmenSandiego/Assets/UdonSharp/PositionMarker.cs
Jamie Greunbaum c11a39d065 - Added markers to show players where to stand during round 2.
- Added a brick material and lined the walls of the alleyway with it.
- Added a concrete walkway to the alleyway.
- Map dots, map borders, and The Chase title are all now anti-aliased.
- Improved the look of the concrete material.
- Wood textures no longer use a transparency render queue.
2026-03-27 04:15:15 -04:00

40 lines
740 B
C#

using UdonSharp;
using UnityEngine;
using VRC.SDKBase;
using VRC.Udon.Common;
[UdonBehaviourSyncMode(BehaviourSyncMode.Manual)]
public class PositionMarker : UdonSharpBehaviour
{
[SerializeField] private GameObject _Marker;
[UdonSynced] private string _PlayerName;
public override void OnDeserialization(DeserializationResult Result)
{
_SetPlayer_Synced();
base.OnDeserialization(Result);
}
public void SetPlayer(string Name)
{
_PlayerName = Name;
_SetPlayer_Synced();
RequestSerialization();
}
private void _SetPlayer_Synced()
{
_Marker.SetActive(Networking.LocalPlayer.displayName == _PlayerName);
}
public void ClearPlayer()
{
_PlayerName = "";
_SetPlayer_Synced();
RequestSerialization();
}
}