Hey @chrisk414, glad you are digging in even more.
Converting from BPs to is not ideally a 1:1 operation - they both have different ways of doing things. For example Sk deals with time completely differently than BPs by using coroutines.
The BP to C++ nativizing is not a trivial amount of work and the C++ code that it generates is not meant to be human readable. If you are converting from BP to Sk, then it would be to use Sk for development and not as a final crazy optimization step before making a final shipping build. You will want to be able to grow and maintain your Sk code as you develop your project. We might look into something to help automate the process though we currently have many other features that will give a bigger bang for your development experience so auto-BP translation is less of a priority.
Porting or translating a project is never fun. Obviously the easiest thing would be to have started primarily with Sk in the first place. That being said, we know that people have existing BP (and C++) projects and they want to start doing game logic with Sk so we want to make the process as easy as practically possible.
Since you are just learning how Sk is different and its advantages, this makes porting a project over in the best SkookumScript way an extra challenge.
Each BP class and method will have a corresponding Sk class and method and as mentioned here you can search for Sk, BP or UE4 C++ names due to all Sk UE4 methods being annotated with
&aka and we will soon be adding the same multi system matching to the auto-complete mechanism.
One good example of a BP project fully converted to SkookumScript is the default UE4 Blueprints project - aka the Butterfly project - which we call the
Look at both the classes
Butterfly_Sk. One is coded in Blueprints and one in , both are equivalent in behavior. You’ll see how the version makes use of a coroutine (
_fly) to describe the flow of the behavior of very naturally. This would be almost impossible to convert automatically.
Keep posting questions and ideas on the forum and we’ll answer as best as we can and continue to add more docs and features to make development easier.
(We’ll answer your question about instancing
Widgets in an upcoming post too.)