Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: parthpatel1612 on June 13, 2014, 11:00:32 AM
-
I am trying to change the sprite at runtime and its work properly but when i tried to use TweenPosition.Begin on the parent gameobject then its changes it back to the default sprite and also changes the scale.
I attaching the pictures of what its doing. I am trying to change the top left calculator icon to audio icon.
First pic - default
Second pic - changed sprite - works properly
third pic - when used tween upper left sprite changes back to the calculator sprite and changes the scale.
Let me know what I am doing wrong.
Thank you
-
TweenPosition has nothing to do with sprites at all. It's used to move the transform from point A to point B. Your issue lies elsewhere -- possibly in not specifying the sprite's name correctly. Note that it's case sensitive.
-
can you tell me how to change sprite or image in UI2DSprite???
thanks
-
GetComponent<UI2DSprite>().sprite2D = someOtherSprite;
-
Thanks ...