Use this guide to create or edit a Cannontower prefab with all required CannontowerView references and team visual pools.

Architecture Context CannontowerView inherits from BuildingLevelStackView. That means visuals are built from three team-based pool arrays:

Unlike ArtilleryView, CannontowerView does not use "_buildingLevels". Cannontower levels are built by stacked pooled parts plus level-based attack range values from "_ranges".

Pre-Setup Checklist

Scene View Gizmos (BuildingView)

Main Procedure

Step 1: Duplicate a Working Prefab

  1. Duplicate Assets/GorodiskiGames/TowerClash/ResourcesStatic/Prefabs/Building/Cannontower.prefab.
  2. Rename the new prefab, for example CannontowerVariant.prefab.
  3. Open the duplicated prefab in Prefab Mode.

Step 2: Verify Required Hierarchy Links 2.1. Confirm these object references in CannontowerView:

Step 3: Configure Core Building Values 3.1. Set gameplay-related values in CannontowerView:

Step 4: Configure "_foundationPools” 4.1. Add one TeamPoolEntry per TeamIDType:

Step 5: Configure "_levelsPools” 5.1. Add one TeamPoolEntry per TeamIDType. 5.2. Assign level segment prefabs for each team. 5.3. Runtime creates floor segments from this pool as level grows.

Step 6: Configure "_roofPools” 6.1. Add one TeamPoolEntry per TeamIDType. 6.2. Assign roof prefabs for each team. 6.3. Runtime places roof at the top of the current level stack.

Step 7: Configure Range Fields 7.1. Assign these combat fields: