World/Udon Bugs & Feature Requests

Post about current World or Udon bugs feature requests. One item per post!
Non-constructive and off-topic posts will be moved or deleted.
TeleportTo AlignRoomWithSpawnPoint has problems if there's a wall between the destination origin and player position
My understanding is that when using AlignRoomWithSpawnPoint with TeleportTo in VR, the passed position/rotation is the destination playspace Origin position/rotation. It's as if the playspace Origin tracking point is moved to your given position, and the player is moved along relative to the Origin. The new origin might be outside a wall, while the player is inside that wall, but that shouldn't matter. However, I've found that if after teleporting a player in VR using AlignRoomWithSpawnPoint, the new player position after teleporting is separated from the new origin position by a wall, the teleport will usually "break". The player's head /viewpoint will end up at the correct position, but they will be detatched from their avatar, which will be outside the wall. This happens when the wall collider is double-sided, i.e. there is collision between the new origin and new player position which seemingly prevents the player capsule from moving to the correct spot. I have made a (contrived) example scene to demonstrate the issue. There is a box, a button which teleports you into the box using AlignRoomWithSpawnPoint, and two indicators. The green indicator shows your AvatarRoot tracking position/rotation, and the magenta indicator shows your Origin tracking position/rotation. When you click the button, the green indicator animates from its position under you to the target position inside the box. The magenta indicator also moves along relatively to the green indicator. At the end of the animation, the magenta indicator should be the new origin position/rotation after teleporting, and so it is the position/rotation passed to TeleportTo. If AlignRoomWithSpawnPoint behaves correctly, you should be teleported into the box and your green indicator should remain underneath you. In the attached video, you can see the first two teleport attempts work correctly. The 1st teleport I stood at the origin, so everything worked fine. The 2nd attempt, the origin was outside the box, but the teleport still worked, and to be honest I don't know why that time it worked. But the 3rd and 4th attempts both failed: my head was teleported into the box, but my avatar stayed outside the box, and the green indicator was outside the box too. I didn't have to jump over the wall to rejoin my body -- I could just pass right through it. Here is a package containing the example scene: https://drive.proton.me/urls/PDST2A2DTR#GU9EoykqkpEU Of course, the workaround here is to just teleport using Align Player WithSpawnPoint, which uses the AvatarRoot position. That's fine and all, but since I encountered this bug and spent days trying to figure out what the heck was happening, I figured I'd report it! Thanks!
4
·
Bug Reports
·
tracked
null-check on gameObject will throw exception if the gameObj is Destroyed
We cannot check whether a GameObject is destroyed or not. To detect an GameObject is destroyed or not, we normally may use (gameObj != null) or (gameObj != null && gameObj.name != "ToDestroy" ) or ReferenceEquals(gameObj , null) Those codes work perfectly in udonSDK3 unity editor environment. However, the same code will throw exception in-game which cause the script stop running. To investigate, we tried to enable UdonSecureHeap in editor and the editor also throw errors, so we guess that Udon's secure heap is what breaking the in-game behavior. The exception message say 'Your script should either check if it is null or you should not destroy the object.' However what I am doing is actually the null-checking!! The following is the error log. I am destroying a 'Cube' and check the cube's status using 'Tester' by showing the result on UnityEngine.UI.Text, which shows "Object is NOT null" or "Object is null" : [UdonBehaviour]An exception occurred during Udon execution, this UdonBehaviour will be halted. VRC.Udon.VM.UdonVMException: The VM encountered an error! Exception Message: An exception occurred during EXTERN to 'UnityEngineObject.__op_Equality__UnityEngineObject_UnityEngineObject__SystemBoolean'. Parameter Addresses: 0x0000000B, 0x00000004, 0x0000000A The object of type 'GameObject' has been destroyed but you are still trying to access it. Your script should either check if it is null or you should not destroy the object. ---------------------- Program Counter was at: 92 ---------------------- Stack Dump: ---------------------- Heap Dump: 0x00000000: 6459115532197657758 0x00000001: Tester 0x00000002: null 0x00000003: Text (UnityEngine.UI.Text) 0x00000004: null 0x00000005: null 0x00000006: Object is null 0x00000007: Object is NOT null [ 0x00000008: ] 0x00000009: 4294967295 0x0000000A: False 0x0000000B: null 0x0000000C: 241 0x0000000D: Cube (UnityEngine.GameObject) 0x0000000E: Object is NOT null [Cube (UnityEngine.GameObject) 0x0000000F: Object is NOT null [Cube (UnityEngine.GameObject) 0x00000010: Object is NOT null [Cube (UnityEngine.GameObject)] 0x00000011: Object is NOT null [Cube (UnityEngine.GameObject)] 0x00000012: 241 0x00000013: Object is NOT null [Cube (UnityEngine.GameObject)]241 0x00000014: 4294967295 0x00000015: UnityEngineObject.__op_Equality__UnityEngineObject_UnityEngineObject__SystemBoolean 0x00000016: UnityEngineTime.__get_frameCount__SystemInt32 0x00000017: SystemInt32.__ToString__SystemString 0x00000018: SystemString.__op_Addition__SystemString_SystemString__SystemString 0x00000019: UnityEngineUIText.__set_text__SystemString__SystemVoid 0x0000001A: UnityEngineGameObject.__ToString__SystemString ---------------------- Inner Exception: ---> VRC.Udon.VM.UdonVMException: An exception occurred during EXTERN to 'UnityEngineObject.__op_Equality__UnityEngineObject_UnityEngineObject__SystemBoolean'. Parameter Addresses: 0x0000000B, 0x00000004, 0x0000000A ---> UnityEngine.MissingReferenceException: The object of type 'GameObject' has been destroyed but you are still trying to access it. Your script should either check if it is null or you should not destroy the object. at (wrapper managed-to-native) UnityEngine.GameObject.get_transform(UnityEngine.GameObject) at VRC.Udon.Security .UnityEngineObjectSecurityBlacklist.IsBlacklisted[T] (T objectToCheck) [0x0008c] in C:\VRChatGit\VRChat-Udon\UdonVM\Udon\Security\Source\UnityEngineObjectSecurityBlacklist.cs:50 at VRC.Udon.ClientBindings.UdonClientInterface.IsBlacklisted[T] (T objectToCheck) [0x00000] in C:\VRChatGit\VRChat-Udon\UdonVM\Udon\ClientBindings\Source\UdonClientInterface.cs:83 at VRC.Udon.UdonManager.IsBlacklisted[T] (T objectToCheck) [0x00001] in E:\Unity Project 2018\Test2018World\Assets\Udon\UdonManager.cs:137 at VRC.Udon.Security .UdonSecureHeap.ScanHeapValue[T] (T& heapValue) [0x0005f] in C:\VRChatGit\VRChat-Udon\UdonVM\Udon\Security\Source\UdonSecureHeap.cs:142 at VRC.Udon.Security .UdonSecureHeap.GetHeapVariable[T] (System.UInt32 address) [0x0000d] in C:\VRChatGit\VRChat-Udon\UdonVM\Udon\Security\Source\UdonSecureHeap.cs:55 at VRC.Udon.Wrapper.Modules.ExternUnityEngineObject.__op_Equality__UnityEngineObject_UnityEngineObject__SystemBoolean (VRC.Udon.Common.Interfaces.IUdonHeap heap, System.UInt32[] parameterAddresses) [0x00000] in C:\VRChatGit\VRChat-Udon\UdonVM\Udon\Wrapper\Source\Modules\UnityEngine\ExternUnityEngineObject.cs:89 at VRC.Udon.VM.UdonVM.Interpret () [0x00272] in C:\VRChatGit\VRChat-Udon\UdonVM\Udon\VM\Source\UdonVM.cs:281 --- End of inner exception stack trace --- at VRC.Udon.VM.UdonVM.Interpret () [0x00326] in C:\VRChatGit\VRChat-Udon\UdonVM\Udon\VM\Source\UdonVM.cs:305 --- End of inner exception stack trace --- at VRC.Udon.VM.UdonVM.Interpret () [0x003f4] in C:\VRChatGit\VRChat-Udon\UdonVM\Udon\VM\Source\UdonVM.cs:346 at VRC.Udon.UdonBehaviour.RunProgram (System.UInt32 entryPoint) [0x0006a] in E:\Unity Project 2018\Test2018World\Assets\Udon\UdonBehaviour.cs:1867 UnityEngine.Debug:LogError(Object, Object) VRC.Core.Logger:LogError(String, Int32, Object) VRC.Udon.UdonBehaviour:RunProgram(UInt32) (at Assets/Udon/UdonBehaviour.cs:1877) VRC.Udon.UdonBehaviour:Update() (at Assets/Udon/UdonBehaviour.cs:762)
7
·
Bug Reports
·
interested
Load More