Search Unity

Official AR Foundation v5.0

Discussion in 'AR' started by tropicdragon_unity, Aug 24, 2022.

  1. andyb-unity

    andyb-unity

    Unity Technologies

    Joined:
    Feb 10, 2022
    Posts:
    1,062
    Hi @Dan4x8,

    I believe the issue observed by @Kasperknop above is the same as this one: https://github.com/Unity-Technologies/arfoundation-samples/issues/1063

    We will post updates to that GitHub issue link as our investigation progresses. We believe this issue might be caused by the new Input System although our investigation is ongoing. For now the only way to achieve frame-perfect sync between camera and tracking data is to remain on AR Foundation 4.2.
     
  2. Flavelius

    Flavelius

    Joined:
    Jul 8, 2012
    Posts:
    945
    When using the simulator, regular objects aswell as tracked planes in the scene don't show up in the game view (only the simulation environment and overlay ui in my case). Only when i manually set the SimulatedCamera's culling mask in the editor to their layer (it's set to none by default). The XR Origin camera's culling mask seems to be unused as long as the Ar camera background component is active.
    Is this expected or does it require another setup step that i missed?
    ubuntu 22.10, Unity 2021.3.20f1, Standard pipeline, Ar foundation 5.1.0-pre.3

    Edit: it's the ARCameraBackground component, that's faulty. It just renders the simulated camera output on top.
     
    Last edited: Apr 7, 2023
  3. unity_qFF5lyej1cOtRg

    unity_qFF5lyej1cOtRg

    Joined:
    Oct 11, 2020
    Posts:
    1
    Hi! I'm working with an AR project on Unity 23.1 and as soon as I check google ARcore in my project settings I get this:

    Library\PackageCache\com.unity.xr.arfoundation@5.0.5\Runtime\InternalUtils\FindObjectsUtility.cs(66,27): error CS0117: 'Object' does not contain a definition for 'FindObjectsByType'

    Library\PackageCache\com.unity.xr.arfoundation@5.0.5\Runtime\InternalUtils\FindObjectsUtility.cs(66,48): error CS0103: The name 'FindObjectsSortMode' does not exist in the current context

    Has anyone ever seen this?
     
  4. CiaranWills

    CiaranWills

    Unity Technologies

    Joined:
    Apr 24, 2020
    Posts:
    199
  5. andyb-unity

    andyb-unity

    Unity Technologies

    Joined:
    Feb 10, 2022
    Posts:
    1,062
    @unity_qFF5lyej1cOtRg 2023.1 is currently in beta. You are likely running on an older version of 2023.1 before these new API members were added (beta 4 if I remember correctly).

    The solution here is to update to the latest patch of 2023.1, or downgrade to an older version of AR Foundation.
     
  6. UnitDan

    UnitDan

    Joined:
    Feb 4, 2019
    Posts:
    12
    I have the same issue. Thanks Flavelius, the culling mask does the trick for now. Using Unity 2022.2.10, URP 14.0.6, ArFoundation 5.0.5.
     
    Last edited: Apr 24, 2023
  7. andyb-unity

    andyb-unity

    Unity Technologies

    Joined:
    Feb 10, 2022
    Posts:
    1,062
    makaka-org likes this.
  8. makaka-org

    makaka-org

    Joined:
    Dec 1, 2013
    Posts:
    1,026
  9. Thaina

    Thaina

    Joined:
    Jul 13, 2012
    Posts:
    1,168
    makaka-org likes this.
  10. makaka-org

    makaka-org

    Joined:
    Dec 1, 2013
    Posts:
    1,026
    Just to log the answer for other users because the staff didn't answer you on this forum
     
    Thaina likes this.
  11. Vineet7088

    Vineet7088

    Joined:
    May 17, 2023
    Posts:
    1
    MakeContentAppearAt(content, content.transform.position, m_Rotation);

    for the ARSessionOrigin this is still not resoved
     
    makaka-org likes this.
  12. makaka-org

    makaka-org

    Joined:
    Dec 1, 2013
    Posts:
    1,026
  13. andyb-unity

    andyb-unity

    Unity Technologies

    Joined:
    Feb 10, 2022
    Posts:
    1,062
    makaka-org likes this.
  14. GameFinder

    GameFinder

    Joined:
    Jan 7, 2015
    Posts:
    17
  15. makaka-org

    makaka-org

    Joined:
    Dec 1, 2013
    Posts:
    1,026
  16. unity_andrewc

    unity_andrewc

    Unity Technologies

    Joined:
    Dec 14, 2015
    Posts:
    223
    Hand-tracking is exposed through the XR Hands package: https://docs.unity3d.com/Packages/com.unity.xr.hands@1.2/manual/index.html.

    Also, there is a new dedicated visionOS forum where you can reach folks more likely to have the relevant experience to help: https://forum.unity.com/forums/visionos.968/
     
    GameFinder and makaka-org like this.
  17. GameFinder

    GameFinder

    Joined:
    Jan 7, 2015
    Posts:
    17
  18. Cybertiger

    Cybertiger

    Joined:
    Dec 19, 2013
    Posts:
    35
    Tried version 5.1.0 and i get this error here using unity 2022.3.9:
    Code (CSharp):
    1. Library\PackageCache\com.unity.xr.arfoundation@5.1.0\Runtime\VisualScripting\Units\Events\EventUnits\SessionStateChangedEventUnit.cs(50,30): error CS0506: 'SessionStateChangedEventUnit.StopListening(GraphStack)': cannot override inherited member 'EventUnit<ARSessionState>.StopListening(GraphStack)' because it is not marked virtual, abstract, or override
     
    Last edited: Oct 4, 2023
  19. andyb-unity

    andyb-unity

    Unity Technologies

    Joined:
    Feb 10, 2022
    Posts:
    1,062
    @Cybertiger The issue here is that the Unity Visual Scripting team inappropriately allowed breaking changes in their minor version release 1.9.0. They have since fixed the issue in 1.9.1. If your project doesn't use Visual Scripting, you can remove the package from your project (it's installed by default): https://docs.unity3d.com/Manual/upm-ui-remove.html, or you should upgrade your Visual Scripting version to 1.9.1.

    The next patch of the 2022 LTS will also use 1.9.1 instead of 1.9.0 but unfortunately they built this Editor containing the breaking change.
     
  20. Archi_16

    Archi_16

    Joined:
    Apr 7, 2017
    Posts:
    87
    Hi there. I have question regarding to Light Estimation.
    On ARCameraManager I have set "Everything" on Light Estimation drop down list.
    In the code, I get all variables. and use them:

    1. var maincolor = obj.lightEstimation.mainLightColor;
    2. var mainLightDirection = obj.lightEstimation.mainLightDirection;
    3. var colorCorrection = obj.lightEstimation.colorCorrection;
    4. var averageBrightness = obj.lightEstimation.averageBrightness;
    5. var averageColorTemperature = obj.lightEstimation.averageColorTemperature;
    6. var averageIntensityInLumens = obj.lightEstimation.averageIntensityInLumens;
    7. var averageMainLightBrightness = obj.lightEstimation.averageMainLightBrightness;

    But only 1 and 2 has values. changing "Everything" to each one only, results same thing, on some cases only 4 and 6 only work.

    Question is, i want to use light direction and averageIntensityInLumens(or averageMainLightBrightness, or averageBrightness) to control main light intensity and angle. so how to do it?
     
  21. Archi_16

    Archi_16

    Joined:
    Apr 7, 2017
    Posts:
    87
    And on IOS Selecting "Eveything" turns to front camera :( Have you tested this before releasing? :)
     
  22. makaka-org

    makaka-org

    Joined:
    Dec 1, 2013
    Posts:
    1,026
    It depends on the platform and specific device. It changes values that are available for your device.
     
    andyb-unity likes this.
  23. andyb-unity

    andyb-unity

    Unity Technologies

    Joined:
    Feb 10, 2022
    Posts:
    1,062
    @Archi_16 Your requested light estimation values are used by the configuration chooser to determine the configuration that meets the highest number of requested features. More information here:


    Yes.
     
    KyryloKuzyk likes this.
  24. Archi_16

    Archi_16

    Joined:
    Apr 7, 2017
    Posts:
    87

    Hello @andyb-unity thanks for your reply. is there and updated configuration list for ARfoundation 5 (and why not for 6), or it is all the same?
    As for now i enabled the Main light direction and intensity, and only direction and color have value, the intensity has not.
    Thanks.
     
    Last edited: Oct 30, 2023
  25. andyb-unity

    andyb-unity

    Unity Technologies

    Joined:
    Feb 10, 2022
    Posts:
    1,062
    @Archi_16 The list of available configurations comes from your device. AR Foundation does not include any pre-built configuration lists.
     
  26. Archi_16

    Archi_16

    Joined:
    Apr 7, 2017
    Posts:
    87
    Unity 2022.3.5, ARFoundation/ARCore 5.0.7, Soft shadow works perfectly.
    Unity 2022.3.11(12 as well), ARFoundation/ARcore 5.1.0, soft shadow doesn't work on Android(haven't tested other platforms, but in editor it works)

    When i turn off Google ARCore from XR Plug-in Management, soft shadows are working again
     
    Last edited: Oct 31, 2023
  27. andyb-unity

    andyb-unity

    Unity Technologies

    Joined:
    Feb 10, 2022
    Posts:
    1,062
    I've never heard of this issue. Please file a bug. Note our FAQ:

     
  28. acme3D

    acme3D

    Joined:
    Feb 4, 2009
    Posts:
    203
    Is this working ok with URP on Unity LTS 2021.3.29 on iOS? Having a lot of problems after I switched to URP (black background, trails)
     
  29. slim_sheady

    slim_sheady

    Joined:
    Mar 23, 2020
    Posts:
    3
    Is there any simple way to implement an in-app photo capture?
    I feel like users would want to save pictures of themselves or the AR experience they're in. I would expect this to be an obvious feature to have in the samples repo but I could not find an example anywhere in the whole AR Foundation samples project.
    A screenshot includes UI and is not as user friendly when they have to press a physical button on the side of the device, nor does it capture video.
     
    makaka-org likes this.
  30. makaka-org

    makaka-org

    Joined:
    Dec 1, 2013
    Posts:
    1,026
    There is an asset called Native Gallery for Android & iOS which provides saving your image in the Gallery app on mobile phone by default as well as the example of making a screenshot. Here you can add mechanics that hide UI during the screenshot.
     
    slim_sheady likes this.