I am seeking to store a list of class type references in a TArray accessible in a c++ method that uses the class references to dynamically spawn actors during the game runtime.
My understanding is that this declaration is the correct way to declare the native TArray to store the class references:
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Any)
TArray<TSubclassOf<class AMechWeapon>> WeaponClasses;
I created a blueprint derived class from the parent where I intended to fill the array in the blueprint editor for the derived class. When I attempt to add an element to the array in the blueprint editor it causes an access violation.
Any ideas on how to solve the access violations or a better way to implement what I’m trying to achieve?