Exemplo n.º 1
0
 /// <summary>
 /// Adds a texture to the material specified by index
 /// </summary>
 /// <param name="index"></param>
 /// <param name="descriptor"></param>
 public void AddTexture(int index, TextureDescriptor descriptor)
 {
     _textureDescriptors.Add(index, descriptor);                       // add descriptor
     _renderer.materials[index].mainTexture      = descriptor.Texture; // set texture
     _renderer.materials[index].mainTexture.name = descriptor.Path;    // name the texture
 }
Exemplo n.º 2
0
 /// <summary>
 /// Adds a texture to the material specified by index
 /// </summary>
 /// <param name="index"></param>
 /// <param name="descriptor"></param>
 public void AddTexture(int index, TextureDescriptor descriptor)
 {
     _textureDescriptors.Add(index, descriptor); // add descriptor
     _renderer.materials[index].mainTexture = descriptor.Texture; // set texture
     _renderer.materials[index].mainTexture.name = descriptor.Path; // name the texture
 }