/// <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 }
/// <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 }