1xn / VRBase

Unreal Engine 4 virtual reality project library built for C++ programming

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

VRBase Library 2.0.0

VRBase is a C++ Unreal Engine library designed to simplify virtual reality development in Unreal. It includes a variety of different classes, each of which perform specific functionality designed to improve overall ease of development.

VRBase implements all basic virtual reality actors (such as the player pawn) C++. You will not need to program the camera or controllers, allowing greater flexibility in game development.

Table of Contents

  1. Installation
  2. Linting
  3. Example VRBase Projects
  4. Documentation

Installation

VRBase is only a library and therefore can only be added to an existing Unreal project.

  1. Clone VRBase into an Unreal project under the directory Source/PROJECTNAME/VRBase.
  2. Right-click the Unreal uproject file in the main root directory and select Generate Visual Studio Project Files to regenerate a clean Visual Studio sln file.
  3. Update the PROJECTNAME.Build.cs file to include VRBase. This file is located in the Source/PROJECTNAME/ directory. The snippet below can be copied and pasted into the file. Be sure to change the project name:
using System.IO;
using UnrealBuildTool;

public class YOURPROJECTNAME : ModuleRules {
	public YOURPROJECTNAME(ReadOnlyTargetRules Target) : base(Target) {
		PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;

        PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "Slate", "SlateCore", "ProceduralMeshComponent" });
        PrivateDependencyModuleNames.AddRange(new string[] { "HeadMountedDisplay", "SteamVR" });
        
        PublicIncludePaths.Add(Path.GetFullPath(Path.Combine(ModuleDirectory, "VRBase")));
    }
}
  1. After opening the Unreal project in the editor, VRBase requires an instance of AGameRules to be included in the level UMap for VRBase to function properly. VRBase classes may not work otherwise.

Linting

Code linting is the process of running a program to check and format source code files according to a certain project or language specification. Without linting, each developer adds their own code style to the codebase, causing inconsistent formatting and making source code harder to read.

This project uses the default clang-format linter, available as an extension for VS Code. You will also need to download the clang libraries found on the LLVM download page, using the LLVM 10.0.0 Windows 64-bit pre-built binary. Be sure to add LLVM to the system path for all users when prompted.

Format On Save should be enabled in VS Code settings in order for this to work:

"[cpp]": {
    "editor.defaultFormatter": "xaver.clang-format",
    "editor.formatOnSave": true
},

Example VRBase Projects

Below is a list of projects in which VRBase has been used:

Documentation

See the documentation page for more information.

About

Unreal Engine 4 virtual reality project library built for C++ programming


Languages

Language:C++ 96.6%Language:C 3.4%