Packaging issues

To package a project for Windows from Unreal, you must have the proper software installed, including Visual Studio 2015. (See the documentation here.)

I wanted to package my game to send to others, but when I tried File/Package Project/Windows, it packed for a while then gave me a fatal error. Several forum posts I read said to delete your Saved and Intermediate file. This created a tremendous problem when I realized I had started building my introductory level using the Default level, which got deleted when I threw away those folders! Recovering them from the trash only recovered a portion of the scene, so I had to rebuild much of it. Lesson learned: Don’t build your levels in the Default level! Start a new one.

Another thing I did to simply the Package process was to turn off all supported platforms that I wouldn’t be using, such as Linnux and iOS.

By reading through the lines and lines of text in the Error log, I found this:

UATHelper: Packaging (Windows (64-bit)): Cook: LogTexture: Warning: Cannot retrieve source data for mip 0 of texture Mushroom3-texture

This could mean the image file was corrupt. I deleted the Mushroom mesh and texture altogether from my content file, and then my game packaged successfully! Next steps will be to re-save the files, re-import and try again to see if I can use the mushroom mesh.

After the game packaged successfully, the next step was to test the .exe file in VR. When I launched the game, it loaded, but only showed up on the computer monitor, not in the VR headset. After more digging through forums, I found some advice on Blueprints, so I added a Delay of 2 seconds, then something to Enable HMD, and also added the Execute Console Command (although that last part doesn’t seem to work automatically like it should):

Start in VR Blueprint

If your game doesn’t start in VR automatically, you can type the Tilde key on your keyboard while in game, which opens up a command console, then type “stereo on”. This will launch it in the headset.

The thing that seemed to work best though is a very small setting that is hard to miss and not very well documented. In the Project settings under Description, look for a checkbox that says “Start in VR” under Settings towards the bottom.

Start in VR setting

After doing all this, my game launched in VR successfully.