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
0
Question by zerox911 · Jul 16, 2012 at 04:19 AM · animationimportflashto

flash animation scene to unity

a few questions i want to ask regarding about animations from Adobe Flash and Unity itself..

  1. how could i import an animation scene from Adobe Flash to unity??

  2. what is the suitable amount of animation time is allowed to Unity for optimum performance??

  3. regarding to (2).. im planning to make cut scenes for every level that is passed.. for your (readers) opinion.. how long does the cut scene to be played??

that is all.. any opinions, answers and suggestions is highly appreciated...

thank you..

p/s : its a stick figure(2D) cut scene..

Comment
Add comment
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

2 Replies

· Add your reply
  • Sort: 
avatar image
2
Best Answer

Answer by J Lam · Jul 17, 2012 at 06:53 AM

Yes, Movie Texture is for PRO only.

or you can have a simple script to replace the texture by frames, here you go, save this into a file SequenceImagePlayer.cs

How to use:

  1. Attach this script to a gameObject with renderer.

  2. You can drag the textures one by one to inspector, or

  3. Place your images under a folder "Resources/yourOwnFolderHere", then input the imagePrefix as "yourOwnFolderHere"

  4. Adjust your frame rate like in Flash


    using UnityEngine; using System.Collections;

    public class SequenceImagePlayer : MonoBehaviour { public Material playerMaterial; public Texture[] playerImages; public string imagePrefix; public int frameRate = 12;

    private float timer; private int currentFrame = 0;

    public void Start(){ if (playerMaterial.Equals(null)){ playerMaterial = gameObject.renderer.material; }

    if (playerImages.Length == 0){ Object[] allImages = Resources.LoadAll(imagePrefix); playerImages = new Texture[allImages.Length]; for (int i=0; i

    public void Update(){ timer += Time.deltaTime; if (timer > 1f/frameRate){ timer = 0f; currentFrame ++; currentFrame = currentFrame % playerImages.Length; SetFrame(currentFrame); } }

    public void SetFrame(int currentFrame){ playerMaterial.mainTexture = playerImages[currentFrame]; } }

Comment
Add comment · Show 1 · 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 zerox911 · Jul 17, 2012 at 06:59 AM 0
Share

thank you very much..!!!

avatar image
0

Answer by J Lam · Jul 16, 2012 at 03:27 PM

You can try export flash animation into sequence images, and load the images as texture to a mesh plane for a quick solve. But this is not a good solution as the texture takes up many memory especially in mobile devices.

If your animations are mainly transform tween animations instead of shape blending, you could try export raw shapes to images and import to unity as mesh plane texture, then animate the plane transform inside Unity. But Unity does not provide a very good editor for keyframe animation, therefore you may feel painful to do keyframe animation inside Unity.

We have similar situation before and we tried many ways around this. And our last approach is "model" in Flash, import and animate in Maya (or any 3D software), then export as FBX and import into Unity. This is the best solution we found to have least impact to memory.

I'm not quite sure whats the meaning of animation time you mentioned...

Comment
Add comment · Show 3 · 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 zerox911 · Jul 17, 2012 at 02:47 AM 0
Share

im new at this animation stuff.. in fact i got an idea of adding cut-scenes to my game... its like a short movie before continuing the game..

what i meant for animation time was the animation period.. or a timeline for the animation... im not so sure whats the correct term for this..

is there another way where i can animate from flash and import directly to unity??

im not doing 3D animations... its a 2D cutscene.. like some stick figures animation...

and.. thanks for your opinion.. i'll try to follow what you have suggested.. that is.. if i can do it...

thanks again..

avatar image J Lam · Jul 17, 2012 at 05:44 AM 0
Share

If its a short movie, you can try looking into the $$anonymous$$ovie Texture that Unity provided, but it is only available in Pro license: http://docs.unity3d.com/Documentation/$$anonymous$$anual/VideoFiles.html

I guess I know what you're asking... Unity is not a frame based editor(tho within update of a $$anonymous$$onoBehaviour, it is being called by "frames"), at least you cannot edit your stuff in a timeslider like the one in flash.

avatar image zerox911 · Jul 17, 2012 at 05:56 AM 0
Share

just to confirm.. $$anonymous$$ovie Texture is only available for PRO only..

but the scenes can be imported to unity(without pro license)??

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

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

How to Import Flash Animations for in-Game use 0 Answers

Import Animation from C4D 1 Answer

Deformation in Character Animation that is not intended. 1 Answer

Unity won't animate Maya Model 1 Answer

importing animation from cheeta 3d 6.0 to unity 4.3 0 Answers


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