Articy Forum


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

Error using AddComponent

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

Page 1 of 1

Error using AddComponent

Posted: Fri 8. Mar 2019, 16:32
by JoseDavid
Hello, I added the Articy Flow Player component to an gameObject in the following way:
gameObject.AddComponent <ArticyFlowPlayer> ();
and the console showed me the following error:
NullReferenceException: Object reference not set to an instance of an object Articy.Unity.ArticyFlowPlayer.Update () (at <b66cb4cb06c542c9b186a27e269d3f49>: 0)

perhaps this component can not be added by code?

Re: Error using AddComponent

Posted: Mon 11. Mar 2019, 10:54
by [Articy] Christian Schildt
Hi JoseDavid,

thanks for reporting this issue, we will take a closer look into it.
As a quick workaround it seems to work if you assign a newly constructed “ArticyRef” object to the “startOn” field of the flow player, directly after adding the component.


Best regards,

Christian

Re: Error using AddComponent

Posted: Mon 11. Mar 2019, 13:02
by JoseDavid
That seems to work, thanks.

All times are UTC
Page 1 of 1