playMaker

Author Topic: NullReferenceException Object ref not set to an inst of an obj iTween  (Read 2479 times)

pietwelve

  • Junior Playmaker
  • **
  • Posts: 70
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

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: NullReferenceException Object ref not set to an inst of an obj iTween
« Reply #1 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

pietwelve

  • Junior Playmaker
  • **
  • Posts: 70
Re: NullReferenceException Object ref not set to an inst of an obj iTween
« Reply #2 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
 

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: NullReferenceException Object ref not set to an inst of an obj iTween
« Reply #3 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 :


pietwelve

  • Junior Playmaker
  • **
  • Posts: 70
Re: NullReferenceException Object ref not set to an inst of an obj iTween
« Reply #4 on: December 12, 2017, 08:10:22 PM »
Hi,
I'm cloning objects from the scene (not prefab).
Any advice ?
Thanks again :-)

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: NullReferenceException Object ref not set to an inst of an obj iTween
« Reply #5 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 as itween is outdated.
You can find free actions here
and paid (maybe more complete) here

pietwelve

  • Junior Playmaker
  • **
  • Posts: 70
Re: NullReferenceException Object ref not set to an inst of an obj iTween
« Reply #6 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 :-)