Skip to content

Accessing StaticSwitchParameterValues #36

@tyen901

Description

@tyen901

Thanks for making this great tool!

I am current stuck trying to access the StaticSwitchParameterValues on MaterialInstanceConstant objects.

image

It does seem to list bHasStaticPermutationResource which indicates that the object has data for static flags.

Below is a snippet from MaterialInstance.h from the UE5 source which talks about this boolean.

	 * Material resources used for rendering this material instance, in the case of static parameters being present.
	 * These will always be valid and non-null when bHasStaticPermutationResource is true,
	 * But only the entries affected by CacheResourceShadersForRendering will be valid for rendering.
	 * There need to be as many entries in this array as can be used simultaneously for rendering.  
	 * For example the material instance needs to support being rendered at different quality levels and feature levels within the same process.
	 */
	TArray<FMaterialResource*> StaticPermutationMaterialResources;```

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions