Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Resolved SHOWING "BLANK" SCREEN AFTER RENDERING THE GAME, BUT WORKS FINE IN PLAY MODE

Discussion in 'VR' started by aih_unity, Feb 22, 2023.

  1. aih_unity

    aih_unity

    Joined:
    Mar 30, 2021
    Posts:
    10
    Here's what a scene looks like:


    Here's what a game scene looks like (and this is how it should be)


    The VR (Oculust Rift S) works fine when I enter the Play Mode, it can interact, move and follow my head gesture. BUT, WHEN I RENDER THE GAME, IT ALWAYS SHOWING A "BLANK" SCREEN,



    it doesn't show any movement even when I shake or move the VR headset.

    Trust me i've try many methods (changing render settings, project setting, etc) but I assume it is stuck at one point in a scene but i had no clue where it was.

    I AM FRUSTRATED AND I HAVE BEEN TRYING TO SOLVE THIS PROBLEM FOR ABOUT A YEAR.
    PLZ HELP. I JUST WANT TO RENDER MY GAME. THIS IS FOR MY THESIS FINAL PROJECT :(
     
  2. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    8,583
    check log files for any errors/warnings,
    https://docs.unity3d.com/Manual/LogFiles.html

    if player location correct? (some urp plugins have that fade effect, when player is inside objects)

    which unity version and XR plugin you are using, unity xr?
    does multipass vs singlepass rendering have any difference?
    try disable post processing if any?
     
  3. aih_unity

    aih_unity

    Joined:
    Mar 30, 2021
    Posts:
    10
    Thanks for your response,

    I did check the log files but there is no error. (i hope so)

    I set the player location outside the area, and when I trying in Play Mode the player are there so I think its correct.

    I'm using unity version 2021.3.6f1 and my XR plugin Management 4.2.0 and checked the Oculus one.

    Multipass and singlepass doesn't have any effect.

    I'm not using post processing so.. yeah..

    BUT, i found an interesting error in the console after rendering, i just realized it.


    Unable to find player assembly: D:\AIH\BISMILLAH_SKRIPSI_GALIH\Temp\StagingArea\Data\Managed\UnityEngine.TestRunner.dll
    UnityEngine.Debug:LogWarning (object)
    Unity.Burst.Editor.BurstAotCompiler:OnPostBuildPlayerScriptDLLsImpl (UnityEditor.Build.Reporting.BuildReport) (at Library/PackageCache/com.unity.burst@1.6.6/Editor/BurstAotCompiler.cs:350)
    Unity.Burst.Editor.BurstAotCompiler:OnPostBuildPlayerScriptDLLs (UnityEditor.Build.Reporting.BuildReport) (at Library/PackageCache/com.unity.burst@1.6.6/Editor/BurstAotCompiler.cs:208)
    UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
     
  4. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    8,583
    that error doesn't sound critical..

    try building empty scene, from separate project, to see if its related to that project.
     
  5. aih_unity

    aih_unity

    Joined:
    Mar 30, 2021
    Posts:
    10
    It is related but after disabling the burst AOT option, nothing changes except the error now is gone.

    I'm trying rendering the game again, it shows a different visual now.


    and I know where its came from


    ANY SOLUTIONS? I THINK THE UNITY JUST RENDERING FROM THAT CAMERA_3 OBJECT
     
  6. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    8,583
    do you have multiple cameras on scene? test if you disable all others.
     
  7. SF_FrankvHoof

    SF_FrankvHoof

    Joined:
    Apr 1, 2022
    Posts:
    780
    Well the good thing is that your game is working..

    One of 2 things will be happening here:
    1 - VR-Camera is failing to Initialize, your InGame-Camera is never being created/controlled, and thus it's defaulting to another camera.
    2 - VR-Camera is working fine, but somehow the other camera is rendering on top.

    An easy way to check which of the 2 it is, would be to Log the pos & rot of your VR-Camera. If that's changing when you move the headset, then #2 is most likely the issue here.
     
  8. aih_unity

    aih_unity

    Joined:
    Mar 30, 2021
    Posts:
    10
    DUUUUUUUUUUUUUDEEEEE IM DISABLING CAMERA_3 AND BOOM! ITS WORKS!

    IM CRYING RN FR!!!!!!!!!

    BUTTT BUTTT THE SOUND IS NOW DISAPPEAR (TESTED IN .EXE FILE)
     
  9. aih_unity

    aih_unity

    Joined:
    Mar 30, 2021
    Posts:
    10

    YEP, THE CAMERA_3 IS RENDERING ON TOP. AAAAAHH GOD!

    but now the sound is disappear, but in Player Mode its works
     
  10. SF_FrankvHoof

    SF_FrankvHoof

    Joined:
    Apr 1, 2022
    Posts:
    780
    If you disabled the entire GO, then you probably also removed the (last remaining) audio-listener in your scene.
     
  11. aih_unity

    aih_unity

    Joined:
    Mar 30, 2021
    Posts:
    10
    I mean i'm just disabled the CAMERA_3 GO, it is possible that some empty audio-listener also rendering on top the other audio-listener?
     
  12. SF_FrankvHoof

    SF_FrankvHoof

    Joined:
    Apr 1, 2022
    Posts:
    780
    Try typing "t:AudioListener" into the search-bar of the Hierarchy-window.
    How many Objects show up (besides the CAMERA_3 GO)?
     
  13. aih_unity

    aih_unity

    Joined:
    Mar 30, 2021
    Posts:
    10
    upload_2023-2-22_19-58-51.png

    turns out the CAMERA_3 didn't show on the list

    so.. I assume disabling CAMERA_3 does not affect the sound?
     
  14. aih_unity

    aih_unity

    Joined:
    Mar 30, 2021
    Posts:
    10
    Oh I forgot..

    additional information:
    My audio is not playing when I play the Game, but it is playing when I interact with the object in it.
    It is works fine in Play/Editor mode.
     
  15. SF_FrankvHoof

    SF_FrankvHoof

    Joined:
    Apr 1, 2022
    Posts:
    780
    So you're getting 'some' audio-output, but not all of it?
    Sounds like you need to start doing a whole lot of debugging..
    Volume would be a first step. Mixers too, if you're using those.
     
  16. aih_unity

    aih_unity

    Joined:
    Mar 30, 2021
    Posts:
    10
    No no no, im not getting all of it.
    I can interact with the object, but the object makes no sound at all.
     
  17. aih_unity

    aih_unity

    Joined:
    Mar 30, 2021
    Posts:
    10
    I think i'm gonna make another thread for the sound bugs.

    REALY APPREACIATED UR HELP GUYS!
    @mgear
    @SF_FrankvHoof

    I DONT KNOW WHAT TO SAY ANYMORE
    THANK U SO MUCH!!!!

    :):):):):):)