- Home /
Create an animation from a bunch of .png images to be used on mobile
I don't have Unity pro, so a good while ago I wrote a script which draws images on screen from a file each frame or so and makes it look like a video is playing. Currently, the script might be a bit heavy for a mobile (or would it really? I do not have a mobile to test it on). I thought, maybe there's a better way to draw a video in a similar technique - I was thinking maybe I could make a sprite sheet and play it as an animation (but still, there's 100+ .png images) or maybe there's a better approach? That is exactly the question - what would be the best way to play a 100 images from a folder as a video and do it so the mobile device wouldn't explode (or just crash). Thank you and c#. Adas Lokys
This isn't as much of answer as it a a suggestion, but have you seen the LiveTexture plugin from Prime31? I know for sure it works on iOS. I'm not 100% if that'd help solve your problem but I'll let you check it out. Sadly, it is not free, and I have yet to try it. https://prime31.com/plugins
And no, I am not with Prime31 in any way whatsoever.
Thanks for the suggestion! However, I would very much like to script it all myself and will take that on this evening. It'd be interesting to see how they tackle this problem, though.
Answer by xortrox · May 09, 2015 at 01:39 PM
Doesn't have to be a spritesheet for it to be an animation. In 2D mode you can just select all the images inside unity and drag them into the scene view and unity will prompt you to save an animation.
This is actually a very good solution to my problem, thanks!
What if you're using 3D mode? I'm trying to use a png sequence with transparency for AR.
Answer by ninjared4 · May 09, 2015 at 03:15 PM
First make a folder in Unity with all of your animation pictures in it. Then go to the animation window(you may have to open it from the Window button in the toolbar). Then click:
Add Curve > Sprite Renderer > Sprite.
Then you can set the sprite in the Inspector window as you would normally.
Answer by Sethhalocat · May 09, 2015 at 03:22 PM
I would reccomend taking a look at the custom 2d game character unity has made for you and.trying to work with that.
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
onControllerHide() crash 0 Answers
How to display a video behind gui on mobile 2 Answers
Android MP4 Video Playback 2 Answers