Export all data
When your scene is complete and tested you are ready to export all data related to it. First save your mesh from the Mesh tab.
To do this drag VBAreaTK (child of 2.5dTK) into the Area field and click Create mesh. The bottom option Don’t destroy on save lets you decide whether to keep the mesh in your scene or not. You will find the mesh in 2.5dToolKit/25dTKTools/Scene data/[scene name]/Mesh.
If you want to export only the file containing data for your objects in the scene, do not select Export Object. You can use this file to correctly set objects in a different scene.
This is an example from the MAINFRAME Perspective Demo scene:
Note that the vertices of the areas are not really important but we have included them because someone might find them useful.
If instead you want to export all the objects as prefabs, ready to be dragged into a new scene, select the Export objects option.
In the 2.5dToolKit/25dTKTools/Scene data/[scene name] folder you will find all the prefabs saved from your scene.
Up to version 3.6.1
The Resources folder is created independently of the Export objects option, when you click Save scene data in the Scene tab. The text file it contains will have the name of the scene and is loaded by the script attached to the character to set the movement parameters.
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.
The scripts attached to the character are as follows:
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.
Remember to save mesh
Remember that the mesh will not be created automatically, you need to follow the steps described above.
To rebuild the scene easily:
Create a new scene
Delete the Main Camera and replace it with the prefab from the Main Camera folder
Add the Background Camera
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 into the scene
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.