Prevent a UObject from being recorded in undo/redo transactions?

Is it possible to prevent a UObject from being saved during a transaction?

My custom UObject is a helper (for example a handle to manipulate the target of a canon) and it does not need to be recoded in the undo/redo stack, I would like to ignore it from transactions.

Ok, I see that there is a NonTransactional property specifier, but I cannot get it to work (I use Unreal.js so it’s a bit different from C++).

Is it possible to specify NonTransactional after the object has been constructed? Or in a different way?

use NonTransactional in your UPROPERTY

UPROPERTY(EditAnywhere, NonTransactional)
float a;