I extend AActor in C++ and create a property of type TSubobjectPtr<UInstancedStaticMeshComponent> like this:
Thing.h
UPROPERTY(VisibleAnywhere, EditInline, Category = MyCategory)
TSubobjectPtr<UInstancedStaticMeshComponent> MyISM;
I then do the following
Thing.cpp
AThing::AThing(const class FPostConstructInitializeProperties& PCIP)
: Super(PCIP)
{
TSubobjectPtr<USphereComponent> DummyComp = PCIP.CreateDefaultSubobject<USphereComponent>(this, TEXT("SphereComp"));
DummyComp->InitSphereRadius(1.0f);
RootComponent = DummyComp;
MyISM = PCIP.CreateDefaultSubobject<UInstancedStaticMeshComponent>(this, TEXT("MyISM"));
MyISM->AttachParent = RootComponent;
MyISM->SetMobility(EComponentMobility::Static);
}
I then extend the Class in a Blueprint, place the blueprint in the level, and when I try to edit the “Instance Start Culling” value in the “Details” pane, I get
ErrorString 0x000000000066c440 L"Assertion failed: !EditReregisterContexts.Find(this)" wchar_t[4096]
May be a duplicate of