|
Hey, guys. When I run this short script, I'm getting a NullReferenceException error. I have no idea why. The error points to this line in iTween: I know it's the "MoveBy" call, because the other part is working correctly--but no luck with the first bit. Here's the script. Any ideas about what I'm doing wrong? UPDATE: Tried using even a basic MoveBy iTween, and no luck. Is there something wrong with the way I'm calling it from the Start function?
(comments are locked)
|
|
SOLVED-- Okay user error: turns out I had TWO iTween folders (ie duplicates) in my project. I guess when I updated once it didn't overwrite the old one, and gave me a new different version instead. So I had two iTween versions coexisting. Ugh. That took me four hours of my life to figure out. But once I deleted the old iTween folder it now works fine. Hope someone finds that helpful!
(comments are locked)
|
|
I'd like to confirm that this happened to me too. This must be some sort of iTween bug. Not sure how-- but four separate iTween scripts mysteriously appeared on my game object. I didn't put them there! In fact, they were set to a quadratic ease (default?) which I hadn't used... so no idea how they appeared. I notice that when I hit play, iTween does instantiate some sort of iTween script on my gameobject. However it usually disappears when you hit stop. Several accrued on my go however. Perhaps if I crashed or something the instantiated script stuck to my prefab and then didn't destroy? Very weird and annoying bug!
(comments are locked)
|
|
I had an unexpected Null Reference Exception from iTween happen to me when the iTween script was mysteriously set on a GameObject in the inspector. Perhaps that happened to you too.
(comments are locked)
|

Maybe the object is destroyed before iTween is finished?
Thanks for thinking about it with me! But destroyed how? I'm not destroying it in this script...and I've just written the object, so there's no chance of it being destroyed by another script, I don't htink....
Hmm, can't technically see anything wrong. Is there any reason why you are calling "oncompletetarget" on the MoveBy's? You shouldn't have to reference that. I haven't looked through the iTween source but it's possible there's an exception error if you try to declare the target to itself.