Search Unity

Resolved Issue with AR core Extensions package

Discussion in 'AR' started by Intraterrestrial_, Aug 11, 2022.

?

Playback for ARCore extensions doesnt work, there is no session object anywhere

  1. maybe using somewhere

    0 vote(s)
    0.0%
  2. there is no playback support rigth now...

    0 vote(s)
    0.0%
  1. Intraterrestrial_

    Intraterrestrial_

    Joined:
    Jun 27, 2021
    Posts:
    20
    I installed ARCore Extensions package from here
    https://developers.google.com/ar/develop/unity-arf/getting-started-extensions
    Then i managed to record a scene with record and playback but when i try to playback it doesnt work my code is

    Code (CSharp):
    1. public ARSession m_Session;
    2.     public void loadSceneMP4(string path){
    3.         if (m_Session.subsystem is ARCoreSessionSubsystem subsystem){
    4.             var session = subsystem.session;
    5.             session.enabled = false;
    6.             session.SetPlaybackDataset(path);
    7.             session.enabled = true;
    8.         }
    9.     }
    it throws me this error
    'ARCoreSessionSubsystem' does not contain a definition for 'session' and no accessible extension method 'session' accepting a first argument of type 'ARCoreSessionSubsystem' could be found
    so my question is how i get it to work, in docs there is no info how to implement playback with arcore using unity.

    Someone tell me i can follow this code in
    https://github.com/Unity-Technologi...Assets/Scenes/ARCore/ARCoreSessionRecorder.cs
    But as noted it doesnt work i think is for old version of arcore for unity...
    So how i get it to work?
    i want to playback video thats all

    note i follow this
    https://developers.google.com/ar/develop/unity/recording-and-playback/developer-guide
    i found there is no session object anywhere and ARSession doesnt have any playback method
    Thanks for time to read i hope i get an answer
     
  2. andyb-unity

    andyb-unity

    Unity Technologies

    Joined:
    Feb 10, 2022
    Posts:
    1,062
    Note that the documentation you are using is deprecated:

    Caution: This page documents the ARCore SDK for Unity, which is deprecated, and no longer supported in Unity 2020 and later. This SDK should only be used by developers working on existing projects which are unable to migrate to Unity's AR Foundation.
    Google has updated documentation available here: https://developers.google.com/ar/develop/unity-arf/recording-and-playback/developer-guide
     
  3. Intraterrestrial_

    Intraterrestrial_

    Joined:
    Jun 27, 2021
    Posts:
    20
    for some reason i cant get it to work with that documentation, i dont know if i am missing a namespace or something but google docs didnt help thats why i was trying that github code form a depreceated version
     
    Last edited: Aug 16, 2022
  4. Intraterrestrial_

    Intraterrestrial_

    Joined:
    Jun 27, 2021
    Posts:
    20
    i think it could be that i am using AR Foundation (some version) and playback is available in this other version, i dont remember where i saw it but in my package manager of unity 2020.3 there is no apparent update for any AR packages, i have version 4.1.10 and i read that playback was available in a new version, (i dont remember where i read it) so i will try with a newer version of unity maybe it should appear an update in package manager... i dont know
     
  5. andyb-unity

    andyb-unity

    Unity Technologies

    Joined:
    Feb 10, 2022
    Posts:
    1,062
  6. andyb-unity

    andyb-unity

    Unity Technologies

    Joined:
    Feb 10, 2022
    Posts:
    1,062
    You should be able to update to 4.2 via the Package Manager in Unity 2020. If you don't see it as an option, you can open Packages/manifest.json from the root of your project, find the lines containing com.unity.xr.arfoundation, com.unity.xr.arsubsystems, and com.unity.xr.arcore, and type in 4.2.3 as the version number.
     
  7. Intraterrestrial_

    Intraterrestrial_

    Joined:
    Jun 27, 2021
    Posts:
    20
    Ok i managed to compile now i will try it on android, thanks
     
    andyb-unity likes this.
  8. Intraterrestrial_

    Intraterrestrial_

    Joined:
    Jun 27, 2021
    Posts:
    20
    I have a new issue when i call
    Code (CSharp):
    1. session.SetPlaybackDataset(path);
    it crashes but i will do another post thanks for replying