Connect Object Reference to Material Instance Constant Object Reference

Hi guys!

I’m creating a script that creates an Material Instance for each texture selecter, but I’m running in an issue;

I can’t seem to find a way to connect a newly created material instance (Which is created by the “Duplicate Asset” node) into the instance slot of “Set Material Instance Texture Parameter Value” node, so I can specify which texture I want to have in which Parameter

Does anyone have any idea how to solve this?

I fixed it by making a Cast To “MaterialINstanceConstant” node and put that into the “Set Material Instance Texture Parameter Value” node