Added an overhead scoreboard so players can see the final round timer.

This commit is contained in:
2026-03-22 20:40:48 -04:00
parent 95bdc941b6
commit bc2ca5cc2f
16 changed files with 883 additions and 186 deletions
@@ -44,7 +44,7 @@ MonoBehaviour:
Data:
- Name:
Entry: 12
Data: 25
Data: 26
- Name:
Entry: 7
Data:
@@ -848,25 +848,25 @@ MonoBehaviour:
Data:
- Name: $k
Entry: 1
Data: _TimerCameraOverlays
Data: _Scoreboard
- Name: $v
Entry: 7
Data: 56|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _TimerCameraOverlays
Data: _Scoreboard
- Name: <UserType>k__BackingField
Entry: 7
Data: 57|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: TimerOverlay[], Assembly-CSharp
Data: SimpleEnable, Assembly-CSharp
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 36
Data: 4
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
@@ -908,25 +908,25 @@ MonoBehaviour:
Data:
- Name: $k
Entry: 1
Data: _EndingPlayer
Data: _TimerCameraOverlays
- Name: $v
Entry: 7
Data: 60|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _EndingPlayer
Data: _TimerCameraOverlays
- Name: <UserType>k__BackingField
Entry: 7
Data: 61|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: RandomVideoPlayer, Assembly-CSharp
Data: TimerOverlay[], Assembly-CSharp
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 4
Data: 36
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
@@ -968,58 +968,46 @@ MonoBehaviour:
Data:
- Name: $k
Entry: 1
Data: _CurrentlyActiveMap
Data: _EndingPlayer
- Name: $v
Entry: 7
Data: 64|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _CurrentlyActiveMap
Data: _EndingPlayer
- Name: <UserType>k__BackingField
Entry: 7
Data: 65|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: ContinentMap, Assembly-CSharp
Data: RandomVideoPlayer, Assembly-CSharp
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 7
Data: 66|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: System.Int32, mscorlib
- Name:
Entry: 8
Data:
Entry: 9
Data: 4
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
- Name:
Entry: 3
Data: 1
Entry: 6
Data:
- Name:
Entry: 8
Data:
- Name: <IsSerialized>k__BackingField
Entry: 5
Data: false
Data: true
- Name: _fieldAttributes
Entry: 7
Data: 67|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
Data: 66|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 2
Data: 1
- Name:
Entry: 7
Data: 68|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
- Name:
Entry: 8
Data:
- Name:
Entry: 7
Data: 69|UdonSharp.FieldChangeCallbackAttribute, UdonSharp.Runtime
Data: 67|UnityEngine.SerializeField, UnityEngine.CoreModule
- Name:
Entry: 8
Data:
@@ -1040,19 +1028,31 @@ MonoBehaviour:
Data:
- Name: $k
Entry: 1
Data: _ActiveMarker
Data: _CurrentlyActiveMap
- Name: $v
Entry: 7
Data: 70|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
Data: 68|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _ActiveMarker
Data: _CurrentlyActiveMap
- Name: <UserType>k__BackingField
Entry: 9
Data: 66
Entry: 7
Data: 69|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: ContinentMap, Assembly-CSharp
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 66
Entry: 7
Data: 70|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: System.Int32, mscorlib
- Name:
Entry: 8
Data:
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
@@ -1100,19 +1100,19 @@ MonoBehaviour:
Data:
- Name: $k
Entry: 1
Data: _StageIndex
Data: _ActiveMarker
- Name: $v
Entry: 7
Data: 74|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _StageIndex
Data: _ActiveMarker
- Name: <UserType>k__BackingField
Entry: 9
Data: 66
Data: 70
- Name: <SystemType>k__BackingField
Entry: 9
Data: 66
Data: 70
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
@@ -1130,13 +1130,73 @@ MonoBehaviour:
Data: 75|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
Data: 2
- Name:
Entry: 7
Data: 76|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
- Name:
Entry: 8
Data:
- Name:
Entry: 7
Data: 77|UdonSharp.FieldChangeCallbackAttribute, UdonSharp.Runtime
- Name:
Entry: 8
Data:
- Name:
Entry: 13
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 7
Data:
- Name: $k
Entry: 1
Data: _StageIndex
- Name: $v
Entry: 7
Data: 78|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _StageIndex
- Name: <UserType>k__BackingField
Entry: 9
Data: 70
- Name: <SystemType>k__BackingField
Entry: 9
Data: 70
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
- Name:
Entry: 3
Data: 1
- Name:
Entry: 8
Data:
- Name: <IsSerialized>k__BackingField
Entry: 5
Data: false
- Name: _fieldAttributes
Entry: 7
Data: 79|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 80|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
- Name:
Entry: 8
Data:
- Name:
Entry: 13
Data:
@@ -1157,13 +1217,13 @@ MonoBehaviour:
Data: _ContinentData
- Name: $v
Entry: 7
Data: 77|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
Data: 81|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _ContinentData
- Name: <UserType>k__BackingField
Entry: 7
Data: 78|System.RuntimeType, mscorlib
Data: 82|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: VRC.SDK3.Data.DataDictionary, VRCSDK3
@@ -1172,7 +1232,7 @@ MonoBehaviour:
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 78
Data: 82
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
@@ -1187,7 +1247,7 @@ MonoBehaviour:
Data: false
- Name: _fieldAttributes
Entry: 7
Data: 79|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
Data: 83|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 0
@@ -1211,13 +1271,13 @@ MonoBehaviour:
Data: _GameStatus
- Name: $v
Entry: 7
Data: 80|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
Data: 84|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _GameStatus
- Name: <UserType>k__BackingField
Entry: 7
Data: 81|System.RuntimeType, mscorlib
Data: 85|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: GameStatus, Assembly-CSharp
@@ -1226,7 +1286,7 @@ MonoBehaviour:
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 66
Data: 70
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
@@ -1241,13 +1301,13 @@ MonoBehaviour:
Data: false
- Name: _fieldAttributes
Entry: 7
Data: 82|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
Data: 86|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 83|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
Data: 87|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
- Name:
Entry: 8
Data:
@@ -1271,7 +1331,7 @@ MonoBehaviour:
Data: _RunTimer
- Name: $v
Entry: 7
Data: 84|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
Data: 88|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _RunTimer
@@ -1295,13 +1355,13 @@ MonoBehaviour:
Data: false
- Name: _fieldAttributes
Entry: 7
Data: 85|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
Data: 89|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 86|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
Data: 90|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
- Name:
Entry: 8
Data:
@@ -1325,16 +1385,16 @@ MonoBehaviour:
Data: _Timer
- Name: $v
Entry: 7
Data: 87|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
Data: 91|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _Timer
- Name: <UserType>k__BackingField
Entry: 9
Data: 66
Data: 70
- Name: <SystemType>k__BackingField
Entry: 9
Data: 66
Data: 70
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
@@ -1349,13 +1409,13 @@ MonoBehaviour:
Data: false
- Name: _fieldAttributes
Entry: 7
Data: 88|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
Data: 92|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 89|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
Data: 93|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
- Name:
Entry: 8
Data:
@@ -1377,78 +1437,18 @@ MonoBehaviour:
- Name: $k
Entry: 1
Data: _SuccessCounter
- Name: $v
Entry: 7
Data: 90|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _SuccessCounter
- Name: <UserType>k__BackingField
Entry: 9
Data: 66
- Name: <SystemType>k__BackingField
Entry: 9
Data: 66
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
- Name:
Entry: 3
Data: 1
- Name:
Entry: 8
Data:
- Name: <IsSerialized>k__BackingField
Entry: 5
Data: false
- Name: _fieldAttributes
Entry: 7
Data: 91|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 2
- Name:
Entry: 7
Data: 92|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
- Name:
Entry: 8
Data:
- Name:
Entry: 7
Data: 93|UdonSharp.FieldChangeCallbackAttribute, UdonSharp.Runtime
- Name:
Entry: 8
Data:
- Name:
Entry: 13
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 7
Data:
- Name: $k
Entry: 1
Data: _FailureCounter
- Name: $v
Entry: 7
Data: 94|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _FailureCounter
Data: _SuccessCounter
- Name: <UserType>k__BackingField
Entry: 9
Data: 66
Data: 70
- Name: <SystemType>k__BackingField
Entry: 9
Data: 66
Data: 70
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
@@ -1496,16 +1496,76 @@ MonoBehaviour:
Data:
- Name: $k
Entry: 1
Data: _CameraControllerRound3
Data: _FailureCounter
- Name: $v
Entry: 7
Data: 98|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _FailureCounter
- Name: <UserType>k__BackingField
Entry: 9
Data: 70
- Name: <SystemType>k__BackingField
Entry: 9
Data: 70
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
- Name:
Entry: 3
Data: 1
- Name:
Entry: 8
Data:
- Name: <IsSerialized>k__BackingField
Entry: 5
Data: false
- Name: _fieldAttributes
Entry: 7
Data: 99|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 2
- Name:
Entry: 7
Data: 100|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
- Name:
Entry: 8
Data:
- Name:
Entry: 7
Data: 101|UdonSharp.FieldChangeCallbackAttribute, UdonSharp.Runtime
- Name:
Entry: 8
Data:
- Name:
Entry: 13
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 7
Data:
- Name: $k
Entry: 1
Data: _CameraControllerRound3
- Name: $v
Entry: 7
Data: 102|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _CameraControllerRound3
- Name: <UserType>k__BackingField
Entry: 7
Data: 99|System.RuntimeType, mscorlib
Data: 103|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: CameraControllerRound3, Assembly-CSharp
@@ -1529,7 +1589,7 @@ MonoBehaviour:
Data: false
- Name: _fieldAttributes
Entry: 7
Data: 100|System.Collections.Generic.List`1[[System.Attribute, mscorlib]],
Data: 104|System.Collections.Generic.List`1[[System.Attribute, mscorlib]],
mscorlib
- Name:
Entry: 12
@@ -39,6 +39,7 @@ public class GameManagerRound3 : GameManagerBase
[SerializeField] private CaptureCarmenNewspaper _CaptureCarmenNewspaper;
[SerializeField] private NewspaperDisplay _NewspaperPublicDisplay;
[SerializeField] private TimerDisplay _TimerPublicDisplay;
[SerializeField] private SimpleEnable _Scoreboard;
[SerializeField] private TimerOverlay[] _TimerCameraOverlays;
[SerializeField] private RandomVideoPlayer _EndingPlayer;
@@ -93,6 +94,7 @@ public class GameManagerRound3 : GameManagerBase
_CaptureCarmenNewspaper.ResetAnimation();
_NewspaperPublicDisplay.Activate(false);
_TimerPublicDisplay.Initialise();
_Scoreboard.Enable(false);
SendCustomNetworkEvent(NetworkEventTarget.All, nameof(EnableAudienceSilencer), false);
@@ -208,6 +210,7 @@ public class GameManagerRound3 : GameManagerBase
BetweenRoundsInterface.HeaderUI.text = RoundSegmentTypeToString(RoundSegmentType.CaptureCarmen);
BetweenRoundsInterface.CommentUI.text = "On your mark...\nGet set...";
_Scoreboard.Enable(true);
foreach (TimerOverlay Overlay in _TimerCameraOverlays)
{
Overlay.EnableOverlayElements(true);
@@ -479,7 +482,7 @@ public class GameManagerRound3 : GameManagerBase
Interface.CommentUI.text = "";
_NewspaperPublicDisplay.Activate(false);
_Scoreboard.Enable(false);
foreach (TimerOverlay Overlay in _TimerCameraOverlays)
{
Overlay.EnableOverlayElements(false);
+173
View File
@@ -0,0 +1,173 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3}
m_Name: SimpleEnable
m_EditorClassIdentifier:
serializedUdonProgramAsset: {fileID: 11400000, guid: a09f238482b841d43b348f6abbcc1fe1,
type: 2}
udonAssembly:
assemblyError:
sourceCsScript: {fileID: 11500000, guid: a4dff40a52ffd0c49a995c2ee074bebf, type: 3}
scriptVersion: 2
compiledVersion: 2
behaviourSyncMode: 4
hasInteractEvent: 0
scriptID: 4942863876421551108
serializationData:
SerializedFormat: 2
SerializedBytes:
ReferencedUnityObjects: []
SerializedBytesString:
Prefab: {fileID: 0}
PrefabModificationsReferencedUnityObjects: []
PrefabModifications: []
SerializationNodes:
- Name: fieldDefinitions
Entry: 7
Data: 0|System.Collections.Generic.Dictionary`2[[System.String, mscorlib],[UdonSharp.Compiler.FieldDefinition,
UdonSharp.Editor]], mscorlib
- Name: comparer
Entry: 7
Data: 1|System.Collections.Generic.GenericEqualityComparer`1[[System.String,
mscorlib]], mscorlib
- Name:
Entry: 8
Data:
- Name:
Entry: 12
Data: 2
- Name:
Entry: 7
Data:
- Name: $k
Entry: 1
Data: _ToggledObject
- Name: $v
Entry: 7
Data: 2|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _ToggledObject
- Name: <UserType>k__BackingField
Entry: 7
Data: 3|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: UnityEngine.GameObject, UnityEngine.CoreModule
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 3
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
- Name:
Entry: 6
Data:
- Name:
Entry: 8
Data:
- Name: <IsSerialized>k__BackingField
Entry: 5
Data: true
- Name: _fieldAttributes
Entry: 7
Data: 4|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 5|UnityEngine.SerializeField, UnityEngine.CoreModule
- Name:
Entry: 8
Data:
- Name:
Entry: 13
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 7
Data:
- Name: $k
Entry: 1
Data: _Enabled
- Name: $v
Entry: 7
Data: 6|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _Enabled
- Name: <UserType>k__BackingField
Entry: 7
Data: 7|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: System.Boolean, mscorlib
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 7
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
- Name:
Entry: 3
Data: 1
- Name:
Entry: 8
Data:
- Name: <IsSerialized>k__BackingField
Entry: 5
Data: false
- Name: _fieldAttributes
Entry: 7
Data: 8|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 1
- Name:
Entry: 7
Data: 9|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
- Name:
Entry: 8
Data:
- Name:
Entry: 13
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 13
Data:
- Name:
Entry: 8
Data:
+8
View File
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: e58fc9ffa576cd84a8447f007c9fbaae
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
+33
View File
@@ -0,0 +1,33 @@
using UdonSharp;
using UnityEngine;
using VRC.Udon.Common;
[UdonBehaviourSyncMode(BehaviourSyncMode.Manual)]
public class SimpleEnable : UdonSharpBehaviour
{
[SerializeField] private GameObject _ToggledObject;
[UdonSynced] private bool _Enabled = false;
public override void OnDeserialization(DeserializationResult Result)
{
_EnableObject_Synced();
base.OnDeserialization(Result);
}
public void Enable(bool Enable)
{
_Enabled = Enable;
_EnableObject_Synced();
RequestSerialization();
}
private void _EnableObject_Synced()
{
_ToggledObject.SetActive(_Enabled);
}
}
+11
View File
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: a4dff40a52ffd0c49a995c2ee074bebf
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -12,7 +12,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3}
m_Name: BoneFollower
m_EditorClassIdentifier:
serializedUdonProgramAsset: {fileID: 11400000, guid: ccbda9bf23e2f714c9226283c77a92e5,
serializedUdonProgramAsset: {fileID: 11400000, guid: 52ecc8a73071e8e40928c3609699fcf4,
type: 2}
udonAssembly:
assemblyError:
@@ -12,7 +12,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3}
m_Name: InteractToggle
m_EditorClassIdentifier:
serializedUdonProgramAsset: {fileID: 11400000, guid: 405e38d3dfb2f514daeed0e28fbb4864,
serializedUdonProgramAsset: {fileID: 11400000, guid: 873dfce61b1514e429c92e0d2fded7de,
type: 2}
udonAssembly:
assemblyError:
@@ -12,7 +12,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3}
m_Name: PlayerModSetter
m_EditorClassIdentifier:
serializedUdonProgramAsset: {fileID: 11400000, guid: f938e6c4ff027a74da405a1f9353fd2b,
serializedUdonProgramAsset: {fileID: 11400000, guid: e81558796a212ab4d88e305e2010f24b,
type: 2}
udonAssembly:
assemblyError:
@@ -12,7 +12,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3}
m_Name: GlobalToggleObject
m_EditorClassIdentifier:
serializedUdonProgramAsset: {fileID: 11400000, guid: c49c9265a3ef24642a6a4465d0a78872,
serializedUdonProgramAsset: {fileID: 11400000, guid: 2fe8ced6184000f49bca526cd2c5891c,
type: 2}
udonAssembly:
assemblyError:
@@ -12,7 +12,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3}
m_Name: MasterToggleObject
m_EditorClassIdentifier:
serializedUdonProgramAsset: {fileID: 11400000, guid: 04024a76ab1924042ba521e11cb76d91,
serializedUdonProgramAsset: {fileID: 11400000, guid: a2d01d9f36ac6df49831be249e48ecc4,
type: 2}
udonAssembly:
assemblyError:
@@ -12,7 +12,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3}
m_Name: TrackingDataFollower
m_EditorClassIdentifier:
serializedUdonProgramAsset: {fileID: 11400000, guid: 17f8fbbe6cc186d4f8dbb057b01a4ec2,
serializedUdonProgramAsset: {fileID: 11400000, guid: 1b89d4552983c0448a7389decec3b555,
type: 2}
udonAssembly:
assemblyError:
@@ -12,7 +12,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3}
m_Name: WorldAudioSettings
m_EditorClassIdentifier:
serializedUdonProgramAsset: {fileID: 11400000, guid: 128d924a3066b7546b2d1c73e61006ab,
serializedUdonProgramAsset: {fileID: 11400000, guid: 994b559b0f158b4499f8937980ed8694,
type: 2}
udonAssembly:
assemblyError: