From ab928f3d01e0cf29b7f0f53865316379b20f922e Mon Sep 17 00:00:00 2001 From: Mark Lierman Date: Sat, 16 Aug 2025 14:20:47 -0400 Subject: [PATCH 1/2] Added more info on using Access Transformers for struct properties --- .../ROOT/pages/Development/ModLoader/AccessTransformers.adoc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/ROOT/pages/Development/ModLoader/AccessTransformers.adoc b/modules/ROOT/pages/Development/ModLoader/AccessTransformers.adoc index e836b215..7d184d29 100644 --- a/modules/ROOT/pages/Development/ModLoader/AccessTransformers.adoc +++ b/modules/ROOT/pages/Development/ModLoader/AccessTransformers.adoc @@ -27,6 +27,7 @@ In order to use Access Transformers, create a file in `YourPluginModReference\Co ; You can use semicolons for comments if you want to leave notes about the purpose of an access transformer Friend=(Class="AFGSomeClass", FriendClass="UMyClass") Accessor=(Class="AFGSomeClass", Property="mSomeProperty") +BlueprintType=(Struct="/Script/FactoryGame.SomeStruct") BlueprintReadWrite=(Class="/Script/FactoryGame.FGSomeClass", Property="mSomeProperty") BlueprintCallable=(Class="/Script/FactoryGame.FGSomeClass", Function="SomeFunction") ---- @@ -80,6 +81,8 @@ It cannot be added to a non-`UPROPERTY` field. It also bypasses the private BPRW conflict check (which is compile time only, it does not affect the editor, or the game), so that no changes to the game headers are required. +This is also used for properties within structs, provided they are a UPROPERTY and the struct is BlueprintType (which can be added with an Access Transformer). + === BlueprintCallable Adds `BlueprintCallable` to the specified UFUNCTION, allowing you to call that function from blueprints. @@ -155,6 +158,7 @@ BlueprintReadWrite=(Class="/Script/FactoryGame.FGSchematicManager", Property="mP BlueprintCallable=(Class="/Script/FactoryGame.FGDismantleInterface", Function="Dismantle") EditAnywhere=(Class="/Script/FactoryGame.IconData", Property="ID") BlueprintType=(Struct="/Script/FactoryGame.WorldScannableData") +BlueprintReadWrite=(Class="/Script/FactoryGame.WorldScannableData", Property="Actor") ---- === Blueprint Asset Property Tracing Example From b3b7c8317a260f5da4f1e7d9f1f9f7e13aef3c0a Mon Sep 17 00:00:00 2001 From: Rob B Date: Sat, 16 Aug 2025 14:29:55 -0400 Subject: [PATCH 2/2] Add comment explaining why `Class=` is used to select the struct --- modules/ROOT/pages/Development/ModLoader/AccessTransformers.adoc | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/ROOT/pages/Development/ModLoader/AccessTransformers.adoc b/modules/ROOT/pages/Development/ModLoader/AccessTransformers.adoc index 7d184d29..46c21cd6 100644 --- a/modules/ROOT/pages/Development/ModLoader/AccessTransformers.adoc +++ b/modules/ROOT/pages/Development/ModLoader/AccessTransformers.adoc @@ -157,6 +157,7 @@ Accessor=(Class="AFGBuildableFactory", Property="mInventoryPotential") BlueprintReadWrite=(Class="/Script/FactoryGame.FGSchematicManager", Property="mPurchasedSchematics") BlueprintCallable=(Class="/Script/FactoryGame.FGDismantleInterface", Function="Dismantle") EditAnywhere=(Class="/Script/FactoryGame.IconData", Property="ID") +; Note that even though WorldScannableData is a struct, BlueprintReadWrite still uses Class to select it BlueprintType=(Struct="/Script/FactoryGame.WorldScannableData") BlueprintReadWrite=(Class="/Script/FactoryGame.WorldScannableData", Property="Actor") ----