- Cleaner code – abstracts all Broke Protocol API and network calls
- Less manual work – no need to constantly sync code between systems
- Fewer bugs – avoids mismatches like "EnterButton" vs "Enterbutton" between code and Unity
- No transfer errors – eliminates inconsistencies between Unity and C# implementations
-
Import unitypackage
PL_PPC_UiGen.unitypackage -
Wait for Unity to Recompile
-
.uxmlFile Naming Convention
Files must be named in the format[PluginName]_[Category/Folder]_[MenuName], e.g.:BetterBP_Estate_ManageSettings.uxmlThis helps avoid name conflicts between menus or plugins.
-
UI Object Names
Set each UI object's name that you want to have a variable.

-
Close Button Requirement
If you want a close button, it must be named"CloseMenu".
This will generate a virtual void On_CloseMenu_Pressedwiththis.Close()instead of aabstract voidwhich will need to be manually overwritten. -
Generate UI Code
Navigate toPointLife-PPC-UiGen→Generate UI Code


-
Select the Export Path
Create a folder in your Visual Studio solution for your plugin. Ideally the Autogenerated Stuff has its own Folder so it does not overwrite or delete any of your code.
-
Enable
DISABLE TEXT
This will show the names of the fields. This does not change anything and is just information for you to see if everything is named correctly. -
Accept or Modify Suggested Fixes
Address the proposed changes to resolve any issues. The Field and File naming is that two Menus won't be sending the same Event. Example the CloseButton would otherwise falsely trigger for all Menus if not renamed.
-
Build and Export Files
-
Add DLL Reference
Add!0PPC-UiGen-BaseType.dllas a reference in your plugin and place it in thePluginsorManagedfolder.
!0PPC-UiGen-BaseType.dll
<Reference Include="0PPC-UiGen-BaseType">
<HintPath>$(BPDIR)\Plugins\!0PPC-UiGen-BaseType.dll</HintPath>
</Reference>-
SDK-style
.csprojSupport
If you're using an SDK-style.csproj, the exported folder will be included automatically. -
Scaffold a New Class
Create a class and add:
using PointLife.UiGen.Scaffold;- Use Visual Studio Alt+Enter
To auto-generate the class.

You can overrideOpenandCloseif needed. Note: Instead of setting stuff in Open ideally set it in the Constructor.
You can now add Code
using BPEssentials.ExtensionMethods;
using BrokeProtocol.Entities;
using PointLife.UiGen.Scaffold;
namespace BPPlasmaGangs.Menus.UiToolkit.Menus
{
public class ManageSettings : scaffold_BetterBP_Estate_ManageSettings
{
public ManageSettings(ShPlayer _player) : base(_player)
{
}
public override void Open()
{
Fields.Text_Password.UpdateTo("123456789"); // Write last Password
Fields.Toggle_AllowVisitors.UpdateTo(true); // Write last Toggle
base.Open();
}
public override void On_Save_Pressed()
{
Fields.UpdateAll(player).Then(() => // Get all Fields from the Client
{
player.TS("settings_saved");
player.TS("setting_toggle", Fields.Toggle_AllowVisitors.CheckboxValue);
player.TS("setting_password", Fields.Text_Password.Text);
Close(); // Close Menu
});
}
}
}In a Command it can then be used like:
new ManageSettings(player).Open();-
VisualElement -
Button -
TextField -
Label(with name attribute) -
Toggle -
Image -
TextMeshPro(TextElement with TextMeshPro integration) -
Slider - TODO -
ProgressBar -
ListView -
ScrollView -
DropdownField - TODO -
IntegerField -
FloatField -
Toolbar -
Tooltip -
MultiColumnListView -
TemplateContainer -
MouseEvent -
KeyEvent -
VisualTreeAsset -
GroupBox -
TextElement -
Box(for layout purposes) -
Window
