Search Unity

AR Foundation Remote | Test and debug your AR project in the Editor

Discussion in 'Assets and Asset Store' started by KyryloKuzyk, May 26, 2020.

  1. JanetGilbertPraxis

    JanetGilbertPraxis

    Joined:
    May 6, 2022
    Posts:
    22
    So is it possible to fix #1 now the feature request has been completed? https://github.com/Unity-Technologies/arfoundation-samples/issues/961
     
  2. KyryloKuzyk

    KyryloKuzyk

    Joined:
    Nov 4, 2013
    Posts:
    1,145
    JanetGilbertPraxis likes this.
  3. tjmaul

    tjmaul

    Joined:
    Aug 29, 2018
    Posts:
    467
    Hi there,

    I successfully set up AR Foundation Remote (great work! I like it very much!) to try it out, but I'm a bit lost on how to go about using the URP. I recompiled the companion app after having set up the Pipeline Asset and forward renderer. I also added the ARBackgroundRendererFeature to the forward renderer and recompiled again, but the screen background stays black as well as the Game window in the editor.

    I also found this (https://github.com/Unity-Technologies/arfoundation-samples/issues/961) and removed those lines myself. But I think you already fixed this with a workaround if I'm not mistaken (Embed AR Foundation and apply fixes)

    Unfortunately, the screen also stays black when building the project and running it on a device. The point cloud and plane meshes show up on the screen (both on the actual build as well as with the companion app). So clearly something is working and I feel I just forgot something. Please let me know if you need any additional information.

    (2022.1.3f, AR Foundation Remote 1.4.23-release.1, iPhone 11)
     
  4. JuanGuzmanH

    JuanGuzmanH

    Joined:
    Feb 8, 2018
    Posts:
    74
    Hi. Im using a simplified of the imagetracking example from the https://github.com/Unity-Technologies/arfoundation-demos .

    Im using:
    - Unity 2021.3.4f1
    - AR Foundation Remote 2.0.23-release.1
    - AR Foundation 4.2.3
    - ARKit XR 4.2.3

    I was able to build the companion app, and install it. The app is able to start but when I Hit play on Unity I have this error:

    AR Foundation Remote: legacy UnityEngine.SpatialTracking.TrackedPoseDriver is not supported. Please use UnityEngine.XR.ARFoundation.ARPoseDriver/UnityEngine.InputSystem.XR.TrackedPoseDriver instead.
    UnityEngine.Debug:LogError (object)
    ARFoundationRemote.RuntimeEditor.CameraPoseReceiver:afterSceneLoad () (at Library/PackageCache/com.kyrylokuzyk.arfoundationremote@f294fc8d4cfd/RuntimeEditor/Receiver/CameraPoseReceiver.cs:36)

    Im not very sure about the solution.

    It looks like the problem is that Im using the legacy input for the Tracked Pose Driver but I did not change the settings of the project at all. Any orientation about a solution?
     
    Last edited: Jun 15, 2022
  5. JuanGuzmanH

    JuanGuzmanH

    Joined:
    Feb 8, 2018
    Posts:
    74
    I found that the camera had the component "Tracked Pose Driver", I removed and add "AR Pose Driver" and now its working
     
    KyryloKuzyk likes this.
  6. JuanGuzmanH

    JuanGuzmanH

    Joined:
    Feb 8, 2018
    Posts:
    74
    Now I have another problem. The app connect to my scene and everything works good but when I click on the play button to stop Unity, then Unity Editor become unresposive and the only way to close it is forcing to quit Unity. Any tips?
     
  7. KyryloKuzyk

    KyryloKuzyk

    Joined:
    Nov 4, 2013
    Posts:
    1,145
    Please check that you've completed all URP setup steps. I collected them all in this post:
    https://forum.unity.com/threads/arf...k-screen-and-no-tracking.915527/#post-6374280
     
  8. KyryloKuzyk

    KyryloKuzyk

    Joined:
    Nov 4, 2013
    Posts:
    1,145
    Could you please file a bug report form here?
    https://github.com/KirillKuzyk/AR-Foundation-Remote-support/issues/new/choose

    Additionally to all form questions, please also try to import the plugin to a fresh Unity project to isolate the issue from other dependencies.
     
  9. Voronoi

    Voronoi

    Joined:
    Jul 2, 2012
    Posts:
    590
    Sorry to double post, I didn't realize when I posted in the thread, that it was not in your support thread!

    My question is do you have or know of a fix for the black screen issue when using AR Foundation 5.0.0-pre.12, Unity 2022.1.+ and URP 13.1.8? I have followed the screenshots here for setting up the scene.

    I know this is likely tied to using 2022 and AR Foundation 5.0.0-pre.12 and not specifically to your plug-in (which works terrific by the way!) but I haven't seen other recent posts reporting this problem or a potential fix for it. There are so many places where this can go wrong, it's also hard to tell if I'm missing something in my setup.

    Currently I am just testing with the black screen, the object is placed and everything else works, just no background image. My current dilemma is to downgrade the project, but I have to change my scripts from XROrigin to ARSessionOrigin which is a pain and I ideally want to use the newer AR Foundation if possible.

    If I do have to downgrade my project, what would you recommend as the best, most stable Unity version and AR Foundation version?
     
  10. KyryloKuzyk

    KyryloKuzyk

    Joined:
    Nov 4, 2013
    Posts:
    1,145
    Yes, I understand that making a downgrade may be painful. But using preview versions of packages is generally not recommended unless you have a strong reason to do so. Downgrading to a stable AR Foundation version may be a necessary evil to fix the issue with a black screen until the AR Foundation 5 will become verified.

    For both of my games, I'm using the 'Recommended' version of Unity (which is currently 2021.3.5f1) with verified AR Foundation packages (which are currently 4.2.3) to minimize the risk. I would apply the same rule for my future projects unless some newer Unity version would have a specific feature I can't live without.
     
    Voronoi likes this.
  11. Voronoi

    Voronoi

    Joined:
    Jul 2, 2012
    Posts:
    590
    It is a bug with Unity 2022 + URP and not AR Foundation, I reported it and they reproduced it.

    I took the plunge and downgraded the project to 2021.3.5f1 and everything is working with both AR Foundation 4.2.3 and 5.0.0-pre.12. I don't need anything in 2022, but I did want to use features from AR Foundation 5.0, which I found I could only install by editing the manifest.json file. I was happy that my project did not die with the downgrade, which has happened before!

    Thanks for your quick response!
     
    KyryloKuzyk likes this.
  12. KyryloKuzyk

    KyryloKuzyk

    Joined:
    Nov 4, 2013
    Posts:
    1,145
    PLUGIN UPDATE POST #14


    Compatibility with VisionLib
    vision_lib.png
    I'm happy to announce that the AR Foundation Remote plugin can now be used together with the VisionLib SDK 2.2.1.

    VisionLib is a powerful SDK with a focus on Object Tracking and now you can run their SDK right in the Unity Editor, increasing your development speed. Please visit the documentation page to prepare the VisionLib SDK to work with the AR Foundation Remote plugin.

    Both versions (v1.0 and v2.0) of the AR Foundation Remote plugin support the integration, so no one is left behind.

    Huge thanks to the VisionLib team for making this happen!


    Native XRInputSystem/XRMeshSubsystem
    support in the Editor
    Not all XR substems in AR Foundation can be implemented on a managed C# side. There are currently three subsystems that have to be written in C++. They are XRInputSystem, XRMeshSubsystem, and XRDisplaySubsystem.

    To integrate the plugin with AR Foundation more seamlessly, the plugin now has native support of XRInputSystem and XRMeshSubsystem substems.

    What does it bring to the users?
    1. Embedding the AR Foundation package is not mandatory anymore. This improves user experience and decreases plugin installation time. There are still a couple of cases that require AR Foundation package embedding, but as time goes on, they will be encountered less and less often because of changes from Unity's side.
    2. ARPoseDriver component now works exactly the same in the Editor as it works on real devices.
    3. The pesky 'No active UnityEngine.XR.XRInputSubsystem is available' warning is now gone. Perfectionists will enjoy.

    The journey of implementing these subsystems in C++ was bumpy, but I refreshed my C++ knowledge and made the plugin integration with Unity/AR Foundation cleaner. As always, full source code is available, including the source code for C++ libraries.


    Maintenance work

    I keep doing the maintenance work to ensure the plugin works with the latest Unity versions, the latest AR Foundation (5.0.0-pre.12), and the latest ARCore Extension. You can find the changelog of all the little things here (v1.0) and here (v2.0).

    Huge thanks for all your trust and support!

     
    Last edited: May 11, 2023
  13. Volkerku

    Volkerku

    Joined:
    Nov 23, 2016
    Posts:
    114
    Unity restart fixed the problem.

    Isuue after updating to AR Remote 2
    I sucesfully upgrraded adn built a new AR Remote Companien app for my iOS device. Alos downloaded the samples. If I run an example scene (for instance Anchors), thUnity sucesfully connects tpo the companion app, and I can see the camera image. However, the detected planes stay frozen, they do not move with the device. Something with camera pose tracking?
    Help pls.
     
    Last edited: Aug 2, 2022
  14. KyryloKuzyk

    KyryloKuzyk

    Joined:
    Nov 4, 2013
    Posts:
    1,145
    Yes, it looks like the problem is in camera pose tracking. Please check that you have the ARPoseDriver.cs on your ARCamera and that there are no warnings in the console.
    Could you please import the plugin's examples and check if they work correctly?
     
  15. Pospischil

    Pospischil

    Joined:
    Sep 11, 2018
    Posts:
    5
    Hello,

    I have an issue with the tool. The current configuration should be requested in the scene via the ARCameraManager. But every time I run the scene, the following error is thrown:

    AR Foundation Remote Companion App: Error: System.Exception: AR Foundation Remote: BlockUntilReceive() timeout.
    The relevant line of code is the following:

    Code (CSharp):
    1. XRCameraConfiguration config = (XRCameraConfiguration)cameraManager.currentConfiguration;
    If I remove the line, the error is not triggered. How can I make this query without the remote tool crashing?

    I'm using:
    • Unity 2021.3.6f1
    • ARFoundation 4.2.3
    • AR Foundation Remote 2.0.24-release.0
     
  16. KyryloKuzyk

    KyryloKuzyk

    Joined:
    Nov 4, 2013
    Posts:
    1,145
    Please update to plugin version 2.0.25-release.0, I addressed this exact issue in this version.
     
  17. KyryloKuzyk

    KyryloKuzyk

    Joined:
    Nov 4, 2013
    Posts:
    1,145
    @Pospischil please also keep in mind that in AR Foundation the ARCameraManager.currentConfiguration is null until the first ARCameraManager.frameReceived event. Here is a code sample:
    Code (CSharp):
    1. using UnityEngine;
    2. using UnityEngine.XR.ARFoundation;
    3.  
    4. public class CurrentConfigurationExample : MonoBehaviour {
    5.     [SerializeField] ARCameraManager cameraManager;
    6.  
    7.     void Awake() {
    8.         cameraManager.frameReceived += frameReceived;
    9.     }
    10.  
    11.     void frameReceived(ARCameraFrameEventArgs _) {
    12.         cameraManager.frameReceived -= frameReceived;
    13.         var currentConfiguration = cameraManager.currentConfiguration;
    14.         if (currentConfiguration.HasValue) {
    15.             Debug.Log($"cameraManager.currentConfiguration retrieved successfully: {currentConfiguration.Value}");
    16.         }
    17.     }
    18. }
    19.  
     
  18. Bersaelor

    Bersaelor

    Joined:
    Oct 8, 2016
    Posts:
    111
    Dear @KirillKuzyk ,

    I'm reading ARKit Blend shapes in my latest app, and I was happy to see that your remote also supports readin blend shapes! (using 2.0.25-release.0, Unity 2021.3.6f1 )
    Now, I added a behaviour to my `ARFace` that's supposed to read the blend shapes, and is very similar too your `ARKitBlendShapeVisualizerFixed` but everytime I run

    Code (CSharp):
    1.             arKitFaceSubsystem = (ARKitFaceSubsystem)faceManager.subsystem;
    2.  
    I get "InvalidCastException: Specified cast is not valid.".

    Yet when I run the demo scene `ARKit FaceBlendshapesExample` that is part of the same unity project the same line in your `ARKitBlendShapeVisualizerFixed` works.

    is there some kind of trick to make the `faceManager.subsystem` be of type `ARKitFaceSubsystem` that I might be missing?

    PS: Logging the subsystem object, both in my scene as well as the demo scene the printed class was `ARFoundationRemote.Runtime.FaceSubsystem` so that wasn't helpful.
    PPS: I'll also attach a screenshot of the runtime inspector values of the ARFace object both for my scene as well as the demo scene, maybe you can see a difference I am not seeing?
     

    Attached Files:

    Last edited: Aug 3, 2022
  19. KyryloKuzyk

    KyryloKuzyk

    Joined:
    Nov 4, 2013
    Posts:
    1,145
    ARKit Blendshapes is one of few features that require minor code modification to work with the plugin. Please add the following code at the top of your script:
    Code (CSharp):
    1. #if UNITY_EDITOR
    2. using ARKitFaceSubsystem = ARFoundationRemote.Runtime.FaceSubsystem;
    3. #endif
     
  20. Bersaelor

    Bersaelor

    Joined:
    Oct 8, 2016
    Posts:
    111
    Thank you for the super fast reply
    And dang, I could have noticed that line in `ARKitBlendShapeVisualizerFixed` myself, guess I was too tired to notice last night ;)
     
    KyryloKuzyk likes this.
  21. Sanban_

    Sanban_

    Joined:
    May 2, 2018
    Posts:
    5
    Hey. I have a question regarding Cross-Plattform-Debugging. So far its not very clear if the Debugging of my AR-IOS-App i coded on Windows will work without having to hook up my Mac inbetween. So: can i easly use this Tool with the combination Windows + IOS-Device or do I have to launch the project in Unity on my Mac anyways to work?
     
  22. KyryloKuzyk

    KyryloKuzyk

    Joined:
    Nov 4, 2013
    Posts:
    1,145
    Please see the response here:
    https://github.com/KirillKuzyk/AR-Foundation-Remote-support/discussions/1#discussioncomment-2810827
     
  23. cyq45

    cyq45

    Joined:
    Feb 21, 2022
    Posts:
    5
    How can I make the ARMeshManager work on unity editor? I use unity 2021.1.18, ARFoundation 4.1.10, ARKitPlugin 4.1.10, iphone12 pro with lidar. other scenes from the ARFoundationRemote plugin works on editor except the mesh example scene.

    the ARMeshManager is disabled when I run the MeshingExample scene on unity editor cause it can't get active XRMeshSubsystem.But I can't modify ARMeshManager to use the XRMeshManagerRemote from ARFoundationRemote. I Got the Warning following from ARMeshManager:

    warning: No active UnityEngine.XR.XRMeshSubsystem is available. Please ensure that a valid loader configuration exists in the XR project settings and that meshing is supported.

    warning: No active UnityEngine.XR.XRInputSubsystem is available. Please ensure that a valid loader configuration exists in the XR project settings.
     
  24. KyryloKuzyk

    KyryloKuzyk

    Joined:
    Nov 4, 2013
    Posts:
    1,145
    Please ensure that you're using the latest plugin version (1.4.25-release.0 or 2.0.25-release.0).
    If you are already, please file a bug report here:
    https://github.com/KirillKuzyk/AR-Foundation-Remote-support/issues/new/choose
     
  25. cyq45

    cyq45

    Joined:
    Feb 21, 2022
    Posts:
    5
    the plugin version I use is 2.0.16. Does the ARMeshManager work on this version? I want to know if this problem is from my side or from this version of the plugin.
     
  26. KyryloKuzyk

    KyryloKuzyk

    Joined:
    Nov 4, 2013
    Posts:
    1,145
    Yes, the ARMeshManager should work in this version. But I still recommend updating to the latest version.
     
  27. cyq45

    cyq45

    Joined:
    Feb 21, 2022
    Posts:
    5
    okay,I will. But I still wonder why I have this problem for this version.Do you have any idea about that?
     
  28. cyq45

    cyq45

    Joined:
    Feb 21, 2022
    Posts:
    5
    Hi, I have updating to the latest version(2.0.25), ARMeshManager can work now.But there is a error keep appearing when I don't connect the companion app.
    Error:
    Exception: AR Foundation Remote: blocking call failed because AR Companion app is not connected.
    ARFoundationRemote.Runtime.TelepathyConnection.ARFoundationRemote.Runtime.IConnection.BlockUntilReceive[ResponseType] (System.Guid guid) (at Library/PackageCache/com.kyrylokuzyk.arfoundationremote@6bd36c81a390-1660559073881/Runtime/Connection/TelepathyConnection.cs:209)
    ARFoundationRemote.Runtime.Connection.BlockUntilReceive[ResponseType] (ARFoundationRemote.Runtime.BlockingMessage payload) (at Library/PackageCache/com.kyrylokuzyk.arfoundationremote@6bd36c81a390-1660559073881/Runtime/Connection/Connection.cs:61)
    In the previous version I used there is a property " ARFoundationRemote.Runtime.Connection.Instance.isConnected " to judge if the companion app is connected,so there won't keep debug this error. Is there a way to check that at version 2.0.25?
     
  29. KyryloKuzyk

    KyryloKuzyk

    Joined:
    Nov 4, 2013
    Posts:
    1,145
    Yes, you can check if the AR Companion app is connected with this property. I recently moved this property to the ARFoundationRemoteUtils class for better encapsulation.
    Code (CSharp):
    1. ARFoundationRemote.Runtime.ARFoundationRemoteUtils.isConnected
    I'll add this info to the error message in the next plugin version, thank you for pointing that out!

    Alternatively, you can temporarily disable the plugin in the 'XR Plug-in Management' window when you don't need it.
     
    Last edited: Aug 16, 2022
  30. cyq45

    cyq45

    Joined:
    Feb 21, 2022
    Posts:
    5
    Yes, both work. but adding a check will be more convenient!
     
    KyryloKuzyk likes this.
  31. calculmentor

    calculmentor

    Joined:
    Jun 25, 2014
    Posts:
    11
    hi there !

    I'm facing some issues with the new release...
    get this error since the last upgrade:
    d3d11: failed to create 2D texture shader resource view id=897 [D3D error was 80070057]

    nothing big I guess !
    U2022, NO URP ARfoudation etc in 4.2.3

    thx in advance !
    .n.
     
  32. KyryloKuzyk

    KyryloKuzyk

    Joined:
    Nov 4, 2013
    Posts:
    1,145
    Hi,

    Could you please remember what has chanced since the last time there was no 'failed to create 2D texture' error?
    1. Have you updated Unity?
    2. Have you updated an AR Foundation package?
    3. Any other changes in your project?

    Or did the error appear after the plugin update? If this is the case, please fill out the bug report and tell me the last plugin version that worked for you.
    https://github.com/KirillKuzyk/AR-Foundation-Remote-support/issues/new/choose
     
  33. FLYUPAV

    FLYUPAV

    Joined:
    Aug 1, 2013
    Posts:
    34
    Hi

    I am getting this error:
    AR Foundation Remote: connection to AR Companion app failed. Please check that:
    1. Unity Editor and AR Device are on the same Wi-Fi network.
    2. AR Companion is running and device is unlocked.
    3. The IP is correct in Assets/Plugins/ARFoundationRemoteInstaller/Resources/Settings

    I checked all 3 steps but still failed to show anything on editor
     
  34. FLYUPAV

    FLYUPAV

    Joined:
    Aug 1, 2013
    Posts:
    34
    I could run meshing example one time, then I tried to lower the resolution. It starts crashing and I don't know which settings can fix this:
    ARCameraBackground calls CommandBuffer.IssuePluginEvent which crashes/freezes some versions of Unity.
     
  35. FLYUPAV

    FLYUPAV

    Joined:
    Aug 1, 2013
    Posts:
    34
    The issue is resolved.
    My question: how to connect the iPhone via USB without needing the wifi connection so it can work offline?
     
  36. KyryloKuzyk

    KyryloKuzyk

    Joined:
    Nov 4, 2013
    Posts:
    1,145
    Here is a quote from the documentation:
     
  37. FLYUPAV

    FLYUPAV

    Joined:
    Aug 1, 2013
    Posts:
    34
    Thanks!
    How do you think I can record the iPhone position while I am moving so I can generate the trajectory of the iPhone while I am moving in the environment?
     
  38. Hinne123

    Hinne123

    Joined:
    May 29, 2018
    Posts:
    3
    Hey Kirill,

    i just bought your awesome tool and trying to get some example scenes running. I setup my project, i built the companion app.

    The compass example seems to work. At least i get alternating heading values when i move my device. The background stays white.

    And now i am trying to run the PlaneAndCloudPointsExample, but i dont get the camera image streamed. The background stays white and nothing moves in the scene. The companions dont show any errors, but the Unity Editor Logs does:

    Code (CSharp):
    1. AssertionException: Assertion failure. Value was Null
    2. Expected: Value was not Null
    3. UnityEngine.Assertions.Assert.Fail (System.String message, System.String userMessage) (at <b2c530e619ab42aeba489c5671c82671>:0)
    4. UnityEngine.Assertions.Assert.IsNotNull[T] (T value, System.String message) (at <b2c530e619ab42aeba489c5671c82671>:0)
    5. UnityEngine.Assertions.Assert.IsNotNull[T] (T value) (at <b2c530e619ab42aeba489c5671c82671>:0)
    6. ARFoundationRemote.RuntimeEditor.MeshingReceiverNative.OnEnable () (at Library/PackageCache/com.kyrylokuzyk.arfoundationremote@838d2e123614-1660916640000/RuntimeEditor/Meshing/MeshingReceiverNative.cs:53)
    7. UnityEngine.GameObject:AddComponent()
    8. ARFoundationRemote.Runtime.Utils:CreatePersistentObject() (at Library/PackageCache/com.kyrylokuzyk.arfoundationremote@838d2e123614-1660916640000/Runtime/Utils/Utils.cs:34)
    9. ARFoundationRemote.RuntimeEditor.MeshingReceiverNative:initOnLoad() (at Library/PackageCache/com.kyrylokuzyk.arfoundationremote@838d2e123614-1660916640000/RuntimeEditor/Meshing/MeshingReceiverNative.cs:45)
    10.  
    11. No active UnityEngine.XR.ARSubsystems.XRSessionSubsystem is available. Please ensure that a valid loader configuration exists in the XR project settings.
    12. UnityEngine.XR.ARFoundation.ARSession:OnEnable () (at Library/PackageCache/com.unity.xr.arfoundation@4.2.3/Runtime/AR/ARSession.cs:341)
    13.  
    14. No active UnityEngine.XR.XRInputSubsystem is available. Please ensure that a valid loader configuration exists in the XR project settings.
    15. UnityEngine.XR.ARFoundation.ARInputManager:OnEnable () (at Library/PackageCache/com.unity.xr.arfoundation@4.2.3/Runtime/AR/ARInputManager.cs:24)
    16.  
    17. No active UnityEngine.XR.ARSubsystems.XRDepthSubsystem is available. Please ensure that a valid loader configuration exists in the XR project settings.
    18. UnityEngine.XR.ARFoundation.ARPointCloudManager:OnEnable ()
    19. ARFoundationRemoteExamples.SetupARFoundationVersionSpecificComponents:init () (at Assets/Samples/AR Foundation Remote/2.0.26-release.0/Examples/Scripts/SetupARFoundationVersionSpecificComponents.cs:86)
    20. ARFoundationRemoteExamples.SetupARFoundationVersionSpecificComponents:initIfNeeded () (at Assets/Samples/AR Foundation Remote/2.0.26-release.0/Examples/Scripts/SetupARFoundationVersionSpecificComponents.cs:69)
    21. ARFoundationRemoteExamples.SetupARFoundationVersionSpecificComponents:Awake () (at Assets/Samples/AR Foundation Remote/2.0.26-release.0/Examples/Scripts/SetupARFoundationVersionSpecificComponents.cs:64)
    22.  
    23. No active UnityEngine.XR.ARSubsystems.XRRaycastSubsystem is available. Please ensure that a valid loader configuration exists in the XR project settings.
    24. UnityEngine.XR.ARFoundation.ARTrackableManager`5<UnityEngine.XR.ARSubsystems.XRRaycastSubsystem, UnityEngine.XR.ARSubsystems.XRRaycastSubsystemDescriptor, UnityEngine.XR.ARSubsystems.XRRaycastSubsystem/Provider, UnityEngine.XR.ARSubsystems.XRRaycast, UnityEngine.XR.ARFoundation.ARRaycast>:OnEnable ()
    25. ARFoundationRemoteExamples.SetupARFoundationVersionSpecificComponents:init () (at Assets/Samples/AR Foundation Remote/2.0.26-release.0/Examples/Scripts/SetupARFoundationVersionSpecificComponents.cs:86)
    26. ARFoundationRemoteExamples.SetupARFoundationVersionSpecificComponents:initIfNeeded () (at Assets/Samples/AR Foundation Remote/2.0.26-release.0/Examples/Scripts/SetupARFoundationVersionSpecificComponents.cs:69)
    27. ARFoundationRemoteExamples.SetupARFoundationVersionSpecificComponents:Awake () (at Assets/Samples/AR Foundation Remote/2.0.26-release.0/Examples/Scripts/SetupARFoundationVersionSpecificComponents.cs:64)
    28.  
    29. No active UnityEngine.XR.ARSubsystems.XRAnchorSubsystem is available. Please ensure that a valid loader configuration exists in the XR project settings.
    30. UnityEngine.XR.ARFoundation.ARTrackableManager`5<UnityEngine.XR.ARSubsystems.XRAnchorSubsystem, UnityEngine.XR.ARSubsystems.XRAnchorSubsystemDescriptor, UnityEngine.XR.ARSubsystems.XRAnchorSubsystem/Provider, UnityEngine.XR.ARSubsystems.XRAnchor, UnityEngine.XR.ARFoundation.ARAnchor>:OnEnable ()
    31. ARFoundationRemoteExamples.SetupARFoundationVersionSpecificComponents:init () (at Assets/Samples/AR Foundation Remote/2.0.26-release.0/Examples/Scripts/SetupARFoundationVersionSpecificComponents.cs:86)
    32. ARFoundationRemoteExamples.SetupARFoundationVersionSpecificComponents:initIfNeeded () (at Assets/Samples/AR Foundation Remote/2.0.26-release.0/Examples/Scripts/SetupARFoundationVersionSpecificComponents.cs:69)
    33. ARFoundationRemoteExamples.SetupARFoundationVersionSpecificComponents:Awake () (at Assets/Samples/AR Foundation Remote/2.0.26-release.0/Examples/Scripts/SetupARFoundationVersionSpecificComponents.cs:64)
    34.  
    35. No active UnityEngine.XR.ARSubsystems.XRPlaneSubsystem is available. Please ensure that a valid loader configuration exists in the XR project settings.
    36. UnityEngine.XR.ARFoundation.ARPlaneManager:OnEnable ()
    37. ARFoundationRemoteExamples.SetupARFoundationVersionSpecificComponents:init () (at Assets/Samples/AR Foundation Remote/2.0.26-release.0/Examples/Scripts/SetupARFoundationVersionSpecificComponents.cs:86)
    38. ARFoundationRemoteExamples.SetupARFoundationVersionSpecificComponents:initIfNeeded () (at Assets/Samples/AR Foundation Remote/2.0.26-release.0/Examples/Scripts/SetupARFoundationVersionSpecificComponents.cs:69)
    39. ARFoundationRemoteExamples.SetupARFoundationVersionSpecificComponents:Awake () (at Assets/Samples/AR Foundation Remote/2.0.26-release.0/Examples/Scripts/SetupARFoundationVersionSpecificComponents.cs:64)
    40.  
    41. No active UnityEngine.XR.ARSubsystems.XRCameraSubsystem is available. Please ensure that a valid loader configuration exists in the XR project settings.
    42. UnityEngine.XR.ARFoundation.SubsystemLifecycleManager`3<UnityEngine.XR.ARSubsystems.XRCameraSubsystem, UnityEngine.XR.ARSubsystems.XRCameraSubsystemDescriptor, UnityEngine.XR.ARSubsystems.XRCameraSubsystem/Provider>:OnEnable ()
    43. ARFoundationRemoteExamples.SetupARFoundationVersionSpecificComponents:init () (at Assets/Samples/AR Foundation Remote/2.0.26-release.0/Examples/Scripts/SetupARFoundationVersionSpecificComponents.cs:142)
    44. ARFoundationRemoteExamples.SetupARFoundationVersionSpecificComponents:initIfNeeded () (at Assets/Samples/AR Foundation Remote/2.0.26-release.0/Examples/Scripts/SetupARFoundationVersionSpecificComponents.cs:69)
    45. ARFoundationRemoteExamples.SetupARFoundationVersionSpecificComponents:Awake () (at Assets/Samples/AR Foundation Remote/2.0.26-release.0/Examples/Scripts/SetupARFoundationVersionSpecificComponents.cs:64)
    46.  
    47. AssertionException: Assertion failure. Value was False
    48. Expected: True
    49. UnityEngine.Assertions.Assert.Fail (System.String message, System.String userMessage) (at <b2c530e619ab42aeba489c5671c82671>:0)
    50. UnityEngine.Assertions.Assert.IsTrue (System.Boolean condition, System.String message) (at <b2c530e619ab42aeba489c5671c82671>:0)
    51. UnityEngine.Assertions.Assert.IsTrue (System.Boolean condition) (at <b2c530e619ab42aeba489c5671c82671>:0)
    52. ARFoundationRemote.Runtime.TelepathyConnection.unregister_internal[T] () (at Library/PackageCache/com.kyrylokuzyk.arfoundationremote@838d2e123614-1660916640000/Runtime/Connection/TelepathyConnection.cs:193)
    53. ARFoundationRemote.Runtime.TelepathyConnection.ARFoundationRemote.Runtime.IConnection.UnRegister[T] () (at Library/PackageCache/com.kyrylokuzyk.arfoundationremote@838d2e123614-1660916640000/Runtime/Connection/TelepathyConnection.cs:188)
    54. ARFoundationRemote.Runtime.Connection.UnRegister[T] () (at Library/PackageCache/com.kyrylokuzyk.arfoundationremote@838d2e123614-1660916640000/Runtime/Connection/Connection.cs:81)
    55. ARFoundationRemote.RuntimeEditor.MeshingReceiverNative.OnDisable () (at Library/PackageCache/com.kyrylokuzyk.arfoundationremote@838d2e123614-1660916640000/RuntimeEditor/Meshing/MeshingReceiverNative.cs:70)
    56.  
    57. AR Foundation Remote: XRLoaderHelper.Deinitialize() wasn't called before exiting play mode. Did you load a new Editor scene without stopping the previous scene? Doing this will break AR Foundation until the next domain reload.
    58.  
    59. UnityEngine.Debug:LogError (object)
    60. ARFoundationRemote.RuntimeEditor.Receiver:onPlaymodeStateChanged (UnityEditor.PlayModeStateChange) (at Library/PackageCache/com.kyrylokuzyk.arfoundationremote@838d2e123614-1660916640000/RuntimeEditor/Receiver/Receiver.cs:56)
    61. UnityEditor.EditorApplication:Internal_PlayModeStateChanged (UnityEditor.PlayModeStateChange)
    62.  

    In ProjectSettings/XR Plug-in Management Settings(Android) "Initialize XR on Startup" and ARCore is activated. Plattform is Android, too.
     
    Last edited: Aug 29, 2022
  39. KyryloKuzyk

    KyryloKuzyk

    Joined:
    Nov 4, 2013
    Posts:
    1,145
    Here is a general idea. Every frame save a pair of [device's position, Time.unscaledTime] to a list. Then, to play back the recording, apply the saved position when the time is right.
     
  40. KyryloKuzyk

    KyryloKuzyk

    Joined:
    Nov 4, 2013
    Posts:
    1,145
    The key error is this one:
    This is a minor bug in Unity/AR Foundation. To prevent it, please don't open new scenes while another is already running.

    Please make sure that the 'AR Foundation Remote' checkbox is ticked in the Standalone tab.
     
  41. srtSteel

    srtSteel

    Joined:
    Dec 11, 2015
    Posts:
    5
    Hi! Will the plugin work with body tracking in unity mars session?
     
  42. KyryloKuzyk

    KyryloKuzyk

    Joined:
    Nov 4, 2013
    Posts:
    1,145
    Hi,

    I haven't tested the plugin with MARS and none of my customers reported compatibility with it. So, unfortunately, the answer is most probably "no".
     
  43. Falondrian

    Falondrian

    Joined:
    Nov 1, 2017
    Posts:
    74
    Hi, been happily using version 1 for several months and thinking of upgrading to v2. Could you please give a quick overview of how v2 compares to the new AR Foundation Simulation?
     
    KyryloKuzyk likes this.
  44. KyryloKuzyk

    KyryloKuzyk

    Joined:
    Nov 4, 2013
    Posts:
    1,145
    It's better to compare v2 to v1. Additionally to v1, v2 brings these new features: Input System (New) support, Session Recording and Playback, and ARCore Cloud Anchors support. You can read a more detailed overview in this blog post.

    It's harder to compare the AR Foundation Remote plugin to the AR Foundation Simulation though as they serve different purposes.

    The Simulation feature:
    + Is quicker to set up. Also, slightly quicker to iterate because you don't have to interact with a real AR device.
    - Produces an approximate behavior of a given AR feature.
    - Supports fewer AR features as of the time of writing.
    - Is supported starting from AR Foundation 5.0.

    The AR Foundation Remote plugin:
    + Precisely replicates the behavior of a real AR device in the Editor.
    + Supports almost all AR features.
    + Works with all AR Foundation versions starting from 3.0.1.
    - Requires you to build the AR Companion app once.
     
    Last edited: Sep 15, 2022
    Falondrian likes this.
  45. Bersaelor

    Bersaelor

    Joined:
    Oct 8, 2016
    Posts:
    111
    @KirillKuzyk so, I noticed in my tests with Image Tracking, the images tracked using the Editor (and AR Remote 2.0.23-release.2 ) seem to be 25% bigger then when run via Xcode on device.
    I.e. my tracked image is 19cm x 19cm, If I put a quad with scale "0.19" in the spot it will match when run on device.
    When I run it in the editor though, the same asset will be much larger then the real-life image.
     
  46. KyryloKuzyk

    KyryloKuzyk

    Joined:
    Nov 4, 2013
    Posts:
    1,145
    Hmm, this is weird. Could you please share the piece of code that is responsible for tracked image visualization?
    Is there a chance your code is resolution-dependent and your Game View resolution is different from the resolution of your AR device?
     
  47. WayneVenter

    WayneVenter

    Joined:
    May 8, 2019
    Posts:
    56
    I'm having a strange build error after adding the package.
    Unity 2021.3.11f, latest verion 2 package from asset store.

    I export via unity and then use Android Studio to build, if I remote the plugin the build if fine.

    Failing in build.gradle

    exec {
    executable workingDir + "/src/main/Il2CppOutputProject/IL2CPP/build/deploy/il2cpp" + executableExtension
    args commandLineArgs
    environment "ANDROID_SDK_ROOT", getSdkDir()
    }

    Error:
    Build file 'C:\...\unityLibrary\build.gradle' line: 74
    Execution failed for task ':unityLibrary:BuildIl2CppTask'.
    > Process 'command 'C:/.../unityLibrary/src/main/Il2CppOutputProject/IL2CPP/build/deploy/il2cpp.exe'' finished with non-zero exit value 4
     
  48. WayneVenter

    WayneVenter

    Joined:
    May 8, 2019
    Posts:
    56
    But what makes it so weird is that when I use the version 1.4.21-release0 (I have both v1 and v2) it builds fine.
    The only difference is that v2 is not embded and v1 is.
     
  49. WayneVenter

    WayneVenter

    Joined:
    May 8, 2019
    Posts:
    56
    OK, update on this, seems issue is with 2021.3.11f, I downgraded to 2021.3.10f and SDK 32 and build tools 33 and gradle 7.22, man Android Studio and Unity is a comabatibility nightmare.
     
    KyryloKuzyk likes this.
  50. WayneVenter

    WayneVenter

    Joined:
    May 8, 2019
    Posts:
    56
    More on this, the issue starts when I update AR Foundation from 4.2.4 to 4.2.6, I then get this error on NativeApi_Unity_Camera_GetTextureReleaseCallbackHandle

    Error: Unity.IL2CPP.Building.BuilderFailedException: Build failed with 0 successful nodes and 1 failed ones
    Annotation: Link_Android_arm64 d8kz/libil2cpp.so
    Cmdline: "C:/Program Files/Unity/Hub/Editor/2021.3.9f1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++" @"C:\UnityExports\...\unityLibrary\build\il2cpp_arm64-v8a_Release\il2cpp_cache\buildstate\artifacts\rsp\1729919944154292146.rsp"
    ExitCode: 1
    Unity.IL2CPP.Building.BuilderFailedException: Build failed with 0 successful nodes and 1 failed ones
    rsp: -march=armv8-a -D__ANDROID_API__=22 -DANDROID -DHAVE_INTTYPES_H -no-canonical-prefixes -funwind-tables -fstack-protector -fdiagnostics-format=msvc -fomit-frame-pointer -std=c++11 -Wswitch -Wno-trigraphs -Wno-tautological-compare -Wno-invalid-offsetof -Wno-implicitly-unsigned-literal -Wno-integer-overflow -Wno-shift-negative-value -Wno-unknown-attributes -Wno-implicit-function-declaration -Wno-null-conversion -Wno-missing-declarations -Wno-unused-value -Wno-pragma-once-outside-header -fvisibility=hidden -fexceptions -fno-rtti -g -Os -fPIC -fno-strict-overflow -ffunction-sections -fdata-sections -fmessage-length=0 -pipe -o "d8kz/libil2cpp.so" -fcolor-diagnostics -fdiagnostics-absolute-paths -target aarch64-linux-android22 -fstrict-aliasing -fdiagnostics-format=msvc -l"log"
    Stdout:
    d8kz/6j7j_Foundation.o: In function `NativeApi_Unity_Camera_GetTextureReleaseCallbackHandle_mE47CA8055086B0B93F98C7566BFC95CF18C454FF':
    C:/UnityExports/.../unityLibrary/src/main/Il2CppOutputProject/Source/il2cppOutput/Unity.XR.ARFoundation.cpp:13561: undefined reference to `UnityARKit_Camera_GetTextureReleaseCallbackHandle'
    C:/UnityExports/.../unityLibrary/src/main/Il2CppOutputProject/Source/il2cppOutput/Unity.XR.ARFoundation.cpp:13561: undefined reference to `UnityARKit_Camera_GetTextureReleaseCallbackHandle'
    C:/UnityExports/.../unityLibrary/src/main/Il2CppOutputProject/Source/il2cppOutput/Unity.XR.ARFoundation.cpp:13561: undefined reference to `UnityARKit_Camera_GetTextureReleaseCallbackHandle'
    clang++: error: linker command failed with exit code 1 (use -v to see invocation)
    at il2cpp.Program.DoRun(String[] args, RuntimePlatform platform, Il2CppCommandLineArguments il2CppCommandLineArguments, BuildingOptions buildingOptions, Boolean throwExceptions)
    > Task :unityLibrary:BuildIl2CppTask FAILED