- Enable Plugin "Blueprint Material and Texture Nodes"
- Create the following assets:
- Material
- Material Layer
- Material Layer Blend
- Open the Material, and in details enable "Use Material Attributes"
- Add the following Parameters to these assets, set them to the same values:
- Static Switch (set default to true)
- Scalar (set to any non-zero value)
- Vector(set to any color)
- Texture (leave as Default Texture)
- Create a Material Instance from your Material. Assign your Layer & Layer Blend assets. Note that the correct Parameter Values are shown in the dropdown for these assets.
- Create a new Editor Utilities>Asset Action Utility function
- Get Selected assets, and For Each Cast to MaterialInstanceConstant
- Get Material Instance [params from step 4] Parameter Values
- Set Parameter Names to Param (the default name for new Parameters)
- Set Associations to Blend Parameter
- Convert each Return Value to String
- Print all strings to log
- Compile
- Right Click on your Material Instance and select Scripted Asset Actions>[your function name]
Actual Result: The following values are always returned:
- Static Switch: false
- Scalar: 0
- Vector: 0,0,0,1
- Texture: [blank]
Expected Result: The values should be the same as those seen in step 5. Compare by setting Association to Global or Layer.