This change should fix objects lagging behind animations for some props.
This commit is contained in:
@@ -44,7 +44,7 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 11
|
||||
Data: 12
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data:
|
||||
@@ -248,7 +248,7 @@ MonoBehaviour:
|
||||
Data: 16|System.RuntimeType, mscorlib
|
||||
- Name:
|
||||
Entry: 1
|
||||
Data: UnityEngine.Transform, UnityEngine.CoreModule
|
||||
Data: VRC.SDK3.Components.VRCObjectSync, VRCSDK3
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
@@ -364,17 +364,11 @@ MonoBehaviour:
|
||||
Entry: 1
|
||||
Data: _ImageCard
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 7
|
||||
Data: 24|System.RuntimeType, mscorlib
|
||||
- Name:
|
||||
Entry: 1
|
||||
Data: UnityEngine.MeshRenderer, UnityEngine.CoreModule
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
Entry: 9
|
||||
Data: 16
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 24
|
||||
Data: 16
|
||||
- Name: <SyncMode>k__BackingField
|
||||
Entry: 7
|
||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||
@@ -389,13 +383,73 @@ MonoBehaviour:
|
||||
Data: true
|
||||
- Name: _fieldAttributes
|
||||
Entry: 7
|
||||
Data: 25|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
Data: 24|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 1
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data: 26|UnityEngine.SerializeField, UnityEngine.CoreModule
|
||||
Data: 25|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: _ImageCardMesh
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 26|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _ImageCardMesh
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 7
|
||||
Data: 27|System.RuntimeType, mscorlib
|
||||
- Name:
|
||||
Entry: 1
|
||||
Data: UnityEngine.MeshRenderer, UnityEngine.CoreModule
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 27
|
||||
- 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: 28|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 1
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data: 29|UnityEngine.SerializeField, UnityEngine.CoreModule
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
@@ -419,13 +473,13 @@ MonoBehaviour:
|
||||
Data: _Activate
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 27|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
Data: 30|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _Activate
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 7
|
||||
Data: 28|System.RuntimeType, mscorlib
|
||||
Data: 31|System.RuntimeType, mscorlib
|
||||
- Name:
|
||||
Entry: 1
|
||||
Data: System.Boolean, mscorlib
|
||||
@@ -434,7 +488,7 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 28
|
||||
Data: 31
|
||||
- Name: <SyncMode>k__BackingField
|
||||
Entry: 7
|
||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||
@@ -449,19 +503,19 @@ MonoBehaviour:
|
||||
Data: false
|
||||
- Name: _fieldAttributes
|
||||
Entry: 7
|
||||
Data: 29|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
Data: 32|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 2
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data: 30|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
|
||||
Data: 33|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data: 31|UdonSharp.FieldChangeCallbackAttribute, UdonSharp.Runtime
|
||||
Data: 34|UdonSharp.FieldChangeCallbackAttribute, UdonSharp.Runtime
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
@@ -485,13 +539,13 @@ MonoBehaviour:
|
||||
Data: _Note
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 32|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
Data: 35|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _Note
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 7
|
||||
Data: 33|System.RuntimeType, mscorlib
|
||||
Data: 36|System.RuntimeType, mscorlib
|
||||
- Name:
|
||||
Entry: 1
|
||||
Data: System.String, mscorlib
|
||||
@@ -500,7 +554,7 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 33
|
||||
Data: 36
|
||||
- Name: <SyncMode>k__BackingField
|
||||
Entry: 7
|
||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||
@@ -515,19 +569,19 @@ MonoBehaviour:
|
||||
Data: false
|
||||
- Name: _fieldAttributes
|
||||
Entry: 7
|
||||
Data: 34|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
Data: 37|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 2
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data: 35|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
|
||||
Data: 38|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data: 36|UdonSharp.FieldChangeCallbackAttribute, UdonSharp.Runtime
|
||||
Data: 39|UdonSharp.FieldChangeCallbackAttribute, UdonSharp.Runtime
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
@@ -551,13 +605,13 @@ MonoBehaviour:
|
||||
Data: _Image
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 37|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
Data: 40|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _Image
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 7
|
||||
Data: 38|System.RuntimeType, mscorlib
|
||||
Data: 41|System.RuntimeType, mscorlib
|
||||
- Name:
|
||||
Entry: 1
|
||||
Data: System.Int32, mscorlib
|
||||
@@ -566,7 +620,7 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 38
|
||||
Data: 41
|
||||
- Name: <SyncMode>k__BackingField
|
||||
Entry: 7
|
||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||
@@ -581,19 +635,19 @@ MonoBehaviour:
|
||||
Data: false
|
||||
- Name: _fieldAttributes
|
||||
Entry: 7
|
||||
Data: 39|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
Data: 42|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 2
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data: 40|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
|
||||
Data: 43|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data: 41|UdonSharp.FieldChangeCallbackAttribute, UdonSharp.Runtime
|
||||
Data: 44|UdonSharp.FieldChangeCallbackAttribute, UdonSharp.Runtime
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
@@ -617,13 +671,13 @@ MonoBehaviour:
|
||||
Data: _ImageScale
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 42|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
Data: 45|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _ImageScale
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 7
|
||||
Data: 43|System.RuntimeType, mscorlib
|
||||
Data: 46|System.RuntimeType, mscorlib
|
||||
- Name:
|
||||
Entry: 1
|
||||
Data: System.Single, mscorlib
|
||||
@@ -632,7 +686,7 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 43
|
||||
Data: 46
|
||||
- Name: <SyncMode>k__BackingField
|
||||
Entry: 7
|
||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||
@@ -647,19 +701,19 @@ MonoBehaviour:
|
||||
Data: false
|
||||
- Name: _fieldAttributes
|
||||
Entry: 7
|
||||
Data: 44|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
Data: 47|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 2
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data: 45|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
|
||||
Data: 48|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data: 46|UdonSharp.FieldChangeCallbackAttribute, UdonSharp.Runtime
|
||||
Data: 49|UdonSharp.FieldChangeCallbackAttribute, UdonSharp.Runtime
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
@@ -683,13 +737,13 @@ MonoBehaviour:
|
||||
Data: _ClueImageDownloader
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 47|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
Data: 50|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _ClueImageDownloader
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 7
|
||||
Data: 48|System.RuntimeType, mscorlib
|
||||
Data: 51|System.RuntimeType, mscorlib
|
||||
- Name:
|
||||
Entry: 1
|
||||
Data: VRC.SDK3.Image.VRCImageDownloader, VRCSDK3
|
||||
@@ -698,7 +752,7 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 48
|
||||
Data: 51
|
||||
- Name: <SyncMode>k__BackingField
|
||||
Entry: 7
|
||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||
@@ -713,7 +767,7 @@ MonoBehaviour:
|
||||
Data: false
|
||||
- Name: _fieldAttributes
|
||||
Entry: 7
|
||||
Data: 49|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
Data: 52|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 0
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using TMPro;
|
||||
using UdonSharp;
|
||||
using UnityEngine;
|
||||
using VRC.SDK3.Components;
|
||||
using VRC.SDK3.Image;
|
||||
using VRC.Udon.Common.Interfaces;
|
||||
|
||||
@@ -13,9 +14,10 @@ public class FilingCabinetNoteDispenser : UdonSharpBehaviour
|
||||
[SerializeField] private AudioManager _AudioManager;
|
||||
|
||||
[SerializeField] private Animator _Animator;
|
||||
[SerializeField] private Transform _ClueCard;
|
||||
[SerializeField] private VRCObjectSync _ClueCard;
|
||||
[SerializeField] private TextMeshProUGUI _ClueCardText;
|
||||
[SerializeField] private MeshRenderer _ImageCard;
|
||||
[SerializeField] private VRCObjectSync _ImageCard;
|
||||
[SerializeField] private MeshRenderer _ImageCardMesh;
|
||||
|
||||
[UdonSynced, FieldChangeCallback(nameof(Activate))] private bool _Activate = false;
|
||||
|
||||
@@ -46,17 +48,30 @@ public class FilingCabinetNoteDispenser : UdonSharpBehaviour
|
||||
}
|
||||
else
|
||||
{
|
||||
_ImageCard.enabled = false;
|
||||
_ImageCard.gameObject.SetActive(false);
|
||||
}
|
||||
}
|
||||
public override void OnImageLoadSuccess(IVRCImageDownload Result)
|
||||
{
|
||||
_ImageCard.material.SetTexture("_MainTex", Result.Result);
|
||||
_ImageCardMesh.material.SetTexture("_MainTex", Result.Result);
|
||||
_ImageCard.gameObject.SetActive(true);
|
||||
|
||||
base.OnImageLoadSuccess(Result);
|
||||
}
|
||||
|
||||
|
||||
public void EnableClueCardSync()
|
||||
{
|
||||
_ClueCard.enabled = true;
|
||||
}
|
||||
|
||||
public void EnableImageCardSync()
|
||||
{
|
||||
_ImageCard.enabled = true;
|
||||
}
|
||||
|
||||
|
||||
public bool Activate
|
||||
{
|
||||
set
|
||||
@@ -65,8 +80,8 @@ public class FilingCabinetNoteDispenser : UdonSharpBehaviour
|
||||
{
|
||||
_Activate = value;
|
||||
|
||||
_ClueCard.localPosition = Vector3.zero;
|
||||
_ClueCard.localRotation = Quaternion.identity;
|
||||
_ClueCard.transform.localPosition = Vector3.zero;
|
||||
_ClueCard.transform.localRotation = Quaternion.identity;
|
||||
|
||||
_ImageCard.transform.localPosition = Vector3.zero;
|
||||
_ImageCard.transform.localRotation = Quaternion.identity;
|
||||
@@ -80,6 +95,12 @@ public class FilingCabinetNoteDispenser : UdonSharpBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
_ClueCard.enabled = false;
|
||||
_ImageCard.enabled = false;
|
||||
|
||||
_ClueCard.gameObject.SetActive(_Activate);
|
||||
_ImageCard.gameObject.SetActive(_Activate);
|
||||
|
||||
RequestSerialization();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user