Search Unity

  1. Read here for Unity's latest plans on OpenXR.
    Dismiss Notice

Resolved error CS0117: 'BuildPipeline' does not contain a definition for 'GetBuildTargetName'

Discussion in 'XR Interaction Toolkit and Input' started by hblanc, Jan 22, 2021.

Thread Status:
Not open for further replies.
  1. hblanc

    hblanc

    Joined:
    Jan 19, 2021
    Posts:
    1
    Hello community ! I'm on a AR project in Unity ( I try to do a mobile application for iOS using the AR camera to see 3D objects).

    My unity version is 2019.4.12f1.
    When I create a 3D project I download these packages :
    -AR Foundation
    -XR Plugin Management
    -AR Kit XR Plugin. (the one that make my problems happen)

    My console says : Library/PackageCache/com.unity.xr.management@3.2.17/Editor/XRGeneralBuildProcessor.cs(39,52): error CS0117: 'BuildPipeline' does not contain a definition for 'GetBuildTargetName'

    I searched help on lots of forum but I can't solve this error. Some solutions were given and worked for some people like "Reset the packages on Help" and others...

    Can anyone help me ? Thanks !!!
     
    khanhabib and mtlight like this.
  2. Lisasz

    Lisasz

    Joined:
    Dec 10, 2015
    Posts:
    2
    Had the same problem and found the solution here:
    https://answers.unity.com/questions/1795233/unity-hdrp-giving-error.html

    Had to remove AR Foundation in the Package Manager first, then downgraded XR Plugin Management to 3.2.16, then reinstalled AR Foundation.

    Also had to downgrade AR Foundation and ARKit XR Plugin, both to version 4.1.1, as recommended in the thread linked above!
     
    Last edited: Jan 22, 2021
  3. TreyK-47

    TreyK-47

    Unity Technologies

    Joined:
    Oct 22, 2019
    Posts:
    1,664
    Additionally, your Unity version must be at least 2019.4.15f1. :)
     
  4. Autarkis

    Autarkis

    Joined:
    Oct 10, 2011
    Posts:
    311
    @TreyK-47 coming in hot with that Unity version tip! Thanks.
     
    TreyK-47 likes this.
  5. simonm_unity283

    simonm_unity283

    Joined:
    Oct 5, 2020
    Posts:
    3
    This issue also happened for me on Unity 2020.1.4f1. The problem fixed itself when I updated to Unity 2020.1.17f1
     
    rushi1962 and TreyK-47 like this.
  6. Raphster

    Raphster

    Joined:
    Feb 8, 2021
    Posts:
    1
    Help-> Reset Packages to defaults worked for me
     
  7. Skeldal

    Skeldal

    Joined:
    Apr 30, 2019
    Posts:
    10
    For me this bug comes with upgrading Oculus XR Toolkit from 1.4.3 to 1.8.1 because I wanted support for Oculus Quest 90fps. It invisibly brought update of XR Plugin Management from 3.2.16 to 4.0.1. My solution was to reset to last working commit, delete library and then install first version of Oculus XR Toolkit that brings 90fps support but does not require XR Plugin Management update (in my case Oculus XR Toolkit v 1.7.0). I have simply tried resist updating Unity to the last moment as it may bring bunch of new problems :)
     
    kahunamoore likes this.
  8. khanhabib

    khanhabib

    Joined:
    Oct 11, 2018
    Posts:
    19
    ARFoundation and XR Plugin management works fine but when i add ARCore XR plugin then erros occur
     
  9. jorgemattei

    jorgemattei

    Joined:
    Mar 17, 2021
    Posts:
    2
    Hi! I'm encountering the same issue @khanhabib is having. As soon as I add ARCore XR Plugin that error occurs.
     
    khanhabib likes this.
  10. jorgemattei

    jorgemattei

    Joined:
    Mar 17, 2021
    Posts:
    2
    Hi @khanhabib,

    I found a solution myself. I ended up downgrading ARFoundation, ArKir, ARCore to 4.1.1 and XR Plugin Management to 3.2.16.

    Remember to change ARCore, ARKit and AR Foundation before downgrading XR PluginManagement, as it is a dependency.
     
    kahunamoore and khanhabib like this.
  11. mcbauer

    mcbauer

    Joined:
    Oct 10, 2015
    Posts:
    448
    I find it pretty sad that this error still happens on a fresh project install using the templates.

    Unity 2020.1.7f1
    AR Template

    Compiler error -> 'BuildPipeline' does not contain a definition for 'GetBuildTargetName'

    Help -> Reset Packages

    Install -> XR Plugin 3.2.17
    Install -> AR Foundation 3.1.10
    Install -> ARCore 3.1.10

    Compiler Error -> 'BuildPipeline' does not contain a definition for 'GetBuildTargetName'

    Is downgrading really the only way to resolve this template error?
     
  12. mcbauer

    mcbauer

    Joined:
    Oct 10, 2015
    Posts:
    448
    Tried updating the project to 2021.1 and it immediately crashed and had to enter Safe mode. From there tried resetting all packages to default and only was able to get Unity to compile after deleting the Examples and XR Folders.

    Using 2021 from a fresh install I was finally able to use the AR Template from scratch and compile a fresh project.
     
  13. conclean

    conclean

    Joined:
    Mar 17, 2021
    Posts:
    1
    Same problem in 2019 LTS.
    2020 LTS works well.
     
  14. khanhabib

    khanhabib

    Joined:
    Oct 11, 2018
    Posts:
    19
    these issues doesnt occur in unity 2020.
     
  15. WhittS3

    WhittS3

    Joined:
    Sep 10, 2018
    Posts:
    1
    Unity 2019.4.13f1, XR Management Plugin 3.2.16, AR Foundation 4.1.1, and AR Core XR Plugin 4.1.1 complies for me for anyone having trouble with AR core package.
     
  16. Ary-Guilherme

    Ary-Guilherme

    Joined:
    Feb 27, 2018
    Posts:
    2
    Your tip solved the problem in my case, thanks!
     
    hemasree_s likes this.
Thread Status:
Not open for further replies.
unityunity