0
Answered

is it possible to use a variable to control a materials parameters?

Aeon FitzGerald 3 months ago in Game Creator updated 2 months ago 6

I'd like to use an action to control the emission intensity on my game objects material, can this be accomplished in GC? 

Unity version:
2019.3
Game Creator version:
1.1.5

Answer

Answer

If you want you can mark this as solved, i just duplicated my material and made one with emission and one without and used the change material action. its not a smooth transition but it works well enough, thanks for your time. 

GOOD, I'M SATISFIED
Satisfaction mark by Aeon FitzGerald 2 months ago

not sure if its matters but im using hdrp 

Under review

Right now I'm not sure how the type of the emission of a material. It really depends on the shader though. If it has the type "Color", you could try using this action from the Hub: https://hub.gamecreator.io/content/item/AGDQhJWN1yls3G3DN6m7.

You'll need to know the name of the variable (most likely Emission or _Emission).

However, if its type is a Float, it will require a custom action.

Thanks for the reply, i tried that action (which seems like it will work in theory) but i get this warning "This should not be called but it's here for legacy purposes. Please contact us at: marti@catsoft-studios.com. Thanks!"

Answer

If you want you can mark this as solved, i just duplicated my material and made one with emission and one without and used the change material action. its not a smooth transition but it works well enough, thanks for your time. 

+1
Answered

Darn, I need to update that Action. I'm opening a ticket. Despite this, you can still use that Action. The only thing is that it doesn't accept "Invoker" as the target game object. The rest should work fine.

I'll still be in the lookout for making an Action that allows smooth material transitioning values. I believe this should be fairly useful.