Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 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 Blayer98 · Oct 27, 2014 at 11:33 PM · profilerlogogif

AnimatedGifDrawer

Hi there,

I have a problem with a tutorial that I'm following so i can have a logo intro for my game.

The link for it is here: http://wiki.unity3d.com/index.php/AnimatedGifDrawer

(I can't afford Unity Pro, WAY TOO EXPENSIVE -.-) Anyway, For some odd reason while i was testing out my compiled .exe file, the debug system told me that Profiler is only for Unity Pro, when I never even used the Profiler in the first place??

The error also said something like this: alt text

 using System.Collections.Generic;
 using System.Drawing;
 using System.Drawing.Imaging;
 using UnityEngine;
  
 public class AnimatedGifDrawer : MonoBehaviour
 {
     public string loadingGifPath;
     public float speed = 1;
     public Vector2 drawPosition;
  
     List<Texture2D> gifFrames = new List<Texture2D>();
     void Awake()
     {
         var gifImage = Image.FromFile(loadingGifPath);
         var dimension = new FrameDimension(gifImage.FrameDimensionsList[0]);
         int frameCount = gifImage.GetFrameCount(dimension);
         for (int i = 0; i < frameCount; i++)
         {
             gifImage.SelectActiveFrame(dimension, i);
             var frame = new Bitmap(gifImage.Width, gifImage.Height);
             System.Drawing.Graphics.FromImage(frame).DrawImage(gifImage, Point.Empty);
             var frameTexture = new Texture2D(frame.Width, frame.Height);
             for (int x = 0; x < frame.Width; x++)
                 for (int y = 0; y < frame.Height; y++)
                 {
                     System.Drawing.Color sourceColor = frame.GetPixel(x, y);
                     frameTexture.SetPixel(frame.Width - 1 - x, y, new Color32(sourceColor.R, sourceColor.G, sourceColor.B, sourceColor.A)); // for some reason, x is flipped
                 }
             frameTexture.Apply();
             gifFrames.Add(frameTexture);
         }
     }
  
     void OnGUI()
     {
         GUI.DrawTexture(new Rect(drawPosition.x, drawPosition.y, gifFrames[0].width, gifFrames[0].height), gifFrames[(int)(Time.frameCount * speed) % gifFrames.Count]);
     }
 }


untitled99.png (20.2 kB)
Comment
Add comment · Show 2
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 ragnaros100 · Oct 30, 2014 at 10:34 AM 0
Share

why not just use spritesheets? It's much easier and less clunky to work with

avatar image Blayer98 · Oct 30, 2014 at 01:32 PM 0
Share

Ok, I'll have a go at that.

0 Replies

· Add your reply
  • Sort: 

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

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

Related Questions

Can I use the profiler for mobile with just Unity Pro? (non iOS or Android pro) 0 Answers

Unity Free works fine with Unity Pro? 1 Answer

Pro feature 0 Answers

difference free and pro version? is it worth it? 1 Answer

'Profiler' error message, but no Profiler code 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