New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Interaction" scene and AR simulation #1052
Comments
|
Likewise, the XR simulation feels pretty useless for previewing placing a product in situ and interacting with the scene through XR Interaction Toolkit, any fixes or ideas? |
|
I asked the same in the Unity forum last week. no reply yet. Dilmer Valecillos confirms that he couldn't make XRI and AR Simulation work together, too. |
|
Hi folks, apologies for radio silence on this issue. The XR Interaction Toolkit team has begun working on updates to their AR components to be compatible with XR Simulation. We'll update this thread once they have more to share about that. The issue is that the XR Interaction Toolkit components currently use the Input System's For anyone writing their own input scripts, you could look at our PressInputBase class for inspiration on how to implement simulation-agnostic input. |
|
Did anyone get it working for the time being? |
|
I hope you'll all find this helpful. I've created a GitHub template repo (which means you can quickly create your own repo from it) that uses AR Foundation and XRI together, with a demo scene using XR Simulation to place and manipulate AR objects. This short video shows how it works: https://www.loom.com/share/35e79df3781a4b9992e516e6c8cb5a7c The repo is here and I've tried to make the README pretty clear about how to get started: https://github.com/JasonSpatial/ar-template I hope this helps. |
|
Thanks @JasonSpatial! I saw Jason give a talk at the GameDevGuild conference a couple weeks ago where I learned of his workaround. He uses the Input System's TouchSimulation while working with XRI in the Editor (does not support multi-touch input): https://github.com/JasonSpatial/ar-template/blob/main/Assets/_Project/Scripts/Editor/ToolsEditor.cs In this case he enables and disables touch simulation via a button on a component Inspector. This might be a suitable workaround for some folks in the meantime until XRI supports AR Foundation's XR Simulation. |
great! no way it works with 2022.3? |
|
I think it should work with 2022.3. The repo is on 2023 but AR Foundation
and XRI are doing all the work so you could whip up a new project pretty
quickly.
…On Mon, Jun 5, 2023 at 11:01 PM Stefano Cecere ***@***.***> wrote:
I hope you'll all find this helpful. I've created a GitHub template repo
(which means you can quickly create your own repo from it) that uses AR
Foundation and XRI together, with a demo scene using XR Simulation to place
and manipulate AR objects.
This short video shows how it works:
https://www.loom.com/share/35e79df3781a4b9992e516e6c8cb5a7c
The repo is here and I've tried to make the README pretty clear about how
to get started: https://github.com/JasonSpatial/ar-template
I hope this helps.
great! no way it works with 2022.3?
|
|
Hi all, we've learned that XR Interaction Toolkit (XRI) 2.5 will include some mobile AR refactors, one of which is adding support for AR Foundation's XR Simulation. XRI 2.5 is not public yet but I thought followers of this thread would like to know this is coming. |
Thanks for the information ! Any ETA for XRI 2.5 ? |
|
Thank you big time for this solution Jason, going to give it a try. I was also curious if there was a clear timeline for XRI 2.5? Trying to help my students tinker with AR Foundation, and it would be great to have something to go to as a backup for testing! |
|
Hi all, happy to share that XRI 2.5 is out now! Looks like the docs haven't uploaded yet (this usually takes up to 48 hours after release), but I see 2.5.0 in the public registry, so you should be able to manually request this version in Package Manager. |
|
i see it in the docs https://docs.unity3d.com/Packages/com.unity.xr.interaction.toolkit@2.5/manual/index.html but not in the public registry (still 2.4.3) :) |
|
The Package Manager in the Unity Editor does not show you the public registry-- it shows you a snapshot of the public registry at the time that the Editor was released. If you add the package by name and specify version 2.5.0, you'll see that the package is in fact in the public registry. https://docs.unity3d.com/Manual/upm-ui-quick.html |
|
I updated to 2.5.0, but the mouse clicking is still not detected in the XR simulation against a detected floor, am I doing something wrong ? I'm using the "AR Placement Interactable" component. It's working fine on the starter scene "ARDemoScene" but this scene doesn't use this component |
done modifying the packages manifest file, thank you! |
|
I didn't get the impression that 2.5 would take away the need to simulate touch. In fact, looking at the XR Screen Space Controller, it has input mappings for Touchscreen Gestures, which suggests it's still expecting a simulated touchscreen gesture. This still works the way it worked before, by enabling Touch Simulation, either via the Input Debugger or via script, as I've done here with a simple editor script for an empty component I've added to AR Session. |
|
I haven't tried this yet myself but it looks like you can set up Editor input by modifying the Touchscreen Gestures Input Action Map as shown on this new page in their docs: https://docs.unity3d.com/Packages/com.unity.xr.interaction.toolkit@2.5/manual/ar-interaction-overview.html |
|
Apologies if this is a Unity forum question as I am more on the art/design end of things. I've tested your amazing project @JasonSpatial but am curious how I would be able to integrate this script into the AR Sample project provided by [Unity] (https://github.com/Unity-Technologies/arfoundation-samples). I would very much love to leverage both the interactable functionality with image tracking but feel like I am running into the same testing roadblocks. I've tried to setup the inputs as mentioned in 2.5 with no luck. I also neglected to mention I am working on a 2022.3.0f1 version if that would present another complication. |
|
@Creepymulder @profkeegan Also, only one-finger touch gestures are currently supported in simulation mode. |
|
Hey all, let me see if I can answer some of your questions about the new AR integration with XRI 2.5.0. As @tropicdragon pointed out, the goal is to replace the existing AR Interactables (placement, rotation, scale, selection, translation) with the new system so that you simply add the I highly recommend using the prefabs and Input Action Map from the AR Starter Assets sample if you plan to use XRI in your AR scene. We have planned to deprecate the older AR Interactable classes in our upcoming XRI 3.0 release, but wanted to get these new changes out to get feedback about the AR Transformer and Screen Space Controller, so please let us know what you like/don't like and how we can improve these additions for the next iteration. |
Thanks ! I'll look into it |
I stand corrected. I just ran the demo scene in 2.5 again and realized I had simulated touch enabled the first time. Excited to say that the new system works without the need to toggle simulated touch! 🎉 Fantastic work, Unity team. @profkeegan I'll be updating my sample repo to use the new approach. The important thing to note is that the new XRI being discussed here doesn't change AR Foundation's functionality (which controls your image tracking). It also looks like any Unity version from 2021.3 and newer should work. |
|
Everything seems to be working quite nicely now! Thanks everyone. I'll keep an eye out for the update @JasonSpatial |
|
@ROBYER1 |
I can confirm I was using the latest Starter Assets for both, I deleted the whole Samples folder then updated to 2.5.1 XRI and pulled Starter Assets down for that first then the AR Starter Assets and the issue was still there.. I will test in an empty project tomorrow to check as I was using it on this repo. Edit: Worked fine in a fresh project when I imported, in the current project which is a clone of this repo, the issue remained - even when I exported the Samples folder for XRI as a Unitypackage file from the working fresh project and imported it into the repo cloned project - It doesn't matter though really as I have at least got it working in another project :) thanks! |
|
Now I have the samples working - I had a quick question about single object spawning/selection I posted here: I was trying to use a workaround suggested here which was for AR Foundation, but these new XRI 2.5.1 components are mostly very different and I can't find a way to automatically select and force the selection of a single spawned AR Object? |


Hi,
I'm trying to find a workflow using AR Foundation and the XR Interaction Toolkit.
If if try the scene "Interaction" on the XR Simulation scene, it's not working : clicking with a mouse on a detected surface doesn't do anything. It's working fine when it's build on Android.
Is this a known limitation or am I doing something wrong ? The scene "SimpleAR" is working fine on the XR Simulation Scene.
Thanks!
The text was updated successfully, but these errors were encountered: