Do you mean nullptr, rather than nullptrn?
Regarding my suggestion above, the static assert is inside the constructor, so it’s only important that the constructor has seen the full definition of ABaseCharacter. So to avoid circular includes, it would be better like this:
// MyClass.h
#pragma once
#include "MyClass.generated.h"
class ABaseCharacter; // Forward declare this
UCLASS()
class UMyClass : public UObject
{
GENERATED_BODY()
UMyClass(); // Explicitly declare a constructor
UPROPERTY()
TWeakObjectPtr<ABaseCharacter> PawnInstigator;
};
// MyClass.cpp
#include "MyClass.h"
#include "BaseCharacter.h" // Make sure we have the full definition of ABaseCharacter
UMyClass::UMyClass()
{
} // PawnInstigator will be constructed here, where the full definition of ABaseCharacter is known
Steve