Skip to content

Commit

Permalink
Fix keyboard stuff and amend manual install instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
DaXcess committed Sep 6, 2024
1 parent c1b9578 commit f54ff00
Showing 3 changed files with 25 additions and 5 deletions.
2 changes: 1 addition & 1 deletion COMPILING.md
Original file line number Diff line number Diff line change
@@ -26,4 +26,4 @@ Alternitavely if you're building a finished product run this command:
$ dotnet build --configuration Release
```

The built plugin assembly can now be found inside the `bin` folder.
The built plugin assemblies can now be found inside the `bin` folder.
23 changes: 21 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -75,7 +75,7 @@ Also make sure you know how to use BepInEx Dependencies and assembly referencing
To install the mod from the source code, you will first have to compile the mod. Instructions for this are available in [COMPILING.md](COMPILING.md).

Next up you'll need to grab a copy of some **Runtime Dependencies**. You can either grab these from [one of the releases](https://github.com/DaXcess/LCVR/releases), or if you truly want the no hand holding experience, you can retrieve them from a Unity project.
Next up you'll need to grab a copy of some **Runtime Dependencies** and the **Asset Bundle**. You can either grab both of these from [the latest release](https://github.com/DaXcess/LCVR/releases/latest). You can also manually retrieve the **Runtime Dependencies** from a manually compiled Unity project.

## Retrieving Runtime Dependencies from a Unity Project

@@ -108,4 +108,23 @@ Once BepInEx has been installed and run at least once, you can start installing

First of all, in the `BepInEx/plugins` folder, create a new folder called `LCVR` (doesn't have to be named that specifically, but makes identification easier). Inside this folder, place the `LCVR.dll` file that was generated during the [COMPILING.md](COMPILING.md) steps.

After this has been completed, create a new directory called `RuntimeDeps` (has to be named exactly that) inside of the `LCVR` folder. Inside this folder you will need to put the DLLs that you have retrieved during the [Retrieving Runtime Depenencies](#retrieving-runtime-dependencies-from-a-unity-project) step. You can now run the game with LCVR installed.
After this has been completed, create a new directory called `RuntimeDeps` (has to be named exactly that) inside the `LCVR` folder. Inside this folder you will need to put the following DLLs:

- UnityEngine.SpatialTracking.dll
- Unity.XR.CoreUtils.dll
- Unity.XR.Interaction.Toolkit.dll
- Unity.XR.Management.dll
- Unity.XR.OpenXR.dll

These files should have been retrieved either during the [Retrieving Runtime Dependencies](#retrieving-runtime-dependencies-from-a-unity-project) step, or from grabbing them from the latest release.

Next up, grab the **Asset Bundle** from one of the releases, and place them into the same folder as the `LCVR.dll` file. This asset bundle file needs to be called `lethalcompanyvr`.

Finally, in the `BepInEx/patchers` folder, also create a new folder called `LCVR` (again, doesn't have to be exact). Inside this folder, place the `LCVR.Preload.dll` file that was also generated during the [COMPILING.md](COMPILING.md) steps.

In this folder, also create a new directory called `RuntimeDeps` (again, has to be exactly named that), and place the following DLLs inside:

- openxr_loader.dll
- UnityOpenXR.dll

You can now run the game with LCVR installed.
5 changes: 3 additions & 2 deletions Source/UI/VRHUD.cs
Original file line number Diff line number Diff line change
@@ -575,15 +575,16 @@ public void ToggleSpectatorLight(bool? active = null)
private void InitializeKeyboard()
{
var canvas = GameObject.Find("Systems/UI/Canvas").GetComponent<Canvas>();
MenuKeyboard = Instantiate(AssetManager.Keyboard).GetComponent<NonNativeKeyboard>();
MenuKeyboard = Instantiate(AssetManager.Keyboard, canvas.transform).GetComponent<NonNativeKeyboard>();

MenuKeyboard.transform.SetParent(canvas.transform, false);
MenuKeyboard.transform.localPosition = new Vector3(0, -470, -40);
MenuKeyboard.transform.localEulerAngles = new Vector3(13, 0, 0);
MenuKeyboard.transform.localScale = Vector3.one * 0.8f;

MenuKeyboard.gameObject.Find("keyboard_Alpha/Deny_Button").SetActive(false);
MenuKeyboard.gameObject.Find("keyboard_Alpha/Confirm_Button").SetActive(false);

MenuKeyboard.SubmitOnEnter = true;

var component = canvas.gameObject.AddComponent<Keyboard>();
component.keyboard = MenuKeyboard;

0 comments on commit f54ff00

Please sign in to comment.