ArticySoftware / Articy3ImporterForUnreal

Articy Importer plugin for the Unreal Engine 4 and Unreal Engine 5 (work in progress).
MIT License
98 stars 41 forks source link

Calling "Execute" node via an Instruction with multiple custom functions prevents subsequent functions from calling #75

Closed metacrab closed 1 year ago

metacrab commented 1 year ago

I believe this is a bug but if not, please let me know.

In an instruction, there are multiple functions, lets say 2: Function1, and Function2. These are implemented via interface to call separate functions.

ArticyDraft_Ya2TWXvkJ7

Function1 calls the "Execute" node (in my case, the Function was creating an Entity, and the Entity has a "on creation" type instruction in Articy).

UnrealEditor_xnyxhs5N2G

As soon as the Execute node is called it "interrupts" the original instruction, and Function 2 will never be called. If you change the original instruction so Function2 is before Function1, both functions call correctly. Thus I assume it's the Instruction node that's "interrupting" the execution order.

I think I have a stopgap fix (pushing these instructions into a queue and calling them subsequently and separately) but preferably any number of functions in the same instruction would call correctly no matter the order, even if they individually execute separate code. Alternatively if this is intended behaviour then there should be explicit instruction not to do this, so it can be built around from the beginning.

Thanks for reading and all the work you put into these integrations.

Alewinn-TerizKoming commented 1 year ago

Hello @metacrab !

Thank you for using Articy and its importer for Unreal.

Yes, this is a currently known behavior; only one function interface should be used per instruction node in the current state of the importer, but you should be able to chain instruction nodes inside Articy to have them executed in the correct order, as you suggested.

We will update the current documentation accordingly to your observations.

Thanks again!