Exposing Reserve() to Blueprints arrays
This is a vital performance function when generating arrays with 500+ size per tick, cause memory reallocation kills the performance completely in blueprint only projects. Can it be exposed to blueprints in the near future?
asked Jun 24 '18 at 09:46 PM in Blueprint Scripting
It is possible to expose the function yourself. Though doing it might cause problems with Blueprint nativization and might not work in the future. See here: https://forums.unrealengine.com/development-discussion/c-gameplay-programming/1590531-implementing-a-custom-generic-array-function-for-blueprint-like-array-remove-requires-customthunk
If you wanna do it anyway: You need a class that inherits from FScriptArray (or implement everything in there on your own), probably want a copy of FScriptArrayHelper that works with your child of FScriptArray.
Then see KismetArrayLibrary.h and my link above on how to create generic array functions.
answered Jul 17 '19 at 03:03 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here