Currently I a struggling with a bug that’s preventing me from properly debugging my game.
Whenever I attempt to make a BoxComponent not HiddenInGame within the editor it throws this access violation exception
Exception thrown at 0x00007FF951F15502 (UE4Editor-Renderer.dll) in UE4Editor.exe: 0xC0000005: Access violation reading location 0x0000000000000040.
In BasePassRendering.cpp at this location
void FBasePassMeshProcessor::AddMeshBatch(const FMeshBatch& RESTRICT MeshBatch, uint64 BatchElementMask, const FPrimitiveSceneProxy* RESTRICT PrimitiveSceneProxy, int32 StaticMeshId)
{
if (MeshBatch.bUseForMaterial)
{
// Determine the mesh's material and blend mode.
const FMaterialRenderProxy* FallbackMaterialRenderProxyPtr = nullptr;
const FMaterial& Material = MeshBatch.MaterialRenderProxy->GetMaterialWithFallback(FeatureLevel, FallbackMaterialRenderProxyPtr);
The component in question is called a UCameraBoundingBoxComponent and is a child of UActorComponent
ClassGroup=(Custom), meta=(BlueprintSpawnableComponent)
class SIDESCROLLINGDEMO_API UCameraBoundingBoxComponent : public UActorComponent
{
...
UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "CameraBounds", meta = (AllowPrivateAccess = "true"))
class UBoxComponent* BoundingBox;
...
}
Which is then later added to my character in the constructor
ASSDCharacter::ASSDCharacter(const FObjectInitializer& ObjectInitializer)
: ACharacter(ObjectInitializer.SetDefaultSubobjectClass<USSDPlayerMovementComponent>(ACharacter::CharacterMovementComponentName))
{
...
CameraBounds = CreateDefaultSubobject<UCameraBoundingBoxComponent>(TEXT("CameraBounds"));
verify(CameraBounds != nullptr);
...
}
I believe there’s some sort of setup with respect to actor components that I failed to do properly. I also have to reload the entire editor if I make changes to the actor component and attempt to do a hot reload, which I imagine I have to do in the constructor.
Is this a bug, or is there some way to toggle publically made values of actorcomponents from the editor?