johnatm / itween

Automatically exported from code.google.com/p/itween
1 stars 2 forks source link

Addes many iTween Components when script has [ExecuteInEditMode] #85

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. create a script with a simple gui and a gameobject that you use iTween on ( 
i did ScaleTo)
2. put [ExecuteInEditMode] at the top of the script, under the using above the 
class
3. this will show the gui in the editor. In my project doing this would add 
many instances of iTween to my gameObject.

(i also used iTween.init on my gameobject in Start()

What is the expected output? What do you see instead?
You should get many exception errors on the gameobject. If you pause and look 
at the gameobject you will see many instances of itweet. sometimes even after 
hitting the play button to stop the game the itween components would still be 
on the gamObject

What version of the product are you using? On what operating system?

newest, Mac OSX Lion

Please provide any additional information below.

Original issue reported on code.google.com by Pat.Sl...@gmail.com on 19 Aug 2011 at 4:35

GoogleCodeExporter commented 8 years ago
I was also able to reproduce this.  

I found that the scene would start without any iTween components on my game 
objects.

As I initiated each iTween action (FadeTo in my case), I would see the 
component appear and disappear.

Then, when I stopped the Player, the GameObjects that FadeTo (and all their 
children) would have an iTween component added to them. 

The next time the scene would run, errors would fill the console regarding 
iTween components not being attached to a game object.

Luckily, I was able to remove all the ExecuteInEditMode directives and no 
longer saw the issue.

Original comment by youdonot...@gmail.com on 25 Oct 2011 at 4:37