Wwise SDK 2021.1.14
|
Resource file (with .rc as the extension) is a file format used to describe the resources used by the plug-in to create a custom graphical interface. An easy way to manage Resource files is to use the Visual Studio Editor tool, which lets you drag-and-drop widgets on a canvas to build the GUI. Here are the steps to create a Resource file for a new plug-in.
First of all, create a new plug-in with wp.py (if you're not familiar with the development tools, refer to Using the Development Tools).
Answer the prompts and when the plug-in is created, change directory to the project folder and call premake
.
Open the generated solution file (.sln) in Visual Studio 2019, make sure that the project folder is highlighted (do not confuse this with the solution folder, otherwise the Add New Item
choices will be different) and select Add New Item...
in the Project menu. In the dialog window, select Resource
in the left column, and then Resource File (.rc)
in the middle pane. This will create a file named Resource.rc
in the WwisePlugin
folder of your project.
In the Resource View, right-click on the Resource.rc
file and select Add Resource
. In the Add Resource
window, select Dialog and click the New button.
Note: When you create a DIALOG window, make sure you set the following styles in its Properties:
|
Using the Toolbox
tab on the left side of the interface, you should now be able to drag-and-drop widgets on the canvas to compose the graphical interface of the plug-in. Saving the project will update the Resource file.
To include the Resource.rc
file in your project, all you have to do is to call premake again. Then, the next time you build your plug-in, a file called resource.h
will be automatically generated based on the Resource file:
To tell the plug-in to use the custom interface, you need to override the methods provided by AK::Wwise::Plugin::GUIWindows
. In Win32/PluginNamePluginGUI.h
, include resource.h
, add the method signatures and create a private variable to store a window handle:
In Win32/PluginNamePluginGUI.cpp
, add the implementation of these methods:
Recompile and load the plug-in in a Wwise project. You should now see your custom graphical interface.
Questions? Problems? Need more info? Contact us, and we can help!
Visit our Support pageRegister your project and we'll help you get started with no strings attached!
Get started with Wwise