Newly installed versions of the engine will now attempt to copy the project-agnostic config settings from a previous engine installation. This happens by way of a versioned manifest that copies old versions when the manifest does not exist, or is a different version. This code path is benign for non-installed versions of the engine (or FPaths::ShouldSaveToUserDir() is false).
EditorGameAgnosticSettings and EditorUserSettings ini paths have been renamed to EditorSettings and EditorPerProjectUserSettings respectively to better convey their purpose. In general, most settings should be saved in EditorSettings (project-agnostic) so that they apply regardless of which project is open. We have some way to go migrating existing settings for this to be the case, however.
Some previously per-project configuration files are now project-agnostic (such as Editor.ini, EditorKeyBindings.ini, and EditorLayout.ini)
GEditor->Access...Settings and GEditor->Get...Settings have been removed in favor of direct access of the CDO through GetMutableDefault<> and GetDefault<> respectively. Global config ini filenames that are not set up are now neither loaded nor saved on build machines, to handle the problem of indeterminate state more generically.
This addresses UETOOL-270 (Most editor preferences should be project-agnostic)
[CL 2517558 by Andrew Rodham in Main branch]
The fact that the error message said "failed to add class" despite the class itself being added was causing confusion.
In the case where adding a new class fails to hot-reload (probably due a compiler error) we now state that the class itself has been added, but that you'll need to recompile the module before it will appear in the editor, and offer an easy way to open the output log to see more detailed compiler output. We also automatically close the class wizard so that you're not left looking at an error message saying that "the class name is already in use".
[CL 2515833 by Jamie Dale in Main branch]
Slate Widget was failing, because of missing Slate dependencies. Testing introduced a couple of problems which all was fixed by this CL:
1. I introduced AdditionalDependencies in .uproject file and change "Add Code To Project..." procedure to fill this array if needed. UBT reads this field and builds the project with required modules. Needed for Slate classes.
2. Changed UHT to #include missing headers in generated.h files if it was missing an include for it's super class. It was causing problems if we were trying to add a subclass of BrushShape -- BrushShape.h didn't have #include "Brush.h" and UBrushShape was inheriting from UBrush.
3. Above problems also occured for Slate classes, but not all of them was UCLASSes, so I had to fixed that manually.
4. "Add Code To Project..." functionality was not invalidating UBT makefiles, which lead to omitting new source files during hot-reloading (even thought it was reporting a success). This change also should improve a bit performance, cause right now there is no "gathering" step -- there is only invalidate step which is a lot quicker.
5. Fixed "Selected Class Source" link to source class in Slate Widget and Slate Widget Style class.
#codereview Robert.Manuszewski
[CL 2481488 by Jaroslaw Palczynski in Main branch]
We now sync the Content Browser view after adding a new class, and also open the BP editor when adding a new BP class.
[CL 2475251 by Jamie Dale in Main branch]
UE-9554 - Add BP/C++ Component's Show all classes list not expanded by default
It now hides the Object root if UObject is not a valid base class type, as this allows the next level of classes to be expanded out which looks much better when adding new component classes.
This involved a lot of shuffling of module dependencies so that we could link GameProjectGeneration to ClassViewer, as previously ClassViewer was directly linking to GameProjectGeneration.
I went through and fixed everything that was linking to GameProjectGeneration to instead list it as a dynamic dependency (which it is, as nothing needs to link to it), and then verified that everything was using ClassViewer correctly (found some places that were only marking it as a dynamic dependency without also adding it as an include module, causing issues with missing API macro definitions as they were including ClassViewer headers via a relative include path).
#codereview Andrew.Rodham
[CL 2451499 by Jamie Dale in Main branch]
The class wizard now filters out non-Blueprintable component types when adding a new BP component
UE-9604 - Add Blueprint Component dialog ignores Blueprintable metadata, allowing you to create a blueprint from any component at all
This vastly limits the selection until UE-8946 has been addressed.
This change also makes the class wizard verify that its featured classes pass the active class filter (as some featured component classes aren't currently Blueprintable).
[CL 2448686 by Matthew Griffin in Main branch]
Editor: Add standard colors for Blueprint/Native text references to editor style
- Update hyperlinks and components tree to use the standard color (native links are now greener)
- Improve selection behavior for these colorized text fields so they are still readable
- Remove some dead style entries
[UE-8717]
[CL 2446936 by Matthew Griffin in Main branch]
Generalized "Add Code to Project" dialog to allow creation of both c++ and blueprint class types.
The add component option when blueprintable components is enabled, now opens up this dialog rather than the parent class picker.
UE-8491 - IWCE: New C++ Component and New Blueprint Component should prompt you for a component type to subclass
[CL 2446735 by Matthew Griffin in Main branch]
Improvements to naming of newly-created C++ and BP components through SCS tree
- Strip off "_C" suffix on newly created Blueprint classes
- Don't strip "Component" from Blueprint class names unless it is the suffix
- Changed prefix for newly-created C++ components from "My" to "New"
- New Blueprint components default to the name of the class unless they are Blueprints of UActorComponent, in which case the name is just "NewComponent"
- New C++ components default to the name of the class unless they inherit from UActorComponent, in which case the name is just "NewComponent"
#codereview matt.kuhlenschmidt
[CL 2425794 by Ben Marsh in Main branch]
Added an experimental method to add a new C++ class derived from ActorComponent to an actor. The purpose of this is to add scripting support directly on an actor without subclassing the actor.
[CL 2419710 by Ben Marsh in Main branch]
After adding a new class, we now always open the IDE to edit source if the hot reload completed successfully
- Also, we display a quick pop-up notification indicating success instead of a modal prompt
[CL 2419701 by Ben Marsh in Main branch]
UE-7184 - Show game c++ classes and engine c++ classes in the content browser
The Content Browser now has extra entries for "Game C++ Classes" and "Engine C++ Classes" (with "Game" and "Engine" being renamed to "Game Content" and "Engine Content" respectively). These new folders serve as hosts for the list of available C++ modules, with each module internally mirroring the folder structure on disk.
For example:
- Game C++ Classes
- ShooterGame
- Classes
- Bots
- ShooterBot
- ShooterAIController
- [...]
- [...]
The Content Browser allows you to navigate and search these classes like you can with assets, and provides convenient access to either edit an existing class, or create a new class (either within a selected folder, or derived from a selected class).
As the Content Browser only shows you known UClass types, any new classes need to be compiled into a loaded module before they will appear. This means that adding a new class will now automatically hot-reload your target module. Should you prefer to handle building and loading your modules manually, you can disable the automatic hot-reload via "Editor Settings" -> "Miscellaneous" -> "Hot Reload" -> "Automatically Hot Reload New Classes" (see UEditorUserSettings::bAutomaticallyHotReloadNewClasses).
[CL 2409386 by Jamie Dale in Main branch]
- Added IDesktopPlatform::GetUserTempPath() and implemented it for windows
- Created SGetSuggestedIDEWidget class that handles whether to show a "Download X" hyperlink vs. an "Install X" button (depending on whether the platform supports on-demand installation)
- Analytics event added ("Editor.Usage.InstalledIDE") that fires whenever the "Install X" button is clicked
- Changed SourceCodeIDEURL_Windows in BaseEditor.ini from the VSC 2013 web page link to the installer download link (need to replace with perma-link once we have it)
[CL 2409158 by Dan Hertzka in Main branch]
UETOOL-213 - Minimize Slate FString -> FText conversion (remove SLATE_TEXT_ATTRIBUTE)
This fixes any editor/engine specific code that was passing text to Slate as FString rather than FText.
[CL 2399803 by Jamie Dale in Main branch]
Introduces the concept of "Active Ticking" to allow Slate to go to sleep when there is no need to update the UI.
While asleep, Slate will skip the Tick & Paint pass for that frame entirely.
- There are TWO ways to "wake" Slate and cause a Tick/Paint pass:
1. Provide some sort of input (mouse movement, clicks, and key presses). Slate will always tick when the user is active.
- Therefore, if the logic in a given widget's Tick is only relevant in response to user action, there is no need to register an active tick.
2. Register an Active Tick. Currently this is an all-or-nothing situation, so if a single active tick needs to execute, all of Slate will be ticked.
- The purpose of an Active Tick is to allow a widget to "drive" Slate and guarantee a Tick/Paint pass in the absence of any user action.
- Examples include animation, async operations that update periodically, progress updates, loading bars, etc.
- An empty active tick is registered for viewports when they are real-time, so game project widgets are unaffected by this change and should continue to work as before.
- An Active Tick is registered by creating an FWidgetActiveTickDelegate and passing it to SWidget::RegisterActiveTick()
- There are THREE ways to unregister an active tick:
1. Return EActiveTickReturnType::StopTicking from the active tick function
2. Pass the FActiveTickHandle returned by RegisterActiveTick() to SWidget::UnregisterActiveTick()
3. Destroy the widget responsible for the active tick
- Sleeping is currently disabled, can be enabled with Slate.AllowSlateToSleep cvar
- There is currently a little buffer time during which Slate continues to tick following any input. Long-term, this is planned to be removed.
- The duration of the buffer can be adjusted using Slate.SleepBufferPostInput cvar (defaults to 1.0f)
- The FCurveSequence API has been updated to work with the active tick system
- Playing a curve sequence now requires that you pass the widget being animated by the sequence
- The active tick will automatically be registered on behalf of the widget and unregister when the sequence is complete
- GetLerpLooping() has been removed. Instead, pass true as the second param to Play() to indicate that the animation will loop. This causes the active tick to be registered indefinitely until paused or jumped to the start/end.
[CL 2391669 by Dan Hertzka in Main branch]