Search Unity

2018.3 beta

Discussion in 'AR' started by DreamEnder, Oct 10, 2018.

  1. DreamEnder

    DreamEnder

    Joined:
    Apr 12, 2011
    Posts:
    191
    Hi. Does AR Foundation work with 2018.3.0b5? I tried the sample project and the background is green.
     
  2. tdmowrer

    tdmowrer

    Joined:
    Apr 21, 2017
    Posts:
    605
    It should, yes. We just retested with the 2018.3.0b5 to be sure. It works on Android and iOS. Can you provide more details concerning the specific device and OS version?
     
  3. DreamEnder

    DreamEnder

    Joined:
    Apr 12, 2011
    Posts:
    191
    I meant to say the screen is black. iPhone6S - OS 12.0.

    In my own game I can see and place the AR objects but the background is all green.
     
  4. JaredJudd

    JaredJudd

    Joined:
    Jul 31, 2012
    Posts:
    4
    I've had this problem in Unity 2018.3.0bX as well, and I finally dug in a little bit more. I'm getting a black screen on Android (or a green screen on iOS).

    I'm running the project from the Github project opened in 2018.3.0b7, and loading the LightEstimation scene deployed unsigned to a Samsung S8+. I have ARCore Support disabled in the project settings, and am using the ARCore XR Plugin 1.0.0-preview.21. It was compiled using .NET 4.x equivalent (instead of the default and deprecated 3.5). I've also tried .NET 3.5, as well as both Mono and IL2CPP builds

    On Android I opened the logcat and saw the first error was:

    E Unity : InvalidOperationException: Nullable object must have a value.
    E Unity : at System.Nullable`1[T].get_Value () [0x00008] in <0000d56de0ae43ca875d7babfd990580>:0
    E Unity : at LightEstimationUI.Update () [0x00025] in <b6518a82f5354a5b8b675b263148171a>:0

    Which looks like it goes back to the LightEstimationUI.cs

    Code (CSharp):
    1. void Update()
    2.     {
    3.         SetUIValue(m_LightEstimation.brightness.HasValue, m_BrightnessVal, m_LightEstimation.brightness.Value.ToString());
    4.         SetUIValue(m_LightEstimation.colorTemperature.HasValue, m_ColorTempVal, m_LightEstimation.colorTemperature.Value.ToString());
    5.         SetUIValue(m_LightEstimation.colorCorrection.HasValue, m_ColorCorrectVal, m_LightEstimation.colorTemperature.Value.ToString());
    6.     }
    I've checked to ensure that the Text component is assigned correctly in editor, which leaves the Brightness, ColorTemp, or ColorCorrection values. The values are a nullable float and a nullable color. Changing the SetUIValue signature to accept the nullable values, and null checking them explicitly still throws errors every update and always shows black.

    E Unity : status.cc:155 ArStatusErrorSpace::AR_ERROR_MISSING_GL_CONTEXT:
    E Unity : ArPresto::ArSession_update failed with status -7

    the missing gl context error appears right before the Nullable Error in subsequent errors that happen each frame.

    Not sure how else to document the issue as I haven't actually changed anything from the GIT project other than changing things to try and fix the problem, but it's still broken straight from the GIT repo.
     
  5. JaredJudd

    JaredJudd

    Joined:
    Jul 31, 2012
    Posts:
    4
    Confirmed that the lwrp_support branch also does not work in 2018.3.0b7 deployed to Samsung S8+.

    Although, this branch doesn't result in a black screen, it is instead a a bit purple, with consistent green and red pixel pattern on the left of the screen.
     

    Attached Files:

  6. JaredJudd

    JaredJudd

    Joined:
    Jul 31, 2012
    Posts:
    4
    Also tried the primary branch in 2018.3.0b7 compiling on a mac and deploying to a google pixel 3. Same black screen.
     
  7. Srokaaa

    Srokaaa

    Joined:
    Sep 18, 2018
    Posts:
    169
    Same for me in 2018.3.b6
     
  8. renaudbedard

    renaudbedard

    Joined:
    Jul 2, 2012
    Posts:
    20
    Same here (black screen with the
    AR_ERROR_MISSING_GL_CONTEXT
    error spam) in 2018.3.0b9 using the SampleLWRPScene of the arfoundation-samples Git repo. I'm on a Samsung Galaxy Note 8.

    I'm using these package versions :
    - AR Foundation 1.0.0-preview.20
    - ARCore XR Plug in 1.0.0-preview.23
    - LWRP 4.1.0-preview
    - Core RP Librari 4.1.0-preview
    So the latest of everything. I had to make some code changes from the official sample for it to compile.

    Excerpt of the logcat of possibly relevant warnings/errors :
    Code (CSharp):
    1. E/libEGL: call to OpenGL ES API with no current context (logged once per thread)
    2. W/AnchorServiceClientFactory: The API key for use with the Google AR service could not be obtained!
    3. W/native: motion_analysis_calculator.cc:361 No input video header found. Downstream calculators expecting video headers are likely to fail.
    4. E/native: session_c_api.cc:1700 ArAugmentedImageDatabase_deserialize: database_raw_bytes was passed NULL.
    5. E/ArPresto: ArPresto::SetConfiguration failed to deserialize Augmented Image database with status -1.
    6. E/NdkImageReader: AImageReader_getWindow
    7. E/NdkImageReader: AImageReader_getWindow
    8. E/native: status.cc:155 ArStatusErrorSpace::AR_ERROR_MISSING_GL_CONTEXT:
    9. E/ArPresto: ArPresto::ArSession_update failed with status -7.
    10. E/native: status.cc:155 ArStatusErrorSpace::AR_ERROR_MISSING_GL_CONTEXT:
    11. E/ArPresto: ArPresto::ArSession_update failed with status -7.
    Edit : Looks like it's a known issue related to new versions of the LWRP : https://github.com/Unity-Technologies/arfoundation-samples/issues/68#issuecomment-438832827
     
  9. tdmowrer

    tdmowrer

    Joined:
    Apr 21, 2017
    Posts:
    605
    Make sure the Player Setting "Graphics Jobs (Experimental)" is not checked. This got enabled accidentally in some of our samples, and it forces multithreaded rendering in 2018.3.
     
    newguy123 likes this.
  10. renaudbedard

    renaudbedard

    Joined:
    Jul 2, 2012
    Posts:
    20
    That was it! Turning Graphics Jobs off fixed everything. Thanks a lot :)