Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: pietwelve on December 11, 2017, 06:07:03 PM

Title: NullReferenceException Object ref not set to an inst of an obj iTween
Post by: pietwelve on December 11, 2017, 06:07:03 PM
Hello,
I've got GameObjects with "itween move Add" action within FSM.
Everyting is allright untill i clone those GObj at startup using "Create Object" action.

Then i've got this console error :
NullReferenceException: Object reference not set to an instance of an object
iTween.RetrieveArgs () (at Assets/iTween/iTween.cs:6793)


Any idea or advice ?
Thanks !
plmker 1.8.4 f5, Unity 5.6.1 f1
Title: Re: NullReferenceException Object ref not set to an inst of an obj iTween
Post by: djaydino on December 11, 2017, 07:04:40 PM
Hi,
The source or target object is getting lost in the procedure.
Try setting a breakpoint after using  "Create Object" action.

to see whats going on
Title: Re: NullReferenceException Object ref not set to an inst of an obj iTween
Post by: pietwelve on December 11, 2017, 09:02:37 PM
hi,
thanks for your post.
- No errors with a breakpoint on the state with the "create Object " action.
- With a breakpoint on the state after the "create Object " action, i've got one error. When clicking on the error the cloned object get highlighted (not the source object)
is that what you suggested to do ?
Thanks
 
Title: Re: NullReferenceException Object ref not set to an inst of an obj iTween
Post by: djaydino on December 12, 2017, 03:53:04 AM
Hi.
Yes, tho clone is loosing the connection.

Are you cloning an object inside your scene or from a prefab?

If from a prefab, you need to connect to scene objects 1st.

here are some ways to do this :

Title: Re: NullReferenceException Object ref not set to an inst of an obj iTween
Post by: pietwelve on December 12, 2017, 08:10:22 PM
Hi,
I'm cloning objects from the scene (not prefab).
Any advice ?
Thanks again :-)
Title: Re: NullReferenceException Object ref not set to an inst of an obj iTween
Post by: djaydino on December 13, 2017, 12:01:59 PM
Hi.
I noticed that it happens when you clone and the other one is still doing the "itween move Add"

If i wait till the "itween move Add" is done and then create i don't get an error.

If i clone a prefab there is no issue.

I would suggest to use prefab instead.

or look into dotween (https://assetstore.unity.com/packages/tools/animation/dotween-hotween-v2-27676) as itween is outdated.
You can find free actions here (http://hutonggames.com/playmakerforum/index.php?topic=10303.msg48638#msg48638)
and paid (maybe more complete) here (https://assetstore.unity.com/packages/tools/visual-scripting/playmaker-actions-for-dotween-by-doozy-49222)
Title: Re: NullReferenceException Object ref not set to an inst of an obj iTween
Post by: pietwelve on December 13, 2017, 07:33:53 PM
Hi,
thanks for the "dotween" advice, i'll look into it.
Unfortunately for some reasons in this case i cant use prefab.
So for now i've replaced itween actions with standard transform actions and the errors are gone ...
Thanks
Have a nice day :-)