1
Support / Re: managing instanced materials
« on: September 18, 2015, 01:19:03 am »
Ok thank you.
Thanks also for the great asset!
Thanks also for the great asset!
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
private void setBrightness(tk2dSpriteCollection coll, float brightness_value) { //on the source material
tk2dSpriteDefinition spriteDef = coll.spriteCollection.FirstValidDefinition;
if (spriteDef != null) {
Material sharedMat = spriteDef.materialInst;
sharedMat.SetFloat("_Brightness", brightness_value);
}
}