Articy Forum


https://www.articy.com:443/forum/

Custom Methods Are Generated Incorrectly On Export

https://www.articy.com:443/forum/viewtopic.php?f=46&t=19040

Page 1 of 1

Custom Methods Are Generated Incorrectly On Export

Posted: Sat 16. Nov 2019, 02:26
by FlowFoSure
Hello,

My condition node custom methods are generated with the wrong return type on export into Unity when I use a string global variable as a parameter.

Here's what I'm doing:
- On some condition node, I have the custom method SomeMethod(GlobalVar.StringVar)
- On import to Unity, IScriptMethodProvider thinks the return type is void. ArticyScriptFragments also behaves strangely. It's inconsistent, but sometimes part of the generated ArticyScriptFragments methods think the return type is void while others think it is bool, so I receive a compile error. It happen sporadically, so I have trouble recreating it.
- On the same condition node, without changing anything else, I change the method to SomeMethod("StringVar")
- On import, everything is generated perfectly. SomeMethod() has the return type of bool

Unity Version: 2018.4.4f1
Unity Articy Importer: I can't any version info on the plugin, but the Unity package was name ArticyImporter_34886
Articy Draft 3: 3.1.20

Any help or guidance would be appreciated.

Thanks!

Re: Custom Methods Are Generated Incorrectly On Export

Posted: Thu 21. Nov 2019, 16:55
by [Articy] Christian Schildt
Hi FlowFoSure,

thanks for reporting this issue.
We could reproduce it and will take a closer look into it soon.


Best regards,

Chris

Re: Custom Methods Are Generated Incorrectly On Export

Posted: Mon 17. Feb 2020, 17:07
by RisingSun
Just in case anyone else has this issue, I've found a tidy workaround..

Instead of having a Condition with the following
Code: Select all
GetSomeBool()

which will generate a method with void return type, using this instead
Code: Select all
GetSomeBool() == true

in your condition node will correctly generate a method with bool return type, and no need to add redundant parameters.

All times are UTC
Page 1 of 1