My example of assigning values to a dynamic array in Blueprints was more for:
- adding values in blueprints, to then be accessed during run time in C++
- something like this
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category=BP)
In this hypothetical case,
you are giving the rest of your team the power to create a list of 2D points in the default properties of a blueprint
And then you can access this data in the C++ at game launch.
This could be 2D points where you are supposed to iterate over all the points and create hud elements, or anything really!
Or it could be 3D points where you should spawn items, or FNames that you should iterate over and use for some purpose.
The point is that you can give your Team the power to send you an unknown amount of data, **AFTER compile time, **
that can vary day to day,
and you can set up the C++ code to use this unknown amount of data!
It’s an amazing thing about blueprints!
That you can add more data AFTER compile time, yet use dynamic arrays to perform the same logic in C++ no matter how much data the Designers add.
You give Designers an FName Array to add entries to over the lifetime of the project
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category=SMAssetPaths)
In the C++, for each FName Entry, which should be the full asset path of a static mesh,
you **[dynamically load](https://wiki.unrealengine.com/Dynamic_Load_Object)** the UStaticMesh and spawn a new Static Mesh Actor and assign the UStaticMesh.
In this way you have engineered a C++ system that Blueprint Designers can extend and utilize to create their chosen number of unique static mesh actors with unique static mesh assets that they create!
The best part is,
**they can add more tomorrow, and the next day, without you ever doing a code compile!**
**I think this aspect of C++ to Blueprint interaction is amazing!**
It really means that you are empowering your entire team!
Whereas you are 1 programmer, you might have 30 Designers who can now create a change to the C++ behavior using **Blueprints + Dynamic Arrays.**