Explain how getAbc(): bool and setAbc(bool) ufuncs will get compiled into abc. Because of that uprop abc: bool should be named bAbc: bool instead to avoid conflicts.
[!NOTE]
There are plans to generate fields instead of getters/setters for the uprops. The setProp is already taken because of a C++ interop issue with the bindings.
Example:
uClass UDirectInteractionComponent of UActorComponent:
(Blueprintable, BlueprintType, BlueprintSpawnableComponent)
uprops(BlueprintReadWrite, EditAnywhere):
bEnabled: bool
ufuncs(BlueprintCallable):
proc getEnabled(): bool =
self.bEnabled
proc setEnabled(newValue: bool) =
let prevEnabled = self.bEnabled
self.bEnabled = newValue
if prevEnabled != self.bEnabled:
self.onEnabledChanged.broadcast(self.bEnabled)
proc toggleEnabled() =
# Use `setEnabled` on Nim side of things
self.setEnabled(not self.bEnabled)
Explain how
getAbc(): bool
andsetAbc(bool)
ufuncs will get compiled intoabc
. Because of that upropabc: bool
should be namedbAbc: bool
instead to avoid conflicts.Example: