diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
new file mode 100644
index 0000000..44d86fa
--- /dev/null
+++ b/.github/workflows/release.yml
@@ -0,0 +1,55 @@
+name: Build Release
+
+on:
+ workflow_dispatch:
+
+env:
+ packageName: "tlp.udonutils"
+
+permissions:
+ contents: write
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+
+ - name: Checkout
+ uses: actions/checkout@v3
+
+ - name: get version
+ id: version
+ uses: notiz-dev/github-action-json-property@7c8cf5cc36eb85d8d287a8086a39dac59628eb31
+ with:
+ path: "Packages/${{env.packageName}}/package.json"
+ prop_path: "version"
+
+ - name: Set Environment Variables
+ run: |
+ echo "zipFile=${{ env.packageName }}-${{ steps.version.outputs.prop }}".zip >> $GITHUB_ENV
+ echo "unityPackage=${{ env.packageName }}-${{ steps.version.outputs.prop }}.unitypackage" >> $GITHUB_ENV
+
+ - name: Create Zip
+ uses: thedoctor0/zip-release@09336613be18a8208dfa66bd57efafd9e2685657
+ with:
+ type: "zip"
+ directory: "Packages/${{env.packageName}}/"
+ filename: "../../${{env.zipFile}}" # make the zip file two directories up, since we start two directories in above
+
+ - run: find "Packages/${{env.packageName}}/" -name \*.meta >> metaList
+
+ - name: Create UnityPackage
+ uses: pCYSl5EDgo/create-unitypackage@cfcd3cf0391a5ef1306342794866a9897c32af0b
+ with:
+ package-path: ${{ env.unityPackage }}
+ include-files: metaList
+
+
+ - name: Make Release
+ uses: softprops/action-gh-release@1e07f4398721186383de40550babbdf2b84acfc5
+ with:
+ tag_name: ${{ steps.version.outputs.prop }}
+ files: |
+ ${{ env.zipFile }}
+ ${{ env.unityPackage }}
+ Packages/${{ env.packageName }}/package.json
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
index e0aa220..904af3a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,9 @@
-/Releases/
-/Releases.meta
+/*
+!.git
+!.github
+!.gitignore
+!LICENSE
+!README.md
+!Packages/
+Packages/*
+!Packages/tlp.udonutils/*
diff --git a/Graphs/HorizontalLookAt.asset b/Graphs/HorizontalLookAt.asset
deleted file mode 100644
index 8c6813f..0000000
--- a/Graphs/HorizontalLookAt.asset
+++ /dev/null
@@ -1,295 +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: 4f11136daadff0b44ac2278a314682ab, type: 3}
- m_Name: HorizontalLookAt
- m_EditorClassIdentifier:
- serializedUdonProgramAsset: {fileID: 11400000, guid: d6bdc5fdaa093bc4b8bf3c34220f70bd,
- type: 2}
- udonAssembly: ".data_start\r\n\r\n .export weight\r\n \r\n instance_0:
- %VRCUdonUdonBehaviour, this\r\n symbolName_0: %SystemString, null\r\n value_0:
- %SystemObject, null\r\n instance_1: %UnityEngineTransform, this\r\n object_0:
- %SystemObject, null\r\n result_0: %SystemBoolean, null\r\n instance_2: %UnityEngineTransform,
- this\r\n value_1: %UnityEngineQuaternion, null\r\n x_0: %SystemSingle, null\r\n
- \ y_0: %SystemSingle, null\r\n z_0: %SystemSingle, null\r\n Vector3_0:
- %UnityEngineVector3, null\r\n instance_3: %UnityEngineQuaternion, null\r\n
- \ a_0: %UnityEngineQuaternion, null\r\n b_0: %UnityEngineQuaternion, null\r\n
- \ t_0: %SystemSingle, null\r\n forward_0: %UnityEngineVector3, null\r\n Vector3_1:
- %UnityEngineVector3, null\r\n Vector3_2: %UnityEngineVector3, null\r\n instance_4:
- %UnityEngineTransform, this\r\n instance_5: %VRCSDKBaseVRCPlayerApi, null\r\n
- \ weight: %SystemSingle, null\r\n _initialRotation: %UnityEngineQuaternion,
- null\r\n\r\n.data_end\r\n\r\n.code_start\r\n\r\n .export _start\r\n \r\n
- \ _start:\r\n \r\n PUSH, instance_1\r\n PUSH, value_0\r\n EXTERN,
- \"UnityEngineTransform.__get_rotation__UnityEngineQuaternion\"\r\n PUSH,
- instance_0\r\n PUSH, symbolName_0\r\n PUSH, value_0\r\n EXTERN,
- \"VRCUdonCommonInterfacesIUdonEventReceiver.__SetProgramVariable__SystemString_SystemObject__SystemVoid\"\r\n
- \ JUMP, 0xFFFFFFFC\r\n \r\n .export _update\r\n \r\n _update:\r\n
- \ \r\n PUSH, object_0\r\n EXTERN, \"VRCSDKBaseNetworking.__get_LocalPlayer__VRCSDKBaseVRCPlayerApi\"\r\n
- \ PUSH, object_0\r\n PUSH, result_0\r\n EXTERN, \"VRCSDKBaseUtilities.__IsValid__SystemObject__SystemBoolean\"\r\n
- \ PUSH, result_0\r\n JUMP_IF_FALSE, 0x00000194\r\n PUSH, instance_4\r\n
- \ PUSH, Vector3_1\r\n EXTERN, \"UnityEngineTransform.__get_position__UnityEngineVector3\"\r\n
- \ PUSH, object_0\r\n PUSH, instance_5\r\n COPY\r\n PUSH,
- object_0\r\n PUSH, Vector3_2\r\n EXTERN, \"VRCSDKBaseVRCPlayerApi.__GetPosition__UnityEngineVector3\"\r\n
- \ PUSH, Vector3_1\r\n PUSH, Vector3_2\r\n PUSH, forward_0\r\n
- \ EXTERN, \"UnityEngineVector3.__op_Subtraction__UnityEngineVector3_UnityEngineVector3__UnityEngineVector3\"\r\n
- \ PUSH, forward_0\r\n PUSH, b_0\r\n EXTERN, \"UnityEngineQuaternion.__LookRotation__UnityEngineVector3__UnityEngineQuaternion\"\r\n
- \ PUSH, _initialRotation\r\n PUSH, b_0\r\n PUSH, weight\r\n
- \ PUSH, instance_3\r\n EXTERN, \"UnityEngineQuaternion.__Slerp__UnityEngineQuaternion_UnityEngineQuaternion_SystemSingle__UnityEngineQuaternion\"\r\n
- \ PUSH, instance_3\r\n PUSH, Vector3_0\r\n EXTERN, \"UnityEngineQuaternion.__get_eulerAngles__UnityEngineVector3\"\r\n
- \ PUSH, Vector3_0\r\n PUSH, y_0\r\n EXTERN, \"UnityEngineVector3.__get_y__SystemSingle\"\r\n
- \ PUSH, x_0\r\n PUSH, y_0\r\n PUSH, z_0\r\n PUSH, value_1\r\n
- \ EXTERN, \"UnityEngineQuaternion.__Euler__SystemSingle_SystemSingle_SystemSingle__UnityEngineQuaternion\"\r\n
- \ PUSH, instance_2\r\n PUSH, value_1\r\n EXTERN, \"UnityEngineTransform.__set_rotation__UnityEngineQuaternion__SystemVoid\"\r\n
- \ JUMP, 0x00000194\r\n JUMP, 0xFFFFFFFC\r\n \r\n\r\n.code_end\r\n"
- assemblyError:
- graphData:
- name:
- description:
- nodes:
- - fullName: Variable_SystemSingle
- uid: e923e774-3a73-41f5-9bfd-58e34e6aa13b
- position: {x: 0, y: 0}
- nodeUIDs:
- -
- -
- -
- -
- -
- flowUIDs: []
- nodeValues:
- - unityObjectValue: {fileID: 0}
- stringValue: System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089|1
- - unityObjectValue: {fileID: 0}
- stringValue: System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089|weight
- - unityObjectValue: {fileID: 0}
- stringValue: System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089|True
- - unityObjectValue: {fileID: 0}
- stringValue: System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089|False
- - unityObjectValue: {fileID: 0}
- stringValue: System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089|none
- - fullName: Variable_UnityEngineQuaternion
- uid: 0e0ff6b0-93a4-49ea-bc5d-d8a1def425e3
- position: {x: 0, y: 0}
- nodeUIDs:
- -
- -
- -
- -
- -
- flowUIDs: []
- nodeValues:
- - unityObjectValue: {fileID: 0}
- stringValue:
- - unityObjectValue: {fileID: 0}
- stringValue: System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089|_initialRotation
- - unityObjectValue: {fileID: 0}
- stringValue: System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089|False
- - unityObjectValue: {fileID: 0}
- stringValue: System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089|False
- - unityObjectValue: {fileID: 0}
- stringValue: System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089|none
- - fullName: Event_Start
- uid: 2fd618ba-0e8e-4354-85ea-21d1eb1cd6e4
- position: {x: 237, y: 10.120003}
- nodeUIDs: []
- flowUIDs:
- - 863d8b39-795d-47f0-97ef-38332dfb396e
- nodeValues: []
- - fullName: UnityEngineTransform.__get_rotation__UnityEngineQuaternion
- uid: 71be00eb-4ebc-466c-8e62-d2346b5efa8d
- position: {x: 366, y: 99.12}
- nodeUIDs:
- -
- flowUIDs: []
- nodeValues:
- - unityObjectValue: {fileID: 0}
- stringValue:
- - fullName: VRCUdonCommonInterfacesIUdonEventReceiver.__SetProgramVariable__SystemString_SystemObject__SystemVoid
- uid: 863d8b39-795d-47f0-97ef-38332dfb396e
- position: {x: 611, y: 10.120003}
- nodeUIDs:
- -
- -
- - 71be00eb-4ebc-466c-8e62-d2346b5efa8d|0
- flowUIDs: []
- nodeValues:
- - unityObjectValue: {fileID: 0}
- stringValue:
- - unityObjectValue: {fileID: 0}
- stringValue: System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089|_initialRotation
- - unityObjectValue: {fileID: 0}
- stringValue:
- - fullName: Event_Update
- uid: c3047606-35f4-4db7-925a-65891c080eea
- position: {x: 237, y: 299.12}
- nodeUIDs: []
- flowUIDs:
- - dddd9e5c-9de3-4ce6-a504-eecad67a5b01
- nodeValues: []
- - fullName: UnityEngineTransform.__get_position__UnityEngineVector3
- uid: c1609de1-79b3-41f6-b104-da4653ab381e
- position: {x: 447.31854, y: 449.35907}
- nodeUIDs:
- -
- flowUIDs: []
- nodeValues:
- - unityObjectValue: {fileID: 0}
- stringValue:
- - fullName: VRCSDKBaseNetworking.__get_LocalPlayer__VRCSDKBaseVRCPlayerApi
- uid: a708fad7-7191-4583-a172-ce1b4aae4237
- position: {x: 231, y: 441.12}
- nodeUIDs: []
- flowUIDs: []
- nodeValues: []
- - fullName: Is_Valid
- uid: dddd9e5c-9de3-4ce6-a504-eecad67a5b01
- position: {x: 442, y: 301.12}
- nodeUIDs:
- - a708fad7-7191-4583-a172-ce1b4aae4237|0
- flowUIDs:
- - 792ff194-644f-4481-9c40-464b58d476dc
- nodeValues:
- - unityObjectValue: {fileID: 0}
- stringValue:
- - fullName: UnityEngineVector3.__op_Subtraction__UnityEngineVector3_UnityEngineVector3__UnityEngineVector3
- uid: 71c60369-dc95-46ee-a076-85bbeeb34341
- position: {x: 665.31854, y: 470.35904}
- nodeUIDs:
- - c1609de1-79b3-41f6-b104-da4653ab381e|0
- - 8a27f689-3a13-4616-882d-dbe11684a773|0
- flowUIDs: []
- nodeValues:
- - unityObjectValue: {fileID: 0}
- stringValue: UnityEngine.Vector3, UnityEngine.CoreModule, Version=0.0.0.0,
- Culture=neutral, PublicKeyToken=null|{"x":0.0,"y":0.0,"z":0.0}
- - unityObjectValue: {fileID: 0}
- stringValue: UnityEngine.Vector3, UnityEngine.CoreModule, Version=0.0.0.0,
- Culture=neutral, PublicKeyToken=null|{"x":0.0,"y":0.0,"z":0.0}
- - fullName: VRCSDKBaseVRCPlayerApi.__GetPosition__UnityEngineVector3
- uid: 8a27f689-3a13-4616-882d-dbe11684a773
- position: {x: 449.31854, y: 546.7591}
- nodeUIDs:
- - a708fad7-7191-4583-a172-ce1b4aae4237|0
- flowUIDs: []
- nodeValues:
- - unityObjectValue: {fileID: 0}
- stringValue:
- - fullName: UnityEngineQuaternion.__LookRotation__UnityEngineVector3__UnityEngineQuaternion
- uid: 41ff8417-f605-4b2e-a773-dadabf686b0e
- position: {x: 891.3185, y: 476.11905}
- nodeUIDs:
- - 71c60369-dc95-46ee-a076-85bbeeb34341|0
- -
- flowUIDs: []
- nodeValues:
- - unityObjectValue: {fileID: 0}
- stringValue: UnityEngine.Vector3, UnityEngine.CoreModule, Version=0.0.0.0,
- Culture=neutral, PublicKeyToken=null|{"x":0.0,"y":0.0,"z":0.0}
- - unityObjectValue: {fileID: 0}
- stringValue: UnityEngine.Vector3, UnityEngine.CoreModule, Version=0.0.0.0,
- Culture=neutral, PublicKeyToken=null|{"x":0.0,"y":0.0,"z":0.0}
- - fullName: UnityEngineQuaternion.__Slerp__UnityEngineQuaternion_UnityEngineQuaternion_SystemSingle__UnityEngineQuaternion
- uid: f9e11131-350c-4a7e-be01-ba48cced02b4
- position: {x: 1248.3185, y: 411.11908}
- nodeUIDs:
- - c0457fc3-0a3e-43b2-b542-6b25acfaaecd|0
- - 41ff8417-f605-4b2e-a773-dadabf686b0e|0
- - b6d37cc4-ccb6-4a47-b2af-4fd441095e7b|0
- flowUIDs: []
- nodeValues:
- - unityObjectValue: {fileID: 0}
- stringValue: UnityEngine.Quaternion, UnityEngine.CoreModule, Version=0.0.0.0,
- Culture=neutral, PublicKeyToken=null|{"x":0.0,"y":0.0,"z":0.0,"w":0.0}
- - unityObjectValue: {fileID: 0}
- stringValue: UnityEngine.Quaternion, UnityEngine.CoreModule, Version=0.0.0.0,
- Culture=neutral, PublicKeyToken=null|{"x":0.0,"y":0.0,"z":0.0,"w":0.0}
- - unityObjectValue: {fileID: 0}
- stringValue: System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089|0
- - fullName: Get_Variable
- uid: b6d37cc4-ccb6-4a47-b2af-4fd441095e7b
- position: {x: 975.31854, y: 582.2391}
- nodeUIDs:
- -
- flowUIDs: []
- nodeValues:
- - unityObjectValue: {fileID: 0}
- stringValue: System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089|e923e774-3a73-41f5-9bfd-58e34e6aa13b
- - unityObjectValue: {fileID: 0}
- stringValue:
- - fullName: Get_Variable
- uid: c0457fc3-0a3e-43b2-b542-6b25acfaaecd
- position: {x: 895.3185, y: 379.99908}
- nodeUIDs:
- -
- flowUIDs: []
- nodeValues:
- - unityObjectValue: {fileID: 0}
- stringValue: System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089|0e0ff6b0-93a4-49ea-bc5d-d8a1def425e3
- - unityObjectValue: {fileID: 0}
- stringValue:
- - fullName: UnityEngineQuaternion.__get_eulerAngles__UnityEngineVector3
- uid: 04842881-04bc-4f41-bd17-92754b9a5959
- position: {x: 1497.3186, y: 429.11905}
- nodeUIDs:
- - f9e11131-350c-4a7e-be01-ba48cced02b4|0
- flowUIDs: []
- nodeValues:
- - unityObjectValue: {fileID: 0}
- stringValue: UnityEngine.Quaternion, UnityEngine.CoreModule, Version=0.0.0.0,
- Culture=neutral, PublicKeyToken=null|{"x":0.0,"y":0.0,"z":0.0,"w":0.0}
- - fullName: UnityEngineTransform.__set_rotation__UnityEngineQuaternion__SystemVoid
- uid: 792ff194-644f-4481-9c40-464b58d476dc
- position: {x: 2185.6965, y: 304.16284}
- nodeUIDs:
- -
- - 699ad579-eca7-43b8-ace9-62020dc8eff2|0
- flowUIDs: []
- nodeValues:
- - unityObjectValue: {fileID: 0}
- stringValue:
- - unityObjectValue: {fileID: 0}
- stringValue: UnityEngine.Quaternion, UnityEngine.CoreModule, Version=0.0.0.0,
- Culture=neutral, PublicKeyToken=null|{"x":0.0,"y":0.0,"z":0.0,"w":0.0}
- - fullName: UnityEngineQuaternion.__Euler__SystemSingle_SystemSingle_SystemSingle__UnityEngineQuaternion
- uid: 699ad579-eca7-43b8-ace9-62020dc8eff2
- position: {x: 1941.4781, y: 377.9635}
- nodeUIDs:
- -
- - 29a0f821-190b-456d-9716-44d82f76bdba|0
- -
- flowUIDs: []
- nodeValues:
- - unityObjectValue: {fileID: 0}
- stringValue: System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089|0
- - unityObjectValue: {fileID: 0}
- stringValue: System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089|0
- - unityObjectValue: {fileID: 0}
- stringValue: System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089|0
- - fullName: UnityEngineVector3.__get_y__SystemSingle
- uid: 29a0f821-190b-456d-9716-44d82f76bdba
- position: {x: 1765.9839, y: 426.9353}
- nodeUIDs:
- - 04842881-04bc-4f41-bd17-92754b9a5959|0
- flowUIDs: []
- nodeValues:
- - unityObjectValue: {fileID: 0}
- stringValue: UnityEngine.Vector3, UnityEngine.CoreModule, Version=0.0.0.0,
- Culture=neutral, PublicKeyToken=null|{"x":0.0,"y":0.0,"z":0.0}
- updateOrder: 0
- graphElementData:
- - type: 5
- uid: 9812095f-d089-45e4-b339-c14973bd58e9
- jsonData: '{"visible":true,"layout":{"serializedVersion":"2","x":10.0,"y":130.0,"width":200.0,"height":150.0}}'
- viewTransform:
- position: {x: 73.2903, y: 136.85036}
- scale: 0.57175326
- version: 1.0.0
- showAssembly: 0
diff --git a/LICENSE b/LICENSE
index ba270be..535612d 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,6 +1,6 @@
MIT License
-Copyright (c) 2020 Guribo
+Copyright (c) 2023 Guribo
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/Graphs.meta b/Packages/tlp.udonutils/Runtime.meta
similarity index 77%
rename from Graphs.meta
rename to Packages/tlp.udonutils/Runtime.meta
index 24327ee..664039a 100644
--- a/Graphs.meta
+++ b/Packages/tlp.udonutils/Runtime.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
-guid: 3638ed376c5a86d44a37588903294bf0
+guid: 4c12bc4e35c3f34489e7202f117a7d42
folderAsset: yes
DefaultImporter:
externalObjects: {}
diff --git a/Scripts/Common.meta b/Packages/tlp.udonutils/Runtime/Common.meta
similarity index 77%
rename from Scripts/Common.meta
rename to Packages/tlp.udonutils/Runtime/Common.meta
index 1f6cd45..1d1f495 100644
--- a/Scripts/Common.meta
+++ b/Packages/tlp.udonutils/Runtime/Common.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
-guid: ba13d0994d1dd394fb7a38e342a8e2dc
+guid: 15b1b88658600ee468c4bdbda71cd7ab
folderAsset: yes
DefaultImporter:
externalObjects: {}
diff --git a/Packages/tlp.udonutils/Runtime/Common/UdonCommon.cs b/Packages/tlp.udonutils/Runtime/Common/UdonCommon.cs
new file mode 100644
index 0000000..93ecd61
--- /dev/null
+++ b/Packages/tlp.udonutils/Runtime/Common/UdonCommon.cs
@@ -0,0 +1,166 @@
+using System;
+using UnityEngine;
+using VRC.SDKBase;
+
+namespace TLP.UdonUtils.Common
+{
+ public static class UdonCommon
+ {
+ ///
+ /// Finds the component of a given type in the current gameobject hierarchy which is closest to the scene root
+ ///
+ ///
+ ///
+ /// the found component or null if none was found
+ public static Component FindTopComponent(Type type, Transform start)
+ {
+ if (!Utilities.IsValid(start))
+ {
+ return null;
+ }
+
+ Component topComponent = null;
+ var topTransform = start;
+
+ do
+ {
+ var behaviour = topTransform.GetComponent(type);
+ if (Utilities.IsValid(behaviour))
+ {
+ topComponent = behaviour;
+ }
+
+ topTransform = topTransform.parent;
+ } while (Utilities.IsValid(topTransform));
+
+ return topComponent;
+ }
+
+ /**
+ * O(n) - scales linearly with number of players present, don't use in Update()!
+ */
+ public static VRCPlayerApi GetClosestPlayer(ref VRCPlayerApi[] players, Vector3 location)
+ {
+ int playerCount = VRCPlayerApi.GetPlayerCount();
+ if (players == null || players.Length < playerCount)
+ {
+ players = new VRCPlayerApi[playerCount * 2];
+ }
+
+ VRCPlayerApi.GetPlayers(players);
+ VRCPlayerApi closestPlayer = null;
+ float closestDistance = float.MaxValue;
+ for (int i = 0; i < playerCount; i++)
+ {
+ var playerInRange = players[i];
+ if (!Utilities.IsValid(playerInRange))
+ {
+ continue;
+ }
+
+ var distanceVector = location - playerInRange.GetPosition();
+ var projectedDistance = Vector3.ProjectOnPlane(
+ distanceVector,
+ playerInRange.GetRotation() * Vector3.up
+ );
+ float projectedDistanceMagnitude = projectedDistance.magnitude;
+ if (projectedDistanceMagnitude < closestDistance)
+ {
+ closestDistance = projectedDistanceMagnitude;
+ closestPlayer = playerInRange;
+ }
+ }
+
+ return closestPlayer;
+ }
+
+ public static VRCPlayerApi GetClosestNonLocalPlayer(ref VRCPlayerApi[] players, Vector3 location)
+ {
+ int playerCount = VRCPlayerApi.GetPlayerCount();
+ if (players == null || players.Length < playerCount)
+ {
+ players = new VRCPlayerApi[playerCount * 2];
+ }
+
+ VRCPlayerApi.GetPlayers(players);
+ VRCPlayerApi closestPlayer = null;
+ float closestDistance = float.MaxValue;
+ for (int i = 0; i < playerCount; i++)
+ {
+ var playerInRange = players[i];
+ if (!Utilities.IsValid(playerInRange))
+ {
+ continue;
+ }
+
+ if (playerInRange.isLocal)
+ {
+ continue;
+ }
+
+ var distanceVector = location - playerInRange.GetPosition();
+ var projectedDistance = Vector3.ProjectOnPlane(
+ distanceVector,
+ playerInRange.GetRotation() * Vector3.up
+ );
+ float projectedDistanceMagnitude = projectedDistance.magnitude;
+ if (projectedDistanceMagnitude < closestDistance)
+ {
+ closestDistance = projectedDistanceMagnitude;
+ closestPlayer = playerInRange;
+ }
+ }
+
+ return closestPlayer;
+ }
+
+ public static int GetPlayersInRangeNoAlloc(
+ ref VRCPlayerApi[] players,
+ Vector3 position,
+ float radius,
+ VRCPlayerApi[] outPlayers
+ )
+ {
+ int playerCount = VRCPlayerApi.GetPlayerCount();
+ if (players == null || players.Length < playerCount)
+ {
+ players = new VRCPlayerApi[playerCount * 2];
+ }
+
+ if (outPlayers == null)
+ {
+ return 0;
+ }
+
+ VRCPlayerApi.GetPlayers(players);
+
+ int playersFound = 0;
+
+ for (int i = 0; i < playerCount; i++)
+ {
+ var playerInRange = players[i];
+ if (!Utilities.IsValid(playerInRange))
+ {
+ continue;
+ }
+
+ if (Vector3.Distance(position, playerInRange.GetPosition()) < radius)
+ {
+ if (outPlayers.Length >= playersFound)
+ {
+ outPlayers[playersFound] = playerInRange;
+ ++playersFound;
+ }
+ }
+ }
+
+ return playersFound;
+ }
+
+ public static string UdonTypeNameShort(string udonTypeName)
+ {
+ string[] productTypeName = udonTypeName.Split('.');
+ return productTypeName.Length > 0 ? productTypeName[productTypeName.Length - 1] : udonTypeName;
+ }
+ }
+}
\ No newline at end of file
diff --git a/Scripts/Common/UdonCommon.cs.meta b/Packages/tlp.udonutils/Runtime/Common/UdonCommon.cs.meta
similarity index 100%
rename from Scripts/Common/UdonCommon.cs.meta
rename to Packages/tlp.udonutils/Runtime/Common/UdonCommon.cs.meta
diff --git a/README.meta b/Packages/tlp.udonutils/Runtime/DesignPatterns.meta
similarity index 77%
rename from README.meta
rename to Packages/tlp.udonutils/Runtime/DesignPatterns.meta
index bd7248b..2e3ce07 100644
--- a/README.meta
+++ b/Packages/tlp.udonutils/Runtime/DesignPatterns.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
-guid: d9bc5484a16077e4bb23256ea2cd3c10
+guid: 8b80eca275b7dd6479a3a69748d4dbd4
folderAsset: yes
DefaultImporter:
externalObjects: {}
diff --git a/Scenes/Examples.meta b/Packages/tlp.udonutils/Runtime/DesignPatterns/MVC.meta
similarity index 77%
rename from Scenes/Examples.meta
rename to Packages/tlp.udonutils/Runtime/DesignPatterns/MVC.meta
index c5f0213..6704314 100644
--- a/Scenes/Examples.meta
+++ b/Packages/tlp.udonutils/Runtime/DesignPatterns/MVC.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
-guid: 3a2f17b414483cf41a4b8fc1c0700502
+guid: 505e85f876996b9418851aab31430300
folderAsset: yes
DefaultImporter:
externalObjects: {}
diff --git a/Packages/tlp.udonutils/Runtime/DesignPatterns/MVC/Controller.cs b/Packages/tlp.udonutils/Runtime/DesignPatterns/MVC/Controller.cs
new file mode 100644
index 0000000..2bd92b7
--- /dev/null
+++ b/Packages/tlp.udonutils/Runtime/DesignPatterns/MVC/Controller.cs
@@ -0,0 +1,146 @@
+using JetBrains.Annotations;
+using UnityEngine;
+using VRC.SDKBase;
+
+namespace TLP.UdonUtils.DesignPatterns.MVC
+{
+ ///
+ /// The controller in the MVC pattern is responsible for receiving user input and updating the model and view
+ /// accordingly.
+ /// It acts as a bridge between the model and the view, ensuring that any changes made to the model
+ /// are reflected in the view.
+ /// The controller also handles any business logic related to user input.
+ ///
+ [DefaultExecutionOrder(ExecutionOrder)]
+ public abstract class Controller : MvcBase
+ {
+ protected override int ExecutionOrderReadOnly => ExecutionOrder;
+
+ [PublicAPI]
+ public new const int ExecutionOrder = Model.ExecutionOrder + 1;
+
+ public bool Initialized { get; private set; }
+ protected Model Model { get; private set; }
+ protected View View { get; private set; }
+
+ #region PublicAPI
+
+ [PublicAPI]
+ public bool Initialize(Model model, View view)
+ {
+#if TLP_DEBUG
+ DebugLog(nameof(Initialize));
+#endif
+ if (HasError)
+ {
+ Error($"Can not initialize again due to previous critical error: '{CriticalError}'");
+ return false;
+ }
+
+ if (Initialized)
+ {
+ Warn("Already initialized");
+ return false;
+ }
+
+ if (!Utilities.IsValid(view))
+ {
+ Error($"{nameof(view)} invalid");
+ return false;
+ }
+
+ if (!Utilities.IsValid(model))
+ {
+ Error($"{nameof(model)} invalid");
+ return false;
+ }
+
+ if (view.HasError)
+ {
+ Error($"{nameof(view)} has critical error: '{view.CriticalError}'");
+ return false;
+ }
+
+ if (view.Initialized)
+ {
+ Error($"{nameof(view)} is already initialized");
+ return false;
+ }
+
+ if (model.HasError)
+ {
+ Error($"{nameof(model)} has critical error: '{model.CriticalError}'");
+ return false;
+ }
+
+ if (!model.Initialized)
+ {
+ Error($"{nameof(model)} is not initialized");
+ return false;
+ }
+
+ View = view;
+ Model = model;
+
+ // setting it to true to prevent attempts to re-initialize controllers that have
+ // failed to initialize and are in need of cleanup
+ Initialized = true;
+
+ if (InitializeInternal())
+ {
+ return true;
+ }
+
+ Error($"Initialization failed. Using {nameof(DeInitialize)} to cleanup.");
+ DeInitialize();
+ return false;
+ }
+
+ protected virtual void OnDestroy()
+ {
+#if TLP_DEBUG
+ DebugLog(nameof(OnDestroy));
+#endif
+ DeInitialize();
+ }
+
+ public bool DeInitialize()
+ {
+#if TLP_DEBUG
+ DebugLog(nameof(DeInitialize));
+#endif
+ if (!Initialized)
+ {
+ return false;
+ }
+
+ if (Utilities.IsValid(View))
+ {
+ View.DeInitialize();
+ }
+
+ View = null;
+
+ if (Utilities.IsValid(Model))
+ {
+ Model.DeInitialize();
+ }
+
+ Model = null;
+
+ if (DeInitializeInternal())
+ {
+ Initialized = false;
+ CriticalError = null;
+ return true;
+ }
+
+ CriticalError = $"De-Initialization failed.";
+ Error(CriticalError);
+ HasError = true;
+ return false;
+ }
+
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/Scripts/Common/Editor/Networking/OwnershipTransferEditor.cs.meta b/Packages/tlp.udonutils/Runtime/DesignPatterns/MVC/Controller.cs.meta
similarity index 83%
rename from Scripts/Common/Editor/Networking/OwnershipTransferEditor.cs.meta
rename to Packages/tlp.udonutils/Runtime/DesignPatterns/MVC/Controller.cs.meta
index 5b0d0b4..e8b89fc 100644
--- a/Scripts/Common/Editor/Networking/OwnershipTransferEditor.cs.meta
+++ b/Packages/tlp.udonutils/Runtime/DesignPatterns/MVC/Controller.cs.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
-guid: e2c21512ad0e81b41b14dc223c8fb956
+guid: 2e7b77ccf077fd34fac39c267d68770e
MonoImporter:
externalObjects: {}
serializedVersion: 2
diff --git a/Packages/tlp.udonutils/Runtime/DesignPatterns/MVC/DummyView.asset b/Packages/tlp.udonutils/Runtime/DesignPatterns/MVC/DummyView.asset
new file mode 100644
index 0000000..b2a44c7
--- /dev/null
+++ b/Packages/tlp.udonutils/Runtime/DesignPatterns/MVC/DummyView.asset
@@ -0,0 +1,743 @@
+%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: DummyView
+ m_EditorClassIdentifier:
+ serializedUdonProgramAsset: {fileID: 11400000, guid: d33163e2cbe294848a7ea9e488b7d07e,
+ type: 2}
+ udonAssembly:
+ assemblyError:
+ sourceCsScript: {fileID: 11500000, guid: c8db13e7e4484903a70bc2f4f099ffb3, type: 3}
+ scriptVersion: 2
+ compiledVersion: 2
+ behaviourSyncMode: 1
+ hasInteractEvent: 0
+ scriptID: -4634886210466703129
+ 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: 12
+ - Name:
+ Entry: 7
+ Data:
+ - Name: $k
+ Entry: 1
+ Data: PendingSerializations
+ - Name: $v
+ Entry: 7
+ Data: 2|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
+ - Name: k__BackingField
+ Entry: 1
+ Data: PendingSerializations
+ - Name: k__BackingField
+ Entry: 7
+ Data: 3|System.RuntimeType, mscorlib
+ - Name:
+ Entry: 1
+ Data: System.Int32, mscorlib
+ - Name:
+ Entry: 8
+ Data:
+ - Name: k__BackingField
+ Entry: 9
+ Data: 3
+ - Name: k__BackingField
+ Entry: 7
+ Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
+ - Name:
+ Entry: 6
+ Data:
+ - Name:
+ Entry: 8
+ Data:
+ - Name: k__BackingField
+ Entry: 5
+ Data: false
+ - 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: 7
+ Data:
+ - Name: $k
+ Entry: 1
+ Data: Severity
+ - Name: $v
+ Entry: 7
+ Data: 5|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
+ - Name: k__BackingField
+ Entry: 1
+ Data: Severity
+ - Name: k__BackingField
+ Entry: 7
+ Data: 6|System.RuntimeType, mscorlib
+ - Name:
+ Entry: 1
+ Data: TLP.UdonUtils.Logger.ELogLevel, TLP.UdonUtils.Runtime
+ - Name:
+ Entry: 8
+ Data:
+ - Name: k__BackingField
+ Entry: 9
+ Data: 3
+ - Name: k__BackingField
+ Entry: 7
+ Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
+ - Name:
+ Entry: 6
+ Data:
+ - Name:
+ Entry: 8
+ Data:
+ - Name: k__BackingField
+ Entry: 5
+ Data: true
+ - Name: _fieldAttributes
+ Entry: 7
+ Data: 7|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
+ - Name:
+ Entry: 12
+ Data: 1
+ - Name:
+ Entry: 7
+ Data: 8|UnityEngine.Serialization.FormerlySerializedAsAttribute, 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: k__BackingField
+ - Name: $v
+ Entry: 7
+ Data: 9|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
+ - Name: k__BackingField
+ Entry: 1
+ Data: k__BackingField
+ - Name: k__BackingField
+ Entry: 7
+ Data: 10|System.RuntimeType, mscorlib
+ - Name:
+ Entry: 1
+ Data: TLP.UdonUtils.Logger.TlpLogger, TLP.UdonUtils.Runtime
+ - Name:
+ Entry: 8
+ Data:
+ - Name: k__BackingField
+ Entry: 7
+ Data: 11|System.RuntimeType, mscorlib
+ - Name:
+ Entry: 1
+ Data: VRC.Udon.UdonBehaviour, VRC.Udon
+ - Name:
+ Entry: 8
+ Data:
+ - Name: k__BackingField
+ Entry: 7
+ Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
+ - Name:
+ Entry: 6
+ Data:
+ - Name:
+ Entry: 8
+ Data:
+ - Name: k__BackingField
+ Entry: 5
+ Data: false
+ - Name: _fieldAttributes
+ Entry: 7
+ Data: 12|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: EventInstigator
+ - Name: $v
+ Entry: 7
+ Data: 13|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
+ - Name: k__BackingField
+ Entry: 1
+ Data: EventInstigator
+ - Name: k__BackingField
+ Entry: 7
+ Data: 14|System.RuntimeType, mscorlib
+ - Name:
+ Entry: 1
+ Data: TLP.UdonUtils.TlpBaseBehaviour, TLP.UdonUtils.Runtime
+ - Name:
+ Entry: 8
+ Data:
+ - Name: k__BackingField
+ Entry: 9
+ Data: 11
+ - Name: k__BackingField
+ Entry: 7
+ Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
+ - Name:
+ Entry: 6
+ Data:
+ - Name:
+ Entry: 8
+ Data:
+ - Name: k__BackingField
+ Entry: 5
+ Data: true
+ - Name: _fieldAttributes
+ Entry: 7
+ Data: 15|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
+ - Name:
+ Entry: 12
+ Data: 3
+ - Name:
+ Entry: 7
+ Data: 16|UnityEngine.Serialization.FormerlySerializedAsAttribute, UnityEngine.CoreModule
+ - Name:
+ Entry: 8
+ Data:
+ - Name:
+ Entry: 7
+ Data: 17|UnityEngine.HideInInspector, UnityEngine.CoreModule
+ - Name:
+ Entry: 8
+ Data:
+ - Name:
+ Entry: 7
+ Data: 18|JetBrains.Annotations.PublicAPIAttribute, 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: Pool
+ - Name: $v
+ Entry: 7
+ Data: 19|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
+ - Name: k__BackingField
+ Entry: 1
+ Data: Pool
+ - Name: k__BackingField
+ Entry: 9
+ Data: 14
+ - Name: k__BackingField
+ Entry: 9
+ Data: 11
+ - Name: k__BackingField
+ Entry: 7
+ Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
+ - Name:
+ Entry: 6
+ Data:
+ - Name:
+ Entry: 8
+ Data:
+ - Name: k__BackingField
+ Entry: 5
+ Data: true
+ - Name: _fieldAttributes
+ Entry: 7
+ Data: 20|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
+ - Name:
+ Entry: 12
+ Data: 3
+ - Name:
+ Entry: 7
+ Data: 21|UnityEngine.Serialization.FormerlySerializedAsAttribute, UnityEngine.CoreModule
+ - Name:
+ Entry: 8
+ Data:
+ - Name:
+ Entry: 7
+ Data: 22|JetBrains.Annotations.PublicAPIAttribute, UnityEngine.CoreModule
+ - Name:
+ Entry: 8
+ Data:
+ - Name:
+ Entry: 7
+ Data: 23|UnityEngine.HideInInspector, 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: PoolableInUse
+ - Name: $v
+ Entry: 7
+ Data: 24|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
+ - Name: k__BackingField
+ Entry: 1
+ Data: PoolableInUse
+ - Name: k__BackingField
+ Entry: 7
+ Data: 25|System.RuntimeType, mscorlib
+ - Name:
+ Entry: 1
+ Data: System.Boolean, mscorlib
+ - Name:
+ Entry: 8
+ Data:
+ - Name: k__BackingField
+ Entry: 9
+ Data: 25
+ - Name: k__BackingField
+ Entry: 7
+ Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
+ - Name:
+ Entry: 6
+ Data:
+ - Name:
+ Entry: 8
+ Data:
+ - Name: k__BackingField
+ Entry: 5
+ Data: true
+ - Name: _fieldAttributes
+ Entry: 7
+ Data: 26|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
+ - Name:
+ Entry: 12
+ Data: 2
+ - Name:
+ Entry: 7
+ Data: 27|JetBrains.Annotations.PublicAPIAttribute, UnityEngine.CoreModule
+ - Name:
+ Entry: 8
+ Data:
+ - Name:
+ Entry: 7
+ Data: 28|UnityEngine.HideInInspector, 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: k__BackingField
+ - Name: $v
+ Entry: 7
+ Data: 29|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
+ - Name: k__BackingField
+ Entry: 1
+ Data: k__BackingField
+ - Name: k__BackingField
+ Entry: 7
+ Data: 30|System.RuntimeType, mscorlib
+ - Name:
+ Entry: 1
+ Data: System.String, mscorlib
+ - Name:
+ Entry: 8
+ Data:
+ - Name: k__BackingField
+ Entry: 9
+ Data: 30
+ - Name: k__BackingField
+ Entry: 7
+ Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
+ - Name:
+ Entry: 6
+ Data:
+ - Name:
+ Entry: 8
+ Data:
+ - Name: k__BackingField
+ Entry: 5
+ Data: false
+ - Name: _fieldAttributes
+ Entry: 7
+ Data: 31|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: k__BackingField
+ - Name: $v
+ Entry: 7
+ Data: 32|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
+ - Name: k__BackingField
+ Entry: 1
+ Data: k__BackingField
+ - Name: k__BackingField
+ Entry: 9
+ Data: 25
+ - Name: k__BackingField
+ Entry: 9
+ Data: 25
+ - Name: k__BackingField
+ Entry: 7
+ Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
+ - Name:
+ Entry: 6
+ Data:
+ - Name:
+ Entry: 8
+ Data:
+ - Name: k__BackingField
+ Entry: 5
+ Data: false
+ - Name: _fieldAttributes
+ Entry: 7
+ Data: 33|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: k__BackingField
+ - Name: $v
+ Entry: 7
+ Data: 34|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
+ - Name: k__BackingField
+ Entry: 1
+ Data: k__BackingField
+ - Name: k__BackingField
+ Entry: 9
+ Data: 25
+ - Name: k__BackingField
+ Entry: 9
+ Data: 25
+ - Name: k__BackingField
+ Entry: 7
+ Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
+ - Name:
+ Entry: 6
+ Data:
+ - Name:
+ Entry: 8
+ Data:
+ - Name: k__BackingField
+ Entry: 5
+ Data: false
+ - Name: _fieldAttributes
+ Entry: 7
+ Data: 35|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: k__BackingField
+ - Name: $v
+ Entry: 7
+ Data: 36|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
+ - Name: k__BackingField
+ Entry: 1
+ Data: k__BackingField
+ - Name: k__BackingField
+ Entry: 7
+ Data: 37|System.RuntimeType, mscorlib
+ - Name:
+ Entry: 1
+ Data: TLP.UdonUtils.DesignPatterns.MVC.Model, TLP.UdonUtils.Runtime
+ - Name:
+ Entry: 8
+ Data:
+ - Name: k__BackingField
+ Entry: 9
+ Data: 11
+ - Name: k__BackingField
+ Entry: 7
+ Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
+ - Name:
+ Entry: 6
+ Data:
+ - Name:
+ Entry: 8
+ Data:
+ - Name: k__BackingField
+ Entry: 5
+ Data: false
+ - Name: _fieldAttributes
+ Entry: 7
+ Data: 38|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: k__BackingField
+ - Name: $v
+ Entry: 7
+ Data: 39|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
+ - Name: k__BackingField
+ Entry: 1
+ Data: k__BackingField
+ - Name: k__BackingField
+ Entry: 7
+ Data: 40|System.RuntimeType, mscorlib
+ - Name:
+ Entry: 1
+ Data: TLP.UdonUtils.DesignPatterns.MVC.Controller, TLP.UdonUtils.Runtime
+ - Name:
+ Entry: 8
+ Data:
+ - Name: k__BackingField
+ Entry: 9
+ Data: 11
+ - Name: k__BackingField
+ Entry: 7
+ Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
+ - Name:
+ Entry: 6
+ Data:
+ - Name:
+ Entry: 8
+ Data:
+ - Name: k__BackingField
+ Entry: 5
+ Data: false
+ - Name: _fieldAttributes
+ Entry: 7
+ Data: 41|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: _modelChangeEvent
+ - Name: $v
+ Entry: 7
+ Data: 42|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
+ - Name: k__BackingField
+ Entry: 1
+ Data: _modelChangeEvent
+ - Name: k__BackingField
+ Entry: 7
+ Data: 43|System.RuntimeType, mscorlib
+ - Name:
+ Entry: 1
+ Data: TLP.UdonUtils.Events.UdonEvent, TLP.UdonUtils.Runtime
+ - Name:
+ Entry: 8
+ Data:
+ - Name: k__BackingField
+ Entry: 9
+ Data: 11
+ - Name: k__BackingField
+ Entry: 7
+ Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
+ - Name:
+ Entry: 6
+ Data:
+ - Name:
+ Entry: 8
+ Data:
+ - Name: k__BackingField
+ Entry: 5
+ Data: false
+ - Name: _fieldAttributes
+ Entry: 7
+ Data: 44|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:
diff --git a/Scripts/Common/HorizontalLookAt.asset.meta b/Packages/tlp.udonutils/Runtime/DesignPatterns/MVC/DummyView.asset.meta
similarity index 79%
rename from Scripts/Common/HorizontalLookAt.asset.meta
rename to Packages/tlp.udonutils/Runtime/DesignPatterns/MVC/DummyView.asset.meta
index c0d1c89..ed22b18 100644
--- a/Scripts/Common/HorizontalLookAt.asset.meta
+++ b/Packages/tlp.udonutils/Runtime/DesignPatterns/MVC/DummyView.asset.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
-guid: a37533707706cdc4ba5293865ef9c38c
+guid: 7f85fe3ea0b1c734ebff43a1a7d05f03
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
diff --git a/Packages/tlp.udonutils/Runtime/DesignPatterns/MVC/DummyView.cs b/Packages/tlp.udonutils/Runtime/DesignPatterns/MVC/DummyView.cs
new file mode 100644
index 0000000..5ca09c3
--- /dev/null
+++ b/Packages/tlp.udonutils/Runtime/DesignPatterns/MVC/DummyView.cs
@@ -0,0 +1,12 @@
+using UdonSharp;
+
+namespace TLP.UdonUtils.DesignPatterns.MVC
+{
+ [UdonBehaviourSyncMode(BehaviourSyncMode.None)]
+ public class DummyView : View
+ {
+ public override void OnModelChanged()
+ {
+ }
+ }
+}
\ No newline at end of file
diff --git a/Packages/tlp.udonutils/Runtime/DesignPatterns/MVC/DummyView.cs.meta b/Packages/tlp.udonutils/Runtime/DesignPatterns/MVC/DummyView.cs.meta
new file mode 100644
index 0000000..f0a9bd3
--- /dev/null
+++ b/Packages/tlp.udonutils/Runtime/DesignPatterns/MVC/DummyView.cs.meta
@@ -0,0 +1,3 @@
+fileFormatVersion: 2
+guid: c8db13e7e4484903a70bc2f4f099ffb3
+timeCreated: 1682614793
\ No newline at end of file
diff --git a/Packages/tlp.udonutils/Runtime/DesignPatterns/MVC/Model.cs b/Packages/tlp.udonutils/Runtime/DesignPatterns/MVC/Model.cs
new file mode 100644
index 0000000..84dcc7e
--- /dev/null
+++ b/Packages/tlp.udonutils/Runtime/DesignPatterns/MVC/Model.cs
@@ -0,0 +1,181 @@
+using JetBrains.Annotations;
+using TLP.UdonUtils.Events;
+using UnityEngine;
+using VRC.SDKBase;
+
+namespace TLP.UdonUtils.DesignPatterns.MVC
+{
+ [DefaultExecutionOrder(ExecutionOrder)]
+ public abstract class Model : MvcBase
+ {
+ public new const int ExecutionOrder = TlpExecutionOrder.UiStart;
+ private const string OnModelChangedCallbackName = "OnModelChanged";
+
+ public bool Initialized { get; private set; }
+
+ public UdonEvent ChangeEvent { get; private set; }
+
+
+ #region PublicAPI
+
+ public bool IsReady()
+ {
+ if (HasError)
+ {
+ Error("Can not add due to previous critical Error");
+ return false;
+ }
+
+ if (Initialized)
+ {
+ return true;
+ }
+
+ Error("Not initialized");
+ return false;
+ }
+
+ [PublicAPI]
+ public bool Initialize(UdonEvent changeEvent)
+ {
+#if TLP_DEBUG
+ DebugLog(nameof(Initialize));
+#endif
+ if (HasError)
+ {
+ Error($"Can not initialize again due to previous critical error: '{CriticalError}'");
+ return false;
+ }
+
+ if (Initialized)
+ {
+ Warn("Already initialized");
+ return false;
+ }
+
+ if (!Utilities.IsValid(changeEvent))
+ {
+ Error($"{nameof(changeEvent)} invalid");
+ return false;
+ }
+
+ Dirty = false;
+ ChangeEvent = changeEvent;
+ ChangeEvent.ListenerMethod = OnModelChangedCallbackName;
+ if (!ChangeEvent.AddListenerVerified(this, OnModelChangedCallbackName))
+ {
+ Error($"Adding to {nameof(ChangeEvent)} with callback '{OnModelChangedCallbackName}' failed");
+ return false;
+ }
+
+ // setting it to true to prevent attempts to re-initialize controllers that have
+ // failed to initialize and are in need of cleanup
+ Initialized = true;
+
+ if (InitializeInternal())
+ {
+ return true;
+ }
+
+ Error($"Initialization failed. Using {nameof(DeInitialize)} to cleanup.");
+ DeInitialize();
+ return false;
+ }
+
+ public override void OnEvent(string eventName)
+ {
+#if TLP_DEBUG
+ DebugLog($"{nameof(OnEvent)} {eventName}");
+#endif
+
+ if (eventName == OnModelChangedCallbackName && ReferenceEquals(EventInstigator, this))
+ {
+ Dirty = false;
+ return;
+ }
+
+ base.OnEvent(eventName);
+ }
+
+
+ public void NotifyIfDirty(int delayFrames = 0)
+ {
+ if (!Dirty)
+ {
+ return;
+ }
+
+ if (HasError || !Initialized)
+ {
+ Error(HasError ? "Has Error" : "Not Initialized");
+ return;
+ }
+
+ if (!Utilities.IsValid(ChangeEvent))
+ {
+ Error($"{nameof(ChangeEvent)} invalid");
+ return;
+ }
+
+ if (delayFrames < 1)
+ {
+ if (!ChangeEvent.Raise(this))
+ {
+ Error($"Failed to raise {nameof(ChangeEvent)} '{ChangeEvent.ListenerMethod}'");
+ }
+
+ return;
+ }
+
+ if (!ChangeEvent.RaiseOnIdle(this, delayFrames))
+ {
+ Error($"Failed to raise {nameof(ChangeEvent)} '{ChangeEvent.ListenerMethod}'");
+ }
+ }
+
+ public virtual bool Dirty { get; set; }
+
+ protected virtual void OnDestroy()
+ {
+#if TLP_DEBUG
+ DebugLog(nameof(OnDestroy));
+#endif
+ DeInitialize();
+ }
+
+ public bool DeInitialize()
+ {
+#if TLP_DEBUG
+ DebugLog(nameof(DeInitialize));
+#endif
+ if (!Initialized)
+ {
+ return false;
+ }
+
+ if (Utilities.IsValid(ChangeEvent))
+ {
+ if (!ChangeEvent.RemoveListener(this, true))
+ {
+ Warn($"{nameof(ChangeEvent)} wasn't being listened to");
+ }
+ }
+
+ if (DeInitializeInternal())
+ {
+ ChangeEvent = null;
+ Initialized = false;
+ CriticalError = null;
+ return true;
+ }
+
+ ChangeEvent = null;
+ CriticalError = $"De-Initialization failed.";
+ Error(CriticalError);
+ HasError = true;
+ return false;
+ }
+
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/Scripts/Common/Editor/UdonCommonEditor.cs.meta b/Packages/tlp.udonutils/Runtime/DesignPatterns/MVC/Model.cs.meta
similarity index 83%
rename from Scripts/Common/Editor/UdonCommonEditor.cs.meta
rename to Packages/tlp.udonutils/Runtime/DesignPatterns/MVC/Model.cs.meta
index 97f13ed..5fcaa33 100644
--- a/Scripts/Common/Editor/UdonCommonEditor.cs.meta
+++ b/Packages/tlp.udonutils/Runtime/DesignPatterns/MVC/Model.cs.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
-guid: 9c86899c631b4f246a31c75efacad6fe
+guid: 6009801846b33b4498ed0fea6a3f2a1f
MonoImporter:
externalObjects: {}
serializedVersion: 2
diff --git a/Packages/tlp.udonutils/Runtime/DesignPatterns/MVC/MvcBase.cs b/Packages/tlp.udonutils/Runtime/DesignPatterns/MVC/MvcBase.cs
new file mode 100644
index 0000000..f0f4db6
--- /dev/null
+++ b/Packages/tlp.udonutils/Runtime/DesignPatterns/MVC/MvcBase.cs
@@ -0,0 +1,48 @@
+using TLP.UdonUtils.Events;
+using UnityEngine;
+
+namespace TLP.UdonUtils.DesignPatterns.MVC
+{
+ public abstract class MvcBase : TlpBaseBehaviour
+ {
+ public string CriticalError { get; protected set; }
+
+ public bool HasError { get; protected set; }
+
+ public static bool InitializeMvcSingleGameObject(GameObject gameObject)
+ {
+ return InitializeMvc(
+ gameObject.GetComponent(),
+ gameObject.GetComponent(),
+ gameObject.GetComponent(),
+ gameObject.GetComponent()
+ );
+ }
+
+ public static bool InitializeMvc(
+ Model model,
+ View view,
+ Controller controller,
+ UdonEvent modelChangedEvent
+ )
+ {
+ return model.Initialize(modelChangedEvent)
+ && controller.Initialize(model, view)
+ && view.Initialize(controller, model);
+ }
+
+ #region Hooks
+
+ protected virtual bool InitializeInternal()
+ {
+ return true;
+ }
+
+ protected virtual bool DeInitializeInternal()
+ {
+ return true;
+ }
+
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/Packages/tlp.udonutils/Runtime/DesignPatterns/MVC/MvcBase.cs.meta b/Packages/tlp.udonutils/Runtime/DesignPatterns/MVC/MvcBase.cs.meta
new file mode 100644
index 0000000..4331553
--- /dev/null
+++ b/Packages/tlp.udonutils/Runtime/DesignPatterns/MVC/MvcBase.cs.meta
@@ -0,0 +1,3 @@
+fileFormatVersion: 2
+guid: dbf7aba592e147d58d75553f36221785
+timeCreated: 1675528678
\ No newline at end of file
diff --git a/Packages/tlp.udonutils/Runtime/DesignPatterns/MVC/View.cs b/Packages/tlp.udonutils/Runtime/DesignPatterns/MVC/View.cs
new file mode 100644
index 0000000..015b35b
--- /dev/null
+++ b/Packages/tlp.udonutils/Runtime/DesignPatterns/MVC/View.cs
@@ -0,0 +1,177 @@
+using JetBrains.Annotations;
+using TLP.UdonUtils.Events;
+using UnityEngine;
+using VRC.SDKBase;
+
+namespace TLP.UdonUtils.DesignPatterns.MVC
+{
+ [DefaultExecutionOrder(ExecutionOrder)]
+ public abstract class View : MvcBase
+ {
+ protected override int ExecutionOrderReadOnly => ExecutionOrder;
+
+ [PublicAPI]
+ public new const int ExecutionOrder = Controller.ExecutionOrder + 1;
+
+ public bool Initialized { get; private set; }
+ public Model Model { get; private set; }
+ public Controller Controller { get; private set; }
+ private UdonEvent _modelChangeEvent;
+
+ protected virtual void OnDestroy()
+ {
+#if TLP_DEBUG
+ DebugLog(nameof(OnDestroy));
+#endif
+ DeInitialize();
+ }
+
+ #region PublicAPI
+
+ [PublicAPI]
+ public bool Initialize(Controller optionalController, Model model)
+ {
+#if TLP_DEBUG
+ DebugLog(nameof(Initialize));
+#endif
+ if (HasError)
+ {
+ Error($"Can not initialize again due to previous critical error: '{CriticalError}'");
+ return false;
+ }
+
+ if (Initialized)
+ {
+ Warn("Already initialized");
+ return false;
+ }
+
+ if (!Utilities.IsValid(model))
+ {
+ Error($"{nameof(model)} invalid");
+ return false;
+ }
+
+ if (model.HasError)
+ {
+ Error($"{nameof(model)} has critical error: '{model.CriticalError}'");
+ return false;
+ }
+
+ if (!model.Initialized)
+ {
+ Error($"{nameof(model)} is not initialized");
+ return false;
+ }
+
+
+ if (Utilities.IsValid(optionalController))
+ {
+ if (optionalController.HasError)
+ {
+ Error($"{nameof(optionalController)} has critical error: '{optionalController.CriticalError}'");
+ return false;
+ }
+
+ if (!optionalController.Initialized)
+ {
+ Error($"{nameof(optionalController)} is not initialized");
+ return false;
+ }
+
+ Controller = optionalController;
+ }
+ else
+ {
+ Controller = null;
+ }
+
+ if (!Utilities.IsValid(model.ChangeEvent))
+ {
+ Error($"{nameof(model.ChangeEvent)} invalid");
+ return false;
+ }
+
+ Model = model;
+ _modelChangeEvent = model.ChangeEvent;
+ _modelChangeEvent.AddListenerVerified(this, nameof(OnModelChanged));
+
+ // setting it to true to prevent attempts to re-initialize controllers that have
+ // failed to initialize and are in need of cleanup
+ Initialized = true;
+ if (InitializeInternal())
+ {
+ return true;
+ }
+
+ Error($"Initialization failed. Using {nameof(DeInitialize)} to cleanup.");
+ DeInitialize();
+ return false;
+ }
+
+ public bool DeInitialize()
+ {
+#if TLP_DEBUG
+ DebugLog(nameof(DeInitialize));
+#endif
+ if (!Initialized)
+ {
+ return false;
+ }
+
+ if (Utilities.IsValid(_modelChangeEvent))
+ {
+ _modelChangeEvent.RemoveListener(this, false);
+ _modelChangeEvent = null;
+ }
+
+ Model = null;
+
+ if (DeInitializeInternal())
+ {
+ Initialized = false;
+ CriticalError = null;
+ return true;
+ }
+
+ CriticalError = $"De-Initialization failed.";
+ Error(CriticalError);
+ HasError = true;
+ return false;
+ }
+
+ #endregion
+
+ #region Hooks
+
+ public abstract void OnModelChanged();
+
+ #endregion
+
+ #region Internal
+
+ public override void OnEvent(string eventName)
+ {
+ switch (eventName)
+ {
+ case nameof(OnModelChanged):
+ if (Initialized && !HasError)
+ {
+ OnModelChanged();
+ }
+ else
+ {
+ Warn($"Ignoring '{eventName}' as not initialized or error has occurred");
+ base.OnEvent(eventName);
+ }
+
+ break;
+ default:
+ base.OnEvent(eventName);
+ return;
+ }
+ }
+
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/Scripts/Common/Editor/UdonMathEditor.cs.meta b/Packages/tlp.udonutils/Runtime/DesignPatterns/MVC/View.cs.meta
similarity index 83%
rename from Scripts/Common/Editor/UdonMathEditor.cs.meta
rename to Packages/tlp.udonutils/Runtime/DesignPatterns/MVC/View.cs.meta
index beea729..fc3cd3f 100644
--- a/Scripts/Common/Editor/UdonMathEditor.cs.meta
+++ b/Packages/tlp.udonutils/Runtime/DesignPatterns/MVC/View.cs.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
-guid: 9ab1a44b0ba276c46acdb97971ec7bfa
+guid: 9755f6b7af945ec48922074df8e73f30
MonoImporter:
externalObjects: {}
serializedVersion: 2
diff --git a/Scripts.meta b/Packages/tlp.udonutils/Runtime/Events.meta
similarity index 77%
rename from Scripts.meta
rename to Packages/tlp.udonutils/Runtime/Events.meta
index ab44a4c..59e0783 100644
--- a/Scripts.meta
+++ b/Packages/tlp.udonutils/Runtime/Events.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
-guid: e93f6d216ff6ebd4a9175779e27c212a
+guid: cde78f2da1d06ab4fa0ae79aa77f32e6
folderAsset: yes
DefaultImporter:
externalObjects: {}
diff --git a/Packages/tlp.udonutils/Runtime/Events/AudioEvent.asset b/Packages/tlp.udonutils/Runtime/Events/AudioEvent.asset
new file mode 100644
index 0000000..7d02721
--- /dev/null
+++ b/Packages/tlp.udonutils/Runtime/Events/AudioEvent.asset
@@ -0,0 +1,854 @@
+%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: AudioEvent
+ m_EditorClassIdentifier:
+ serializedUdonProgramAsset: {fileID: 11400000, guid: d45c4a2db24880e47aaf5a2fb83e07dd,
+ type: 2}
+ udonAssembly:
+ assemblyError:
+ sourceCsScript: {fileID: 11500000, guid: e20d1406d8c442dca0724e09444df504, type: 3}
+ scriptVersion: 2
+ compiledVersion: 2
+ behaviourSyncMode: 2
+ hasInteractEvent: 0
+ scriptID: 7908371545052765338
+ 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: 14
+ - Name:
+ Entry: 7
+ Data:
+ - Name: $k
+ Entry: 1
+ Data: PendingSerializations
+ - Name: $v
+ Entry: 7
+ Data: 2|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
+ - Name: k__BackingField
+ Entry: 1
+ Data: PendingSerializations
+ - Name: k__BackingField
+ Entry: 7
+ Data: 3|System.RuntimeType, mscorlib
+ - Name:
+ Entry: 1
+ Data: System.Int32, mscorlib
+ - Name:
+ Entry: 8
+ Data:
+ - Name: k__BackingField
+ Entry: 9
+ Data: 3
+ - Name: k__BackingField
+ Entry: 7
+ Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
+ - Name:
+ Entry: 6
+ Data:
+ - Name:
+ Entry: 8
+ Data:
+ - Name: k__BackingField
+ Entry: 5
+ Data: false
+ - 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: 7
+ Data:
+ - Name: $k
+ Entry: 1
+ Data: Severity
+ - Name: $v
+ Entry: 7
+ Data: 5|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
+ - Name: k__BackingField
+ Entry: 1
+ Data: Severity
+ - Name: k__BackingField
+ Entry: 7
+ Data: 6|System.RuntimeType, mscorlib
+ - Name:
+ Entry: 1
+ Data: TLP.UdonUtils.Logger.ELogLevel, TLP.UdonUtils.Runtime
+ - Name:
+ Entry: 8
+ Data:
+ - Name: k__BackingField
+ Entry: 9
+ Data: 3
+ - Name: k__BackingField
+ Entry: 7
+ Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
+ - Name:
+ Entry: 6
+ Data:
+ - Name:
+ Entry: 8
+ Data:
+ - Name: k__BackingField
+ Entry: 5
+ Data: true
+ - Name: _fieldAttributes
+ Entry: 7
+ Data: 7|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
+ - Name:
+ Entry: 12
+ Data: 1
+ - Name:
+ Entry: 7
+ Data: 8|UnityEngine.Serialization.FormerlySerializedAsAttribute, 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: k__BackingField
+ - Name: $v
+ Entry: 7
+ Data: 9|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
+ - Name: k__BackingField
+ Entry: 1
+ Data: k__BackingField
+ - Name: k__BackingField
+ Entry: 7
+ Data: 10|System.RuntimeType, mscorlib
+ - Name:
+ Entry: 1
+ Data: TLP.UdonUtils.Logger.TlpLogger, TLP.UdonUtils.Runtime
+ - Name:
+ Entry: 8
+ Data:
+ - Name: k__BackingField
+ Entry: 7
+ Data: 11|System.RuntimeType, mscorlib
+ - Name:
+ Entry: 1
+ Data: VRC.Udon.UdonBehaviour, VRC.Udon
+ - Name:
+ Entry: 8
+ Data:
+ - Name: k__BackingField
+ Entry: 7
+ Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
+ - Name:
+ Entry: 6
+ Data:
+ - Name:
+ Entry: 8
+ Data:
+ - Name: k__BackingField
+ Entry: 5
+ Data: false
+ - Name: _fieldAttributes
+ Entry: 7
+ Data: 12|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: EventInstigator
+ - Name: $v
+ Entry: 7
+ Data: 13|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
+ - Name: k__BackingField
+ Entry: 1
+ Data: EventInstigator
+ - Name: k__BackingField
+ Entry: 7
+ Data: 14|System.RuntimeType, mscorlib
+ - Name:
+ Entry: 1
+ Data: TLP.UdonUtils.TlpBaseBehaviour, TLP.UdonUtils.Runtime
+ - Name:
+ Entry: 8
+ Data:
+ - Name: k__BackingField
+ Entry: 9
+ Data: 11
+ - Name: k__BackingField
+ Entry: 7
+ Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
+ - Name:
+ Entry: 6
+ Data:
+ - Name:
+ Entry: 8
+ Data:
+ - Name: k__BackingField
+ Entry: 5
+ Data: true
+ - Name: _fieldAttributes
+ Entry: 7
+ Data: 15|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
+ - Name:
+ Entry: 12
+ Data: 3
+ - Name:
+ Entry: 7
+ Data: 16|UnityEngine.Serialization.FormerlySerializedAsAttribute, UnityEngine.CoreModule
+ - Name:
+ Entry: 8
+ Data:
+ - Name:
+ Entry: 7
+ Data: 17|UnityEngine.HideInInspector, UnityEngine.CoreModule
+ - Name:
+ Entry: 8
+ Data:
+ - Name:
+ Entry: 7
+ Data: 18|JetBrains.Annotations.PublicAPIAttribute, 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: Pool
+ - Name: $v
+ Entry: 7
+ Data: 19|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
+ - Name: k__BackingField
+ Entry: 1
+ Data: Pool
+ - Name: k__BackingField
+ Entry: 9
+ Data: 14
+ - Name: k__BackingField
+ Entry: 9
+ Data: 11
+ - Name: k__BackingField
+ Entry: 7
+ Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
+ - Name:
+ Entry: 6
+ Data:
+ - Name:
+ Entry: 8
+ Data:
+ - Name: k__BackingField
+ Entry: 5
+ Data: true
+ - Name: _fieldAttributes
+ Entry: 7
+ Data: 20|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
+ - Name:
+ Entry: 12
+ Data: 3
+ - Name:
+ Entry: 7
+ Data: 21|UnityEngine.Serialization.FormerlySerializedAsAttribute, UnityEngine.CoreModule
+ - Name:
+ Entry: 8
+ Data:
+ - Name:
+ Entry: 7
+ Data: 22|JetBrains.Annotations.PublicAPIAttribute, UnityEngine.CoreModule
+ - Name:
+ Entry: 8
+ Data:
+ - Name:
+ Entry: 7
+ Data: 23|UnityEngine.HideInInspector, 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: PoolableInUse
+ - Name: $v
+ Entry: 7
+ Data: 24|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
+ - Name: k__BackingField
+ Entry: 1
+ Data: PoolableInUse
+ - Name: k__BackingField
+ Entry: 7
+ Data: 25|System.RuntimeType, mscorlib
+ - Name:
+ Entry: 1
+ Data: System.Boolean, mscorlib
+ - Name:
+ Entry: 8
+ Data:
+ - Name: k__BackingField
+ Entry: 9
+ Data: 25
+ - Name: k__BackingField
+ Entry: 7
+ Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
+ - Name:
+ Entry: 6
+ Data:
+ - Name:
+ Entry: 8
+ Data:
+ - Name: k__BackingField
+ Entry: 5
+ Data: true
+ - Name: _fieldAttributes
+ Entry: 7
+ Data: 26|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
+ - Name:
+ Entry: 12
+ Data: 2
+ - Name:
+ Entry: 7
+ Data: 27|JetBrains.Annotations.PublicAPIAttribute, UnityEngine.CoreModule
+ - Name:
+ Entry: 8
+ Data:
+ - Name:
+ Entry: 7
+ Data: 28|UnityEngine.HideInInspector, 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: Listeners
+ - Name: $v
+ Entry: 7
+ Data: 29|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
+ - Name: k__BackingField
+ Entry: 1
+ Data: Listeners
+ - Name: k__BackingField
+ Entry: 7
+ Data: 30|System.RuntimeType, mscorlib
+ - Name:
+ Entry: 1
+ Data: TLP.UdonUtils.TlpBaseBehaviour[], TLP.UdonUtils.Runtime
+ - Name:
+ Entry: 8
+ Data:
+ - Name: k__BackingField
+ Entry: 7
+ Data: 31|System.RuntimeType, mscorlib
+ - Name:
+ Entry: 1
+ Data: UnityEngine.Component[], UnityEngine.CoreModule
+ - Name:
+ Entry: 8
+ Data:
+ - Name: k__BackingField
+ Entry: 7
+ Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
+ - Name:
+ Entry: 6
+ Data:
+ - Name:
+ Entry: 8
+ Data:
+ - Name: k__BackingField
+ Entry: 5
+ Data: true
+ - Name: _fieldAttributes
+ Entry: 7
+ Data: 32|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
+ - Name:
+ Entry: 12
+ Data: 1
+ - Name:
+ Entry: 7
+ Data: 33|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: RaiseOnEnable
+ - Name: $v
+ Entry: 7
+ Data: 34|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
+ - Name: k__BackingField
+ Entry: 1
+ Data: RaiseOnEnable
+ - Name: k__BackingField
+ Entry: 9
+ Data: 25
+ - Name: k__BackingField
+ Entry: 9
+ Data: 25
+ - Name: k__BackingField
+ Entry: 7
+ Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
+ - Name:
+ Entry: 6
+ Data:
+ - Name:
+ Entry: 8
+ Data:
+ - Name: k__BackingField
+ Entry: 5
+ Data: true
+ - Name: _fieldAttributes
+ Entry: 7
+ Data: 35|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: RaiseOnStart
+ - Name: $v
+ Entry: 7
+ Data: 36|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
+ - Name: k__BackingField
+ Entry: 1
+ Data: RaiseOnStart
+ - Name: k__BackingField
+ Entry: 9
+ Data: 25
+ - Name: k__BackingField
+ Entry: 9
+ Data: 25
+ - Name: k__BackingField
+ Entry: 7
+ Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
+ - Name:
+ Entry: 6
+ Data:
+ - Name:
+ Entry: 8
+ Data:
+ - Name: k__BackingField
+ Entry: 5
+ Data: true
+ - Name: _fieldAttributes
+ Entry: 7
+ Data: 37|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: ListenerMethod
+ - Name: $v
+ Entry: 7
+ Data: 38|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
+ - Name: k__BackingField
+ Entry: 1
+ Data: ListenerMethod
+ - Name: k__BackingField
+ Entry: 7
+ Data: 39|System.RuntimeType, mscorlib
+ - Name:
+ Entry: 1
+ Data: System.String, mscorlib
+ - Name:
+ Entry: 8
+ Data:
+ - Name: k__BackingField
+ Entry: 9
+ Data: 39
+ - Name: k__BackingField
+ Entry: 7
+ Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
+ - Name:
+ Entry: 6
+ Data:
+ - Name:
+ Entry: 8
+ Data:
+ - Name: k__BackingField
+ Entry: 5
+ Data: true
+ - Name: _fieldAttributes
+ Entry: 7
+ Data: 40|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
+ - Name:
+ Entry: 12
+ Data: 2
+ - Name:
+ Entry: 7
+ Data: 41|UnityEngine.TooltipAttribute, UnityEngine.CoreModule
+ - Name: tooltip
+ Entry: 1
+ Data: Name of the method to be called on each listener
+ - Name:
+ Entry: 8
+ Data:
+ - Name:
+ Entry: 7
+ Data: 42|JetBrains.Annotations.PublicAPIAttribute, 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: k__BackingField
+ - Name: $v
+ Entry: 7
+ Data: 43|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
+ - Name: k__BackingField
+ Entry: 1
+ Data: k__BackingField
+ - Name: k__BackingField
+ Entry: 9
+ Data: 3
+ - Name: k__BackingField
+ Entry: 9
+ Data: 3
+ - Name: k__BackingField
+ Entry: 7
+ Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
+ - Name:
+ Entry: 6
+ Data:
+ - Name:
+ Entry: 8
+ Data:
+ - Name: k__BackingField
+ Entry: 5
+ Data: false
+ - Name: _fieldAttributes
+ Entry: 7
+ Data: 44|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: _nextInvocationFrame
+ - Name: $v
+ Entry: 7
+ Data: 45|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
+ - Name: k__BackingField
+ Entry: 1
+ Data: _nextInvocationFrame
+ - Name: k__BackingField
+ Entry: 9
+ Data: 3
+ - Name: k__BackingField
+ Entry: 9
+ Data: 3
+ - Name: k__BackingField
+ Entry: 7
+ Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
+ - Name:
+ Entry: 6
+ Data:
+ - Name:
+ Entry: 8
+ Data:
+ - Name: k__BackingField
+ Entry: 5
+ Data: false
+ - Name: _fieldAttributes
+ Entry: 7
+ Data: 46|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: _instigator
+ - Name: $v
+ Entry: 7
+ Data: 47|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
+ - Name: k__BackingField
+ Entry: 1
+ Data: _instigator
+ - Name: k__BackingField
+ Entry: 9
+ Data: 14
+ - Name: k__BackingField
+ Entry: 9
+ Data: 11
+ - Name: k__BackingField
+ Entry: 7
+ Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
+ - Name:
+ Entry: 6
+ Data:
+ - Name:
+ Entry: 8
+ Data:
+ - Name: k__BackingField
+ Entry: 5
+ Data: false
+ - Name: _fieldAttributes
+ Entry: 7
+ Data: 48|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: k__BackingField
+ - Name: $v
+ Entry: 7
+ Data: 49|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
+ - Name: k__BackingField
+ Entry: 1
+ Data: k__BackingField
+ - Name: k__BackingField
+ Entry: 9
+ Data: 25
+ - Name: k__BackingField
+ Entry: 9
+ Data: 25
+ - Name: k__BackingField
+ Entry: 7
+ Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
+ - Name:
+ Entry: 6
+ Data:
+ - Name:
+ Entry: 8
+ Data:
+ - Name: k__BackingField
+ Entry: 5
+ Data: false
+ - Name: _fieldAttributes
+ Entry: 7
+ Data: 50|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:
diff --git a/Scripts/Common/Networking/OwnerOnly.asset.meta b/Packages/tlp.udonutils/Runtime/Events/AudioEvent.asset.meta
similarity index 79%
rename from Scripts/Common/Networking/OwnerOnly.asset.meta
rename to Packages/tlp.udonutils/Runtime/Events/AudioEvent.asset.meta
index 33cb4a4..28f1952 100644
--- a/Scripts/Common/Networking/OwnerOnly.asset.meta
+++ b/Packages/tlp.udonutils/Runtime/Events/AudioEvent.asset.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
-guid: a9d7f3c7a72f844488ff7cbb04cfd1a6
+guid: d9cb23a6fff21ad4aae7c7556dcba43c
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
diff --git a/Packages/tlp.udonutils/Runtime/Events/AudioEvent.cs b/Packages/tlp.udonutils/Runtime/Events/AudioEvent.cs
new file mode 100644
index 0000000..b50ad93
--- /dev/null
+++ b/Packages/tlp.udonutils/Runtime/Events/AudioEvent.cs
@@ -0,0 +1,16 @@
+using JetBrains.Annotations;
+using UdonSharp;
+using UnityEngine;
+
+namespace TLP.UdonUtils.Events
+{
+ [DefaultExecutionOrder(ExecutionOrder)]
+ [UdonBehaviourSyncMode(BehaviourSyncMode.NoVariableSync)]
+ public class AudioEvent : UdonEvent
+ {
+ protected override int ExecutionOrderReadOnly => ExecutionOrder;
+
+ [PublicAPI]
+ public new const int ExecutionOrder = TlpExecutionOrder.AudioStart;
+ }
+}
\ No newline at end of file
diff --git a/Packages/tlp.udonutils/Runtime/Events/AudioEvent.cs.meta b/Packages/tlp.udonutils/Runtime/Events/AudioEvent.cs.meta
new file mode 100644
index 0000000..d48deb8
--- /dev/null
+++ b/Packages/tlp.udonutils/Runtime/Events/AudioEvent.cs.meta
@@ -0,0 +1,3 @@
+fileFormatVersion: 2
+guid: e20d1406d8c442dca0724e09444df504
+timeCreated: 1676120656
\ No newline at end of file
diff --git a/Packages/tlp.udonutils/Runtime/Events/DirectInputEvent.asset b/Packages/tlp.udonutils/Runtime/Events/DirectInputEvent.asset
new file mode 100644
index 0000000..860233a
--- /dev/null
+++ b/Packages/tlp.udonutils/Runtime/Events/DirectInputEvent.asset
@@ -0,0 +1,854 @@
+%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: DirectInputEvent
+ m_EditorClassIdentifier:
+ serializedUdonProgramAsset: {fileID: 11400000, guid: 8c32cabbf588ff54188b2d3eb52bd9f3,
+ type: 2}
+ udonAssembly:
+ assemblyError:
+ sourceCsScript: {fileID: 11500000, guid: b0340305c81c4a769edb673cb7fbaba1, type: 3}
+ scriptVersion: 2
+ compiledVersion: 2
+ behaviourSyncMode: 2
+ hasInteractEvent: 0
+ scriptID: -974849984374150553
+ 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: 14
+ - Name:
+ Entry: 7
+ Data:
+ - Name: $k
+ Entry: 1
+ Data: PendingSerializations
+ - Name: $v
+ Entry: 7
+ Data: 2|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
+ - Name: k__BackingField
+ Entry: 1
+ Data: PendingSerializations
+ - Name: k__BackingField
+ Entry: 7
+ Data: 3|System.RuntimeType, mscorlib
+ - Name:
+ Entry: 1
+ Data: System.Int32, mscorlib
+ - Name:
+ Entry: 8
+ Data:
+ - Name: k__BackingField
+ Entry: 9
+ Data: 3
+ - Name: k__BackingField
+ Entry: 7
+ Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
+ - Name:
+ Entry: 6
+ Data:
+ - Name:
+ Entry: 8
+ Data:
+ - Name: k__BackingField
+ Entry: 5
+ Data: false
+ - 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: 7
+ Data:
+ - Name: $k
+ Entry: 1
+ Data: Severity
+ - Name: $v
+ Entry: 7
+ Data: 5|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
+ - Name: k__BackingField
+ Entry: 1
+ Data: Severity
+ - Name: k__BackingField
+ Entry: 7
+ Data: 6|System.RuntimeType, mscorlib
+ - Name:
+ Entry: 1
+ Data: TLP.UdonUtils.Logger.ELogLevel, TLP.UdonUtils.Runtime
+ - Name:
+ Entry: 8
+ Data:
+ - Name: k__BackingField
+ Entry: 9
+ Data: 3
+ - Name: k__BackingField
+ Entry: 7
+ Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
+ - Name:
+ Entry: 6
+ Data:
+ - Name:
+ Entry: 8
+ Data:
+ - Name: k__BackingField
+ Entry: 5
+ Data: true
+ - Name: _fieldAttributes
+ Entry: 7
+ Data: 7|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
+ - Name:
+ Entry: 12
+ Data: 1
+ - Name:
+ Entry: 7
+ Data: 8|UnityEngine.Serialization.FormerlySerializedAsAttribute, 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: k__BackingField
+ - Name: $v
+ Entry: 7
+ Data: 9|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
+ - Name: k__BackingField
+ Entry: 1
+ Data: k__BackingField
+ - Name: k__BackingField
+ Entry: 7
+ Data: 10|System.RuntimeType, mscorlib
+ - Name:
+ Entry: 1
+ Data: TLP.UdonUtils.Logger.TlpLogger, TLP.UdonUtils.Runtime
+ - Name:
+ Entry: 8
+ Data:
+ - Name: k__BackingField
+ Entry: 7
+ Data: 11|System.RuntimeType, mscorlib
+ - Name:
+ Entry: 1
+ Data: VRC.Udon.UdonBehaviour, VRC.Udon
+ - Name:
+ Entry: 8
+ Data:
+ - Name: k__BackingField
+ Entry: 7
+ Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
+ - Name:
+ Entry: 6
+ Data:
+ - Name:
+ Entry: 8
+ Data:
+ - Name: k__BackingField
+ Entry: 5
+ Data: false
+ - Name: _fieldAttributes
+ Entry: 7
+ Data: 12|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: EventInstigator
+ - Name: $v
+ Entry: 7
+ Data: 13|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
+ - Name: k__BackingField
+ Entry: 1
+ Data: EventInstigator
+ - Name: k__BackingField
+ Entry: 7
+ Data: 14|System.RuntimeType, mscorlib
+ - Name:
+ Entry: 1
+ Data: TLP.UdonUtils.TlpBaseBehaviour, TLP.UdonUtils.Runtime
+ - Name:
+ Entry: 8
+ Data:
+ - Name: k__BackingField
+ Entry: 9
+ Data: 11
+ - Name: k__BackingField
+ Entry: 7
+ Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
+ - Name:
+ Entry: 6
+ Data:
+ - Name:
+ Entry: 8
+ Data:
+ - Name: k__BackingField
+ Entry: 5
+ Data: true
+ - Name: _fieldAttributes
+ Entry: 7
+ Data: 15|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
+ - Name:
+ Entry: 12
+ Data: 3
+ - Name:
+ Entry: 7
+ Data: 16|UnityEngine.Serialization.FormerlySerializedAsAttribute, UnityEngine.CoreModule
+ - Name:
+ Entry: 8
+ Data:
+ - Name:
+ Entry: 7
+ Data: 17|UnityEngine.HideInInspector, UnityEngine.CoreModule
+ - Name:
+ Entry: 8
+ Data:
+ - Name:
+ Entry: 7
+ Data: 18|JetBrains.Annotations.PublicAPIAttribute, 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: Pool
+ - Name: $v
+ Entry: 7
+ Data: 19|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
+ - Name: k__BackingField
+ Entry: 1
+ Data: Pool
+ - Name: k__BackingField
+ Entry: 9
+ Data: 14
+ - Name: k__BackingField
+ Entry: 9
+ Data: 11
+ - Name: k__BackingField
+ Entry: 7
+ Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
+ - Name:
+ Entry: 6
+ Data:
+ - Name:
+ Entry: 8
+ Data:
+ - Name: k__BackingField
+ Entry: 5
+ Data: true
+ - Name: _fieldAttributes
+ Entry: 7
+ Data: 20|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
+ - Name:
+ Entry: 12
+ Data: 3
+ - Name:
+ Entry: 7
+ Data: 21|UnityEngine.Serialization.FormerlySerializedAsAttribute, UnityEngine.CoreModule
+ - Name:
+ Entry: 8
+ Data:
+ - Name:
+ Entry: 7
+ Data: 22|JetBrains.Annotations.PublicAPIAttribute, UnityEngine.CoreModule
+ - Name:
+ Entry: 8
+ Data:
+ - Name:
+ Entry: 7
+ Data: 23|UnityEngine.HideInInspector, 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: PoolableInUse
+ - Name: $v
+ Entry: 7
+ Data: 24|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
+ - Name: k__BackingField
+ Entry: 1
+ Data: PoolableInUse
+ - Name: k__BackingField
+ Entry: 7
+ Data: 25|System.RuntimeType, mscorlib
+ - Name:
+ Entry: 1
+ Data: System.Boolean, mscorlib
+ - Name:
+ Entry: 8
+ Data:
+ - Name: k__BackingField
+ Entry: 9
+ Data: 25
+ - Name: k__BackingField
+ Entry: 7
+ Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
+ - Name:
+ Entry: 6
+ Data:
+ - Name:
+ Entry: 8
+ Data:
+ - Name: k__BackingField
+ Entry: 5
+ Data: true
+ - Name: _fieldAttributes
+ Entry: 7
+ Data: 26|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
+ - Name:
+ Entry: 12
+ Data: 2
+ - Name:
+ Entry: 7
+ Data: 27|JetBrains.Annotations.PublicAPIAttribute, UnityEngine.CoreModule
+ - Name:
+ Entry: 8
+ Data:
+ - Name:
+ Entry: 7
+ Data: 28|UnityEngine.HideInInspector, 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: Listeners
+ - Name: $v
+ Entry: 7
+ Data: 29|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
+ - Name: k__BackingField
+ Entry: 1
+ Data: Listeners
+ - Name: k__BackingField
+ Entry: 7
+ Data: 30|System.RuntimeType, mscorlib
+ - Name:
+ Entry: 1
+ Data: TLP.UdonUtils.TlpBaseBehaviour[], TLP.UdonUtils.Runtime
+ - Name:
+ Entry: 8
+ Data:
+ - Name: k__BackingField
+ Entry: 7
+ Data: 31|System.RuntimeType, mscorlib
+ - Name:
+ Entry: 1
+ Data: UnityEngine.Component[], UnityEngine.CoreModule
+ - Name:
+ Entry: 8
+ Data:
+ - Name: k__BackingField
+ Entry: 7
+ Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
+ - Name:
+ Entry: 6
+ Data:
+ - Name:
+ Entry: 8
+ Data:
+ - Name: k__BackingField
+ Entry: 5
+ Data: true
+ - Name: _fieldAttributes
+ Entry: 7
+ Data: 32|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
+ - Name:
+ Entry: 12
+ Data: 1
+ - Name:
+ Entry: 7
+ Data: 33|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: RaiseOnEnable
+ - Name: $v
+ Entry: 7
+ Data: 34|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
+ - Name: k__BackingField
+ Entry: 1
+ Data: RaiseOnEnable
+ - Name: k__BackingField
+ Entry: 9
+ Data: 25
+ - Name: k__BackingField
+ Entry: 9
+ Data: 25
+ - Name: k__BackingField
+ Entry: 7
+ Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
+ - Name:
+ Entry: 6
+ Data:
+ - Name:
+ Entry: 8
+ Data:
+ - Name: k__BackingField
+ Entry: 5
+ Data: true
+ - Name: _fieldAttributes
+ Entry: 7
+ Data: 35|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: RaiseOnStart
+ - Name: $v
+ Entry: 7
+ Data: 36|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
+ - Name: k__BackingField
+ Entry: 1
+ Data: RaiseOnStart
+ - Name: k__BackingField
+ Entry: 9
+ Data: 25
+ - Name: k__BackingField
+ Entry: 9
+ Data: 25
+ - Name: k__BackingField
+ Entry: 7
+ Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
+ - Name:
+ Entry: 6
+ Data:
+ - Name:
+ Entry: 8
+ Data:
+ - Name: k__BackingField
+ Entry: 5
+ Data: true
+ - Name: _fieldAttributes
+ Entry: 7
+ Data: 37|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: ListenerMethod
+ - Name: $v
+ Entry: 7
+ Data: 38|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
+ - Name: k__BackingField
+ Entry: 1
+ Data: ListenerMethod
+ - Name: k__BackingField
+ Entry: 7
+ Data: 39|System.RuntimeType, mscorlib
+ - Name:
+ Entry: 1
+ Data: System.String, mscorlib
+ - Name:
+ Entry: 8
+ Data:
+ - Name: k__BackingField
+ Entry: 9
+ Data: 39
+ - Name: k__BackingField
+ Entry: 7
+ Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
+ - Name:
+ Entry: 6
+ Data:
+ - Name:
+ Entry: 8
+ Data:
+ - Name: k__BackingField
+ Entry: 5
+ Data: true
+ - Name: _fieldAttributes
+ Entry: 7
+ Data: 40|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
+ - Name:
+ Entry: 12
+ Data: 2
+ - Name:
+ Entry: 7
+ Data: 41|UnityEngine.TooltipAttribute, UnityEngine.CoreModule
+ - Name: tooltip
+ Entry: 1
+ Data: Name of the method to be called on each listener
+ - Name:
+ Entry: 8
+ Data:
+ - Name:
+ Entry: 7
+ Data: 42|JetBrains.Annotations.PublicAPIAttribute, 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: k__BackingField
+ - Name: $v
+ Entry: 7
+ Data: 43|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
+ - Name: k__BackingField
+ Entry: 1
+ Data: k__BackingField
+ - Name: k__BackingField
+ Entry: 9
+ Data: 3
+ - Name: k__BackingField
+ Entry: 9
+ Data: 3
+ - Name: k__BackingField
+ Entry: 7
+ Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
+ - Name:
+ Entry: 6
+ Data:
+ - Name:
+ Entry: 8
+ Data:
+ - Name: k__BackingField
+ Entry: 5
+ Data: false
+ - Name: _fieldAttributes
+ Entry: 7
+ Data: 44|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: _nextInvocationFrame
+ - Name: $v
+ Entry: 7
+ Data: 45|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
+ - Name: k__BackingField
+ Entry: 1
+ Data: _nextInvocationFrame
+ - Name: k__BackingField
+ Entry: 9
+ Data: 3
+ - Name: k__BackingField
+ Entry: 9
+ Data: 3
+ - Name: k__BackingField
+ Entry: 7
+ Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
+ - Name:
+ Entry: 6
+ Data:
+ - Name:
+ Entry: 8
+ Data:
+ - Name: k__BackingField
+ Entry: 5
+ Data: false
+ - Name: _fieldAttributes
+ Entry: 7
+ Data: 46|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: _instigator
+ - Name: $v
+ Entry: 7
+ Data: 47|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
+ - Name: k__BackingField
+ Entry: 1
+ Data: _instigator
+ - Name: k__BackingField
+ Entry: 9
+ Data: 14
+ - Name: k__BackingField
+ Entry: 9
+ Data: 11
+ - Name: k__BackingField
+ Entry: 7
+ Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
+ - Name:
+ Entry: 6
+ Data:
+ - Name:
+ Entry: 8
+ Data:
+ - Name: k__BackingField
+ Entry: 5
+ Data: false
+ - Name: _fieldAttributes
+ Entry: 7
+ Data: 48|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: k__BackingField
+ - Name: $v
+ Entry: 7
+ Data: 49|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
+ - Name: k__BackingField
+ Entry: 1
+ Data: k__BackingField
+ - Name: k__BackingField
+ Entry: 9
+ Data: 25
+ - Name: k__BackingField
+ Entry: 9
+ Data: 25
+ - Name: k__BackingField
+ Entry: 7
+ Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
+ - Name:
+ Entry: 6
+ Data:
+ - Name:
+ Entry: 8
+ Data:
+ - Name: k__BackingField
+ Entry: 5
+ Data: false
+ - Name: _fieldAttributes
+ Entry: 7
+ Data: 50|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:
diff --git a/Graphs/HorizontalLookAt.asset.meta b/Packages/tlp.udonutils/Runtime/Events/DirectInputEvent.asset.meta
similarity index 79%
rename from Graphs/HorizontalLookAt.asset.meta
rename to Packages/tlp.udonutils/Runtime/Events/DirectInputEvent.asset.meta
index d88da8f..cbd399b 100644
--- a/Graphs/HorizontalLookAt.asset.meta
+++ b/Packages/tlp.udonutils/Runtime/Events/DirectInputEvent.asset.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
-guid: 282ba712dfa27c246b44b2c9e30d749c
+guid: 35313354a85954a4083bc4777e80dd0c
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
diff --git a/Packages/tlp.udonutils/Runtime/Events/DirectInputEvent.cs b/Packages/tlp.udonutils/Runtime/Events/DirectInputEvent.cs
new file mode 100644
index 0000000..97f4643
--- /dev/null
+++ b/Packages/tlp.udonutils/Runtime/Events/DirectInputEvent.cs
@@ -0,0 +1,16 @@
+using JetBrains.Annotations;
+using UdonSharp;
+using UnityEngine;
+
+namespace TLP.UdonUtils.Events
+{
+ [DefaultExecutionOrder(ExecutionOrder)]
+ [UdonBehaviourSyncMode(BehaviourSyncMode.NoVariableSync)]
+ public class DirectInputEvent : UdonEvent
+ {
+ protected override int ExecutionOrderReadOnly => ExecutionOrder;
+
+ [PublicAPI]
+ public new const int ExecutionOrder = TlpExecutionOrder.DirectInputStart;
+ }
+}
\ No newline at end of file
diff --git a/Packages/tlp.udonutils/Runtime/Events/DirectInputEvent.cs.meta b/Packages/tlp.udonutils/Runtime/Events/DirectInputEvent.cs.meta
new file mode 100644
index 0000000..bf9ead9
--- /dev/null
+++ b/Packages/tlp.udonutils/Runtime/Events/DirectInputEvent.cs.meta
@@ -0,0 +1,3 @@
+fileFormatVersion: 2
+guid: b0340305c81c4a769edb673cb7fbaba1
+timeCreated: 1676120508
\ No newline at end of file
diff --git a/Packages/tlp.udonutils/Runtime/Events/PlayerMotionEvent.asset b/Packages/tlp.udonutils/Runtime/Events/PlayerMotionEvent.asset
new file mode 100644
index 0000000..defec71
--- /dev/null
+++ b/Packages/tlp.udonutils/Runtime/Events/PlayerMotionEvent.asset
@@ -0,0 +1,854 @@
+%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: PlayerMotionEvent
+ m_EditorClassIdentifier:
+ serializedUdonProgramAsset: {fileID: 11400000, guid: b45fcf3e21d07614097b5e5d39c2e4b7,
+ type: 2}
+ udonAssembly:
+ assemblyError:
+ sourceCsScript: {fileID: 11500000, guid: 12863696f24240549d5d9aa0e7804501, type: 3}
+ scriptVersion: 2
+ compiledVersion: 2
+ behaviourSyncMode: 2
+ hasInteractEvent: 0
+ scriptID: -1217826581959681859
+ 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: 14
+ - Name:
+ Entry: 7
+ Data:
+ - Name: $k
+ Entry: 1
+ Data: PendingSerializations
+ - Name: $v
+ Entry: 7
+ Data: 2|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
+ - Name: k__BackingField
+ Entry: 1
+ Data: PendingSerializations
+ - Name: k__BackingField
+ Entry: 7
+ Data: 3|System.RuntimeType, mscorlib
+ - Name:
+ Entry: 1
+ Data: System.Int32, mscorlib
+ - Name:
+ Entry: 8
+ Data:
+ - Name: k__BackingField
+ Entry: 9
+ Data: 3
+ - Name: k__BackingField
+ Entry: 7
+ Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
+ - Name:
+ Entry: 6
+ Data:
+ - Name:
+ Entry: 8
+ Data:
+ - Name: k__BackingField
+ Entry: 5
+ Data: false
+ - 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: 7
+ Data:
+ - Name: $k
+ Entry: 1
+ Data: Severity
+ - Name: $v
+ Entry: 7
+ Data: 5|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
+ - Name: k__BackingField
+ Entry: 1
+ Data: Severity
+ - Name: k__BackingField
+ Entry: 7
+ Data: 6|System.RuntimeType, mscorlib
+ - Name:
+ Entry: 1
+ Data: TLP.UdonUtils.Logger.ELogLevel, TLP.UdonUtils.Runtime
+ - Name:
+ Entry: 8
+ Data:
+ - Name: k__BackingField
+ Entry: 9
+ Data: 3
+ - Name: k__BackingField
+ Entry: 7
+ Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
+ - Name:
+ Entry: 6
+ Data:
+ - Name:
+ Entry: 8
+ Data:
+ - Name: k__BackingField
+ Entry: 5
+ Data: true
+ - Name: _fieldAttributes
+ Entry: 7
+ Data: 7|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
+ - Name:
+ Entry: 12
+ Data: 1
+ - Name:
+ Entry: 7
+ Data: 8|UnityEngine.Serialization.FormerlySerializedAsAttribute, 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: k__BackingField
+ - Name: $v
+ Entry: 7
+ Data: 9|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
+ - Name: k__BackingField
+ Entry: 1
+ Data: k__BackingField
+ - Name: k__BackingField
+ Entry: 7
+ Data: 10|System.RuntimeType, mscorlib
+ - Name:
+ Entry: 1
+ Data: TLP.UdonUtils.Logger.TlpLogger, TLP.UdonUtils.Runtime
+ - Name:
+ Entry: 8
+ Data:
+ - Name: k__BackingField
+ Entry: 7
+ Data: 11|System.RuntimeType, mscorlib
+ - Name:
+ Entry: 1
+ Data: VRC.Udon.UdonBehaviour, VRC.Udon
+ - Name:
+ Entry: 8
+ Data:
+ - Name: k__BackingField
+ Entry: 7
+ Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
+ - Name:
+ Entry: 6
+ Data:
+ - Name:
+ Entry: 8
+ Data:
+ - Name: k__BackingField
+ Entry: 5
+ Data: false
+ - Name: _fieldAttributes
+ Entry: 7
+ Data: 12|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: EventInstigator
+ - Name: $v
+ Entry: 7
+ Data: 13|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
+ - Name: k__BackingField
+ Entry: 1
+ Data: EventInstigator
+ - Name: k__BackingField
+ Entry: 7
+ Data: 14|System.RuntimeType, mscorlib
+ - Name:
+ Entry: 1
+ Data: TLP.UdonUtils.TlpBaseBehaviour, TLP.UdonUtils.Runtime
+ - Name:
+ Entry: 8
+ Data:
+ - Name: k__BackingField
+ Entry: 9
+ Data: 11
+ - Name: k__BackingField
+ Entry: 7
+ Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
+ - Name:
+ Entry: 6
+ Data:
+ - Name:
+ Entry: 8
+ Data:
+ - Name: k__BackingField
+ Entry: 5
+ Data: true
+ - Name: _fieldAttributes
+ Entry: 7
+ Data: 15|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
+ - Name:
+ Entry: 12
+ Data: 3
+ - Name:
+ Entry: 7
+ Data: 16|UnityEngine.Serialization.FormerlySerializedAsAttribute, UnityEngine.CoreModule
+ - Name:
+ Entry: 8
+ Data:
+ - Name:
+ Entry: 7
+ Data: 17|UnityEngine.HideInInspector, UnityEngine.CoreModule
+ - Name:
+ Entry: 8
+ Data:
+ - Name:
+ Entry: 7
+ Data: 18|JetBrains.Annotations.PublicAPIAttribute, 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: Pool
+ - Name: $v
+ Entry: 7
+ Data: 19|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
+ - Name: k__BackingField
+ Entry: 1
+ Data: Pool
+ - Name: k__BackingField
+ Entry: 9
+ Data: 14
+ - Name: k__BackingField
+ Entry: 9
+ Data: 11
+ - Name: k__BackingField
+ Entry: 7
+ Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
+ - Name:
+ Entry: 6
+ Data:
+ - Name:
+ Entry: 8
+ Data:
+ - Name: