0
Fixed

Change the material using a list of variables.

Homie 5 months ago in Game Creator updated by Marti (Lead Developer) 5 months ago 3

Hello everyone!

I recently started using GC, so sorry for the possibly stupid question!

So, I have a character that contains many materials (16) on one Skinnedmesh, and I need to change, let's say one of them. However, when I use "Change material" it only changes the first one (Element 0). I think, i need to create a list of variables and modify the material using the index, just can't figure out how to do it. Suggestions, guys?

Unity version:
2019.2.3
Game Creator version:
1.0.5

Answer

Answer
Fixed

Awesome! I've just updated the Change Material Action. I'm marking this topic as Fixed. It will be available tomorrow (if the Asset Store team reviews our package in time), together with other bugs squashed and other brand-new features.

If after the update you have any questions regarding this topic, feel free to reopen it. Cheers!

Fixing

Hi Homie,

Welcome to the Game Creator community. Don't worry about asking anything. In fact, you're right. We didn't take into account that a mesh could have more than one material. Unity gives access to THE material of the renderer as well as a list of materials. 

We'll be updating the current Change Material action to support index-based selection. The default one will be set to zero, in order to keep compatibility with previous versions.

+1

Thanks for the quick response. I will wait for the update)

Answer
Fixed

Awesome! I've just updated the Change Material Action. I'm marking this topic as Fixed. It will be available tomorrow (if the Asset Store team reviews our package in time), together with other bugs squashed and other brand-new features.

If after the update you have any questions regarding this topic, feel free to reopen it. Cheers!