<aside> ⚠️ Don’t forget to add a PlayerSpawner (in Start Area, or for debug/teleport in other areas). See Player Spawner.
</aside>
<aside> ⚠️ Don’t forget to add a way to load other levels in End Area so the player can leave when they end the dungeon.
</aside>
Area Catalog Data
Set Up the AreaData. You can copy and edit one from the proto sample (...\BasSDK\BuildStaging\Catalogs\default\proto\Areas).
Edit these fields :
Leave the rest for later.
Don’t forget to add the Data in SDK, then click on ThunderRoad (SDK) / load All Json. Every time you change the data reload all JSON to avoid log errors.
Return to the Area Prefab view
On the root/parent, add the Area component and set the field DataId with the ID you chose in the catalog Data. See Area.
Create a box collider as a separate GameObject of the root, make sure its position is 0,0,0.
Edit the box collider so it contains all the colliders in the prefab (wall etc).
Make sure this box stopped at connection position.
Copy the value of this box to the AreaData file in the fields name Bounds. (center and size)
Delete the box collider from the prefab.
Save the prefab and go back to the AreaData file to edit connections. For each connection your Area has :
Add an areaConnection to the connections list (copy-paste from the sample)
Edit the fields :
Leave the fakeViewAddress empty for now.
Open the area prefab.
On the root, add the component ItemSpawnerLimiter and setup its value.
On the root, add the LightingGroupComponent.
On the root, add the NavMeshSurface Component.
Create an empty game object name Gateways under the root, and place it at the origin (0,0,0).
For each connection, in the same order as in the AreaData :
Create an empty game object under Gateways
change its coordinate so it is at the connection position, and rotate it so the Z axis face the outside of the area.
Add the AreaGateway Component to it. See Area Gateway
Setup the LocalBound of this component (value or with gizmos). When the player enters this box it will fade the fake view and set active the adjacent Area.
Click on the SetupFakeView button.
A GameObject called reflection sorcery should appear as a child. Select it and click on the ToggleEditMode Button.
A GameObject named room volume appear, it's a box on the prefab scene, edit it so it fits to the near wall. Then Click on ToggleEditMode button on reflection sorcery again.
Save and close the prefab.
Open the AreaTest Scene.