Prepare for FirstStage
This guide will illustrate how to prepare assets and scenes for use in FirstStage
All imported individual Assets and whole Scenes will possibly require
- Organise the folder scheme
- Fix any obvious issues
Whole Scenes will also require:
- Setting floor layers
- Remove existing cameras
- Set the inital spawn point
Optionally, Scenes can be processed to extract all the Assets used within the Scene, and make the Assets available for use in other FirstStage Scenes. This will require:
- Separate and import Scene assets
- Identify Stage asset
NB – After any fixes are done in the Unity Editor, for speed and efficiency we recommend that you always first export to a LOCAL FirstStage repository, and then once reviewed and approved, exxport to a cloud-based FirstStage Project repository.
It is worth duplicating package contents when you plan to make amendments before import, so that you retain a copy of the original file. Copying files is best done by selecting them, then pressing Ctrl-D on your keyboard to create a duplicate.
1. Preparing All Assets
1. Organise the folder scheme
The name of the asset and the folder it is in will be preserved when the asset is committed to the repository, so it can be helpful to choose a scheme that mirrors your source asset structure. Generally the top level folder should be something that identifies the publisher, as you may end up inporting a number of assets from that source.
NB – For Max/Maya users, it may help to choose a scheme that mirrors your source asset structure.
- Click on the Create drop down in the Project window tool bar and select Folder, then name the new folder after the publisher “Gnarly Potato”.
- Drag asset package folder (‘Japanese Coin’) onto the publisher folder (‘Gnarly Potato’) to establish a folder scheme.
2. Fix any obvious issues
To thoroughly inspect the asset before import, you will want to review the files included in the asset package, and the visual appearance of the asset.
To do this, you will need to open the sample scene to allow scrutiny of all the assets in the bundle.
- In the Project window (bottom left as standard), select the asset folder to import and double-click the scene file (in this case called ‘presentation’) to open it.
You can now view the scene elements in the Hierarchy window
- To visually preview the assets in the Scene window, double-click each asset GameObject in the Hierarchy window (‘coin’ or ‘coin pile’).
2. Preparing whole Scenes
1. Set floor layers
If your asset has surfaces that would represent the ground level for your characters to stand on, such as floors and stairs, or even the inside of a bus, we need to mark the floor geometry so that FirstStage can identify it. Unity does this by putting objects into different layers.
- Double-click the scene file in the Project window so that it opens up in the Hierarchy window
- Locate the assets that make up the floor.
Try searching for expected file names, like “floor” or “stairs” in the search box at the top of the Hierarchy window.
- In the Hierarchy window multiple-select all the relevant files, then click on the Layer selection button in the Inspector window and select ‘Ground’ from the drop-down.
NB – If there is no ‘Ground’ Layer listed, create a new one by selecting ‘Add Layer…’ at the bottom of the drop down.
- When the Unity Editor asks whether it should do this for children also, click ‘Yes, change children’ so that any nested assets within those floor assets also get marked as Ground.
2. Remove existing cameras
Example scenes often have a Player GameObject (often named ‘Player’ or ‘Controller’) to demonstrate the scene. If the scene has one, or a camera rig, these objects should be removed as they will conflict with FirstStage when loaded.
- Locate any Player GameObjects or Cameras in the scene.
Try searching for “player”, “game”, “controller” or “camera” in the Hierarch in the Hierarchy window.
Selecting one should cause them to appear in the Scene window as a grey GameObject cube with coloured axes, that when selected in that view spawns a CameraPreview.
- Right click on the relevant asset in the Inspector window and select ‘Delete’.
3. Set the inital spawn point
In order to arrive in a good position in the scene, we need that position.
- In the Hierarchy window select the Scene root folder.
- Click on Create in the Hierarchy window toolbar and select ‘Create Empty’.
This will create a GameObject asset in the scene list in the Hierarchy window.
- Right-click the new GameObject and select Rename
Rename it to “LOCAL_USER”.
- With LOCAL_USER GameObject selected in the Hierarchy window, move it to the correct place to spawn when entering the scene.
- Place it at ground level by changing the Transform Poistion Y value to ‘0’
- Movie it to a suitable position in the scene by changing the X and Z values.
- Change the direction of view when spawned by changing ??? – CAN THIS BE DONE???
3. Extracting Assets from Scenes
1. Separate and import Scene assets
If you import a scene and notice that some of the props (e.g., tables, chairs) are just static set dressing but need to be interacted with (e.g. moved, deleted, etc.), you need to import their prefabs separately from the scene file. This has the additional advantage of adding those assets to your inventory to be individually selected in the Asset Browser and used in other sets.
- In the Project window, select the scene’s root folder and search for ‘prefab’ in the search box.
You will likely find a series of categorised folders called ‘Prefabs’ with all the scene’s assets in them
- Follow the Prepare for FirstStage and Export to FirstStage guides to set up the assets correctly before importing them, either individually or in batches.
This will include checking for obvious issues such as missingf textures, and adding tags and a description.
NB – Some prefabs may be part of the construction of the building and background (e.g. walls, floors, etc.). It is best to NOT import those.
2. Identify Stage assets
Now the prefabs are in the repository, we can identify all the game objects in the scene that are from an asset prefab so that FirstStage can work with them.
- Select the menu option Moviestorm > Identify Stage Things
NB – Nothing will visibly happen, but a list of identified Assets will appear in the Console window.
- You are now ready to Export to FirstStage!
Follow the Export to FirstStage guide again to Import and Commit the identified Assets to the FirstStage repository.