public void setModelTexture(UnitModelTextureType type) { Texture texture = null; if (images.TryGetValue(type, out texture)) { renderer.material.mainTexture = texture; } else { SLog.log("UnitModelImage.setModelTexture(): unknown type == " + type.ToString()); } }
// ------------------------------------------------------------------------------------ // public void addTexture(Texture texture, UnitModelTextureType type) { images.Add(type, texture); }