50 lines
1.8 KiB
C++
50 lines
1.8 KiB
C++
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
|
|
class UBlueprint;
|
|
class USCS_Node;
|
|
class UActorComponent;
|
|
class USimpleConstructionScript;
|
|
class UClass;
|
|
class UWingComponentReference;
|
|
class WingOut;
|
|
|
|
|
|
struct UWingComponent
|
|
{
|
|
public:
|
|
static UActorComponent* GetImmutableTemplate(const UWingComponentReference *Ref);
|
|
static UActorComponent* GetMutableTemplate(const UWingComponentReference *Ref);
|
|
|
|
static bool ReparentComponent(UWingComponentReference *Ref, UWingComponentReference *Parent, WingOut Errors);
|
|
static bool DeleteComponent(UWingComponentReference *Ref, WingOut Errors);
|
|
static bool AddComponent(UBlueprint *BP, UClass *Class,
|
|
UWingComponentReference *Parent, FName Name, WingOut Errors);
|
|
|
|
static TArray<UWingComponentReference*> GetAll(UBlueprint* BP);
|
|
static void PrintAll(UBlueprint* BP, WingOut Out);
|
|
|
|
static bool CheckValidComponentClass(UClass *Class, WingOut Errors);
|
|
private:
|
|
struct FoundComponent
|
|
{
|
|
FName Name;
|
|
USCS_Node *SCS;
|
|
UActorComponent *Native;
|
|
};
|
|
|
|
static UActorComponent *FindComponentInCDO(UClass *Class, FName Name);
|
|
static USCS_Node* FindSCSNodeByName(UBlueprint *BP, FName VariableName);
|
|
static FoundComponent FindComponent(UBlueprint *BP, FName Name);
|
|
static bool CheckValidParent(FoundComponent FC, WingOut Errors);
|
|
static bool CheckExists(FoundComponent FC, WingOut Errors);
|
|
static bool CheckNoSuchComponent(FoundComponent FC, WingOut Errors);
|
|
static bool CheckNotNative(FoundComponent FC, const TCHAR *Action, WingOut Errors);
|
|
static bool CheckOwnedByBlueprint(FoundComponent FC, UBlueprint *BP, WingOut Errors);
|
|
static void AddChildNode(UBlueprint *BP, USCS_Node *Node, FoundComponent Parent);
|
|
static TMap<FName, FName> CalculateParentNames(USimpleConstructionScript *Script);
|
|
static void PrintComponentInfo(const FString& TypeName, const FString& VarName,
|
|
const FString& ParentName, bool Inherited, WingOut Out);
|
|
};
|