Welcome to the Oculus Developer Forums!

Your participation on the forum is subject to the Oculus Code of Conduct.

In general, please be respectful and kind. If you violate the Oculus Code of Conduct, your access to the developer forums may be revoked at the discretion of Oculus staff.

Unity 5.4.2 build application but I got black screen

sanchuansanchuan Posts: 2
NerveGear
When in Unity I can run it ,but after building I got black Screen.It seems that Oculus Runtime isn't work.  I used Unity OVRPlugin only!I am sorry my bad English.
 Thanks  :)

Answers

  • vrdavebvrdaveb Posts: 1,596 Oculus Staff
    > When in Unity I can run it ,but after building I got black Screen.It seems that Oculus Runtime isn't work.

    If VR is working in the editor, but not in your standalone build, make sure you've enabled VR support in the player settings and included Oculus in the list of VR devices. We have seen an issue where VR sometimes fails to load if a Unity app is installed to a folder with non-english Unicode characters in the path. Can you share <appname>_Data/output_log.txt from a run with the issue?
  • negatronixnegatronix Posts: 17
    NerveGear

    Hi Everyone... I am also having this same issue. My game runs beautifully in the Unity Editor, however does not show up after I hit build and run(Can't run in Rift from the desktop) VR is enabled in player settings, and Oculus shows as a VR device like vrdaveb mentioned in a post above.

    I am using Unity version 5.5.0f3 64bit and DX11.. I am using a retail/consumer Oculus Rift purchased just before Christmas.

    I downloaded the Oculus SDK.. however I wasn't sure if there is a specific location to place it. It did not have a setup/install option?? I also downloaded the Oculus Utilities for Unity 5 and installed the package.

    When I search for info related to this.. Most of what I read says that I should set my Rift as a display in windows via right click the desktop and extend my display... I do not see the Rift listed as an option for a display, and when I click identify nothing is found. There is also mention of an Oculus Display Driver.. where do I get that if it is not installed during the initial setup of the Rift?

    Any help would really be appreciated,

    Thanks... btw I am also new to this forum

    -Kory

  • vrdavebvrdaveb Posts: 1,596 Oculus Staff
    Unity's built-in VR support should "just work" if you've installed the Rift Runtime and enabled VR in your project. Here is a list of the supported versions of Unity. If you still see the same issue with 5.5.0p1, please send <AppName>_Data/output_log.txt and a copy of the build for us to debug.
  • negatronixnegatronix Posts: 17
    NerveGear

    Thanks for your reply vrdaveb.. I am fairly certain that this is not related to Unity but the lack of the Rift being identified as a second display via windows. I am downloading and reinstalling the Oculus runtime now. I'll post the results back.

    Just to be sure.. A member on the Unity forum mentioned that I need to sign the app to be able to view it. Would this be the case to run a build from my desktop. My Rift is set to run unsigned apps in the general settings.

    Thanks,

    -Kory

  • vrdavebvrdaveb Posts: 1,596 Oculus Staff
    Signing with the OSIG mechanism is a Gear VR thing and dooesn't apply to Rift apps. Does any app, such as Oculus Home run on your Rift?
  • negatronixnegatronix Posts: 17
    NerveGear
    Yes.. if you are referring to the app where you select games etc.. yes that works, as well as a few games that I've installed.
  • vrdavebvrdaveb Posts: 1,596 Oculus Staff
    Can you share output_log.txt from the app that isn't working?
  • negatronixnegatronix Posts: 17
    NerveGear
    So after reinstalling the Oculus software nothing changed. This is super frustrating!!
  • BravezebraBravezebra Posts: 7
    NerveGear
    Hi,

    I think that I have the same problem... I'm have this message on the log: Security error. This plugin is invalid!.

    I've already watched that in other posts you've recommended to install a redistributable package. It hasn't work for me. I am also working with the last SDK and Tools and Unity 5.5.0f3.

    Any recommendation?

    Cheers,
  • negatronixnegatronix Posts: 17
    NerveGear

    Update-- I am still unable to see a build from Unity on my Oculus rift. I have installed current drivers for my video card, made several attempts at reinstalling the Oculus SDK, and the Unity tools.

    After installing the latest drivers for my video card--The only thing that has changed is this.. I now see, only at times.. seems to be when the editor is open and I run a build of my game from the desktop: When I put on my Rift there is a message saying that Unity is taking a long time to load, please check the App. The game is rendering on my desktop as it does in the editor, but not on my Rift.

    There are no visible error messages to log, and no messages in the Unity Console.. If there is a specific place to grab output, please point me where to go for it.

    My system is: Win 7 Pro  SP1 64bit, i5 processor, 8 gigs of ram, Asus Rog Strix 1080.. I have been able to run several games from the Oculus store without issue and incredibly smooth, the demo house that came with one of the packages that I downloaded, and anything within the Unity editor.. Just seems to be a disconnect when I run a build from my desktop between the game app and it connecting properly with the Rift.

    Sorry to be redundant, I am not sure where to get the info that you have mentioned..

    vrdaveb said:
    Unity's built-in VR support should "just work" if you've installed the Rift Runtime and enabled VR in your project. Here is a list of the supported versions of Unity. If you still see the same issue with 5.5.0p1, please send <AppName>_Data/output_log.txt and a copy of the build for us to debug.
  • vrdavebvrdaveb Posts: 1,596 Oculus Staff
    > I'm have this message on the log: Security error. This plugin is invalid!.

    Let's follow up in your other thread: https://forums.oculus.com/developer/discussion/47956/working-on-unity-editor-but-not-in-build-security-error-this-plugin-is-invalid-unity-5-5-0f3

    > I am not sure where to get the info that you have mentioned.

    When you make a standalone build, Unity creates an exectuable with the name you choose. Suppose you choose AppName.exe. Right next to the exe file, there will be a folder AppName_Data. In that folder, there is a file output_log.txt. Can you share it, please?
  • negatronixnegatronix Posts: 17
    NerveGear
    vrdaveb said:
    > I'm have this message on the log: Security error. This plugin is invalid!.

    Let's follow up in your other thread: https://forums.oculus.com/developer/discussion/47956/working-on-unity-editor-but-not-in-build-security-error-this-plugin-is-invalid-unity-5-5-0f3

    > I am not sure where to get the info that you have mentioned.

    When you make a standalone build, Unity creates an exectuable with the name you choose. Suppose you choose AppName.exe. Right next to the exe file, there will be a folder AppName_Data. In that folder, there is a file output_log.txt. Can you share it, please?

    Here is a copy of an output_log file for a test level that I quickly constructed. Just a plane and a OVR_camera rig to walk around some boxes with. I am also receiving an error stating that.. This plugin is invalid!.


  • negatronixnegatronix Posts: 17
    NerveGear

    Initialize engine version: 5.5.0f3 (38b4efef76f0)
    GfxDevice: creating device client; threaded=1
    Security error. This plugin is invalid!

     
    (Filename:  Line: 30)

    Direct3D:
        Version:  Direct3D 11.0 [level 11.0]
        Renderer: NVIDIA GeForce GTX 1080 (ID=0x1b80)
        Vendor:   NVIDIA
        VRAM:     8084 MB
        Driver:   21.21.13.7633
    Default GameObject Tag: Player already registered
     
    (Filename:  Line: 90)

    Begin MonoManager ReloadAssembly
    Platform assembly: C:\Users\Kory\Desktop\PwOcTest86_64bit_Data\Managed\UnityEngine.dll (this message is harmless)
    Loading C:\Users\Kory\Desktop\PwOcTest86_64bit_Data\Managed\UnityEngine.dll into Unity Child Domain
    Platform assembly: C:\Users\Kory\Desktop\PwOcTest86_64bit_Data\Managed\Assembly-CSharp-firstpass.dll (this message is harmless)
    Loading C:\Users\Kory\Desktop\PwOcTest86_64bit_Data\Managed\Assembly-CSharp-firstpass.dll into Unity Child Domain
    Platform assembly: C:\Users\Kory\Desktop\PwOcTest86_64bit_Data\Managed\Assembly-CSharp.dll (this message is harmless)
    Loading C:\Users\Kory\Desktop\PwOcTest86_64bit_Data\Managed\Assembly-CSharp.dll into Unity Child Domain
    Platform assembly: C:\Users\Kory\Desktop\PwOcTest86_64bit_Data\Managed\UnityEngine.UI.dll (this message is harmless)
    Loading C:\Users\Kory\Desktop\PwOcTest86_64bit_Data\Managed\UnityEngine.UI.dll into Unity Child Domain
    Platform assembly: C:\Users\Kory\Desktop\PwOcTest86_64bit_Data\Managed\UnityEngine.Networking.dll (this message is harmless)
    Loading C:\Users\Kory\Desktop\PwOcTest86_64bit_Data\Managed\UnityEngine.Networking.dll into Unity Child Domain
    Platform assembly: C:\Users\Kory\Desktop\PwOcTest86_64bit_Data\Managed\UnityEngine.PlaymodeTestsRunner.dll (this message is harmless)
    Loading C:\Users\Kory\Desktop\PwOcTest86_64bit_Data\Managed\UnityEngine.PlaymodeTestsRunner.dll into Unity Child Domain
    Platform assembly: C:\Users\Kory\Desktop\PwOcTest86_64bit_Data\Managed\UnityEngine.VR.dll (this message is harmless)
    Loading C:\Users\Kory\Desktop\PwOcTest86_64bit_Data\Managed\UnityEngine.VR.dll into Unity Child Domain
    Platform assembly: C:\Users\Kory\Desktop\PwOcTest86_64bit_Data\Managed\Pathfinding.Ionic.Zip.Reduced.dll (this message is harmless)
    Loading C:\Users\Kory\Desktop\PwOcTest86_64bit_Data\Managed\Pathfinding.Ionic.Zip.Reduced.dll into Unity Child Domain
    Platform assembly: C:\Users\Kory\Desktop\PwOcTest86_64bit_Data\Managed\Pathfinding.JsonFx.dll (this message is harmless)
    Loading C:\Users\Kory\Desktop\PwOcTest86_64bit_Data\Managed\Pathfinding.JsonFx.dll into Unity Child Domain
    - Completed reload, in  0.024 seconds
    Platform assembly: C:\Users\Kory\Desktop\PwOcTest86_64bit_Data\Managed\System.Core.dll (this message is harmless)
    Platform assembly: C:\Users\Kory\Desktop\PwOcTest86_64bit_Data\Managed\System.dll (this message is harmless)
    OnLevelWasLoaded was found on OVRScreenFade
    This message has been deprecated and will be removed in a later version of Unity.
    Add a delegate to SceneManager.sceneLoaded instead to get notifications after scene loading has completed
     
    (Filename:  Line: 382)

    desktop: 1920x1080 60Hz; virtual: 1920x1080 at 0,0
    <RI> Initializing input.

    <RI> Input initialized.

    <RI> Initialized touch support.

    Security error. This plugin is invalid!

     
    (Filename:  Line: 30)

    Security error. This plugin is invalid!

     
    (Filename:  Line: 30)

    UnloadTime: 0.799346 ms
    Fallback handler could not load library C:/Users/Kory/Desktop/PwOcTest86_64bit_Data/Mono/OVRPlugin
    Fallback handler could not load library C:/Users/Kory/Desktop/PwOcTest86_64bit_Data/Mono/.\OVRPlugin
    Fallback handler could not load library C:/Users/Kory/Desktop/PwOcTest86_64bit_Data/Mono/OVRPlugin
    Fallback handler could not load library C:/Users/Kory/Desktop/PwOcTest86_64bit_Data/Mono/libOVRPlugin
    Fallback handler could not load library C:/Users/Kory/Desktop/PwOcTest86_64bit_Data/Mono/.\libOVRPlugin
    Fallback handler could not load library C:/Users/Kory/Desktop/PwOcTest86_64bit_Data/Mono/libOVRPlugin
    Fallback handler could not load library C:/Users/Kory/Desktop/PwOcTest86_64bit_Data/Mono/OVRPlugin
    Fallback handler could not load library C:/Users/Kory/Desktop/PwOcTest86_64bit_Data/Mono/.\OVRPlugin
    Fallback handler could not load library C:/Users/Kory/Desktop/PwOcTest86_64bit_Data/Mono/OVRPlugin
    Fallback handler could not load library C:/Users/Kory/Desktop/PwOcTest86_64bit_Data/Mono/libOVRPlugin
    Fallback handler could not load library C:/Users/Kory/Desktop/PwOcTest86_64bit_Data/Mono/.\libOVRPlugin
    Fallback handler could not load library C:/Users/Kory/Desktop/PwOcTest86_64bit_Data/Mono/libOVRPlugin
    Fallback handler could not load library C:/Users/Kory/Desktop/PwOcTest86_64bit_Data/Mono/OVRPlugin
    Fallback handler could not load library C:/Users/Kory/Desktop/PwOcTest86_64bit_Data/Mono/.\OVRPlugin
    Fallback handler could not load library C:/Users/Kory/Desktop/PwOcTest86_64bit_Data/Mono/OVRPlugin
    Fallback handler could not load library C:/Users/Kory/Desktop/PwOcTest86_64bit_Data/Mono/libOVRPlugin
    Fallback handler could not load library C:/Users/Kory/Desktop/PwOcTest86_64bit_Data/Mono/.\libOVRPlugin
    Fallback handler could not load library C:/Users/Kory/Desktop/PwOcTest86_64bit_Data/Mono/libOVRPlugin
    Unity v5.5.0f3, Oculus Utilities v1.10.0, OVRPlugin v0.0.0, SDK v0.0.0.
     
    (Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)

    Fallback handler could not load library C:/Users/Kory/Desktop/PwOcTest86_64bit_Data/Mono/OVRPlugin
    Fallback handler could not load library C:/Users/Kory/Desktop/PwOcTest86_64bit_Data/Mono/.\OVRPlugin
    Fallback handler could not load library C:/Users/Kory/Desktop/PwOcTest86_64bit_Data/Mono/OVRPlugin
    Fallback handler could not load library C:/Users/Kory/Desktop/PwOcTest86_64bit_Data/Mono/libOVRPlugin
    Fallback handler could not load library C:/Users/Kory/Desktop/PwOcTest86_64bit_Data/Mono/.\libOVRPlugin
    Fallback handler could not load library C:/Users/Kory/Desktop/PwOcTest86_64bit_Data/Mono/libOVRPlugin
    Fallback handler could not load library C:/Users/Kory/Desktop/PwOcTest86_64bit_Data/Mono/OVRPlugin
    Fallback handler could not load library C:/Users/Kory/Desktop/PwOcTest86_64bit_Data/Mono/.\OVRPlugin
    Fallback handler could not load library C:/Users/Kory/Desktop/PwOcTest86_64bit_Data/Mono/OVRPlugin
    Fallback handler could not load library C:/Users/Kory/Desktop/PwOcTest86_64bit_Data/Mono/libOVRPlugin
    Fallback handler could not load library C:/Users/Kory/Desktop/PwOcTest86_64bit_Data/Mono/.\libOVRPlugin
    Fallback handler could not load library C:/Users/Kory/Desktop/PwOcTest86_64bit_Data/Mono/libOVRPlugin
    Fallback handler could not load library C:/Users/Kory/Desktop/PwOcTest86_64bit_Data/Mono/OVRPlugin
    Fallback handler could not load library C:/Users/Kory/Desktop/PwOcTest86_64bit_Data/Mono/.\OVRPlugin
    Fallback handler could not load library C:/Users/Kory/Desktop/PwOcTest86_64bit_Data/Mono/OVRPlugin
    Fallback handler could not load library C:/Users/Kory/Desktop/PwOcTest86_64bit_Data/Mono/libOVRPlugin
    Fallback handler could not load library C:/Users/Kory/Desktop/PwOcTest86_64bit_Data/Mono/.\libOVRPlugin
    Fallback handler could not load library C:/Users/Kory/Desktop/PwOcTest86_64bit_Data/Mono/libOVRPlugin
    Fallback handler could not load library C:/Users/Kory/Desktop/PwOcTest86_64bit_Data/Mono/OVRPlugin
    Fallback handler could not load library C:/Users/Kory/Desktop/PwOcTest86_64bit_Data/Mono/.\OVRPlugin
    Fallback handler could not load library C:/Users/Kory/Desktop/PwOcTest86_64bit_Data/Mono/OVRPlugin
    Fallback handler could not load library C:/Users/Kory/Desktop/PwOcTest86_64bit_Data/Mono/libOVRPlugin
    Fallback handler could not load library C:/Users/Kory/Desktop/PwOcTest86_64bit_Data/Mono/.\libOVRPlugin
    Fallback handler could not load library C:/Users/Kory/Desktop/PwOcTest86_64bit_Data/Mono/libOVRPlugin
    DllNotFoundException: OVRPlugin
      at (wrapper managed-to-native) OVRPlugin/OVRP_1_1_0:ovrp_GetNodePresent (OVRPlugin/Node)
      at OVRPlugin.get_hmdPresent () [0x00000] in <filename unknown>:0
      at OVRManager.get_isHmdPresent () [0x00000] in <filename unknown>:0
      at OVRDisplay.ConfigureEyeDesc (VRNode eye) [0x00000] in <filename unknown>:0
      at OVRDisplay.UpdateTextures () [0x00000] in <filename unknown>:0
      at OVRDisplay..ctor () [0x00000] in <filename unknown>:0
      at OVRManager.Awake () [0x00000] in <filename unknown>:0
     
    (Filename:  Line: -1)

    Fallback handler could not load library C:/Users/Kory/Desktop/PwOcTest86_64bit_Data/Mono/OVRPlugin
    Fallback handler could not load library C:/Users/Kory/Desktop/PwOcTest86_64bit_Data/Mono/.\OVRPlugin
    Fallback handler could not load library C:/Users/Kory/Desktop/PwOcTest86_64bit_Data/Mono/OVRPlugin
    Fallback handler could not load library C:/Users/Kory/Desktop/PwOcTest86_64bit_Data/Mono/libOVRPlugin
    Fallback handler could not load library C:/Users/Kory/Desktop/PwOcTest86_64bit_Data/Mono/.\libOVRPlugin
    Fallback handler could not load library C:/Users/Kory/Desktop/PwOcTest86_64bit_Data/Mono/libOVRPlugin
    NullReferenceException: Object reference not set to an instance of an object
      at OVRCameraRig.UpdateAnchors () [0x00000] in <filename unknown>:0
      at OVRCameraRig.Start () [0x00000] in <filename unknown>:0
     
    (Filename:  Line: -1)

    NullReferenceException: Object reference not set to an instance of an object
      at OVRCameraRig.UpdateAnchors () [0x00000] in <filename unknown>:0
      at OVRCameraRig.Update () [0x00000] in <filename unknown>:0
     
    (Filename:  Line: -1)

    NullReferenceException: Object reference not set to an instance of an object
      at OVRCameraRig.UpdateAnchors () [0x00000] in <filename unknown>:0
      at OVRCameraRig.Update () [0x00000] in <filename unknown>:0 
     



  • vrdavebvrdaveb Posts: 1,596 Oculus Staff
    Thanks, I don't see any non-English Unicode characters in "C:\Users\Kory\Desktop\PwOcTest86_64bit", so it's unclear why OVRPlugin is failing the security check. What language is Windows set to use? Does it help to move the app to "C:\Test"?
  • negatronixnegatronix Posts: 17
    NerveGear

    No.. it didn't change anything. By language I would assume English if that is what you mean?

    -Kory

  • vrdavebvrdaveb Posts: 1,596 Oculus Staff
    Yes, if English is the only language you're using with Windows and you haven't changed OVRPlugin in the Unity install folder or added another copy of OVRPlugin.dll to your project, then this is unexpected. Can you share a copy of the built project with me? Maybe I can reproduce it here.
  • negatronixnegatronix Posts: 17
    NerveGear
    Sure.. I can send a copy to you.. What do you need, just the app and the related folder? How do I do that?
  • vrdavebvrdaveb Posts: 1,596 Oculus Staff
    AppName.exe and the AppName_Data folder should be good enough. Can you zip them up and PM me a dropbox link?
  • negatronixnegatronix Posts: 17
    NerveGear

    alright.. Give me a few!

    Thanks


  • negatronixnegatronix Posts: 17
    NerveGear
    I sent you a message with a link.. not sure if it will work. It still seems to be uploading. My DB is probably full.. bleh
  • negatronixnegatronix Posts: 17
    NerveGear

    Update-- I am still unable to see a build from Unity on my Oculus rift. I have installed current drivers for my video card, made several attempts at reinstalling the Oculus SDK, and the Unity tools.

    After installing the latest drivers for my video card--The only thing that has changed is this.. I now see, only at times.. seems to be when the editor is open and I run a build of my game from the desktop: When I put on my Rift there is a message saying that Unity is taking a long time to load, please check the App. The game is rendering on my desktop as it does in the editor, but not on my Rift.

    There are no visible error messages to log, and no messages in the Unity Console.. If there is a specific place to grab output, please point me where to go for it.

    My system is: Win 7 Pro  SP1 64bit, i5 processor, 8 gigs of ram, Asus Rog Strix 1080.. I have been able to run several games from the Oculus store without issue and incredibly smooth, the demo house that came with one of the packages that I downloaded, and anything within the Unity editor.. Just seems to be a disconnect when I run a build from my desktop between the game app and it connecting properly with the Rift.

    Sorry to be redundant, I am not sure where to get the info that you have mentioned..

    vrdaveb said:
    Unity's built-in VR support should "just work" if you've installed the Rift Runtime and enabled VR in your project. Here is a list of the supported versions of Unity. If you still see the same issue with 5.5.0p1, please send <AppName>_Data/output_log.txt and a copy of the build for us to debug.

    Thanks again,
    -Kory
  • negatronixnegatronix Posts: 17
    NerveGear

    Update-- I am still unable to see a build from Unity on my Oculus rift. I have installed current drivers for my video card, made several attempts at reinstalling the Oculus SDK, and the Unity tools.

    After installing the latest drivers for my video card--The only thing that has changed is this.. I now see, only at times.. seems to be when the editor is open and I run a build of my game from the desktop: When I put on my Rift there is a message saying that Unity is taking a long time to load, please check the App. The game is rendering on my desktop as it does in the editor, but not on my Rift.

    There are no visible error messages to log, and no messages in the Unity Console.. If there is a specific place to grab output, please point me where to go for it.

    My system is: Win 7 Pro  SP1 64bit, i5 processor, 8 gigs of ram, Asus Rog Strix 1080.. I have been able to run several games from the Oculus store without issue and incredibly smooth, the demo house that came with one of the packages that I downloaded, and anything within the Unity editor.. Just seems to be a disconnect when I run a build from my desktop between the game app and it connecting properly with the Rift.

    Sorry to be redundant, I am not sure where to get the info that you have mentioned..

    vrdaveb said:
    Unity's built-in VR support should "just work" if you've installed the Rift Runtime and enabled VR in your project. Here is a list of the supported versions of Unity. If you still see the same issue with 5.5.0p1, please send <AppName>_Data/output_log.txt and a copy of the build for us to debug.

    Thanks again,
    -Kory
  • vrdavebvrdaveb Posts: 1,596 Oculus Staff
    @negatronix, your build didn't include OVRPlugin.dll. That means when you built it, Oculus wasn't in the list of supported VR devices in Player Settings.
Sign In or Register to comment.