Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Kronas · Jul 01, 2013 at 04:14 PM · itweennullplaymaker

Null Ref Error with Playmaker and iTween

I have a simple prefab created with my character, two cubes that are used for waypoints to patrol, and one large cube used as a trigger to tell that character to chase after the player. When I have this prefab in the scene by himself there are no problems. However when I place that prefab into another prefab within the scene I start getting constant Null Ref errors, all coming from iTween.

 NullReferenceException: Object reference not set to an instance of an object
 iTween.RetrieveArgs () (at Assets/Plugins/iTween/iTween.cs:6788)
 iTween.Awake () (at Assets/Plugins/iTween/iTween.cs:6538)
 UnityEngine.GameObject:AddComponent(String)
 iTween:Launch(GameObject, Hashtable) (at Assets/iTween/Plugins/iTween.cs:6740)
 iTween:MoveTo(GameObject, Hashtable) (at Assets/iTween/Plugins/iTween.cs:1448)
 HutongGames.PlayMaker.Actions.iTweenMoveTo:DoiTween() (at Assets/Scripts/PlayMaker/Actions/iTween/iTweenMoveTo.cs:177)
 HutongGames.PlayMaker.Actions.iTweenMoveTo:OnEnter() (at Assets/Scripts/PlayMaker/Actions/iTween/iTweenMoveTo.cs:106)
 HutongGames.PlayMaker.FsmState:OnEnter()
 HutongGames.PlayMaker.Fsm:EnterState(FsmState)
 HutongGames.PlayMaker.Fsm:SwitchState(FsmState)
 HutongGames.PlayMaker.Fsm:UpdateStateChanges()
 HutongGames.PlayMaker.Fsm:Start()
 PlayMakerFSM:Start()

 NullReferenceException: Object reference not set to an instance of an object
 iTween.CallBack (System.String callbackType) (at Assets/Plugins/iTween/iTween.cs:7031)
 iTween.TweenStart () (at Assets/Plugins/iTween/iTween.cs:4585)
 iTween+<Start>c__Iterator2.MoveNext () (at Assets/Plugins/iTween/iTween.cs:6546)

 NullReferenceException: Object reference not set to an instance of an object
 iTween.LateUpdate () (at Assets/Plugins/iTween/iTween.cs:6589)

The only place I am using iTween is within some of the playmaker scripts I have made. The Playmaker script simply uses iTween Move To to move to one point and once it gets there it uses it again to move back. Once the character enters the trigger collider it then goes into the chase state where I use iTween Move Update to move toward the player. The players object is stored in a global variable and the chase script uses that global variable. The other two points used for the pathing are just cube objects within the prefab of the character.

Has anyone run into this before, or have any ideas as to what might be causing the issue? Also if you need any additional information just let me know and I will get you anything you need.

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Bardoctorus · Jul 25, 2013 at 03:04 PM 0
Share

You had any luck with this? I've had an almost identical problem and I can't for the life of me figure out what he issue is.

avatar image navidhaghighi · May 24, 2018 at 03:24 PM 0
Share

i'm still having this problem , iTween adds too many components too my gameobject. it is a really annoying problem. and i can't get new iTween through assetstore (since our country is restricted) , so i have an old version of iTween downloaded from github. if anyone have new iTween and could upload it somewhere for me i would appreciate it, or if anyone found a solution for this problem.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by SubatomicHero · Jul 26, 2013 at 12:08 PM

Check the object that is performing the iTween animations. I had this error where there were many instances on iTween scripts attached to the objects at the editor level.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image pixelR · Sep 16, 2013 at 10:59 AM 0
Share

I cannot vote it up yet but this was the solution for me. I don't know why there were so many iTween components attached to my GameObject in the editor, my only guess is that a Play$$anonymous$$aker update must have been gone wrong somehow. Removing all those iTween components made the error go away and everything works now as expected.

UPDATE: problem is there again. $$anonymous$$y prefab instance gets an additional script attached whenever another gameobject uses it in a iTweenRotateTo FS$$anonymous$$ action. :/

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

19 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

itween add null checker 1 Answer

NGUI - Simulate a button press from script 3 Answers

New UI Issues. 0 Answers

Unity Itween error 3 Answers

Playmaker: How to use transform.position in actions 2 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges