Creating C# plugin
Browzwear supports writing a plugin in C#. Follow these steps to create a basic plugin:
Create new project
Install VStitcher.
Open Visual Studio.
Go to File -> New -> Project.
In the New project wizard, choose Visual C# -> Class Library.
Set your desired project name and location and click 'OK'.
Add Browzwear library to your project
Go to 'Project' menu -> 'Add Reference...'
Browse to '%PROGRAMFILES%\Browzwear\VStitcher\{VSTITCHER-VERSION}'.
Select 'BwPluginAPICSharp.dll' file.
Click 'OK'.
Now that you have reference to 'BwPluginAPICSharp', right click on it and select 'Properties'.
Change the value of 'Copy Local' to False.
Initialize plugin
Add the following code to an existing / new .cs file:
using BwPluginApi;//You must create the class under the global namespace
class BwApiPlugin
{
// implement initialization function
public static int Init(string args /*= Empty String!!! */)
{
// return 1 for successful initialization
return 1;
}
}Create plugin.json file to your plugin
Create a file named plugin.json in the plugin folder. refer to "..\BWPlugin\schema\plugin_manifest.json" for more information.
Example of plugin.json file:
{
"identifier": {Your identifier},
"name": {Your plugin name},
"type": "c#",
"main": {Your dll path},
}Note: 'type' should always be c# if you using c# to create your plugin.
Project settings
For the plugin to work you need to place it in the right folder. To change your project settings:
Go to your project Properties.
Under 'Build', change the 'Output path' to:
C:\Users\{USER}\AppData\Local\Browzwear\VStitcher\Plugins.In order to be able to debug the plugin go to 'Debug' and do the flowing:
Set 'Start Action' to 'Start external program' and point to:
C:\Program Files\Browzwear\VStitcher\{VSTITCHER-VERSION}\VStitcher.exeMake sure in 'Enable Debuggers' the checkbox "Enable native code debugging" is selected.
That's it! You just created your first plugin.