I am trying to create multiple UStaticMeshComponent by using for loop but Unreal Engine keeps triggering breakpoint on CreateDefaultSubobject in Object.h(Not in my code, it’s from UE4 core API). When I’m creating a single component it’s working fine www.myloweslife.com I am pretty new to UnrealEngine and C++ so I might be doing something dumb but please be easy on that:)
Thank you so much for your help.
Header
#pragma once
#include “CoreMinimal.h”
#include “GameFramework/Actor.h”
#include “FlowSphere.generated.h”
UCLASS()
class CPP_PRACTICE_3_API AFlowSphere : public AActor
{
GENERATED_BODY()
public:
// Sets default values for this actor’s properties
AFlowSphere();
protected:
// Called when the game starts or when spawned
virtual void BeginPlay() override;
public:
// Called every frame
virtual void Tick(float DeltaTime) override;
private:
//UPROPERTY()
//TArray<UStaticMeshComponent*> StaticMeshComponents;
UStaticMeshComponent* test;
};