- Added a live indicator lamp over the door to the camera room. - All set walls are now proper models and not just stretched cubes. - Tweaked glow effect on clue screen. - Removed post processing filter on the video capture camera. - Lightmaps updated to pack lighting data more efficiently.
38 lines
745 B
C#
38 lines
745 B
C#
|
|
using UdonSharp;
|
|
using UnityEngine;
|
|
using VRC.SDKBase;
|
|
using VRC.Udon;
|
|
|
|
|
|
[UdonBehaviourSyncMode(BehaviourSyncMode.Manual)]
|
|
public class LiveIndicator : UdonSharpBehaviour
|
|
{
|
|
[SerializeField] private Material _UnlitLampMaterial;
|
|
[SerializeField] private Material _LitLampMaterial;
|
|
|
|
[SerializeField] private MeshRenderer _MarkerMesh;
|
|
|
|
[UdonSynced, FieldChangeCallback(nameof(Active))] private bool _Active = false;
|
|
|
|
|
|
private void ReactToActivation()
|
|
{
|
|
Material[] Materials = _MarkerMesh.materials;
|
|
Materials[0] = Active ? _LitLampMaterial : _UnlitLampMaterial;
|
|
_MarkerMesh.materials = Materials;
|
|
}
|
|
|
|
|
|
public bool Active
|
|
{
|
|
set
|
|
{
|
|
_Active = value;
|
|
ReactToActivation();
|
|
RequestSerialization();
|
|
}
|
|
get => _Active;
|
|
}
|
|
}
|