Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Clarification;Changing Materials

Discussion in 'Scripting' started by AaronC, Sep 28, 2006.

  1. AaronC


    Mar 6, 2006
    I know this has been hit on before, I've run a couple o threads myself on the topic. In the abscence of Quiktime video, We use still images and change them at various speeds to replicate a "movie."

    This is one of Freyrs snippets where I've changed "transform" to "Texture2D"

    Code (csharp):
    1. var obj : Texture2D[];
    3. function GetItem(i) {
    4.    return obj[i];
    5. }
    This enables me to drag and drop Textures into the inspector.
    Which is much faster than making a material, then dragging a texture on to that, and assigning that to a varible slot in a change material script.

    What Im getting at is;
    I have 300+ 128x128 textures in a folder.
    Is there a way thru scripting to turn these into a "movie" without having to make a seperate material for each texture?

    Or simplified still;
    Whats the best way to turn these 300+images into a movie(on a cube or a Gui, either is fine)

    Ive re read the previous threads, but I feel as though my efforts here

    Are uneccessarily time consuming to construct.
    Surely I can have a script in the same folder as the textures and can drag that script onto a gameobject and have the still images flik from one to the next and so on?
    Thanks guys
  2. Eric5h5


    Volunteer Moderator Moderator

    Jul 19, 2006
    Can you use this maybe? Only problem is, a 2048x2048 texture could only fit a maximum of 256 "subtextures" of 128x128 size in it.

  3. AaronC


    Mar 6, 2006
    Hey cheers for steering me in that direction Eric-Id "heard about" that script but having never had a look at it i thought it was a perlin noise script-Thanks

    I realised instead of using an image sequence for a title I can make 3d letters so will look at that

    Will try that in future though