Rebuilding scene outside 2.5d Toolkit


When your scene is ready, you can export all game objects as prefabs and rebuild the scene for your game.

Let’s take the Demo PAINTING multilevel scene as an example.

First of all click on the Save scene data button in the Scene tab.

In the 2.5dToolKit/25dTKTools/Scene data folder will be create a folder with the same name as the scene. Inside you will find the Resources folder which contains a text file with scene and character settings. This file is loaded when the game runs.

Now create the mesh. Move to the Mesh tab and drag VBAreaTK, child of VB25dTK, into the Areas field. Click Create mesh then Save mesh.

Move to the Advanced tab, select Export objects and click Save.

All game objects, the Main Camera, the Background Camera, the character will be saved in the same folder as prefab. Unused scripts will be removed from game objects and character, and the character movement script will be added. This script will read the data contained in the Resources folder. In perspective projection only the data relating to the walking and running speed you have set, in orthographic projection also the data for its scaling and for the change in speed as it moves away.

Scripts that use this data file are:

CharCtrl25dTKOrtho
CharCtrl25dTKPersp

in the 2.5dToolKit/Demo/Scripts folder
and

CharMoveOrtho
CharMovePersp

in the 2.5dToolKit/25dTKTools/Scripts/External use.

The first two are attached to the character during its initialization in 2.5dToolKit, the second when you export the objects by selecting Export objects.

Now you have all the tools to recreate the scene for your game. Some of this data will not be necessary if you are using assets for adventure game creation. 

See this page to set up a new scene in Adventure Creator.

Set up new scene

Create a new scene.

Delete the Main Camera and drag the Main Camera prefab from the Main Camera folder into the Hierarchy.

Drag VBBgCameraTK from the Background Camera folder into the Hierarchy.

If you are in a new project you will need to create a new layer called VBBackground and check that VBBgCameraTK has Culling Mask set to this layer and the child  VBBackgroundImgUI is on this layer.

Drag the prefab mesh from the Mesh folder into the Hierarchy.
Select it and drag the MatteShadow material found in 2.5dToolKit/Shading into the Element 0 field of Materials.
Drag the CustomTransparentShadowCollectorVal shader found in the same folder into the Shader field.
See here for details.

Drag the character and all game objects into the scene.

Everything will be set up correctly.

vbgamestudio
Author: vbgamestudio