File size: 2,655 Bytes
7fd553e | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | // Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "Kismet/BlueprintFunctionLibrary.h"
#include "UObject/SoftObjectPtr.h"
#include "LyraSystemStatics.generated.h"
template <typename T> class TSubclassOf;
class AActor;
class UActorComponent;
class UObject;
struct FFrame;
UCLASS()
class ULyraSystemStatics : public UBlueprintFunctionLibrary
{
GENERATED_BODY()
public:
/** Returns the soft object reference associated with a Primary Asset Id, this works even if the asset is not loaded */
UFUNCTION(BlueprintPure, Category = "AssetManager", meta=(DeterminesOutputType=ExpectedAssetType))
static TSoftObjectPtr<UObject> GetTypedSoftObjectReferenceFromPrimaryAssetId(FPrimaryAssetId PrimaryAssetId, TSubclassOf<UObject> ExpectedAssetType);
UFUNCTION(BlueprintCallable)
static FPrimaryAssetId GetPrimaryAssetIdFromUserFacingExperienceName(const FString& AdvertisedExperienceID);
UFUNCTION(BlueprintCallable, BlueprintAuthorityOnly, Category="Lyra", meta = (WorldContext = "WorldContextObject"))
static void PlayNextGame(const UObject* WorldContextObject);
// Sets ParameterName to ParameterValue on all sections of all mesh components found on the TargetActor
UFUNCTION(BlueprintCallable, Category = "Rendering|Material", meta=(DefaultToSelf="TargetActor"))
static void SetScalarParameterValueOnAllMeshComponents(AActor* TargetActor, const FName ParameterName, const float ParameterValue, bool bIncludeChildActors = true);
// Sets ParameterName to ParameterValue on all sections of all mesh components found on the TargetActor
UFUNCTION(BlueprintCallable, Category = "Rendering|Material", meta=(DefaultToSelf="TargetActor"))
static void SetVectorParameterValueOnAllMeshComponents(AActor* TargetActor, const FName ParameterName, const FVector ParameterValue, bool bIncludeChildActors = true);
// Sets ParameterName to ParameterValue on all sections of all mesh components found on the TargetActor
UFUNCTION(BlueprintCallable, Category = "Rendering|Material", meta=(DefaultToSelf="TargetActor"))
static void SetColorParameterValueOnAllMeshComponents(AActor* TargetActor, const FName ParameterName, const FLinearColor ParameterValue, bool bIncludeChildActors = true);
// Gets all the components that inherit from the given class
UFUNCTION(BlueprintCallable, Category = "Actor", meta=(DefaultToSelf="TargetActor", ComponentClass="/Script/Engine.ActorComponent", DeterminesOutputType="ComponentClass"))
static TArray<UActorComponent*> FindComponentsByClass(AActor* TargetActor, TSubclassOf<UActorComponent> ComponentClass, bool bIncludeChildActors = true);
};
|