Agrarsense
MaterialParameterCollectionUtilities.h
Go to the documentation of this file.
1// Copyright (c) 2024 FrostBit Software Lab at the Lapland University of Applied Sciences
2//
3// This work is licensed under the terms of the MIT license.
4// For a copy, see <https://opensource.org/licenses/MIT>.
5
6#pragma once
7
8#include "CoreMinimal.h"
9#include "Kismet/BlueprintFunctionLibrary.h"
10#include "Materials/MaterialParameterCollectionInstance.h"
11
12#include "MaterialParameterCollectionUtilities.generated.h"
13
17UCLASS()
18class AGRARSENSE_API UMaterialParameterCollectionUtilities : public UBlueprintFunctionLibrary
19{
20 GENERATED_BODY()
21
22public:
23
31 UFUNCTION(BlueprintCallable, Category = "Material Utilities")
32 static bool UpdateMaterialCollectionVectorValue(UMaterialParameterCollectionInstance* MPCInstance, const FName ParameterName, const FVector4 Value);
33
41 UFUNCTION(BlueprintCallable, Category = "Material Utilities")
42 static bool UpdateMaterialCollectionScalarValue(UMaterialParameterCollectionInstance* MPCInstance, const FName ParameterName, const float Value);
43
50 UFUNCTION(BlueprintCallable, Category = "Material Utilities")
51 static UMaterialParameterCollectionInstance* LoadMaterialParameterCollectionInstance(const UObject* WorldContextObject, const FString& Path);
52
53};