Compile using Visual Studio - umbrella-mod-team/Umbrella-Samples GitHub Wiki

This guide is intended for advanced users who want to create more complex modules and work directly with Visual Studio.

The main difference compared to using the Script Creation tool lies in the limitations regarding project dependencies. For simple and small-scale projects, Script Creation is often sufficient. However, when dealing with more complex tasks—such as incorporating NuGet packages or additional dependencies and structuring classes—this method may fall short.

For this approach, it is highly recommended to download the WIGUx Samples. Not only will these samples provide valuable ideas for your project, but they also offer an ideal initial infrastructure to help you get started quickly.

This guide will take you through building your solution, creating a custom module for EmuVR, and associating it with a UGC (User-Generated Content) file.

Table of Contents

Creating Your Own Module

  1. Open the WIGUx.Samples.sln file in Visual Studio 2022.
  1. In the Solution Explorer panel, right-click on your solution and select Add -> New Project.
  1. In the New Project Dialog, search for WIGUx Module Project, then click Next.

image

  1. Change name of the project as desired and click Create.
  1. A new project will be generated, including two example files: a Module and a Controller.
  1. Select your project, right-click on it, and choose Build (or press SHIFT+F6).
  1. Once the build is complete, the .dll will be generated and placed in EMUvr\WIGUx\Modules, ready for use.

Associating a Controller with a UGC

After building your module, it needs to be associated with a UGC file. Follow these steps:

  1. Open EmuVR\WIGUx\Content Manager\WIGUx.Manager.exe.
  2. In the toolbar, click the Configuration button.
  3. Using the file explorer, drag your UGC file into the UGC list in the Modules section.
  4. Select the UGC from the list and click Add Module to UGC.
  5. In the dialog that appears, select the Controller you created, then click OK.
  6. Click Save to confirm the changes.

Your UGC is now associated with the Controller and ready for use!


Updating Your Module Code

Once everything is set up, you can easily update your module with new functionality. Follow these steps to update the module:

  1. Make the necessary code changes to your Module or Controller.
  2. Build the project again (SHIFT+F6).
    • The new build will automatically overwrite the old assembly in the EMUvr\WIGUx\Modules folder.
  3. Once the build completes, restart EmuVR to test the updated functionality.

By following these steps, you can build, customize, and update your own modules for EmuVR seamlessly. If you encounter any issues, feel free to reach out to the community!