Why can't I edit the value of an array of actor ?
Hello. I'm trying to reference every actors I create in an array so I could use it to spawn objects then but when I try to edit the variable it says "Editing this value is not allowed", I didn't put the variable in the blueprint yet so I don't understand why couldn't I be able to edit it ? Thank you
asked Apr 29 '14 at 01:39 AM in Blueprint Scripting
You must add them during runtime.
AActor* is the underlying type and it is a pointer. Since it is not a simple data type the potential exists that you could try and reference something in the Pre-PIE / Pre-Game world that would not exist in PIE, or does not exist until PIE.
To reduce chances of errors like this (which would crash the Editor to desktop), you are encouraged/required to add the AActor* elements after game time starts.
After game start, use the appropriate Array nodes to add the actors you want to the array.
Follow this question
Once you sign in you will be able to subscribe for any updates here