Set up a UE4 project to use SkookumScript
In order to run SkookumScript code as part of your project, the project must first be set up to use SkookumScript. We call this Skookifying a project.
Skookify your project
- At the bottom of the Members widget, click the collapsed New Class or Member pane. A “Skookify your project?” confirmation message will display:
-
Click Yes to add the files SkookumScript needs to your project. (See Skookification: What happens under the hood below.)
-
If you are using a version control system such as Perforce, you will need to start tracking the project by adding the new
Scripts
folder and all its subfolders and files. (You do not have to add theContent\SkookumScript
folder or files, since they are generated by the SkookumIDE.)
Congratulations, your project is now Skookified! You can now add snazzy SkookumScript code via the New Class or Member pane.
What if I click No?
If you click No, your project will remain un-Skookified and no SkookumScript code will be saved in your project. The New Class or Member pane will remain unavailable. You will still be able to use the SkookumIDE Workbench widgets to run engine script snippets in your non-Skookified project.
Skookification: What happens under the hood
When you Skookify your UE4 project, this is what happens:
- a
Scripts
folder is created, which contains aSkookum-project.ini
project settings file that details all the overlays for the project - a
Project
subfolder is created—this will contain SkookumScript code in theProject
overlay - compiled script binaries are placed in the
Content\SkookumScript
folder - the SkookumScript UE4 Plugin is notified about Skookifying the project (which obviously requires the SkookumIDE be connected to the UE4 editor) and it does the following additional actions:
- the project-specific Blueprints and C++ script bindings (those reflected to Blueprints) are analysed and the corresponding SkookumScript overlays and scripts are generated including the subfolders
Project-Generated-BP
andProject-Generated-C++
DefaultGame.ini
is modified to include the SkookumScript compiled binaries in the cooked project data. IfDefaultGame.ini
is checked into version control, it will first be checked out.
- the project-specific Blueprints and C++ script bindings (those reflected to Blueprints) are analysed and the corresponding SkookumScript overlays and scripts are generated including the subfolders
Some assembly may be required
It is possible that the analysis and generation of corresponding SkookumSript code could have some problems. There can be duplicate names or other issues that may need to be resolved by hand. If this occurs and you have trouble getting your project to generate valid initial SkookumScript code or getting up and running, please seek help on the SkookumScript Forum where the SkookumScript team and other SkookumScript users can lend a hand.
Resolving name collisions: UE4 Blueprint and reflected C++ renaming system for generated SkookumScript
A class/struct/enum and property renaming system exists to resolve name collisions during the generation of SkookumScript code from UE4 Blueprints and reflected C++. Skookification of all class/struct/enum and data member names gets routed through the renaming system.
To use it, add entries to your project’s Config/SkookumScript.ini
file.
Use the +RenameClasses
key to specify a rename rule for a class/struct/enum in the format:
Use the +RenameProperties
key to specify a rename rule for a property/data member in the format:
You can also use the package name (asset path) to resolve name clashes between assets with the same name located in different folders. The generic syntax is:
For example:
When you make changes to the SkookumScript.ini
file, and change focus back to UE4 editor, the SkookumScript.ini
file gets reloaded by the SkookumScript plugin and script files are regenerated based on the changes - then changing focus to the SkookumIDE and compiling applies the changes to the compiled SkookumScript binaries.
SkookumScript and non-SkookumScript projects: feature comparison
With both SkookumScript-enabled and non-SkookumScript projects, code snippets can be executed from the SkookumIDE Workbench (REPL) widgets using common engine commands. However, only SkookumSript-enabled projects can create project-specific SkookumScript commands. Likewise, only SkookumScript-enabled projects can call project-specific SkookumScript commands or project-specific C++-reflected commands.
Feature | non-Sk Project | Sk Project |
---|---|---|
Core+Engine Sk REPL | ✔ | ✔ |
Project BP REPL | ✔ | ✔ |
Project C++ REPL | ✔ | |
Project Sk REPL | ✔ | |
Project Sk Scripts | ✔ |
Related: Disable or remove SkookumScript in a UE4 project
Next » Tutorials
« Previous Unreal Engine 4 Plugin quick start