[C++] Changing alpha of a Material at runtime?

In a simple space shoot-em-up clone, I have pickups that spawn. I’d like if the lifetime reaches a threshold for the pickup to start blinking.

The pickups have a static mesh component, how would I change that static mesh’s alpha at runtime?

You’re looking to create a Material Parameter that you can update to make the material change behavior. I think this link can get you started:

I agree with Dieselhead.
In ue3 we change the material param in code and it still work in ue4 if ParameterCollections not very fit for you.
search SetVectorParameterValueEditorOnly in code, you can extend a new method reference with it.
Or try all GetXXParameterValue in MaterialInstance.

By the way:
the source code in MaterialParameterCollectionInstance class is a good start.

If you right click on the data you want to change in the material, you can Convert to Parameter. Then in the code:

material->Set******ParameterValue(FName(TEXT(“Name you called parameter”)), somethingParameterType);