Skip to content
This repository has been archived by the owner on Jan 22, 2022. It is now read-only.

Commit

Permalink
Add support for serialization result in OnPostSerialization
Browse files Browse the repository at this point in the history
  • Loading branch information
MerlinVR committed May 15, 2021
1 parent a03a6e7 commit 7507e92
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions Assets/UdonSharp/Editor/UdonSharpResolverContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ public bool ReplaceInternalEventName(ref string eventName)
{ "_inputLookHorizontal", new System.Tuple<System.Type, string>[] { new System.Tuple<System.Type, string>(typeof(float), "inputLookHorizontalFloatValue"), new System.Tuple<System.Type, string>(typeof(VRC.Udon.Common.UdonInputEventArgs), "inputLookHorizontalArgs") } },
{ "_inputLookVertical", new System.Tuple<System.Type, string>[] { new System.Tuple<System.Type, string>(typeof(float), "inputLookVerticalFloatValue"), new System.Tuple<System.Type, string>(typeof(VRC.Udon.Common.UdonInputEventArgs), "inputLookVerticalArgs") } },
{ "_onOwnershipTransferred", new System.Tuple<System.Type, string>[] { new System.Tuple<System.Type, string>(typeof(VRC.SDKBase.VRCPlayerApi), "onOwnershipTransferredPlayer") } },
{ "_onPostSerialization", new System.Tuple<System.Type, string>[] { new System.Tuple<System.Type, string>(typeof(VRC.Udon.Common.SerializationResult), "onPostSerializationResult") } },
};

public System.Tuple<System.Type, string>[] GetMethodCustomArgs(string methodName)
Expand Down
2 changes: 1 addition & 1 deletion Assets/UdonSharp/Scripts/UdonSharpBehaviour.cs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ public virtual void OnPlayerCollisionStay(VRC.SDKBase.VRCPlayerApi player) { }
public virtual void OnPlayerParticleCollision(VRC.SDKBase.VRCPlayerApi player) { }
public virtual void OnPlayerRespawn(VRC.SDKBase.VRCPlayerApi player) { }

public virtual void OnPostSerialization() { }
public virtual void OnPostSerialization(VRC.Udon.Common.SerializationResult result) { }
public virtual bool OnOwnershipRequest(VRC.SDKBase.VRCPlayerApi requestingPlayer, VRC.SDKBase.VRCPlayerApi requestedOwner) => true;

public virtual void MidiNoteOn(int channel, int number, int velocity) { }
Expand Down

0 comments on commit 7507e92

Please sign in to comment.