Search Unity

Texture swap and UV

Discussion in 'Editor & General Support' started by BlueMumm, Feb 28, 2008.

  1. BlueMumm

    BlueMumm

    Joined:
    Feb 7, 2008
    Posts:
    43
    I was wanting to know how texture swapping worked and how Unity does it. I also wanted to know if Unity supported multiple UVs per model.
     
  2. CBot

    CBot

    Joined:
    Jan 25, 2008
    Posts:
    29
    Do you mean "how does one swap the texture of an object?" The following will do it.

    Code (csharp):
    1.  
    2. var newTexture : Texture;
    3. object.renderer.material.mainTexture = newTexture;
    4.  
    I'm not sure about the second question.
     
  3. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203
    Unity supports both multipe uv sets and multiple materials per mesh.
     
  4. BlueMumm

    BlueMumm

    Joined:
    Feb 7, 2008
    Posts:
    43
    Can you explain how to do multiple UVs. I have not found anything on how to do this. Thanks for the reply
     
  5. AaronC

    AaronC

    Joined:
    Mar 6, 2006
    Posts:
    3,552
    You have to have an modelling application that does this. Like Maya, or cheetah3d. Or Blender if you are patient.

    AC
     
  6. toole11

    toole11

    Joined:
    Jan 18, 2008
    Posts:
    12
    I'm working with Mumm on this problem and we are currently using a cube primitive made in Maya '08 which has 3 UV sets on it to try and figure out the problem.
     
  7. AaronC

    AaronC

    Joined:
    Mar 6, 2006
    Posts:
    3,552
    Rightclick over your object, go UV linking, then fiddle with whats assigned to what in the "UVcentric" relationship editor.

    Selecting from one side and selecting from the other is how you assign textures to uv sets.
    HTH
    AC