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
- Building the Solution
- Creating Your Own Module
- Associating a Controller with UGC
- Updating Your Module Code
Creating Your Own Module
- Open the
WIGUx.Samples.slnfile in Visual Studio 2022.
- In the Solution Explorer panel, right-click on your solution and select
Add -> New Project.
- In the New Project Dialog, search for WIGUx Module Project, then click
Next.
- Change name of the project as desired and click
Create.
- A new project will be generated, including two example files: a Module and a Controller.
- Select your project, right-click on it, and choose
Build(or pressSHIFT+F6).
- Once the build is complete, the
.dllwill be generated and placed inEMUvr\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:
- Open
EmuVR\WIGUx\Content Manager\WIGUx.Manager.exe. - In the toolbar, click the
Configurationbutton. - Using the file explorer, drag your UGC file into the UGC list in the Modules section.
- Select the UGC from the list and click
Add Module to UGC. - In the dialog that appears, select the Controller you created, then click
OK. - Click
Saveto 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:
- Make the necessary code changes to your Module or Controller.
- Build the project again (
SHIFT+F6).- The new build will automatically overwrite the old assembly in the
EMUvr\WIGUx\Modulesfolder.
- The new build will automatically overwrite the old assembly in the
- 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!