-
Notifications
You must be signed in to change notification settings - Fork 62
Home
Welcome to the Subsystem Browser Plugin wiki! Check navigation on right side.
Subsystems provide an easy way to extend engine functionality and implement new features.
Check Programming Subsystems article or this presentation slides if you haven't tried them yet.
Plugin provides a dedicated Subsystem Browser panel to display active subsystems with property editor.
Subsystem Settings panel provides an easy way to interact with Config properties in Subsystem-derived classes without need to create a standalone UDeveloperSettings class.
There are several ways to install the plugin: from Marketplace and from GitHub.
- Get plugin on FAB: https://www.fab.com/listings/b557270d-b692-4261-bda8-6a8e469a6249
- Click on
Download, launcher would download it for you to specified engine - Activate plugin in editor
Pluginsmenu
- Download source code archive
- Latest development version: From main page
Clone -> Download ZIPmenu. - Marketplace version (may be a bit out of date): From
Releasespage.
- Unpack the contents into "YourProjectFolder/Plugins/SubsystemBrowserPlugin" (create if missing)
- Activate plugin in editor
Pluginsmenu
Function with CallInEditor specifier creates a clickable button in details view that will call it.
Function with SBQuickAction specifier creates an item in context menu of subsystem that will call it.
// A trivial subsystem class
UCLASS()
class UMySubsystem : public UWorldSubsystem
{
GENERATED_BODY()
public:
// Add "Quick Action" function
//
// Will be accessible from context menu on subsystem
UFUNCTION(meta=(SBQuickAction), Category=Stats)
void ResetStats();
// Add "Call In Editor" function that will be accessible in Details View when viewing subsystem.
//
// NOTE: will be visible but not work in UE 5.5+ in Subsystem Settings (Settings display Class Default Object)
// cause https://github.com/EpicGames/UnrealEngine/commit/74d38ba7a6fc2c78133827c31da65d4e9f3d2926
UFUNCTION(CallInEditor, Category=Debug)
void DrawDebugInfo();
}Subsystem Settings feature allows viewing and editing subsystem configs in a similar way to Developer Settings.
If your subsystem class has Config you can view it in a similar way within Subsystem Settings panel.
// Config is required to mark class configurable
// DefaultConfig to store settings in DefaultGame.ini
// Display of subsystem within settings panel can be changed with `SBSection` `SBSectionDesc` specifiers.
UCLASS(Config=Game, DefaultConfig, meta=(SBSectionDesc="My Subsystem Description"))
class UMySubsystem : public UWorldSubsystem
{
GENERATED_BODY()
public:
// A helper function if you need to access defaults
UFUNCTION(BlueprintPure, Category="MyGame|Misc")
static const UMySubsystem* GetMySubsystemDefaults() { return GetDefault<ThisClass>(); }
protected:
// Config - marks property to be configurable
// EditAnywhere - marks property to be editable and shown in DetailsView
// Blueprint[ReadOnly|ReadWrite] - if you want access property in blueprint graph
UPROPERTY(Config, EditAnywhere, BlueprintReadOnly, Category=General)
int32 NumActorsToSpawn = 0;
// Referencing assets has same rules as UDeveloperSettings
UPROPERTY(Config, EditAnywhere, BlueprintReadOnly, Category=General)
TSoftClasPtr<AActor> ActorClassToSpawn;
}Release packages are always updated to latest marketplace release version
You can find me on twitter @AquanoxTV or Unreal Source Discord #cpp or #programmers-hangout channel.