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 infrid · Apr 18, 2012 at 01:19 AM · updateitweeneasing

Why are tweening libraries so horifically slow on iOS and what can we do?

I've been trying to tween a couple of objects in my game to simulate a lobbed ball, basically moving a horizontal and vertical container, both over a set amount of time, with different easing functions.

I've tried iTween - lose 30 fps, just for having 3 tweens on my ipod touch 4g. Same with HOTween - lose 30 fps the second I execute the tweens.

I tried ANi.Mate, but couldn't get it to work, which at least saves me from it's ugly, ugly naming ;)

So.. why is it that this seems to be such a hard thing to do on iOS.

I've now found myself from being quite a way through my game to back to the start, as I need to manually write a whole bunch of easing functions, etc, that work in update methods and do not eat 30fps just to move 3 objects ..

Anyone got any ideas on what I can do? I'm guessing I'm going to have to basically look inside iTween or similar and lift out the easing code.. has anyone got any pointers to any code examples for doing this?

Comment
Add comment · Show 5
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 Demigiant · Apr 18, 2012 at 07:20 PM 0
Share

Losing 30 fps for 3 tweens, whatever the tween engine used, is honestly not possible. Probably there's something wrong in the way you create the tweens (or you're animating something that requires additional update time by Unity - like animating a rigidBody with compound colliders - thus the cause is to be found elsewhere). Anyway, you can grab HOTween's easing functions on its Google code source (http://code.google.com/p/hotween/source/browse/#svn%2Ftrunk%2FHoloville%2FHOTween%2FCore%2FEasing)

avatar image Adamcbrz · Apr 19, 2012 at 04:06 AM 0
Share

I agree iTween should not be that expensive. I am using it a lot in my iOS apps with very little overhead. Are you sure that iTween is the issue?

avatar image Berenger · Apr 19, 2012 at 06:12 AM 1
Share

As iTween seems to work with a coroutine, I have a feeling you're creating many instances of routines, like in an Update function.

avatar image maroonrs2 · Apr 19, 2012 at 09:10 AM 0
Share

I know the feeling...

avatar image yezzer · Apr 19, 2012 at 09:14 AM 0
Share

I too have used iTween in iOS and not noticed what you're describing. As @berenger suggests, you may be creating the tween in an Update() or similar.

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by dentedpixel · Nov 27, 2012 at 06:16 PM

I too had issues with iTween on iOS. Because I was so frustrated by the perfomance hit, and I really wanted to still use a tweening library. I wrote my own library called LeanTween.

You can download it here: http://u3d.as/content/dented-pixel/lean-tween/31i

To answer your question; I found the biggest problem with iTween is that for every tween it is instantiating and destroying an object (at least from what I could tell looking through the code). Instantiation is quite an expensive operation in Unity on iOS. So my tweening library avoids this, instantiating all the objects at the beginning of the scene and reusing these objects as needed instead of creating new ones.

Comment
Add comment · 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

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

10 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

Related Questions

How do I use iTween outside of start? 0 Answers

iTween, I need a Sharp movement between points on an iTween path 0 Answers

iTween ValueTo FieldOfView isn't easing 1 Answer

Replacing iTween.MoveUpdate with iTween.MoveTo 1 Answer

Custom Easing Types using Curves for Motion? 3 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