-
Notifications
You must be signed in to change notification settings - Fork 247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Differentiating between object reference and class reference #72
Comments
So, in example you provided there is array of UClass pointers? Could you give me game name, class and field name where this bug occurs, so I can find a way to differentiate them. |
No, it is a type. For example, In UE editor in Blueprints, when you create a variable to a reference type UObject like Actor or PlayerController it offers 2 choices:
On C++ side it is respectively:
I can but I believe you dont need to know specific game, it is nothing unique and this is just how UDumper seems to handle things in general (?). If you desire so I can make repro test project on UE 4.26.2, it is very simple, just define basic class with 2 types of said members and then package and dump. The only way I managed to figure this out is because they have used it in a blueprint that inherited custom C++ class and in BP they have populated inherited field which was serialized later with BP body. Obviously you cant do that with pointers. |
Test project: https://www.dropbox.com/s/u8soy5cjtu9cph4/WindowsNoEditor.7z?dl=1 // Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "MyActor.generated.h"
UCLASS()
class MYPROJECT_API AMyActor : public AActor
{
GENERATED_BODY()
public:
// Sets default values for this actor's properties
AMyActor();
protected:
// Called when the game starts or when spawned
virtual void BeginPlay() override;
public:
// Called every frame
virtual void Tick(float DeltaTime) override;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
TArray<AMyActor*> ObjectReference;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
TArray<TSubclassOf<AMyActor>> TypeReference;
}; Dumped as: // Class MyProject.MyActor
// Size: 0x240 (Inherited: 0x220)
struct AMyActor : AActor {
struct TArray<struct AMyActor*> ObjectReference; // 0x220(0x10)
struct TArray<struct AMyActor*> TypeReference; // 0x230(0x10)
}; |
So, is this problem solved? |
So I have this dump from UD:
which, if you try to inherit the data, would be
UPROPERTY(EditAnywhere, BlueprintReadWrite) TArray<AMyCharacterBase*> ListOfPlayables;
However, in actuality it is
These are completely different things. Is it impossible to differentiate this type runtime when dumping?
The text was updated successfully, but these errors were encountered: