Converting bp to c++?

Hi, if i were to convert my BP to c++ at some point would that help? I am talking about the auto c++ converter

  • The blueprint contains a “For Each Loop” and has index from give or take 50-50.000
  • The for each loop updates location and rotations from a actor reference

Hey there!

The answer is: it depends.

Converting code from BP to C++ using the blueprint nativization options in UE4 can speed up certain parts of your game/code, but it may not be noticeable. In your case, I would imagine it might help a bit as the iterations of the loop get towards the higher end of that 50,000 range you mention, but down around 50 you’re not likely to see much of a change if any since the for loop isn’t really performing a lot of heavy computations. If the logic is part of your game that runs often though, then it could still be nice to nativize the BP to C++.

That said, the best way to know if it will help is by testing, so you could use the profiling tools to see how long execution of that for loop and it’s updates takes, and then try the convert to C++ option and rerun the tests to see how much time is saved. Hope that helps a bit!

Thanks for the information, i’ll let you know how it goes and post it here :slight_smile: