Does UPROPERTY support a getter method?

TL;DR: I have a non-trivial logic that I want to do when a UPROPERTY is accessed. Is this possible?

So here’s a few extra details:
I want to lazily-convert a byte array that I get from an input device into a UTexture2D when my UPROPERTY UTexture2D is accessed (retrieved, get call, etc). The reason I want to do it lazily, my UCLASS is created in a thread that isn’t the game thread, but I need to wait until the game thread accesses the UCLASS to create the UTexture2D so that the construction is done on the game thread.

C++ does not support that as variables in C++ are directly readed from memory, and reflections does not support that either, there might be something generated from UHT but even so it will be hard to edit things there permanently, but it worth of study that. You need to create Get and Set function Java style, note that lot of Unreal API variables work same way

You could also try to something by overriding = operator, bu not sure how blueprint supports that

http://en.cppreference.com/w/cpp/language/operators

You will want to look into IDetailCustomization to customize the details panel for your object, where you can provide your own Slate implementation and methods for setting values and such. There are plenty of examples of this being used in the source.

Yes :slight_smile: most nodes in blueprints are C++ function binding by using UFUNCTION

UFUNCTION(BlueprintCallable, Category=Something)

Or make passive function, like get varable works

UFUNCTION(BlueprintPure, Category=Something)

If I create Java-style get/set method will the UE4Editor see and use them?