CreateWidgetStacks

CreateWidgetStacks

#Overview

name: CreateWidgetStacks

The value of this variable can be defined or overridden in .ini config files. 5 .ini config files referencing this setting variable.

It is referenced in 3 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of CreateWidgetStacks is to define and configure a list of widget creation tool stacks in Unreal Engine 5’s widget editor tool palette. This setting variable is used to organize and manage different sets of widget creation tools within the editor interface.

CreateWidgetStacks is primarily used by the WidgetEditorToolPalette plugin, which is an experimental feature in Unreal Engine 5. This plugin enhances the widget editor with additional tool palette functionality.

The value of this variable is set in the UCreateWidgetToolSettings class, which inherits from UDeveloperSettings. This suggests that the variable can be configured through the project settings or engine configuration files.

CreateWidgetStacks interacts with other variables and structures within the plugin, such as FCreateWidgetStackInfo and FCreateWidgetToolInfo. These are used to define the individual stacks and tools within each stack.

Developers should be aware that this is part of an experimental plugin, so its behavior and API may change in future engine versions. They should also understand that modifying these settings will directly affect the available tool stacks in the widget editor.

Best practices when using this variable include:

  1. Carefully planning the organization of widget creation tools into logical stacks.
  2. Ensuring that the DisplayName for each stack is clear and descriptive.
  3. Regularly reviewing and updating the tool stacks to match project requirements.
  4. Being cautious when modifying these settings, as they affect the editor workflow for all team members.
  5. Documenting any custom configurations to maintain consistency across the development team.

#Setting Variables

#References In INI files

Location: <Workspace>/Engine/Plugins/Experimental/WidgetEditorToolPalette/Config/BaseWidgetEditorToolPalette.ini:2, section: [/Script/WidgetEditorToolPalette.CreateWidgetToolSettings]

Location: <Workspace>/Engine/Plugins/Experimental/WidgetEditorToolPalette/Config/BaseWidgetEditorToolPalette.ini:3, section: [/Script/WidgetEditorToolPalette.CreateWidgetToolSettings]

Location: <Workspace>/Engine/Plugins/Experimental/WidgetEditorToolPalette/Config/BaseWidgetEditorToolPalette.ini:4, section: [/Script/WidgetEditorToolPalette.CreateWidgetToolSettings]

Location: <Workspace>/Engine/Plugins/Experimental/WidgetEditorToolPalette/Config/BaseWidgetEditorToolPalette.ini:5, section: [/Script/WidgetEditorToolPalette.CreateWidgetToolSettings]

Location: <Workspace>/Engine/Plugins/Experimental/WidgetEditorToolPalette/Config/BaseWidgetEditorToolPalette.ini:6, section: [/Script/WidgetEditorToolPalette.CreateWidgetToolSettings]

#References in C++ code

#Callsites

This variable is referenced in the following C++ source code:

#Loc: <Workspace>/Engine/Plugins/Experimental/WidgetEditorToolPalette/Source/WidgetEditorToolPalette/Private/WidgetEditorToolPaletteCommands.cpp:26

Scope (from outer to inner):

file
function     void FWidgetEditorToolPaletteCommands::RegisterCommands

Source code excerpt:

	const UCreateWidgetToolSettings* Settings = GetDefault<UCreateWidgetToolSettings>();

	for (const FCreateWidgetStackInfo& CreateWidgetStack : Settings->CreateWidgetStacks)
	{
		TSharedPtr<FUICommandInfo> StackCommand;

		FUICommandInfo::MakeCommandInfo(
			this->AsShared(),
			StackCommand,

#Loc: <Workspace>/Engine/Plugins/Experimental/WidgetEditorToolPalette/Source/WidgetEditorToolPalette/Private/WidgetEditorToolPaletteMode.cpp:49

Scope (from outer to inner):

file
function     void UWidgetEditorToolPaletteMode::Enter

Source code excerpt:

		// Create tool stacks defined in settings
		const UCreateWidgetToolSettings* Settings = GetDefault<UCreateWidgetToolSettings>();
		for (const FCreateWidgetStackInfo& CreateWidgetStack : Settings->CreateWidgetStacks)
		{
			const TSharedPtr<FUICommandInfo>& StackCommand = ToolPaletteCommands.CreateWidgetToolStacks[CreateWidgetStack.DisplayName];
			ToolStackContext->RegisterToolStack(StackCommand, CreateWidgetStack.DisplayName);

			for (const FCreateWidgetToolInfo& CreateWidgetToolInfo : CreateWidgetStack.WidgetToolInfos)
			{

#Loc: <Workspace>/Engine/Plugins/Experimental/WidgetEditorToolPalette/Source/WidgetEditorToolPalette/Public/Settings/CreateWidgetToolSettings.h:78

Scope (from outer to inner):

file
class        class UCreateWidgetToolSettings : public UDeveloperSettings

Source code excerpt:

	/** List of tool stacks to create */
	UPROPERTY(EditAnywhere, config, Category=Startup)
	TArray<FCreateWidgetStackInfo> CreateWidgetStacks;
};