1. Help us improve the editor usability and artist workflows. Join our discussion to provide your feedback.
    Dismiss Notice
  2. We're looking for feedback on Unity Starter Kits! Let us know what you’d like.
    Dismiss Notice
  3. We’re giving 2017.1 beta testers a chance to win t-shirts and a Nintendo Switch. Read more on the blog.
    Dismiss Notice
  4. Unity 2017.1 beta is now available for download.
    Dismiss Notice
  5. Unity 5.6 is now released.
    Dismiss Notice
  6. Get further faster with the Unity Plus Accelerator Pack, free for new Unity Plus subscribers for a limited time. Click here for more details.
    Dismiss Notice
  7. Check out all the fixes for 5.6 on the patch releases page.
    Dismiss Notice
  8. Learn how you'll soon be able to publish your games to China in four simple steps with Xiaomi. Sign up now for early access.
    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,085
    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,376
    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:
    48
    Venryx likes this.