diff --git a/CyanEmu/Scripts/CyanEmuMain.cs b/CyanEmu/Scripts/CyanEmuMain.cs index af6a463..8b40808 100644 --- a/CyanEmu/Scripts/CyanEmuMain.cs +++ b/CyanEmu/Scripts/CyanEmuMain.cs @@ -423,6 +423,16 @@ private void OnPlayerLeft(VRCPlayerApi player) sdkManager_.OnPlayerLeft(player); } + public static void PlayerRespawned(VRCPlayerApi player) + { + instance_?.OnPlayerRespawn(player); + } + + private void OnPlayerRespawn(VRCPlayerApi player) + { + sdkManager_.OnPlayerRespawn(player); + } + public static GameObject SpawnObject(GameObject prefab) { return SpawnObject(prefab, Vector3.zero, Quaternion.identity); diff --git a/CyanEmu/Scripts/CyanEmuPlayerController.cs b/CyanEmu/Scripts/CyanEmuPlayerController.cs index c59166b..44430dc 100644 --- a/CyanEmu/Scripts/CyanEmuPlayerController.cs +++ b/CyanEmu/Scripts/CyanEmuPlayerController.cs @@ -435,6 +435,7 @@ public void Respawn() } CloseMenu(); Teleport(descriptor_.spawns[0], false); + CyanEmuMain.PlayerRespawned(player_.player); } public void Teleport(Transform point, bool fromPlaySpace) diff --git a/CyanEmu/Scripts/Interfaces/ICyanEmuSDKManager.cs b/CyanEmu/Scripts/Interfaces/ICyanEmuSDKManager.cs index 40e23d7..9a85fed 100644 --- a/CyanEmu/Scripts/Interfaces/ICyanEmuSDKManager.cs +++ b/CyanEmu/Scripts/Interfaces/ICyanEmuSDKManager.cs @@ -8,6 +8,7 @@ public interface ICyanEmuSDKManager void OnNetworkReady(); void OnPlayerJoined(VRCPlayerApi player); void OnPlayerLeft(VRCPlayerApi player); + void OnPlayerRespawn(VRCPlayerApi player); void OnSpawnedObject(GameObject spawnedObject); } } \ No newline at end of file diff --git a/CyanEmu/Scripts/VRCSDK2/CyanEmuTriggerExecutor.cs b/CyanEmu/Scripts/VRCSDK2/CyanEmuTriggerExecutor.cs index 6508d01..067b7ce 100644 --- a/CyanEmu/Scripts/VRCSDK2/CyanEmuTriggerExecutor.cs +++ b/CyanEmu/Scripts/VRCSDK2/CyanEmuTriggerExecutor.cs @@ -150,6 +150,8 @@ public void OnPlayerLeft(VRCPlayerApi player) FireTriggerTypeInternal(VRC_Trigger.TriggerType.OnPlayerLeft); } + public void OnPlayerRespawn(VRCPlayerApi player) { } // SDK2 does not support this method + public void OnSpawnedObject(GameObject spawnedObject) { VRC_Trigger[] triggers = spawnedObject.GetComponentsInChildren(); diff --git a/CyanEmu/Scripts/VRCSDK3/CyanEmuUdonManager.cs b/CyanEmu/Scripts/VRCSDK3/CyanEmuUdonManager.cs index d833a82..b8e7e53 100644 --- a/CyanEmu/Scripts/VRCSDK3/CyanEmuUdonManager.cs +++ b/CyanEmu/Scripts/VRCSDK3/CyanEmuUdonManager.cs @@ -89,6 +89,14 @@ public void OnPlayerLeft(VRCPlayerApi player) } } + public void OnPlayerRespawn(VRCPlayerApi player) + { + foreach (var udonBehavior in allUdonBehaviours_) + { + udonBehavior.RunEvent("_onPlayerRespawn", ("player", player)); + } + } + public void OnSpawnedObject(GameObject spawnedObject) { UdonBehaviour[] udonBehaviours = spawnedObject.GetComponentsInChildren(); diff --git a/CyanEmu/Tests/Scenes/VRCSDK2TestScene.unity b/CyanEmu/Tests/Scenes/VRCSDK2TestScene.unity index 9c6456f..2b59ec5 100644 --- a/CyanEmu/Tests/Scenes/VRCSDK2TestScene.unity +++ b/CyanEmu/Tests/Scenes/VRCSDK2TestScene.unity @@ -38409,7 +38409,7 @@ PrefabInstance: m_Modifications: - target: {fileID: 416072, guid: 9cb1e183d39ba432db5c583c4548819c, type: 3} propertyPath: m_LocalPosition.x - value: 1.98 + value: -8.9 objectReference: {fileID: 0} - target: {fileID: 416072, guid: 9cb1e183d39ba432db5c583c4548819c, type: 3} propertyPath: m_LocalPosition.y @@ -38417,7 +38417,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 416072, guid: 9cb1e183d39ba432db5c583c4548819c, type: 3} propertyPath: m_LocalPosition.z - value: 6.45 + value: -4.57 objectReference: {fileID: 0} - target: {fileID: 416072, guid: 9cb1e183d39ba432db5c583c4548819c, type: 3} propertyPath: m_LocalRotation.x @@ -44354,17 +44354,17 @@ PrefabInstance: type: 3} propertyPath: DynamicMaterials.Array.data[3] value: - objectReference: {fileID: 2100000, guid: 6025efa5103521d439261a278af62225, type: 2} + objectReference: {fileID: 2100000, guid: 3682f7747d485db4586750a832808b31, type: 2} - target: {fileID: 114409779611674446, guid: 9cb1e183d39ba432db5c583c4548819c, type: 3} propertyPath: DynamicMaterials.Array.data[4] value: - objectReference: {fileID: 2100000, guid: 7c48dd635ddae9d4bbd1847add58246a, type: 2} + objectReference: {fileID: 2100000, guid: 6025efa5103521d439261a278af62225, type: 2} - target: {fileID: 114409779611674446, guid: 9cb1e183d39ba432db5c583c4548819c, type: 3} propertyPath: DynamicMaterials.Array.data[5] value: - objectReference: {fileID: 2100000, guid: 9414e644b0d9d4c4cb1d863093f0284c, type: 2} + objectReference: {fileID: 2100000, guid: 7c48dd635ddae9d4bbd1847add58246a, type: 2} - target: {fileID: 114409779611674446, guid: 9cb1e183d39ba432db5c583c4548819c, type: 3} propertyPath: DynamicMaterials.Array.data[6] @@ -44374,22 +44374,22 @@ PrefabInstance: type: 3} propertyPath: DynamicMaterials.Array.data[7] value: - objectReference: {fileID: 2100000, guid: 3682f7747d485db4586750a832808b31, type: 2} + objectReference: {fileID: 2100000, guid: bedcbcc4d577778478a5f01fe1415af1, type: 2} - target: {fileID: 114409779611674446, guid: 9cb1e183d39ba432db5c583c4548819c, type: 3} propertyPath: DynamicMaterials.Array.data[8] value: - objectReference: {fileID: 2100000, guid: bedcbcc4d577778478a5f01fe1415af1, type: 2} + objectReference: {fileID: 2100000, guid: 6021947067b9d6c4bac8d9e085a71558, type: 2} - target: {fileID: 114409779611674446, guid: 9cb1e183d39ba432db5c583c4548819c, type: 3} propertyPath: DynamicMaterials.Array.data[9] value: - objectReference: {fileID: 2100000, guid: 6021947067b9d6c4bac8d9e085a71558, type: 2} + objectReference: {fileID: 2100000, guid: 66cc0ea5b14665342802e7f17e512305, type: 2} - target: {fileID: 114409779611674446, guid: 9cb1e183d39ba432db5c583c4548819c, type: 3} propertyPath: DynamicMaterials.Array.data[10] value: - objectReference: {fileID: 2100000, guid: 66cc0ea5b14665342802e7f17e512305, type: 2} + objectReference: {fileID: 2100000, guid: 9414e644b0d9d4c4cb1d863093f0284c, type: 2} - target: {fileID: 114409779611674446, guid: 9cb1e183d39ba432db5c583c4548819c, type: 3} propertyPath: DynamicMaterials.Array.data[11] @@ -223958,7 +223958,7 @@ GameObject: - component: {fileID: 1723337016} - component: {fileID: 1723337015} - component: {fileID: 1723337014} - m_Layer: 13 + m_Layer: 0 m_Name: Pickup m_TagString: Untagged m_Icon: {fileID: 0} @@ -224038,7 +224038,7 @@ Rigidbody: m_Drag: 0 m_AngularDrag: 0.05 m_UseGravity: 1 - m_IsKinematic: 0 + m_IsKinematic: 1 m_Interpolate: 0 m_Constraints: 0 m_CollisionDetection: 0 diff --git a/CyanEmu/Tests/Scenes/VRCSDK3TestScene.unity b/CyanEmu/Tests/Scenes/VRCSDK3TestScene.unity index e811ead..3bc9289 100644 --- a/CyanEmu/Tests/Scenes/VRCSDK3TestScene.unity +++ b/CyanEmu/Tests/Scenes/VRCSDK3TestScene.unity @@ -194,6 +194,83 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &362756669 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 362756672} + - component: {fileID: 362756671} + - component: {fileID: 362756670} + m_Layer: 8 + m_Name: Body + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &362756670 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 362756669} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 36 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 3 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1.25 + m_Text: +--- !u!222 &362756671 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 362756669} + m_CullTransparentMesh: 0 +--- !u!224 &362756672 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 362756669} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1395586825} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 8.3, y: -49.1} + m_SizeDelta: {x: 709.1, y: 631.5} + m_Pivot: {x: 0.5, y: 0.5} --- !u!1001 &418516841 PrefabInstance: m_ObjectHideFlags: 0 @@ -284,6 +361,83 @@ PrefabInstance: objectReference: {fileID: 2100000, guid: 1c987494452b85f4ab4cac3322415907, type: 2} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 8894fa7e4588a5c4fab98453e558847d, type: 3} +--- !u!1 &485952343 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 485952344} + - component: {fileID: 485952346} + - component: {fileID: 485952345} + m_Layer: 8 + m_Name: Header + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &485952344 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 485952343} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1395586825} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 1} + m_AnchorMax: {x: 0.5, y: 1} + m_AnchoredPosition: {x: -0.000000027674, y: -21} + m_SizeDelta: {x: 527.9, y: 53.9} + m_Pivot: {x: 0.5, y: 1} +--- !u!114 &485952345 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 485952343} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 42 + m_FontStyle: 1 + m_BestFit: 0 + m_MinSize: 2 + m_MaxSize: 42 + m_Alignment: 1 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Test +--- !u!222 &485952346 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 485952343} + m_CullTransparentMesh: 0 --- !u!1001 &601459925 PrefabInstance: m_ObjectHideFlags: 0 @@ -403,6 +557,118 @@ LightProbeGroup: - {x: -1, y: -1, z: 1} - {x: -1, y: -1, z: -1} m_Dering: 0 +--- !u!1 &951521472 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 951521473} + - component: {fileID: 951521477} + - component: {fileID: 951521476} + - component: {fileID: 951521475} + - component: {fileID: 951521474} + m_Layer: 8 + m_Name: Canvas + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &951521473 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 951521472} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 4} + m_LocalScale: {x: 0.0034999994, y: 0.0034999999, z: 1} + m_Children: + - {fileID: 1395586825} + m_Father: {fileID: 1422590457} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 2} + m_SizeDelta: {x: 764.0327, y: 778.5363} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &951521474 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 951521472} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -1533785930, guid: 661092b4961be7145bfbe56e1e62337b, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &951521475 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 951521472} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1301386320, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 1 + m_BlockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 +--- !u!114 &951521476 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 951521472} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1980459831, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 0 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 800, y: 600} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 0 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 10 +--- !u!223 &951521477 +Canvas: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 951521472} + m_Enabled: 1 + serializedVersion: 3 + m_RenderMode: 2 + m_Camera: {fileID: 0} + m_PlaneDistance: 100 + m_PixelPerfect: 0 + m_ReceivesEvents: 1 + m_OverrideSorting: 0 + m_OverridePixelPerfect: 0 + m_SortingBucketNormalizedSize: 0 + m_AdditionalShaderChannelsFlag: 0 + m_SortingLayerID: 0 + m_SortingOrder: 0 + m_TargetDisplay: 0 --- !u!1 &1184174119 GameObject: m_ObjectHideFlags: 0 @@ -618,6 +884,137 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 6 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1395586824 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1395586825} + - component: {fileID: 1395586827} + - component: {fileID: 1395586826} + m_Layer: 8 + m_Name: Panel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1395586825 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1395586824} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 485952344} + - {fileID: 362756672} + m_Father: {fileID: 951521473} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1395586826 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1395586824} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 +--- !u!222 &1395586827 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1395586824} + m_CullTransparentMesh: 0 +--- !u!1 &1422590455 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1422590457} + - component: {fileID: 1422590456} + m_Layer: 0 + m_Name: RespawnTest + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1422590456 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1422590455} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 45115577ef41a5b4ca741ed302693907, type: 3} + m_Name: + m_EditorClassIdentifier: + interactTextPlacement: {fileID: 0} + interactText: Use + interactTextGO: {fileID: 0} + proximity: 2 + SynchronizePosition: 0 + AllowCollisionOwnershipTransfer: 0 + serializedProgramAsset: {fileID: 11400000, guid: 30ec570f49da29948ae81f2436b846b8, + type: 2} + programSource: {fileID: 11400000, guid: a1cfe81457478344baa3ea7f455d459a, type: 2} + serializedPublicVariablesBytesString: Ai8AAAAAATIAAABWAFIAQwAuAFUAZABvAG4ALgBDAG8AbQBtAG8AbgAuAFUAZABvAG4AVgBhAHIAaQBhAGIAbABlAFQAYQBiAGwAZQAsACAAVgBSAEMALgBVAGQAbwBuAC4AQwBvAG0AbQBvAG4AAAAAAAYBAAAAAAAAACcBBAAAAHQAeQBwAGUAAWgAAABTAHkAcwB0AGUAbQAuAEMAbwBsAGwAZQBjAHQAaQBvAG4AcwAuAEcAZQBuAGUAcgBpAGMALgBMAGkAcwB0AGAAMQBbAFsAVgBSAEMALgBVAGQAbwBuAC4AQwBvAG0AbQBvAG4ALgBJAG4AdABlAHIAZgBhAGMAZQBzAC4ASQBVAGQAbwBuAFYAYQByAGkAYQBiAGwAZQAsACAAVgBSAEMALgBVAGQAbwBuAC4AQwBvAG0AbQBvAG4AXQBdACwAIABtAHMAYwBvAHIAbABpAGIAAQEJAAAAVgBhAHIAaQBhAGIAbABlAHMALwEAAAABaAAAAFMAeQBzAHQAZQBtAC4AQwBvAGwAbABlAGMAdABpAG8AbgBzAC4ARwBlAG4AZQByAGkAYwAuAEwAaQBzAHQAYAAxAFsAWwBWAFIAQwAuAFUAZABvAG4ALgBDAG8AbQBtAG8AbgAuAEkAbgB0AGUAcgBmAGEAYwBlAHMALgBJAFUAZABvAG4AVgBhAHIAaQBhAGIAbABlACwAIABWAFIAQwAuAFUAZABvAG4ALgBDAG8AbQBtAG8AbgBdAF0ALAAgAG0AcwBjAG8AcgBsAGkAYgABAAAABgEAAAAAAAAAAi8CAAAAAVYAAABWAFIAQwAuAFUAZABvAG4ALgBDAG8AbQBtAG8AbgAuAFUAZABvAG4AVgBhAHIAaQBhAGIAbABlAGAAMQBbAFsAVQBuAGkAdAB5AEUAbgBnAGkAbgBlAC4AVQBJAC4AVABlAHgAdAAsACAAVQBuAGkAdAB5AEUAbgBnAGkAbgBlAC4AVQBJAF0AXQAsACAAVgBSAEMALgBVAGQAbwBuAC4AQwBvAG0AbQBvAG4AAgAAAAYCAAAAAAAAACcBBAAAAHQAeQBwAGUAARcAAABTAHkAcwB0AGUAbQAuAFMAdAByAGkAbgBnACwAIABtAHMAYwBvAHIAbABpAGIAJwEKAAAAUwB5AG0AYgBvAGwATgBhAG0AZQABBAAAAFQAZQB4AHQAJwEEAAAAdAB5AHAAZQABIwAAAFUAbgBpAHQAeQBFAG4AZwBpAG4AZQAuAFUASQAuAFQAZQB4AHQALAAgAFUAbgBpAHQAeQBFAG4AZwBpAG4AZQAuAFUASQALAQUAAABWAGEAbAB1AGUAAAAAAAcFBwUHBQ== + publicVariablesUnityEngineObjects: + - {fileID: 362756670} + publicVariablesSerializationDataFormat: 0 +--- !u!4 &1422590457 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1422590455} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 951521473} + m_Father: {fileID: 0} + m_RootOrder: 8 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1486937346 GameObject: m_ObjectHideFlags: 0 diff --git a/CyanEmu/Tests/UdonGraph.meta b/CyanEmu/Tests/UdonGraph.meta new file mode 100644 index 0000000..3f894c2 --- /dev/null +++ b/CyanEmu/Tests/UdonGraph.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e9c07f30c6dd3da4ca0ecba1ee3b9f29 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/CyanEmu/Tests/UdonGraph/OnRespawnTest.asset b/CyanEmu/Tests/UdonGraph/OnRespawnTest.asset new file mode 100644 index 0000000..426aa4d --- /dev/null +++ b/CyanEmu/Tests/UdonGraph/OnRespawnTest.asset @@ -0,0 +1,201 @@ +%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: OnRespawnTest + m_EditorClassIdentifier: + serializedUdonProgramAsset: {fileID: 11400000, guid: 30ec570f49da29948ae81f2436b846b8, + type: 2} + udonAssembly: ".data_start\r\n\r\n .export Text\r\n \r\n instance_0: %UnityEngineUIText, + null\r\n value_0: %SystemString, null\r\n str0_0: %SystemString, null\r\n + \ str1_0: %SystemString, null\r\n str2_0: %SystemString, null\r\n str3_0: + %SystemString, null\r\n instance_1: %UnityEngineUIText, null\r\n str0_1: + %SystemString, null\r\n str1_1: %SystemString, null\r\n str2_1: %SystemString, + null\r\n VRCPlayerApi_0: %VRCSDKBaseVRCPlayerApi, null\r\n onPlayerRespawnPlayer: + %VRCSDKBaseVRCPlayerApi, null\r\n instance_2: %SystemInt32, null\r\n instance_3: + %VRCSDKBaseVRCPlayerApi, null\r\n String_0: %SystemString, null\r\n Text: + %UnityEngineUIText, null\r\n\r\n.data_end\r\n\r\n.code_start\r\n\r\n .export + _onPlayerRespawn\r\n \r\n _onPlayerRespawn:\r\n \r\n PUSH, Text\r\n + \ PUSH, instance_0\r\n COPY\r\n PUSH, Text\r\n PUSH, + instance_1\r\n COPY\r\n PUSH, instance_1\r\n PUSH, str0_0\r\n + \ EXTERN, \"UnityEngineUIText.__get_text__SystemString\"\r\n PUSH, + onPlayerRespawnPlayer\r\n PUSH, VRCPlayerApi_0\r\n COPY\r\n PUSH, + VRCPlayerApi_0\r\n PUSH, str0_1\r\n EXTERN, \"VRCSDKBaseVRCPlayerApi.__get_displayName__SystemString\"\r\n + \ PUSH, onPlayerRespawnPlayer\r\n PUSH, instance_3\r\n COPY\r\n + \ PUSH, instance_3\r\n PUSH, instance_2\r\n EXTERN, \"VRCSDKBaseVRCPlayerApi.__get_playerId__SystemInt32\"\r\n + \ PUSH, instance_2\r\n PUSH, str2_1\r\n EXTERN, \"SystemInt32.__ToString__SystemString\"\r\n + \ PUSH, str0_1\r\n PUSH, str1_1\r\n PUSH, str2_1\r\n PUSH, + str2_0\r\n EXTERN, \"SystemString.__Concat__SystemString_SystemString_SystemString__SystemString\"\r\n + \ PUSH, String_0\r\n PUSH, str3_0\r\n COPY\r\n PUSH, + str0_0\r\n PUSH, str1_0\r\n PUSH, str2_0\r\n PUSH, str3_0\r\n + \ PUSH, value_0\r\n EXTERN, \"SystemString.__Concat__SystemString_SystemString_SystemString_SystemString__SystemString\"\r\n + \ PUSH, instance_0\r\n PUSH, value_0\r\n EXTERN, \"UnityEngineUIText.__set_text__SystemString__SystemVoid\"\r\n + \ JUMP, 0xFFFFFFFC\r\n \r\n\r\n.code_end\r\n" + assemblyError: + graphData: + name: + description: + nodes: + - fullName: Event_OnPlayerRespawn + uid: 5584c42d-ad8e-4010-8294-516ca5efeeb1 + position: {x: 168, y: 150} + nodeUIDs: [] + flowUIDs: + - d6af0e5e-0c06-4d0c-af77-0bc7f6ada851 + nodeValues: [] + - fullName: VRCSDKBaseVRCPlayerApi.__get_displayName__SystemString + uid: f82921cc-ab20-4f83-9873-c092663bf886 + position: {x: 306.55, y: 351.39465} + nodeUIDs: + - 5584c42d-ad8e-4010-8294-516ca5efeeb1|0 + flowUIDs: [] + nodeValues: + - unityObjectValue: {fileID: 0} + stringValue: + - fullName: Variable_UnityEngineUIText + uid: 1fce057d-e809-43dc-bf7a-17cdbd0bdc57 + 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|Text + - 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: UnityEngineUIText.__get_text__SystemString + uid: 630840a6-c3aa-4937-ab4b-8e4a8a07af52 + position: {x: 574.75903, y: 261.08453} + nodeUIDs: + - f416bc2f-c8fe-4aa8-8b99-ac8c0033d954|0 + flowUIDs: [] + nodeValues: + - unityObjectValue: {fileID: 0} + stringValue: + - fullName: Get_Variable + uid: e587112d-5d9f-4229-846c-284cc68de2d9 + position: {x: 446.34433, y: 5.90815} + nodeUIDs: + - + flowUIDs: [] + nodeValues: + - unityObjectValue: {fileID: 0} + stringValue: System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089|1fce057d-e809-43dc-bf7a-17cdbd0bdc57 + - fullName: SystemString.__Concat__SystemString_SystemString_SystemString_SystemString__SystemString + uid: 85255701-e73f-4e99-b0bb-80c0a5dac30c + position: {x: 906.8916, y: 227.75754} + nodeUIDs: + - 630840a6-c3aa-4937-ab4b-8e4a8a07af52|0 + - + - b5db34b4-a3c9-48db-bcba-e78494245b30|0 + - dfd39f24-bc1b-421f-b81a-2c4a764af0c6|0 + flowUIDs: [] + nodeValues: + - unityObjectValue: {fileID: 0} + stringValue: + - unityObjectValue: {fileID: 0} + stringValue: 'System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089| + +' + - unityObjectValue: {fileID: 0} + stringValue: + - unityObjectValue: {fileID: 0} + stringValue: System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089|1fce057d-e809-43dc-bf7a-17cdbd0bdc57 + - fullName: Const_SystemString + uid: dfd39f24-bc1b-421f-b81a-2c4a764af0c6 + position: {x: 544.3416, y: 583.7746} + nodeUIDs: + - + flowUIDs: [] + nodeValues: + - unityObjectValue: {fileID: 0} + stringValue: System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089| + Respawned! + - fullName: Get_Variable + uid: f416bc2f-c8fe-4aa8-8b99-ac8c0033d954 + position: {x: 424.25858, y: 235.2693} + nodeUIDs: + - + flowUIDs: [] + nodeValues: + - unityObjectValue: {fileID: 0} + stringValue: System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089|1fce057d-e809-43dc-bf7a-17cdbd0bdc57 + - fullName: UnityEngineUIText.__set_text__SystemString__SystemVoid + uid: d6af0e5e-0c06-4d0c-af77-0bc7f6ada851 + position: {x: 1179.2988, y: 93.20041} + nodeUIDs: + - e587112d-5d9f-4229-846c-284cc68de2d9|0 + - 85255701-e73f-4e99-b0bb-80c0a5dac30c|0 + flowUIDs: [] + nodeValues: + - unityObjectValue: {fileID: 0} + stringValue: + - unityObjectValue: {fileID: 0} + stringValue: + - fullName: SystemString.__Concat__SystemString_SystemString_SystemString__SystemString + uid: b5db34b4-a3c9-48db-bcba-e78494245b30 + position: {x: 530.4243, y: 354.6965} + nodeUIDs: + - f82921cc-ab20-4f83-9873-c092663bf886|0 + - + - 538c3f31-2713-4b19-b5eb-8bd2156f313a|0 + - + flowUIDs: [] + nodeValues: + - unityObjectValue: {fileID: 0} + stringValue: + - unityObjectValue: {fileID: 0} + stringValue: 'System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089| ' + - unityObjectValue: {fileID: 0} + stringValue: + - unityObjectValue: {fileID: 0} + stringValue: System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089| + - fullName: VRCSDKBaseVRCPlayerApi.__get_playerId__SystemInt32 + uid: d7f4a65e-c53b-41a9-9289-f1aaf7504e6e + position: {x: 151.11815, y: 461.79593} + nodeUIDs: + - 5584c42d-ad8e-4010-8294-516ca5efeeb1|0 + flowUIDs: [] + nodeValues: + - unityObjectValue: {fileID: 0} + stringValue: + - fullName: SystemInt32.__ToString__SystemString + uid: 538c3f31-2713-4b19-b5eb-8bd2156f313a + position: {x: 303.89334, y: 448.57095} + nodeUIDs: + - d7f4a65e-c53b-41a9-9289-f1aaf7504e6e|0 + flowUIDs: [] + nodeValues: + - unityObjectValue: {fileID: 0} + stringValue: System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089|0 + updateOrder: 0 + graphElementData: + - type: 5 + uid: ecaf99b8-b642-4c35-a335-4ce93c625aea + jsonData: '{"visible":true,"layout":{"serializedVersion":"2","x":10.0,"y":130.0,"width":200.0,"height":150.0}}' + - type: 4 + uid: dfb39583-181b-4a9b-b639-26cf6b49806f + jsonData: '{"visible":true,"layout":{"serializedVersion":"2","x":10.0,"y":20.0,"width":0.0,"height":0.0}}' + viewTransform: + position: {x: 3.0727692, y: 98.815956} + scale: 0.7561437 + version: 1.0.0 + showAssembly: 0 diff --git a/CyanEmu/Tests/UdonGraph/OnRespawnTest.asset.meta b/CyanEmu/Tests/UdonGraph/OnRespawnTest.asset.meta new file mode 100644 index 0000000..1687585 --- /dev/null +++ b/CyanEmu/Tests/UdonGraph/OnRespawnTest.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a1cfe81457478344baa3ea7f455d459a +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: