Search Unity

  1. We've closed the job boards. If you're looking for work, or looking to hire check out Unity Connect. You can see more information here.
    Dismiss Notice
  2. We're running great holiday deals on subscriptions, swag and Asset Store packages! Take a peek at this blog for more information!
    Dismiss Notice
  3. Check out our Unite Austin 2017 YouTube playlist to catch up on what you missed. More videos coming soon.
    Dismiss Notice
  4. Unity 2017.2 is now released.
    Dismiss Notice
  5. The Unity Gear Store is here to help you look great at your next meetup, user group or conference. With all new Unity apparel, stickers and more!
    Dismiss Notice
  6. Introducing the Unity Essentials Packs! Find out more.
    Dismiss Notice
  7. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice
  8. Unity 2017.3 beta is now available for download.
    Dismiss Notice

animated gif is not working

Discussion in 'iOS and tvOS' started by chishti, Aug 5, 2009.

  1. chishti

    chishti

    Joined:
    May 21, 2009
    Posts:
    187
    Hi

    I am using a animated gif that displays "Loading..."
    and while it is used in game play it don't displays the dots(...). Any Idea to display animated gif.

    Or Any other idea that we can display a loading screen that may contain the Loading bar or something like that.

    thanks in advance

    unityboy
     
  2. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    31,399
    Unity doesn't have any support for animated gifs. It's a terrible format anyway; use a series of textures instead.

    --Eric
     
  3. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,596
    you can not have any animation during loading anyway. Nothing on screen is beeing updated.
     
  4. jtbentley

    jtbentley

    Joined:
    Jun 30, 2009
    Posts:
    1,379
    If your'e using gif as your only format, you don't have anything to load anyway :)
     
  5. n_khan

    n_khan

    Joined:
    Aug 3, 2009
    Posts:
    1
    Hey dude, I am here.
    Better you use sequence of images (texture) to animate. Because there is no solution for animated gif in unity. :D
     
  6. chishti

    chishti

    Joined:
    May 21, 2009
    Posts:
    187
    thanks guys I got the point what I have to do.

    thanks to all again :)
     
  7. chishti

    chishti

    Joined:
    May 21, 2009
    Posts:
    187
    I have implemented the logic of rendering 4 images that have "Loading", "Loading.", "Loading..", "Loading...". I used GUI.Label (I have tried DrawTexture as well) to change them after certain number of frames in function OnGUI.

    Code (csharp):
    1.  
    2. var LoadingScreens : Texture[];
    3. function Start()
    4. {
    5.         Counter = 1;
    6.     i = 0;
    7. }
    8. function OnGUI()
    9. {
    10. GUI.Label(Rect(0, 0, 480, 320), LoadingScreens[i]);
    11.     Counter += 1;
    12.     if(Counter%100 == 0)
    13.         i+=1;
    14.    
    15.     if (i>3)
    16.     {       Counter = 0;
    17.         i=0;
    18.     }
    19. }
    20.  
    As a testing I used them in the menu back ground screen to render them it was working fine and the images were changing as expected.

    But the same Logic is not working when My level of game is being loaded after executing Application.LoadLevel("MyLevel"). Any Idea what Could be the reason. heavy processing or what ????

    thanks

    unityboy
     
  8. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,596
    no
    after LoadLevel and until its fully loaded there is no world update nor any execution of anything.
    processing will continue after the load has been finished
     
  9. mehrdada

    mehrdada

    Joined:
    Jan 21, 2013
    Posts:
    5
  10. Jtbentley_v2

    Jtbentley_v2

    Joined:
    Sep 5, 2012
    Posts:
    174
    I didn't think we could load levels asynchronously on iPhone..?
     
  11. Venryx

    Venryx

    Joined:
    Sep 25, 2012
    Posts:
    438
    Last edited: Mar 3, 2014
  12. WestHill

    WestHill

    Joined:
    Oct 29, 2012
    Posts:
    71
    Venryx likes this.