Was able to parse UObject with gencpp!!!

This commit is contained in:
2024-04-14 21:51:14 -04:00
parent 7b9e277bc1
commit 48d21ddd15
25 changed files with 855 additions and 422 deletions

View File

@ -21,7 +21,6 @@ public:
FGameplayAttributeData MaxMana;
UGasaAttributeSet();
UFUNCTION()
void Client_OnRep_Health( FGameplayAttributeData& PrevHealth );
UFUNCTION()

View File

@ -3,7 +3,6 @@
#include "Camera/CameraComponent.h"
#include "GameFramework/SpringArmComponent.h"
ACameraMount::ACameraMount()
{
PrimaryActorTick.bCanEverTick = true;

View File

@ -22,4 +22,3 @@ public:
void PostInitializeComponents() override;
#pragma endregion Actor
};

View File

@ -5,4 +5,7 @@ void UGasaGameInstance::Init()
Super::Init();
DevOptionsCache.CachedDevOptions();
using namespace Gasa;
Log(FString::Printf(TEXT("UObject Size: %d RT: %d"), sizeof(UObject), UObject::StaticClass()->PropertiesSize ));
}

View File

@ -0,0 +1,9 @@
// Don't keep this included anywhere
// Purely for inspection purposes
#include "GasaCommon.h"
void test()
{
UObject::StaticClass()->PropertiesSize
}

View File

@ -0,0 +1,7 @@
#include "GasaUserWidget.h"
UGasaUserWidget::UGasaUserWidget(FObjectInitializer const& ObjectInitializer)
: UUserWidget(ObjectInitializer)
{
}

View File

@ -0,0 +1,26 @@
#pragma once
#include "Blueprint/UserWidget.h"
#include "GasaUserWidget.generated.h"
UCLASS(Blueprintable)
class GASA_API UGasaUserWidget : public UUserWidget
{
GENERATED_BODY()
public:
UPROPERTY(BlueprintReadOnly)
TObjectPtr<UObject> WidgetController;
UGasaUserWidget(FObjectInitializer const& ObjectInitializer);
UFUNCTION(BlueprintCallable)
void SetWidgetController(UObject* Controller)
{
WidgetController = Controller;
OnWidgetControllerSet();
}
UFUNCTION(BlueprintImplementableEvent)
void OnWidgetControllerSet();
};

View File

@ -0,0 +1,9 @@
#pragma once
#include "Components/ProgressBar.h"
UCLASS()
class GASA_API UProgressIndicator : public UProgressBar
{
};

View File

@ -0,0 +1 @@
#include "WidgetController.h"

View File

@ -0,0 +1,23 @@
#pragma once
#include "GasaCommon.h"
#include "WidgetController.generated.h"
UCLASS(BlueprintType)
class GASA_API UWdgetController : public UObject
{
GENERATED_BODY()
public:
UPROPERTY(BlueprintReadOnly, Category="Player")
TObjectPtr<APlayerController> Controller;
UPROPERTY(BlueprintReadOnly, Category="Player")
TObjectPtr<APlayerState> PlayerState;
UPROPERTY(BlueprintReadOnly, Category="Player")
TObjectPtr<UAbilitySystemComponent> AbilitySystem;
UPROPERTY(BlueprintReadOnly, Category="Player")
TObjectPtr<UAttributeSet> Attributes;
};