Send Your Vive Unreal Bare Minimum App ExplainedAugust 18, 2016 | vive unreal engine development vr send
This continues how to create a bare minimum Vive Unreal app from scratch and explains the bare minimum steps needed to send it to other people. The first method enables anyone with Windows and a Vive to launch your standalone app without installing anything else. The second method enables you to send your project to someone else who installed Unreal Editor so they can work on the project with you.
This method enables sharing your Unreal project with someone who doesn't have or want to install Unreal Editor. We must package your app into a self-contained folder along with a copy of Unreal Engine so they can launch your app without installing anything.
This video shows a quick run through of the below if at any point you get confused about where a button or selection is:
Identify Starting LevelThe bare minimum project contains only one level, but full games may have many levels. Even if the bare minimum project had more levels, when you play in the editor, the editor knows to launch the level you are editing. When packaging a game into a self-contained launcher, we must identify which level should load first. With the project open in Unreal Editor, go to Edit -> Project Settings. In the Maps & Modes settings, set the Game Default Map to Minimum.
Enable Vive At Launch
In the Unreal Editor, you use the VR Preview Play mode by clicking on the white dropdown arrow next to the Play Icon and choosing VR Preview. Unreal Editor then knows to use the Vive. When you distribute an app, people simply execute the app executable without specifying a play mode, so we must setup your standalone app to use the Vive.
Go to the Content Browser and open up the VR_GameMode pawn you created previously. Look for a blue highlighted link that says "Open Full Blueprint Editor" and click on it. The view will change to a gridded center with some nodes on it. You may need to right-click on the grid and drag it down slightly to see the nodes.
Unreal includes a visual programmer for people who do not want to code in C++ called Blueprints, which is what you now see. Without writing code, let's add some simple logic to start rendering on the Vive and collecting tracking data when someone launches your sharable app.
In the VR_GameNode blueprint grid, find the node named "Event BeginPlay". Click on the white arrow on the right side of the node, drag, and release. A dialog window will come up with a list of nodes you can add to the grid. Select a Development -> Editor -> Execute Console Command node to add it to the grid.
Click on box next to the purple pin within the Execute Console Command node and enter "Stereo On" as the command to execute. In the toolbar above the grid, click on the Compile button.
With these two steps complete, when someone you send the app to launches the app, it will load the Minimum level. From the Minimum level, it will look up the game mode override, finding the VR_GameMode pawn. Just as play begins, the logic you added will switch the rendering to the Vive and start collecting tracking data.
With the project open in Unreal Editor, set File -> Package Project -> Package Configuration -> Shipping. This tells Unreal Editor that, when you package your project, you want a fully independent executable app not dependent on anything else being installed.
To create the package, use File -> Package Project -> Windows -> Windows (32-bit) and choose a folder. Let packaging finish and open the folder in File Explorer. Change the name of the folder from WindowsNoEditor to ViveUnreal. Then zip it up into a ViveUnreal.zip file. Send this archive to anyone with Windows and a Vive.
Take a quick peek inside the archive. The Engine folder contains the Unreal engine itself, built from your own Unreal Editor installation. The ViveUnreal folder contains the content of your ViveUnreal project - levels, objects, code, etc. The ViveUnreal.exe shim executable starts up Unreal Engine and loads your Minimum level.
Because you must include the engine in your package, the sharable file becomes quite large. A bare minimum app packaged this way, even zipped, becomes 70MB.
Since you have not optimized the app for VR yet, it may not appear as sharp as when you play it in the Unreal editor. It may not have as high a frame rate. When you launch it, it may behave like a full screen application on your monitor, but only render an image in a corner of it (but look OK in the Vive). This sticks to the bare minimum to send your draft since you can optimize later.
This method enables you to send the Unreal project containing your app with someone else who installed Unreal so they can open, play, and edit it.
Open the ViveUnreal project in Unreal Editor again. Go to File -> Package -> Zip Up Project. Whomever you send the resulting zip file to can unzip it and double-click on the extracted ViveUnreal.uproject file to open the project in their Unreal Editor.
The Unreal Editor stores everything you see and change in the editor in a file in your project folder, including levels, objects, code, and texture images. This video shows what Unreal Editor effectively does when you use Zip Up Project.
To do this manually, you would shut down Unreal Editor. In File Explorer, open the ViveUnreal folder you created and delete the Intermediate and Saved folders. These folders contain temporary files used by the editor when you work on the project. Unreal Editor will automatically rebuild these when you open the project again.
Select all the files in the ViveUnreal folder in File Explorer. Select all the files in the ViveUnreal folder and zip them up into a ViveUnreal.zip archive.
This works because anyone who installed Unreal Editor has the rendering engine and editor on their computer. When they open the project and launch it with VR Preview, their editor builds their own Intermediate and Saved folders using your project files and plays your level with their installed engine.
As well as enabling other people to work on your project, this results in a very small file. A bare mimimum app sent this way only requires a 500KB zip file.
Now that you have the basics you need to work on the project with someone else and send your app to anyone, you are in an even better position to create Witcher 3 in VR with a little more effort. Go!
If people report your standalone app does not play on the Vive, have them start SteamVR before they launch it. By default, SteamVR should launch automatically when your app calls for Stereo On, but this depends on a setting in SteamVR. To re-enable the setting if it has been disabled, people must click on the white dropdown arrow next to "SteamVR" in the SteamVR status box that displays when SteamVR is running. See Settings -> Developer -> Start SteamVR when an application starts.
Since you have not yet optimized your standalone app, it will capture keyboard and mouse control when it starts up, but still show some of the desktop, making it seem like it is in windowed mode, which it isn't. To escape this if you remain at the keyboard, use Alt-Tab. Alternatively, in the Vive, bring up the system menu, click the system icon, and choose Exit.