Search Unity

  1. Read here to learn more about our latest preview of the XR Interaction Toolkit.
    Dismiss Notice
  2. Click here to receive a gift with your purchase of Unity Pro or Unity Enterprise.
    Dismiss Notice
  3. Read here for Unity's latest plans on OpenXR.
    Dismiss Notice

Unity XR Interaction Toolkit Preview Release (0.9)

Discussion in 'XR Interaction Toolkit and Input' started by mfuad, Dec 17, 2019.

Thread Status:
Not open for further replies.
  1. Shizola

    Shizola

    Joined:
    Jun 29, 2014
    Posts:
    259
    Are Unity still working on this? No updates in a while and forum is filling up with actual spam.
     
    ROBYER1 likes this.
  2. tikitofu

    tikitofu

    Joined:
    Aug 12, 2014
    Posts:
    4
    Hi, is there a way to ForceRelease an interactable like you could using the Oculus SDK?

    Thanks!
     
  3. Matt_D_work

    Matt_D_work

    Unity Technologies

    Joined:
    Nov 30, 2016
    Posts:
    151
    still working on it :) more updates soon!
     
  4. Matt_D_work

    Matt_D_work

    Unity Technologies

    Joined:
    Nov 30, 2016
    Posts:
    151
    Hmm, you could call selectexit manually. and there will be a way to script select/deselect. but not deselect on its own.

    where would you use this functionality?
     
  5. tobaccoblonde

    tobaccoblonde

    Joined:
    Apr 18, 2017
    Posts:
    11
    hello,

    i need this functionality as well. i did get it to work if i manually called OnSelectExit, but it lead to some odd behaviour where select enter would be "always on" meaning that if i hovered over a valid interactable it would auto select it. it got a bit gnarly. this was testing with minimal changes, a simple XRGrabInteractable and calling OnSelectExit when events were called.

    an example use case would be resetting a simple loop where i require the player to pick up interactables, but i don't require the player to put down interactables. if the player dies with interactables in their hand, i don't necessarily want to respawn the player entity, i just want to reset the interactables.
     
  6. tikitofu

    tikitofu

    Joined:
    Aug 12, 2014
    Posts:
    4
    Thanks Matt_D_work. It seems my question was answered on this very thread (Page 3) by jackpr:

    "you could toggle m_AllowSelect on the XRGrabInteractables. This will force any held object to be dropped by the hand's interactor."

    However, I have yet to test it.
     
  7. tobaccoblonde

    tobaccoblonde

    Joined:
    Apr 18, 2017
    Posts:
    11
    that works. but you have to grab the interactor from the interactable, then you have to manage the interactor after you turn off its ability to select things.
     
  8. Muskie

    Muskie

    Joined:
    Jan 21, 2017
    Posts:
    29
    So, how do I get Haptics on UI events?

    I have an XR Ray Interactor set up on a controller. I'm able to hover and select UI objects fine, but none of the events in the Sound/haptic/Interactor Events are triggering.
     
  9. a436t4ataf

    a436t4ataf

    Joined:
    May 19, 2013
    Posts:
    1,102
  10. Matt_D_work

    Matt_D_work

    Unity Technologies

    Joined:
    Nov 30, 2016
    Posts:
    151
    Let me take a note ...
     
  11. Aaron-Meyers

    Aaron-Meyers

    Joined:
    Dec 8, 2009
    Posts:
    290
    @Matt_D_work while you're here, I just want to put a word in for a general request to try to change a bunch of the fields and functions for XRIT classes to be protected/virtual rather than private so that we are better able to extend functionality in future versions
     
  12. BottlecapDave

    BottlecapDave

    Joined:
    May 10, 2019
    Posts:
    1
    harleydk and a436t4ataf like this.
  13. harleydk

    harleydk

    Joined:
    Jul 30, 2012
    Posts:
    23
    >We have a reticle attached to our
    XRInteractorLineVisual
    . But for some reason while hovering over UI the reticle sometimes flickers. It doesn't happen with all UI.

    Collider issue, maybe?
     
  14. harleydk

    harleydk

    Joined:
    Jul 30, 2012
    Posts:
    23
    Hello @Matt_D_work , can I get a quick question in? It's been a while since you wrote of this patch, and I'm finding myself in a place where I really need to extend the classes in order to make them work with Mirror Networking for multiplayer-functionality. Can you shed a bit of light on when the patch is due?

    Fingers crossed.
     
  15. blackfox_studio

    blackfox_studio

    Joined:
    Apr 8, 2019
    Posts:
    38
    Hello, when is the next release (0.9.5) scheduled for?
     
    harleydk likes this.
  16. blackfox_studio

    blackfox_studio

    Joined:
    Apr 8, 2019
    Posts:
    38
    Hello,
    is anybody experiencing problems with the XR rig camera showing a dark scene from time to time? I need to restart the app several times before the correct lighting kicks in. Looks like a bug
     
  17. harleydk

    harleydk

    Joined:
    Jul 30, 2012
    Posts:
    23
    Haven't had the pleasure. It is an empty scene, what's going on in there?
     
  18. a436t4ataf

    a436t4ataf

    Joined:
    May 19, 2013
    Posts:
    1,102
  19. tobaccoblonde

    tobaccoblonde

    Joined:
    Apr 18, 2017
    Posts:
    11
  20. jcfalcone89

    jcfalcone89

    Joined:
    Jun 17, 2015
    Posts:
    11
    Does anyone know how to use the IPointerEnterHandler, IPointerExitHandler, etc with the toolkit? I've some assets that use it but I couldn't find a way for the toolkit to trigger it.

    Edit: The Asset is a gameobject not a UI element
     
  21. harleydk

    harleydk

    Joined:
    Jul 30, 2012
    Posts:
    23
    Thanks @a436t4ataf , I'll check it out in detail after the working day is done. The equally sweet and annoying thing about the Mirror Networking is in how the classes utilizing it must inherit from 'NetworkBehaviour', a derivative of MonoBehaviour. So I'll need to - if I insist on using that framework - work with that. Class extensions would probably not cut it, and would also not be a pretty solution what with numerous properties passed through.

    Actually the proper solutions is likely to work around it, as opposed to 'making it work', as it's probably not good to have the networking code so tightly integrated with the XR code.
     
  22. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    968
    As mentioned here, if there is a bug you have noticed, please report it using the instructions below and mention your case number in your comments in this thread. It helps the developers a lot!

     
    a436t4ataf likes this.
  23. a436t4ataf

    a436t4ataf

    Joined:
    May 19, 2013
    Posts:
    1,102
    If it's not part of a UI, then those interfaces make no sense. They are part of Unity's core EventSystems, which is all about UI.

    I'm sure you could write your own code to make it work - but other than code readability, I'm not sure why you'd want to. You'll be making it up yourself (you'd have to invent your own definition of what a "pointer" is, and what "enter" means - and then you can write your own code to detect that and call those methods).

    Off the top of my head (I'm sure if I'm wrong someone will correct me :)) XR has a custom implementation of EventSystem config components that: detect a UI, and - *if* you are using XR items that make sense with pointers, e.g. XRRayController, and *if* you have a UI - then it intelligently defines what a "pointer" means in VR, and defines what "enter" means in VR, and converts that to Unity's EventSystem.

    But without a UI ... what does "pointer" mean and what does "enter" mean??
     
  24. a436t4ataf

    a436t4ataf

    Joined:
    May 19, 2013
    Posts:
    1,102
    I was a bit confused by this reply - Class extensions work perfectly with any base class, that's the point - then I realised that what you really meant was:

    "I need to fundamentally rewrite XR IT so that it uses interfaces everywhere, instead of classes"

    ...since you're using another framework that breaks some basic priniciples of C# code-design ;) - but your general need is a perfectly reasonable ask.

    I agree with that: it's a mistake that XR IT is using classes named "XRBase...something" in every method signature, abusing them as interfaces, instead of using interfaces. The weird thing is: it actually uses them as interfaces! It would have taken almost the same effort to write interfaces in the first place! And if they'd used interfaces ... then some of the bugs we've reported would have never been created (the compiler would have automatically prevented them: I'm sure some of the private fields were meant to be public, but because they had direct class access, the authors didn't notice their mistakes).

    But this is still a "preview", and that implies a lot of hacked-together, poorly-designed code (deliberately: make it quick, make it scrappy, and get it released early - so you have time to get feedback and improve it, rather than waste time making a polished codebase that does the wrong things).

    So ... I have hope that the original authors fully intend to replace the base-class abuse with interfaces before they do a 1.0.0 release. Although we have no info on when that would be :(.

    (Insert rant here about how (e.g. Mirror) requiring custom base classes is almost always wrong: it's bad C#, bad OOP, and usually used by programmers who are being too lazy to think about their problem properly and architect the correct solution).

    Back to your problem:

    Converting classes to interfaces is a lot of work if it's someone else's code and you're expecting them to update their code frequently (which is the case with XR IT). You can't easily patch it. I would recommend either:

    1. OR: figure out a way to force Mirror to let you invoke its methods without needing you to extend their custom base-class. Most networking libraries have this as an option -- the base-class is (usually) only for your convenience, it's not actually required.

    2. OR: Create a github fork of XR IT and do the work of converting everything, and hope that the community here joins in, and helps you maintain it until Unity re-architects around interfaces themselves.

    3. OR: write "bridging" MonoBehaviours that convert data back and forth between Mirror and XR* classes. You can use the script-execution-order features in UnityEditor to make sure this executes at the right time each frame compared to the others, and initializes before/after them (as required). When XR IT upgrades to interfaces: throw this code away, and write new code that extends Mirror's base-class (and copy/paste the body of the methods in).
     
    mikeNspired likes this.
  25. harleydk

    harleydk

    Joined:
    Jul 30, 2012
    Posts:
    23
    You're right, that's the meaning, and, yes, I hope it's a reasonable ask. Well, one could equally argue that I should switch networking framework to one that suits XR IT better. But I need Mirror just as much as I need XR IT (for plugins such as VOIP and networking Nat Hole Punching and such).

    That's a bit... harsh :). I'm inclined to believe that there are reasons - unbeknownst to me - why they went the way they did, and besides if I hadn't been making a networking game, with frameworks that have their own code-structure opinions, I would've been able to work with this.

    In regards to 'hacked together' there are certainly some issues (I would be pleasently surprised, though, if the framework went 100% interfaces all the way in v1.0). The way some of the components are semi hard-wired together is probably less than ideal - for instance, the way the XRRig works by assumption that the camera is a child component (e.g. 'MoveCameraToWorldLocation') makes it difficult to have the camera elsewhere in the hierarchy, an assumption it's not always possible to work with. That, though, I'm as hopeful as are you will be fixed in due time.

    That's a bit... harsh :). I might be wrong, but I believe the intent of Mirror Networking was/is to frame the problem of designing an efficient networking solution in terms of, paraphrasing, 'how can we enable developers, who want to network-enable their games, in an easy and stable manner'. And it does that beautifully, I must confess - no affiliation - that I'm very impressed with it. Granted it's not something one might implement with the intent of being able to replace it with a different framework, ever. Generally agree with you but think it's important to take the 'mission statement' into consideration, so to speak. Different tools for different tasks.

    I'm inclined to work towards a temporary solution (as temporary as the XR IT preview, anyway...) of bridging the gap via some facade-classes that'll essentially grab what data I need to replicate on the network from the XR-classes. I don't have a high tolerance requirement and my transport-layer is UDP anyway, I can afford to lose packages. Thanks for the inspiration, much appreciate it!

    Generally a big thanks for your careful consideration on the above.
     
  26. Aaron-Meyers

    Aaron-Meyers

    Joined:
    Dec 8, 2009
    Posts:
    290
    Finding that when I set my XR Ray Interactors to Sphere Cast rather than Raycast, my console gets flooded with this error:
    upload_2020-6-17_13-34-5.png

    Anyone else?
     
  27. danielrothmann

    danielrothmann

    Joined:
    Feb 4, 2016
    Posts:
    8
    At this point it is probably "preaching to the choir", but thought I'd chime in with some feedback too.

    Interactables side of the system works great, easy to work with, easy to extend.

    I really need a way to override Hover+Select for an Interactor though. For example, these scenarios result in bad behaviour when using the Interaction system due to Interactables not being properly released:

    - Enabling / disabling of a GameObject containing an Interactor
    - Destroying an Interactable that is currently being hovered or selected by an Interactor
    - Switching between Interactors (switching between Direct Interactor and Ray Interactor, for example)

    Other than that I like the system, nice work :) Hope to see more progress soon!
     
    Matt_D_work likes this.
  28. harleydk

    harleydk

    Joined:
    Jul 30, 2012
    Posts:
    23
    Works OK with sphere cast here.
     
  29. flipwon

    flipwon

    Joined:
    Dec 29, 2016
    Posts:
    140
    Is there any word on intractable movement types fixed? :(

    Would really love to use this but I don't think I can make it on instantaneous and the weird attach issues.
     
  30. linojon

    linojon

    Joined:
    Aug 25, 2014
    Posts:
    115
    I set an Interactables layer on the GameObject, used that as the Raycast Mask on the hand controller, and then on the GameObject, change its layer to 0 when it's not interactable anymore.
     
    harleydk likes this.
  31. flipwon

    flipwon

    Joined:
    Dec 29, 2016
    Posts:
    140
    Unfortunately this doesnt work with direct interactors while in hand. I cant seem to find a way to make an object not be interactable while currently held by a direct interactor.

    Changing the layer works fine with ray interactors, but not direct. I'll have to dig a bit deeper perhaps


    edit: Upon posting this I figured out a solution to this issue, if anyone has this odd use case. It was working with the rays because it was using the object layer with the raycast, but wasn't taking the object layer into account when adding as valid targets.


    When picking an object up that I dont want to be interactable while in hand, in the interactables onselect event I call a simple function to change to an ignored layer.

    I then added the layer check to the OnTriggerEnter of the xrdirectinteractor script:

    Code (CSharp):
    1. protected void OnTriggerEnter(Collider col)
    2.         {
    3.             var interactable = interactionManager.TryGetInteractableForCollider(col);
    4.             if (interactable && !m_ValidTargets.Contains(interactable))
    5.             {
    6.                 if (interactionLayerMask == (interactionLayerMask | (1 << interactable.gameObject.layer)))
    7.                 {
    8.                     m_ValidTargets.Add(interactable);
    9.                 }
    10.             }
    11.         }
    Doing this caused an issue if you tried to put an interactable down that was having its layer changed and didnt leave it's collider box it wasn't being recognized as a valid layer, so I duplicated this code and put it into a new OnTriggerStay function as well. Not sure that this will break anything, but so far so good:

    Code (CSharp):
    1. protected void OnTriggerStay(Collider col)
    2.         {
    3.             var interactable = interactionManager.TryGetInteractableForCollider(col);
    4.             if (interactable && !m_ValidTargets.Contains(interactable))
    5.             {
    6.                 if (interactionLayerMask == (interactionLayerMask | (1 << interactable.gameObject.layer)))
    7.                 {
    8.                     m_ValidTargets.Add(interactable);
    9.                 }
    10.             }
    11.         }
     
    Last edited: Jun 24, 2020
    harleydk likes this.
  32. flipwon

    flipwon

    Joined:
    Dec 29, 2016
    Posts:
    140
    I had another issue with instantaneous attach points not lining up correctly, and I've fixed this by storing the center of mass on any instantaneous object, and setting it to vector3.zero on select enter, and back to it's original on select exit:

    Set to true when selecting the instantaneous object, false otherwise.. Could probably quickly turn this into an interface or subscribe to the events here or whatever, but this is the gist

    Code (CSharp):
    1.  
    2.     protected Rigidbody Rigidbody;
    3.     protected Vector3 CenterOfMass;
    4.  
    5.  
    6.     void Awake()
    7.     {
    8.         Rigidbody = GetComponent<Rigidbody>();
    9.         CenterOfMass = Rigidbody.centerOfMass;
    10.     }
    11.  
    12.     public void OnSelect(bool set)
    13.     {
    14.         Rigidbody.centerOfMass = set ? Vector3.zero : CenterOfMass;
    15.     }
     
  33. BSBuser

    BSBuser

    Joined:
    Jun 9, 2019
    Posts:
    2
    Hi there!

    Firstly, I know this is probably not the best place to ask for help on XR implementations, because this thread clearly focuses on the implementation of XR Toolkit itself, but...

    I am trying to find 2 things, which I thought these demos would shed some light but no, they didn't show examples of:

    1 - a vr button - that actually works in any x/y/z rotation. I found this (
    ) and implemented his code but it only works with the button facing up or at small angles because it uses the XR "hover functions" and is using (hover) interactor's position which in this implementation is giving wrong y-distances when buttons rotated on x/z axis. Besides, I don't think the hover approach is the better way to implement a button in VR, just an opinion.

    2 - how to properly use custom hand models with different poses, like a pose for grabbing knobs, a pose for holding pistols, a pose with a stretched index finger for clicking buttons, things like that. I can only find examples for other VR plugins like SteamVR and Oculus. I just could not find a similar example for the XR toolkit. An example of one I found -


    Has anyone here been successful on implementing such things with XR Toolkit?
     
    Last edited: Jun 25, 2020
  34. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    968
    I would highly recommend making separate threads for these, hand posing works fine with this, have been using VRIK Hand Pose script which is part of FinalIK for that.
     
    a436t4ataf likes this.
  35. Tomza

    Tomza

    Joined:
    Aug 27, 2013
    Posts:
    591
    Hello all,

    I have installed the XR plugins for developing with using Oculus VR. Suddenly, however, we got strange errors because of XR.

    Code (CSharp):

    Code (CSharp):
    1. -----CompilerOutput:-stdout--exitcode: 1--compilationhadfailure: True--outfile: Temp/Unity.XR.WindowsMixedReality.dll
    2. Microsoft (R) Visual C# Compiler version 2.9.1.65535 (9d34608e)
    3. Copyright (C) Microsoft Corporation. All rights reserved.
    4.  
    5. Library\PackageCache\com.unity.xr.windowsmr@2.2.0\Runtime\Session\WindowsMRSessionSubsystem.cs(15,28): error CS0246: The type or namespace name 'IProvider' could not be found (are you missing a using directive or an assembly reference?)
    6. Library\PackageCache\com.unity.xr.windowsmr@2.2.0\Runtime\ReferencePoint\WindowsMRReferencePointSubsystem.cs(20,28): error CS0246: The type or namespace name 'IProvider' could not be found (are you missing a using directive or an assembly reference?)
    7. Library\PackageCache\com.unity.xr.windowsmr@2.2.0\Runtime\Session\WindowsMRSessionSubsystem.cs(15,38): error CS0508: 'WindowsMRSessionSubsystem.CreateProvider()': return type must be 'XRSessionSubsystem.Provider' to match overridden member 'XRSessionSubsystem.CreateProvider()'
    8. Library\PackageCache\com.unity.xr.windowsmr@2.2.0\Runtime\Session\WindowsMRSessionSubsystem.cs(20,15): warning CS0108: 'WindowsMRSessionSubsystem.Provider' hides inherited member 'XRSessionSubsystem.Provider'. Use the new keyword if hiding was intended.
    9. Library\PackageCache\com.unity.xr.windowsmr@2.2.0\Runtime\ReferencePoint\WindowsMRReferencePointSubsystem.cs(20,38): error CS0508: 'WindowsMRReferencePointSubsystem.CreateProvider()': return type must be 'XRAnchorSubsystem.Provider' to match overridden member 'XRAnchorSubsystem.CreateProvider()'
    10. Library\PackageCache\com.unity.xr.windowsmr@2.2.0\Runtime\ReferencePoint\WindowsMRReferencePointSubsystem.cs(25,15): warning CS0108: 'WindowsMRReferencePointSubsystem.Provider' hides inherited member 'XRAnchorSubsystem.Provider'. Use the new keyword if hiding was intended.
    11. Library\PackageCache\com.unity.xr.windowsmr@2.2.0\Runtime\Session\WindowsMRSessionSubsystem.cs(20,26): error CS0246: The type or namespace name 'IProvider' could not be found (are you missing a using directive or an assembly reference?)
    12. Library\PackageCache\com.unity.xr.windowsmr@2.2.0\Runtime\ReferencePoint\WindowsMRReferencePointSubsystem.cs(25,26): error CS0246: The type or namespace name 'IProvider' could not be found (are you missing a using directive or an assembly reference?)
    13. Library\PackageCache\com.unity.xr.windowsmr@2.2.0\Runtime\InputSystem\DeviceLayouts.cs(21,31): warning CS0108: 'WMRHMD.trackingState' hides inherited member 'TrackedDevice.trackingState'. Use the new keyword if hiding was intended.
    14. Library\PackageCache\com.unity.xr.windowsmr@2.2.0\Runtime\InputSystem\DeviceLayouts.cs(24,30): warning CS0108: 'WMRHMD.isTracked' hides inherited member 'TrackedDevice.isTracked'. Use the new keyword if hiding was intended.
    15. Library\PackageCache\com.unity.xr.windowsmr@2.2.0\Runtime\InputSystem\DeviceLayouts.cs(27,31): warning CS0108: 'WMRHMD.devicePosition' hides inherited member 'TrackedDevice.devicePosition'. Use the new keyword if hiding was intended.
    16. Library\PackageCache\com.unity.xr.windowsmr@2.2.0\Runtime\InputSystem\DeviceLayouts.cs(30,34): warning CS0108: 'WMRHMD.deviceRotation' hides inherited member 'TrackedDevice.deviceRotation'. Use the new keyword if hiding was intended.
    17. Library\PackageCache\com.unity.xr.windowsmr@2.2.0\Runtime\InputSystem\DeviceLayouts.cs(33,31): warning CS0108: 'WMRHMD.leftEyePosition' hides inherited member 'XRHMD.leftEyePosition'. Use the new keyword if hiding was intended.
    18. Library\PackageCache\com.unity.xr.windowsmr@2.2.0\Runtime\InputSystem\DeviceLayouts.cs(36,34): warning CS0108: 'WMRHMD.leftEyeRotation' hides inherited member 'XRHMD.leftEyeRotation'. Use the new keyword if hiding was intended.
    19. Library\PackageCache\com.unity.xr.windowsmr@2.2.0\Runtime\InputSystem\DeviceLayouts.cs(39,31): warning CS0108: 'WMRHMD.rightEyePosition' hides inherited member 'XRHMD.rightEyePosition'. Use the new keyword if hiding was intended.
    20. Library\PackageCache\com.unity.xr.windowsmr@2.2.0\Runtime\InputSystem\DeviceLayouts.cs(42,34): warning CS0108: 'WMRHMD.rightEyeRotation' hides inherited member 'XRHMD.rightEyeRotation'. Use the new keyword if hiding was intended.
    21. Library\PackageCache\com.unity.xr.windowsmr@2.2.0\Runtime\InputSystem\DeviceLayouts.cs(45,31): warning CS0108: 'WMRHMD.centerEyePosition' hides inherited member 'XRHMD.centerEyePosition'. Use the new keyword if hiding was intended.
    22. Library\PackageCache\com.unity.xr.windowsmr@2.2.0\Runtime\InputSystem\DeviceLayouts.cs(48,34): warning CS0108: 'WMRHMD.centerEyeRotation' hides inherited member 'XRHMD.centerEyeRotation'. Use the new keyword if hiding was intended.
    23. Library\PackageCache\com.unity.xr.windowsmr@2.2.0\Runtime\InputSystem\DeviceLayouts.cs(78,31): warning CS0108: 'HololensHand.trackingState' hides inherited member 'TrackedDevice.trackingState'. Use the new keyword if hiding was intended.
    24. Library\PackageCache\com.unity.xr.windowsmr@2.2.0\Runtime\InputSystem\DeviceLayouts.cs(81,30): warning CS0108: 'HololensHand.isTracked' hides inherited member 'TrackedDevice.isTracked'. Use the new keyword if hiding was intended.
    25. Library\PackageCache\com.unity.xr.windowsmr@2.2.0\Runtime\InputSystem\DeviceLayouts.cs(84,31): warning CS0108: 'HololensHand.devicePosition' hides inherited member 'TrackedDevice.devicePosition'. Use the new keyword if hiding was intended.
    26. Library\PackageCache\com.unity.xr.windowsmr@2.2.0\Runtime\InputSystem\DeviceLayouts.cs(87,34): warning CS0108: 'HololensHand.deviceRotation' hides inherited member 'TrackedDevice.deviceRotation'. Use the new keyword if hiding was intended.
    27. Library\PackageCache\com.unity.xr.windowsmr@2.2.0\Runtime\Session\WindowsMRSessionSubsystem.cs(27,58): error CS0115: 'WindowsMRSessionSubsystem.Provider.GetAvailabilityAsync()': no suitable method found to override
    28. Library\PackageCache\com.unity.xr.windowsmr@2.2.0\Runtime\Session\WindowsMRSessionSubsystem.cs(34,43): error CS0115: 'WindowsMRSessionSubsystem.Provider.trackingState': no suitable method found to override
    29. Library\PackageCache\com.unity.xr.windowsmr@2.2.0\Runtime\Session\WindowsMRSessionSubsystem.cs(42,47): error CS0115: 'WindowsMRSessionSubsystem.Provider.notTrackingReason': no suitable method found to override
    30. Library\PackageCache\com.unity.xr.windowsmr@2.2.0\Runtime\Session\WindowsMRSessionSubsystem.cs(50,34): error CS0115: 'WindowsMRSessionSubsystem.Provider.Destroy()': no suitable method found to override
    31. Library\PackageCache\com.unity.xr.windowsmr@2.2.0\Runtime\Session\WindowsMRSessionSubsystem.cs(54,34): error CS0115: 'WindowsMRSessionSubsystem.Provider.Pause()': no suitable method found to override
    32. Library\PackageCache\com.unity.xr.windowsmr@2.2.0\Runtime\Session\WindowsMRSessionSubsystem.cs(59,34): error CS0115: 'WindowsMRSessionSubsystem.Provider.Resume()': no suitable method found to override
    33. Library\PackageCache\com.unity.xr.windowsmr@2.2.0\Runtime\Session\WindowsMRSessionSubsystem.cs(64,34): error CS0115: 'WindowsMRSessionSubsystem.Provider.Reset()': no suitable method found to override
    34. Library\PackageCache\com.unity.xr.windowsmr@2.2.0\Runtime\ReferencePoint\WindowsMRReferencePointSubsystem.cs(43,17): error CS0619: 'XRReferencePoint' is obsolete: 'XRReferencePoint has been deprecated. Use XRReferencePoint instead (UnityUpgradable) -> UnityEngine.XR.ARSubsystems.XRReferencePoint'
    35. Library\PackageCache\com.unity.xr.windowsmr@2.2.0\Runtime\ReferencePoint\WindowsMRReferencePointSubsystem.cs(42,53): error CS0619: 'XRReferencePoint' is obsolete: 'XRReferencePoint has been deprecated. Use XRReferencePoint instead (UnityUpgradable) -> UnityEngine.XR.ARSubsystems.XRReferencePoint'
    36. Library\PackageCache\com.unity.xr.windowsmr@2.2.0\Runtime\ReferencePoint\WindowsMRReferencePointSubsystem.cs(71,21): error CS0619: 'XRReferencePoint' is obsolete: 'XRReferencePoint has been deprecated. Use XRReferencePoint instead (UnityUpgradable) -> UnityEngine.XR.ARSubsystems.XRReferencePoint'
    37. Library\PackageCache\com.unity.xr.windowsmr@2.2.0\Runtime\ReferencePoint\WindowsMRReferencePointSubsystem.cs(27,34): error CS0115: 'WindowsMRReferencePointSubsystem.Provider.Start()': no suitable method found to override
    38. Library\PackageCache\com.unity.xr.windowsmr@2.2.0\Runtime\ReferencePoint\WindowsMRReferencePointSubsystem.cs(32,34): error CS0115: 'WindowsMRReferencePointSubsystem.Provider.Stop()': no suitable method found to override
    39. Library\PackageCache\com.unity.xr.windowsmr@2.2.0\Runtime\ReferencePoint\WindowsMRReferencePointSubsystem.cs(37,34): error CS0115: 'WindowsMRReferencePointSubsystem.Provider.Destroy()': no suitable method found to override
    40. Library\PackageCache\com.unity.xr.windowsmr@2.2.0\Runtime\ReferencePoint\WindowsMRReferencePointSubsystem.cs(42,71): error CS0115: 'WindowsMRReferencePointSubsystem.Provider.GetChanges(XRReferencePoint, Allocator)': no suitable method found to override
    41. Library\PackageCache\com.unity.xr.windowsmr@2.2.0\Runtime\ReferencePoint\WindowsMRReferencePointSubsystem.cs(69,34): error CS0115: 'WindowsMRReferencePointSubsystem.Provider.TryAddReferencePoint(Pose, out XRReferencePoint)': no suitable method found to override
    42. Library\PackageCache\com.unity.xr.windowsmr@2.2.0\Runtime\ReferencePoint\WindowsMRReferencePointSubsystem.cs(76,34): error CS0115: 'WindowsMRReferencePointSubsystem.Provider.TryRemoveReferencePoint(TrackableId)': no suitable method found to override
    43. Library\PackageCache\com.unity.xr.windowsmr@2.2.0\Runtime\InputSystem\DeviceLayouts.cs(152,31): warning CS0108: 'WMRSpatialController.trackingState' hides inherited member 'TrackedDevice.trackingState'. Use the new keyword if hiding was intended.
    44. Library\PackageCache\com.unity.xr.windowsmr@2.2.0\Runtime\InputSystem\DeviceLayouts.cs(155,30): warning CS0108: 'WMRSpatialController.isTracked' hides inherited member 'TrackedDevice.isTracked'. Use the new keyword if hiding was intended.
    45. Library\PackageCache\com.unity.xr.windowsmr@2.2.0\Runtime\InputSystem\DeviceLayouts.cs(158,31): warning CS0108: 'WMRSpatialController.devicePosition' hides inherited member 'TrackedDevice.devicePosition'. Use the new keyword if hiding was intended.
    46. Library\PackageCache\com.unity.xr.windowsmr@2.2.0\Runtime\InputSystem\DeviceLayouts.cs(161,34): warning CS0108: 'WMRSpatialController.deviceRotation' hides inherited member 'TrackedDevice.deviceRotation'. Use the new keyword if hiding was intended.
    47. Library\PackageCache\com.unity.xr.windowsmr@2.2.0\Runtime\ReferencePoint\WindowsMRReferencePointSubsystem.cs(142,25): error CS0619: 'XRReferencePoint' is obsolete: 'XRReferencePoint has been deprecated. Use XRReferencePoint instead (UnityUpgradable) -> UnityEngine.XR.ARSubsystems.XRReferencePoint'
    48. -----CompilerOutput:-stderr----------
    49. -----EndCompilerOutput---------------

    upload_2020-6-25_19-20-26.png

    upload_2020-6-25_19-20-3.png
     
    P_Jong likes this.
  36. BentelAnnR

    BentelAnnR

    Joined:
    Jun 16, 2020
    Posts:
    4
    Hi all,

    I'm having some problems with the selection: while SelectEnter is correctly called by the InteractionManager, SelectExit is never called.

    I'm using the laser to select objects ("hover to select" field of XRRayInteractor set to true), the problem is: once an object is selected, I'm not able to select another object by interacting with it through the laser because the previous one keeps being in the selected state although it is no more hit by the laser.

    Debugging the application I've discovered that the SelectExit is never called by the InteractionManager, because the if statement of the following code is never passed, because interactor.selectTarget is set to null, for reasons I ignore, because interactor.selectTarget is correctly set in the selection phase.

    Code (CSharp):
    1. void ClearInteractorSelection(XRBaseInteractor interactor)
    2.         {
    3.             // TODO: Make sure SelectExit is called if the selectTarget of the interactor is destroyed (and write a test around this).
    4.             if (interactor.selectTarget &&
    5.                 (!interactor.isSelectActive || !interactor.CanSelect(interactor.selectTarget) || !interactor.selectTarget.IsSelectableBy(interactor)))
    6.                 SelectExit(interactor, interactor.selectTarget);
    7.         }
    I'm quite sure I'm using the scripts the wrong way, so which is the correct way of enabling selection through the laser?

    Thanks in advance
     
  37. Aaron-Meyers

    Aaron-Meyers

    Joined:
    Dec 8, 2009
    Posts:
    290
    Looked into this again and the problem is just sitting there in plain sight in XRRayInteractor.cs:

    Code (CSharp):
    1.  
    2. int CheckCollidersBetweenPoints(Vector3 from, Vector3 to)
    3. {
    4.     Array.Clear(m_RaycastHits, 0, kMaxRaycastHits);
    5.  
    6.     if (m_HitDetectionType == HitDetectionType.SphereCast && m_SphereCastRadius > 0.0f)
    7.     {
    8.         // casts a sphere along a ray from last point to next point to check if there are hits in between
    9.         return Physics.SphereCastNonAlloc(from, m_SphereCastRadius, to - from,
    10.             m_RaycastHits, Vector3.Distance(to, from), raycastMask, raycastTriggerInteraction);
    11.     }
    12.     else
    13.     {
    14.         // raycast from last point to next point to check if there are hits in between                                      
    15.         return Physics.RaycastNonAlloc(from, to - from,
    16.             m_RaycastHits, Vector3.Distance(to, from), raycastMask, raycastTriggerInteraction);
    17.     }
    18. }
    19.  
    The console is flooded with errors about "Assertion failed on expression: 'IsNormalized(direction)'" because Physics.SphereCastNonAlloc is expecting a normalized vector and the XRRayInteractor is sending
    to - from
    when I suppose it ought to be sending
    (to - from).normalized
    .

    Unfortunately, making this fix gets erased every time you open Unity because the Package Manager resets any changes you make to any packages. D:

    So uhh... would be nice to see this fixed! Seems ridiculous for Physics.SphereCastNonAlloc to have an assertion like that anyway... why can't it just normalize the direction vector for you?!? If it's already checking, it's already done the computation!

    *sigh*

    0.9.5 soon?
     
    harleydk likes this.
  38. TheMaximL

    TheMaximL

    Joined:
    Jul 27, 2019
    Posts:
    50
    I've heavily modified the XR Toolkit to include stuff that was needed, so I had to remove the XR Toolkit from the package manager and just put it in the usual asset folder. Only work around for the wipe on open issue.
     
  39. Aaron-Meyers

    Aaron-Meyers

    Joined:
    Dec 8, 2009
    Posts:
    290
    Was it a pretty smooth process? I'm concerned about GUID's changing and associations breaking and having a big mess to clean up if I make that kind of change mid-project.
     
  40. flipwon

    flipwon

    Joined:
    Dec 29, 2016
    Posts:
    140
    It's very simple. Just drag the folder into the assets/packages folder. Back up just in case, but it went without a hitch for me
     
  41. MaskedMouse

    MaskedMouse

    Joined:
    Jul 8, 2014
    Posts:
    616
    I am seeing this flickering reticle problem with the UI as well.

    Also we set the stopLineAtFirstRaycastHit boolean but it wasn't even implemented in the actual processing. I had to move the package from cache into the packages folder for it to be editable to implement the boolean myself. Which is literally a minute edit. But whenever a package update comes we have to do this again of course. Which makes an update process cumbersome if we have to do minor implementations and fixes.
    But at the same time the package hasn't been updated since April 7. At least not for Unity 2019.4.
     
  42. EXPLoad_Unity

    EXPLoad_Unity

    Joined:
    Jul 1, 2020
    Posts:
    1
    Hi, all!

    I'm trying to create simple scene for my Oculus Quest (I use Oculus Link to test)
    I've installed required XR Packages
    But I get Errors
    Moreover I launched this project on 25 May and it wqorked fine, but now it seems something went wrong. Perhaps Oculus Quest was updated...
    I suppose Unity (2019.3.13) can't see Oculus Quest via Oculus Link
    Can anyone help, please?
     

    Attached Files:

  43. Totalschaden

    Totalschaden

    Joined:
    Dec 14, 2013
    Posts:
    31
    I have 2 issues, first of all I would like to Interact with a Gameobject that contains a BoxCollider + Event Trigger using Xr Ray Interactor, but i cant get it to work ! Shoudnt this work by default ??? Looking for OnPointerClick and Hover there.

    My 2nd Issue is an error spamming like crazy, cant realy find a fix for it: (This happens once there is an XR Rig in scene and the valve index connects in play mode) doubleclicking it say its caused by XRSystem.cs line: display.GetCullingParameters(camera, renderPass.cullingPassIndex, out var cullingParams);
     
    Last edited: Jul 2, 2020
  44. BentelAnnR

    BentelAnnR

    Joined:
    Jun 16, 2020
    Posts:
    4
    Hi everyone,

    I was wondering which is the most correct way of managing multiple interactors that I want to use with the same controller.

    I want to be able to both grab objects with my hands and interact with them through the laser.
    The way in which all the tutorials and example projects do this stuff is by having multiple controllers, each one having a different interactor (one for XR Ray Interactor, one for XR Direct Interactor, one for XR Teleport), because only one interactor component can be added to an object having an XR Controller.

    So eventually the same XR Rig will have like 4 or more controllers. Is that the only correct way to realize multimodal interactions or is there another one?

    Thanks a lot
     
    Shizola likes this.
  45. shubh143

    shubh143

    Joined:
    Jun 1, 2017
    Posts:
    7
    can anyone tell me which devices currently the xr tool kit supports
     
  46. tevfikufuk

    tevfikufuk

    Joined:
    Sep 18, 2017
    Posts:
    4
    Hi, everyone!

    Can you tell me if you can see the XR Interaction Toolkit in Unity 2020.1 beta and 2020.2 alpha?
    I cannot see the package itself and I am a bit worried about it.
     

    Attached Files:

    • xr.png
      xr.png
      File size:
      10.5 KB
      Views:
      29
  47. mikeNspired

    mikeNspired

    Joined:
    Jan 13, 2016
    Posts:
    55
    From what I can tell, all preview packages that don't have a stable release are not listed in the 2020 alphas and betas.
     
    tevfikufuk likes this.
  48. a436t4ataf

    a436t4ataf

    Joined:
    May 19, 2013
    Posts:
    1,102
    Maybe there's a bug in XR here, but Triggers should always be avoided if possible. This is a general Unity thing, not related to VR: Event-Trigger is basically "broken" (it's by-design, but the design is highly confusing) in Unity and always has been - it doesn't function correctly in physics, and has some special weird behaviours. The TL;DR (personal opinion): is don't use triggers, find a different way to achieve what you're hoping for.

    Some people have triggered this with XR already (search the forums. That's what the search button is for). But if you don't have the same mistake they made:

    There is a bug (feature?) added to core Unity sometime last year - Unity is now much more sensitive to camera positions and config, and spams errors if a camera moves too far from the origin or has an invalid width/height etc. There are many possible causes, but check your Camera and where it is in the hierarchy, make sure none of its parent objects have scale different from (1,1,1), and make sure none of its parent objects (or it) are offset more than 100's of meters from the origin. (I know that 10,000 meters breaks it, where 100 meters is fine).
     
  49. Cdngater

    Cdngater

    Joined:
    May 29, 2014
    Posts:
    63
    How do I stop the com.unity.xr.interaction.toolkit from updating from the associated git repository?

    Problem is this, I have using the OpenVR XR preview and there is a button disconnect between openVR and toolkit.InputHelpers.

    The InputHelper has a definition for GripPressed where as the OpenVR is looking for GripButton. Seeing as the code for openVR is locked away in a DLL I was just going to modify the InputHelper instead.

    But every time I make a change, Unity re-gets the toolkit from the repository and overwrites my change. I tried removing the repository setting from the json script, but that got put back as well.

    I just need to stop this update, at least until OpenVR or the ToolKit is updated.
     
  50. a436t4ataf

    a436t4ataf

    Joined:
    May 19, 2013
    Posts:
    1,102
Thread Status:
Not open for further replies.
unityunity