Native-defined blueprint subsystem

[go to native definition]

GBAEditor Subsystem#

    Inherits Editor Subsystem

Editor subsystem to handle Gameplay Attribute property renames in Blueprint.

Changing a variable name needs to be handled to prevent crash from happening if any Gameplay Effects is using it, and if that Gameplay Effect was previously opened and focused again in editor (not relevant anymore since rework into using TWeakFieldPtr<FProperty>).

The Details customization for the Attribute or Effect using those needs to be updated "live", whereas in the usual case of having Attributes defined in cpp, code needs to be recompiled and editor restarted.

With Blueprints, we need a way to rename attributes and have Gameplay Effects (or other K2 nodes using Gameplay Attribute) updated to reference the new property.


Subsystem register to an OnVariableRename delegate fired off from UGBAAttributeSetBlueprint, and handle any editor specific code.

When a rename happens, this event fires off and triggers the following logic in this subsystem:

  1. Get all referencers to the original Attribute Set Blueprints (its package name)
  2. Check if any referencers is currently opened in Editor, store them (TODO: Check if renamed attribute is actually used, a referencer can be referencing other attributes from same BP, in which case closing asset editor is not required)
  3. Close any opened referencers in Editor
  4. Update CDO for any referencers to update property from Old Attribute property to the new one
  5. Reopen any closed editor previously, if any