Most Stingray template projects (except for 'empty') include two UI templates that load when you run the project:
The 'empty' template contains an empty Scaleform Studio project to help you get started, but it doesn't include the scripts found in other templates.
You can modify these templates to suit your game project, or create a new Scaleform Studio project and import it to your Stingray project.
Import your Scaleform Studio project to Stingray using the Import button in the Stingray Asset Browser.
This adds the project to a s2d_projects folder (which is created if it does not already exist).
Optional: In your Stingray project, delete the Scaleform Studio templates located in content/ui folder.
If you delete these files from disk, you also need to modify the boot.package file found in the template to delete the projects from the s2d section.
The boot.package file includes all files within the Stingray project, so it's a good practice to add any Scaleform Studio project you import to the s2d section.
Edit the main_menu script (located in script/lua folder) to load your project instead of the default template menu project, as follows:
The main_menu file also includes a custom event listener which checks for events dispatched from Scaleform Studio.
Modify the custom event handler function to listen for your Scaleform events and perform actions accordingly.
The Stingray templates load the appropriate template level by default. To change this or to add a new level:
Go to project.lua, add your level to the Project.level_names = {} line and invoke this level in main_menu.lua when an action is performed.
For instance, in the basic template, modify the line SimpleProject.change_level(Project.level_names.basic) to point to your level instead of the basic level.You can either run the project or the menu level to test loading of your new level.
You can create Scaleform Studio projects in Stingray without importing them from Scaleform Studio.
In the Asset Browser, right-click in the folder where you want your Scaleform Studio project, and select Create > Scaleform Studio Project.
Enter a name for your project. This creates a Scaleform Studio project.
Double-click the project (or right-click, select Open) to open it in Scaleform Studio.