Store blueprint component in an array
I have a blueprint (based on a cpp class) which contains another blueprint as its component: How can I store it in the editor into an array (so that I'm able to access it via cpp)? I thought of something like
but this gives me a "OtherCompilationError (5)"...
asked Sep 23 '16 at 03:18 PM in C++ Programming
Try including "BlueprintReadWrite" in your UPROPERTY macro and change "EditDefaultsOnly" to "EditAnywhere" (at least for now):
You should be able to add the pointer to your array within the Blueprint editor. Do you see the array property in the blueprint? Is it editable but not accepting your component, or is it greyed out?
answered Sep 23 '16 at 07:43 PM
TSubclassOf is templated with the actual class, not with a pointer.
Are you trying to access the component itself or are you trying to access the blueprint to spawn more instances of the component?
If you want to collect multiple instances of your door actor, you just want to store the pointers in the array:
answered Sep 23 '16 at 06:10 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here