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
1
Question by gringofx · May 22, 2012 at 02:21 AM · androidtouch

Animated Gif

How can I play an animated Gif, in Unity?

Comment
Add comment · Show 1
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 moghes · Jun 25, 2012 at 09:36 PM 1
Share

I had a similar case where I solved like this.

 public var pictureArray:Texture[];
 private var picture:Texture; 
 private var delay:int = 0;
 private var count:int = 0;
 function OnGUI () 
 {  
    delay++;     
    if(delay % 20 == 0)
    {
        count++;
        if(count == pictureArray.Length)
            count = 0;
        picture = pictureArray[count];           
        delay = 0;           
    }       
 }

so that now ur picture is changing dynamically, use it for a guiTexture or inside a GUI window ...

3 Replies

· Add your reply
  • Sort: 
avatar image
2

Answer by Eric5h5 · May 22, 2012 at 02:31 AM

If you write an animated GIF parser yourself, yes. Otherwise no.

Comment
Add comment · Show 7 · 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
avatar image gringofx · May 22, 2012 at 02:54 AM 0
Share

I already have the animated GIF, but does not PLay, Is freeze on the First Frame.

avatar image Eric5h5 · May 22, 2012 at 04:47 AM 0
Share

Well, yes, because (as I said), there is no animated GIF support. Unless you write it yourself.

avatar image flamy · May 22, 2012 at 05:53 AM 0
Share

still gif is not a good format to work with anyway!?! is it!?

avatar image Eric5h5 · May 22, 2012 at 06:08 AM 0
Share

Not really, though I would say there's a certain appeal to the idea of using an animated graphic format where it's really easy to preview the animation in a standard way, rather than working with sprite sheets. Anyway the only hard part about writing an animated GIF importer would be dealing with the compression. Although that is a fairly major hard part.

avatar image gringofx · May 22, 2012 at 12:31 PM 0
Share

No its not good format, but the problem is that I cannot play an $$anonymous$$Pg or whatever video format, that unity gave me as error.

Error building Player: Couldn't build player because of unsupported data on target platform. and I need to put a video inside a plane.

Show more comments
avatar image
1

Answer by Venryx · Mar 03, 2014 at 07:59 PM

You could also try a script like the following, which makes use of Mono's System.Drawing library: http://wiki.unity3d.com/index.php/AnimatedGifDrawer

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
avatar image
0

Answer by Misung · May 11, 2013 at 07:48 AM

Try my goods of asset store.

http://u3d.as/content/zne-edu/zne-gif

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

8 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Touch Not Working 0 Answers

Make an object move in the direction of touch 0 Answers

A node in a childnode? 1 Answer

Android double jump not working correctly 1 Answer

smooth movement with rigidbody2D 1 Answer


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