Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question AR Foundation Samples Not Compiling

Discussion in 'AR' started by wiltabone, Mar 18, 2021.

  1. wiltabone

    wiltabone

    Joined:
    Oct 30, 2015
    Posts:
    9
    Hi,

    I have been trying to successfully get the AR foundation samples working on iOS for a couple of days now.
    Tried different editors (2021.x, 2020.x, 2019.x) and versions of the branch.
    On the 2021 using the latest branch I kept getting libil2cpp errors.

    Now with 2019.4.19fl with downgrading to ARFoundation 4.1.1, I get errors with the ARCoreSessionRecorder.cs.
    Multiples of: Assets/Scenes/ARCore/ARCoreSessionRecorder.cs(76,40): error CS1519: Invalid token '=>' in class, struct, or interface member declaration

    If I delete that directory, I then get errors related to the UX files.

    Is there any version of the samples that is actually verified to work with a particular Unity version and AR Foundation please? They seem to not be working in different ways on anything I try at the moment ...

    Thanks
     
  2. KyryloKuzyk

    KyryloKuzyk

    Joined:
    Nov 4, 2013
    Posts:
    1,121
  3. TreyK-47

    TreyK-47

    Unity Technologies

    Joined:
    Oct 22, 2019
    Posts:
    1,810
    So, @KirillKuzyk's answer is wrong and right. :)

    ARCoreSessionRecorder.cs has recently been added to the repository.

    But it is correct that the repository required Unity 2020 as a minimum.
     
    KyryloKuzyk likes this.
  4. KyryloKuzyk

    KyryloKuzyk

    Joined:
    Nov 4, 2013
    Posts:
    1,121
    @TreyK-47 my bad, the ARCoreSessionRecorder.cs was added recently to support the AR Foundation 4.2.0-pre.2.
    @wiltabone, so the issue was in the old Unity version that didn't support new C# features.
     
    TreyK-47 likes this.