Summary
Several Scene Graph methods are missing the <transacts>
effect.
# on `entity`
AddComponents<native><final><public>(Components: []component): void
AddEntities<native><final><public>(NewChildEntities: []entity): void
RemoveFromParent<native><final><public>(): void
# on `component`
RemoveFromEntity<native><final><public>(): void
Please select what you are reporting on:
Verse
What Type of Bug are you experiencing?
Verse
Steps to Reproduce
Try replicating the same technique as the following extensions:
@experimental
# Sets the global transform of this entity, in the case the entity does not have a transform_component it will create one and set its global transform
(InEntity: entity).SetGlobalTransform<native><public>(NewGlobalTransform: (/Verse.org/SpatialMath:)transform)<transacts>: void
@experimental
# Sets the local transform of this entity, in the case the entity does not have a transform_component it will create one and set its local transform
(InEntity: entity).SetLocalTransform<native><public>(NewLocalTransform: (/Verse.org/SpatialMath:)transform)<transacts>: void
The extensions are marked as <transacts>
and they claim that one can add a new component to an entity while being in a transacts context. However this is only achieved because those methods are <native>
and rely on internal non-verse implementation. The same technique is not possible in pure verse right now as the methods mentioned at the top are not annotated with <transacts>
.
Expected Result
The 4 methods mentioned at the top should get the <transacts>
effect.
Observed Result
The 4 methods cannot be use from within a transaction and thus cannot be used in a faileable context where their side-effect would be undone on failure. This forces the verse developer to create methods that return an optional result inside of <transacts><decides>: t
.
Platform(s)
UEFN (v34.00)