x


How do I animate a pre-animated video on Unity Material object?

I have created a plane mesh, which has a little video 2d animation, created on 3d Studio. This animates well in rendering on this, however, importing it and placing it in the world space on Unity, does not reveal, possibly setting incorrect, anybody know the answer?

more ▼

asked Feb 17 '10 at 10:22 AM

Peter Hagan gravatar image

Peter Hagan
2 2 2 2

Are you using a movie texture for this? Are you seeing nothing at all or just the first frame or... ?

Feb 19 '10 at 01:27 PM andeeee ♦
(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

[Edit] just realised your question was asked on Feb 17th and it is now May, oh well maybe you still need help.

I assume you've created the plane and have the animated texture working within 3D Studio, but then when you import it to Unity it doesn't play.

Here is what you shoud do (assuming you havn't already.

  • Place your Plane into the scene (or create a new Plane via Game Object > Create Other > Plane)

  • Click on your plane and go to 'Mesh renderer' in the Inspector Window, then go to Materials and where it says 'Element 0' press the arrow to open a dropdown menu and select your Animated Texture (or simply drag the texture into this field). This assigns the texture to the plane.

  • It's a good idea to change the shader of the texture to Self-Illumin/Dissuse as this means that the texture generates light and will be coreectly visable (though this is only a personal preference)

  • Next you will need a script to tell the animation to play and when to play it, here is an example here:

    function Start () { // play the cutscene renderer.material.mainTexture.Play (); }

Assign this script to the Plane that the texture is applied to, That will simply play the animation straight away as you start playing.

Hope that helps.

more ▼

answered May 24 '10 at 06:05 PM

Jack Eaves gravatar image

Jack Eaves
235 12 12 26

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

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

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x1036
x282

asked: Feb 17 '10 at 10:22 AM

Seen: 1787 times

Last Updated: Feb 17 '10 at 10:22 AM