How to "expose on spawn" a constructor param in C++?
In BP you can "expose on spawn" a variable and you will have an option to feed some value in it on "SpawnActorFromClass" node.
In vanilla C++ you just define a constructor with params.
How do yo make it in UE4's UCLASS C++?
asked Mar 12 '18 at 05:36 PM in C++ Programming
You create the variable as a UPROPERTY and also give it a special parameter. Here is an example:
answered Mar 12 '18 at 08:11 PM
You spawn an actor, then set the values to what you want. Spawning from the Blueprint does this. Nothing written code does not do this. However you make a single line of code look it is still executing 1 instruction at a time, however many dozens, hundreds, thousands, or millions of instructions are invoked. They are still only executed 1 instruction at a time.
I'm not sure where you got this "1task=1function" idea, but you might as well unlearn that right now. Your entire application is running from a single function called main(). EVERYTASK = 1 function.
answered Mar 14 '18 at 08:19 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here