Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Question 2D UI to Augemented Reality Project, any help?

Discussion in 'Android' started by teigencarter0, Mar 8, 2024.

  1. teigencarter0

    teigencarter0

    Joined:
    Mar 7, 2024
    Posts:
    3
    I built a user interface that pretty much acts as a slideshow where there is a next and previous button that when clicked, the next image is displayed and the instructions with each image also changes.
    My desired project is to take this 2D template project and have the UI displayed on top of an AR camera. So, when someone run the project and is holding their camera up, the UI is still displayed and interactable.
    I started a 3D template project and added an AR Session and XR Origin using the target image manager so when the image is located, a cube is displayed, all while the UI is constantly shown. (one of the photos attached is my ui and the black background is ideally going to be replaced with the ar camera).
    The other attachment is what i eventually want to use my AR camera for. I am just trying to set the camera with the UI first. vmware_article1_image.jpg ar ui.png
    When i try to build this project i run into some errors.

    I have completely updated all Android SDKs using android studio and have followed pretty much any tutorial I can to get this to work.
    I am using Unity version 2022.3.21f1

    Errors:
    1. Exception while marshalling C:\Program Files\Unity\Hub\Editor\2022.3.21f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\build-tools\32.0.0\package.xml. Probably the SDK is read-only

    2.
    Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
    C:\Users\teige\newestVersionAR\Library\Bee\Android\Prj\IL2CPP\Gradle\unityLibrary\src\main\java\FinishTaskPrompt.java:1: error: class, interface, or enum expected

    3. CommandInvokationFailure: Gradle build failed. C:\Program Files\Unity\Hub\Editor\2022.3.21f1\Editor\Data\PlaybackEngines\AndroidPlayer\OpenJDK\bin\java.exe -classpath "C:\Program Files\Unity\Hub\Editor\2022.3.21f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-7.2.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleDebug"
     
  2. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,933
    FinishTaskPrompt.java comes from your project, try exporting gradle project instead, and open it in Android Studio, might be easier to see the errors.
     
  3. teigencarter0

    teigencarter0

    Joined:
    Mar 7, 2024
    Posts:
    3
    I deleted everything to do with FinishTaskPrompt and it built fine! The only thing now is the AR camera is not working. It only shows my UI but no camera :/