Rebuilding scene outside 2.5d Toolkit
Note: from version 3.7.0
A new feature has been introduced that allows you to choose whether the character should move only by clicking on the NavMesh or by clicking anywhere on the screen.
The script will no longer create the Resources folder but will use the VBEngineTK GameObject to get the data needed for the character’s movement. This GameObject will be saved automatically when you export the data. Drag it into your new scene as you do with all the others.
Note: The configuration file is still used by 2.5D Toolkit and is saved, together with the scene objects summary file, in the _FileData folder. If you are using the configuration file in your programming, please note that it has been slightly modified.
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.
Only for versions up to 3.6.1
First of all click on the Save scene data button in the Scene tab.
From version 3.7.0 this operation will no longer be necessary because it is performed automatically when exporting data from the Advanced tab.
Only for versions up to 3.6.1
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.
Only for versions up to 3.6.1
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.
From version 3.7.0
A new feature has been introduced that allows you to choose whether the character should move only by clicking on the NavMesh or by clicking anywhere on the screen.
The script will no longer create the Resources folder but will use the VBEngineTK GameObject to get the data needed for the character’s movement. This GameObject will be saved automatically when you export the data. Drag it into your new scene as you do with all the others.
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.
From version 3.7.0 you will also find VBEngineTK.prefab which contains all the data for the character movement. The Resources folder with the configuration file will no longer be available.
Everything will be set up correctly.