- Added a special indoor post process volume to help with exposure changes.

- Secret Vulpine trigger is now network synced.
- Horseshoe is now network synced. Continuous for now, manual sync is planned.
This commit is contained in:
Jamie Greunbaum
2024-12-10 19:44:47 -05:00
parent 0e20e4a8e5
commit 57d9aa55ab
62 changed files with 2265 additions and 756 deletions
+213 -33
View File
@@ -44,25 +44,25 @@ MonoBehaviour:
Data:
- Name:
Entry: 12
Data: 4
Data: 7
- Name:
Entry: 7
Data:
- Name: $k
Entry: 1
Data: IsBeingHeld
Data: HomeLocation
- Name: $v
Entry: 7
Data: 2|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: IsBeingHeld
Data: HomeLocation
- Name: <UserType>k__BackingField
Entry: 7
Data: 3|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: System.Boolean, mscorlib
Data: UnityEngine.GameObject, UnityEngine.CoreModule
- Name:
Entry: 8
Data:
@@ -80,7 +80,7 @@ MonoBehaviour:
Data:
- Name: <IsSerialized>k__BackingField
Entry: 5
Data: false
Data: true
- Name: _fieldAttributes
Entry: 7
Data: 4|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
@@ -104,19 +104,25 @@ MonoBehaviour:
Data:
- Name: $k
Entry: 1
Data: IsInHome
Data: _IsBeingHeld
- Name: $v
Entry: 7
Data: 5|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: IsInHome
Data: _IsBeingHeld
- Name: <UserType>k__BackingField
Entry: 9
Data: 3
Entry: 7
Data: 6|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: System.Boolean, mscorlib
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 3
Data: 6
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
@@ -131,19 +137,19 @@ MonoBehaviour:
Data: false
- Name: _fieldAttributes
Entry: 7
Data: 6|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
Data: 7|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 2
- Name:
Entry: 7
Data: 7|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
Data: 8|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
- Name:
Entry: 8
Data:
- Name:
Entry: 7
Data: 8|UdonSharp.FieldChangeCallbackAttribute, UdonSharp.Runtime
Data: 9|UdonSharp.FieldChangeCallbackAttribute, UdonSharp.Runtime
- Name:
Entry: 8
Data:
@@ -164,31 +170,25 @@ MonoBehaviour:
Data:
- Name: $k
Entry: 1
Data: HorseshoeConstraint
Data: _IsInHome
- Name: $v
Entry: 7
Data: 9|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
Data: 10|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: HorseshoeConstraint
Data: _IsInHome
- Name: <UserType>k__BackingField
Entry: 7
Data: 10|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: UnityEngine.Animations.ParentConstraint, UnityEngine.AnimationModule
- Name:
Entry: 8
Data:
Entry: 9
Data: 6
- Name: <SystemType>k__BackingField
Entry: 9
Data: 10
Data: 6
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
- Name:
Entry: 6
Data:
Entry: 3
Data: 1
- Name:
Entry: 8
Data:
@@ -198,6 +198,132 @@ MonoBehaviour:
- Name: _fieldAttributes
Entry: 7
Data: 11|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 2
- Name:
Entry: 7
Data: 12|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
- Name:
Entry: 8
Data:
- Name:
Entry: 7
Data: 13|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: _IsHungOnHook
- Name: $v
Entry: 7
Data: 14|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _IsHungOnHook
- Name: <UserType>k__BackingField
Entry: 9
Data: 6
- Name: <SystemType>k__BackingField
Entry: 9
Data: 6
- 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: 15|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 2
- Name:
Entry: 7
Data: 16|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
- Name:
Entry: 8
Data:
- Name:
Entry: 7
Data: 17|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: _HomeCollider
- Name: $v
Entry: 7
Data: 18|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _HomeCollider
- Name: <UserType>k__BackingField
Entry: 7
Data: 19|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: UnityEngine.Collider, UnityEngine.PhysicsModule
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 19
- 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: false
- Name: _fieldAttributes
Entry: 7
Data: 20|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 0
@@ -218,16 +344,16 @@ MonoBehaviour:
Data:
- Name: $k
Entry: 1
Data: HorseshoeRigidBody
Data: _HorseshoeRigidBody
- Name: $v
Entry: 7
Data: 12|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
Data: 21|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: HorseshoeRigidBody
Data: _HorseshoeRigidBody
- Name: <UserType>k__BackingField
Entry: 7
Data: 13|System.RuntimeType, mscorlib
Data: 22|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: UnityEngine.Rigidbody, UnityEngine.PhysicsModule
@@ -236,7 +362,7 @@ MonoBehaviour:
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 13
Data: 22
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
@@ -251,7 +377,61 @@ MonoBehaviour:
Data: false
- Name: _fieldAttributes
Entry: 7
Data: 14|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
Data: 23|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 0
- 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: _HorseshoeConstraint
- Name: $v
Entry: 7
Data: 24|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: _HorseshoeConstraint
- Name: <UserType>k__BackingField
Entry: 7
Data: 25|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: UnityEngine.Animations.ParentConstraint, UnityEngine.AnimationModule
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 25
- 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: false
- Name: _fieldAttributes
Entry: 7
Data: 26|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 0
+116 -29
View File
@@ -8,69 +8,156 @@ using VRC.Udon;
public class Horseshoe : UdonSharpBehaviour
{
private bool IsBeingHeld = false;
[UdonSynced, FieldChangeCallback(nameof(SetIsInHome))]
private bool IsInHome = true;
public GameObject HomeLocation;
private ParentConstraint HorseshoeConstraint;
private Rigidbody HorseshoeRigidBody;
[UdonSynced, FieldChangeCallback(nameof(SetHeld))]
private bool _IsBeingHeld = false;
[UdonSynced, FieldChangeCallback(nameof(SetInHome))]
private bool _IsInHome = true;
[UdonSynced, FieldChangeCallback(nameof(SetHungOnHook))]
private bool _IsHungOnHook = true;
//[UdonSynced(UdonSyncMode.Linear), FieldChangeCallback(nameof(UpdateSyncedPosition))]
//private Vector3 _SyncedPosition;
//[UdonSynced(UdonSyncMode.Linear), FieldChangeCallback(nameof(UpdateSyncedRotation))]
//private Quaternion _SyncedRotation;
private Collider _HomeCollider;
private Rigidbody _HorseshoeRigidBody;
private ParentConstraint _HorseshoeConstraint;
public void Start()
{
HorseshoeConstraint = GetComponent<ParentConstraint>();
HorseshoeRigidBody = GetComponent<Rigidbody>();
_HomeCollider = HomeLocation.GetComponent<Collider>();
_HorseshoeRigidBody = GetComponent<Rigidbody>();
_HorseshoeConstraint = GetComponent<ParentConstraint>();
}
public override void OnPickup()
{
Networking.SetOwner(Networking.LocalPlayer, gameObject);
IsBeingHeld = true;
EnableConstraints(false);
RequestSerialization();
SetProgramVariable("_IsBeingHeld", true);
SetProgramVariable("_IsHungOnHook", false);
base.OnPickup();
}
public override void OnDrop()
{
IsBeingHeld = false;
SetProgramVariable("_IsBeingHeld", false);
if (IsInHome)
if (_IsInHome)
{
EnableConstraints(true);
SetProgramVariable("_IsHungOnHook", true);
}
else
{
EnableConstraints(false);
}
RequestSerialization();
base.OnDrop();
}
private void EnableConstraints(bool enable)
public void OnTriggerEnter(Collider OtherCollider)
{
HorseshoeRigidBody.useGravity = !enable;
HorseshoeConstraint.enabled = enable;
if (CollidingObjectIsHome(OtherCollider))
{
SetProgramVariable("_IsInHome", true);
if (!_IsBeingHeld)
{
SetProgramVariable("_IsHungOnHook", true);
}
}
}
public bool SetIsInHome
public void OnTriggerExit(Collider OtherCollider)
{
if (CollidingObjectIsHome(OtherCollider))
{
SetProgramVariable("_IsInHome", false);
}
}
//public override void PostLateUpdate()
//{
// if (_IsBeingHeld)
// {
// SetProgramVariable("_SyncedPosition", gameObject.transform.position);
// SetProgramVariable("_SyncedRotation", gameObject.transform.rotation);
// }
// base.PostLateUpdate();
//}
private bool CollidingObjectIsHome(Collider OtherCollider)
{
if (OtherCollider.Equals(_HomeCollider))
{
return true;
}
return false;
}
public bool SetHeld
{
set
{
IsInHome = value;
_IsBeingHeld = value;
_HorseshoeRigidBody.useGravity = (!_IsBeingHeld && !_IsHungOnHook);
}
if (!IsBeingHeld && IsInHome)
get => _IsBeingHeld;
}
public bool SetInHome
{
set
{
_IsInHome = value;
}
get => _IsInHome;
}
public bool SetHungOnHook
{
set
{
_IsHungOnHook = value;
_HorseshoeConstraint.enabled = _IsHungOnHook;
if (_IsHungOnHook)
{
EnableConstraints(true);
_HorseshoeRigidBody.useGravity = false;
}
}
get => IsInHome;
get => _IsHungOnHook;
}
//public Vector3 UpdateSyncedPosition
//{
// set
// {
// _SyncedPosition = value;
// gameObject.transform.position = _SyncedPosition;
// }
// get => _SyncedPosition;
//}
//public Quaternion UpdateSyncedRotation
//{
// set
// {
// _SyncedRotation = value;
// gameObject.transform.rotation = _SyncedRotation;
// }
// get => _SyncedRotation;
//}
}
@@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 50e605e4fb9c4344ca324c4fe313ff02
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
@@ -1,46 +0,0 @@
using UdonSharp;
using UnityEngine;
using VRC.SDKBase;
using VRC.Udon;
public class HorseshoeHomeLocation : UdonSharpBehaviour
{
public GameObject Horseshoe;
private UdonBehaviour HorseshoeBehaviour;
private MeshCollider HorseshoeCollider;
public void Start()
{
HorseshoeBehaviour = Horseshoe.GetComponent<UdonBehaviour>();
HorseshoeCollider = Horseshoe.GetComponent<MeshCollider>();
}
public void OnTriggerEnter(Collider OtherCollider)
{
if (CollidingObjectIsHorseshoe(OtherCollider))
{
HorseshoeBehaviour.SetProgramVariable<bool>("IsInHome", true);
}
}
public void OnTriggerExit(Collider OtherCollider)
{
if (CollidingObjectIsHorseshoe(OtherCollider))
{
HorseshoeBehaviour.SetProgramVariable<bool>("IsInHome", false);
}
}
private bool CollidingObjectIsHorseshoe(Collider OtherCollider)
{
if (OtherCollider.Equals(HorseshoeCollider))
{
return true;
}
return false;
}
}
@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: e9d6c68d56214fc4e9c6004b07574621
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -1,107 +0,0 @@
%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: SecretVulpine
m_EditorClassIdentifier:
serializedUdonProgramAsset: {fileID: 11400000, guid: 444456c545771e54e9155151732d669e,
type: 2}
udonAssembly:
assemblyError:
sourceCsScript: {fileID: 11500000, guid: 4b9393fee8dcb7c4e90a4f7b21518221, type: 3}
scriptVersion: 2
compiledVersion: 2
behaviourSyncMode: 0
hasInteractEvent: 1
scriptID: -8610235078425832821
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: 1
- Name:
Entry: 7
Data:
- Name: $k
Entry: 1
Data: Vulpine
- Name: $v
Entry: 7
Data: 2|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: Vulpine
- 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: 0
- Name:
Entry: 13
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 13
Data:
- Name:
Entry: 8
Data:
@@ -1,19 +0,0 @@
using UdonSharp;
using UnityEngine;
using VRC.SDKBase;
using VRC.Udon;
public class SecretVulpine : UdonSharpBehaviour
{
public GameObject Vulpine;
public override void Interact()
{
if (Vulpine != null)
{
Vulpine.SetActive(!Vulpine.activeSelf);
RequestSerialization();
}
}
}
@@ -10,18 +10,18 @@ MonoBehaviour:
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: c333ccfdd0cbdbc4ca30cef2dd6e6b9b, type: 3}
m_Name: HorseshoeHomeLocation
m_Name: SecretVulpineTrigger
m_EditorClassIdentifier:
serializedUdonProgramAsset: {fileID: 11400000, guid: 79f7759cb5e96b142bde0b27e0670975,
serializedUdonProgramAsset: {fileID: 11400000, guid: 444456c545771e54e9155151732d669e,
type: 2}
udonAssembly:
assemblyError:
sourceCsScript: {fileID: 11500000, guid: e9d6c68d56214fc4e9c6004b07574621, type: 3}
sourceCsScript: {fileID: 11500000, guid: 4b9393fee8dcb7c4e90a4f7b21518221, type: 3}
scriptVersion: 2
compiledVersion: 2
behaviourSyncMode: 0
hasInteractEvent: 0
scriptID: 7795716828761129294
hasInteractEvent: 1
scriptID: -2067154315038537254
serializationData:
SerializedFormat: 2
SerializedBytes:
@@ -44,19 +44,19 @@ MonoBehaviour:
Data:
- Name:
Entry: 12
Data: 3
Data: 2
- Name:
Entry: 7
Data:
- Name: $k
Entry: 1
Data: Horseshoe
Data: Vulpine
- Name: $v
Entry: 7
Data: 2|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: Horseshoe
Data: Vulpine
- Name: <UserType>k__BackingField
Entry: 7
Data: 3|System.RuntimeType, mscorlib
@@ -104,19 +104,19 @@ MonoBehaviour:
Data:
- Name: $k
Entry: 1
Data: HorseshoeBehaviour
Data: FoxIsActive
- Name: $v
Entry: 7
Data: 5|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: HorseshoeBehaviour
Data: FoxIsActive
- Name: <UserType>k__BackingField
Entry: 7
Data: 6|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: VRC.Udon.UdonBehaviour, VRC.Udon
Data: System.Boolean, mscorlib
- Name:
Entry: 8
Data:
@@ -127,8 +127,8 @@ MonoBehaviour:
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
- Name:
Entry: 6
Data:
Entry: 3
Data: 1
- Name:
Entry: 8
Data:
@@ -140,61 +140,19 @@ MonoBehaviour:
Data: 7|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 0
Data: 2
- Name:
Entry: 13
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 8
Data:
Entry: 7
Data: 8|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
- Name:
Entry: 8
Data:
- Name:
Entry: 7
Data:
- Name: $k
Entry: 1
Data: HorseshoeCollider
- Name: $v
Entry: 7
Data: 8|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: HorseshoeCollider
- Name: <UserType>k__BackingField
Entry: 7
Data: 9|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: UnityEngine.MeshCollider, UnityEngine.PhysicsModule
Data: 9|UdonSharp.FieldChangeCallbackAttribute, UdonSharp.Runtime
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 9
- 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: false
- Name: _fieldAttributes
Entry: 7
Data: 10|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 0
- Name:
Entry: 13
Data:
@@ -0,0 +1,37 @@
using UdonSharp;
using UnityEngine;
using VRC.SDKBase;
using VRC.Udon;
public class SecretVulpineTrigger : UdonSharpBehaviour
{
public GameObject Vulpine;
[UdonSynced, FieldChangeCallback(nameof(SetFoxActive))]
private bool FoxIsActive = false;
public override void Interact()
{
if (Vulpine != null)
{
Networking.SetOwner(Networking.LocalPlayer, gameObject);
SetProgramVariable("FoxIsActive", !FoxIsActive);
RequestSerialization();
}
}
public bool SetFoxActive
{
set
{
Vulpine.SetActive(!Vulpine.activeSelf);
FoxIsActive = value;
}
get => FoxIsActive;
}
}