-
-
Notifications
You must be signed in to change notification settings - Fork 89
Events
NGenesis edited this page May 17, 2021
·
18 revisions
These are the method stubs available for Unity events.
Events | ||
---|---|---|
FixedUpdate | OnJointBreak | OnRenderImage |
LateUpdate | OnJointBreak2D | OnRenderObject |
OnAnimatorIK | OnMouseDown | OnTransformChildrenChanged |
OnAnimatorMove | OnMouseDrag | OnTransformParentChanged |
OnCollisionEnter | OnMouseEnter | OnTriggerEnter |
OnCollisionEnter2D | OnMouseExit | OnTriggerEnter2D |
OnCollisionExit | OnMouseOver | OnTriggerExit |
OnCollisionExit2D | OnMouseUp | OnTriggerExit2D |
OnCollisionStay | OnMouseUpAsButton | OnTriggerStay |
OnCollisionStay2D | OnParticleCollision | OnTriggerStay2D |
OnControllerColliderHit | OnParticleTrigger | OnWillRenderObject |
OnDestroy | OnPostRender | Start |
OnDisable | OnPreCull | Update |
OnEnable | OnPreRender |
These are the method stubs you can override via UdonSharpBehaviour
.
These methods have to be public
public override void <method>() {}
Returns | Name | |
---|---|---|
void |
Interact() | Fired when a user interacts with the object Will add a box collider if no collider is present. |
void |
OnDrop() | Requires VRC_Pickup |
bool |
OnOwnershipRequest(VRCPlayerApi requester, VRCPlayerApi newOwner) | Fired when an UdonBehaviour is going to change owner. Returning true will accept the change in ownership, and returning false will reject the change in ownership. |
void |
OnOwnershipTransferred(VRCPlayerApi player) | Fired every time a UdonBehaviour changes owner |
void |
OnPickup() | Requires VRC_Pickup |
void |
OnPickupUseDown() | Requires VRC_Pickup |
void |
OnPickupUseUp() | Requires VRC_Pickup |
void |
OnPlayerJoined(VRCPlayerApi player) | Fired when a new player joins the instance |
void |
OnPlayerLeft(VRCPlayerApi player) | Fired when a player leaves the instance |
void |
OnPlayerRespawn(VRCPlayerApi player) | Fired when a player respawns |
void |
OnSpawn() | Fired when a object is spawned via network instantiation |
void |
OnStationEntered(VRCPlayerApi player) | Requires VRC_Station |
void |
OnStationExited(VRCPlayerApi player) | Requires VRC_Station |
void |
OnVideoEnd() | When the video player ends playback |
void |
OnVideoError(VideoError videoError) | When an error occurs with the player |
void |
OnVideoLoop() | If looping is enabled, this will fire at the end |
void |
OnVideoPause() | When the video player is paused |
void |
OnVideoPlay() | When you start playing a video |
void |
OnVideoStart() | When a video is playing for the first time? |
void |
OnVideoReady() | When the video player has loaded the url |
void |
OnPreSerialization() | Fired before sending network data |
void |
OnPostSerialization(VRC.Udon.Common.SerializationResult result) | Fired after sending network data and provides data on whether the serialization attempt succeeded and how many bytes were serialized. |
void |
OnDeserialization() | Fired when network data is received |
void |
OnPlayerTriggerEnter(VRCPlayerApi player) | Player enters a trigger |
void |
OnPlayerTriggerStay(VRCPlayerApi player) | Player stays in a trigger |
void |
OnPlayerTriggerExit(VRCPlayerApi player) | Player leaves a trigger |
void |
OnPlayerCollisionEnter(VRCPlayerApi player) | Player collides with a collider |
void |
OnPlayerCollisionStay(VRCPlayerApi player) | Player stays on a collider |
void |
OnPlayerCollisionExit(VRCPlayerApi player) | Player leaves the collider |
void |
OnPlayerParticleCollision(VRCPlayerApi player) | A collision particle hits the player |
void |
MidiNoteOn(int channel, int number, int velocity) | Triggered when a Note On message is received, typically by pressing a key / pad on your device. See Midi in Udon for more information. |
void |
MidiNoteOff(int channel, int number, int velocity) | Triggered when a Note Off message is received, typically by releasing a key / pad on your device. See Midi in Udon for more information. |
void |
MidiControlChange(int channel, int number, int value) | Triggered when a control change is received. These are typically sent by knobs and sliders on your Midi device. See Midi Events for more information. |
void |
InputJump(bool value, VRC.Udon.Common.UdonInputEventArgs args) | See Input Events for more information. |
void |
InputUse(bool value, VRC.Udon.Common.UdonInputEventArgs args) | See Input Events for more information. |
void |
InputGrab(bool value, VRC.Udon.Common.UdonInputEventArgs args) | See Input Events for more information. |
void |
InputDrop(bool value, VRC.Udon.Common.UdonInputEventArgs args) | See Input Events for more information. |
void |
InputMoveHorizontal(float value, VRC.Udon.Common.UdonInputEventArgs args) | See Input Events for more information. |
void |
InputMoveVertical(float value, VRC.Udon.Common.UdonInputEventArgs args) | See Input Events for more information. |
void |
InputLookHorizontal(float value, VRC.Udon.Common.UdonInputEventArgs args) | See Input Events for more information. |
void |
InputLookVertical(float value, VRC.Udon.Common.UdonInputEventArgs args) | See Input Events for more information. |