Creating a debugging tool for the Editor
One of the easiest and fastest ways to test things while we are developing is by creating debugging tools to help us execute specific methods and trigger events so we can validate that our systems are working without having to play the game. This can be used for simple things such as adding more gold for the player or even spawning units and upgrading buildings.
Creating the Object Pool for the Warrior unit
- Open the
- Left-click on the + button in the top-left corner of the Hierarchy view, select Create Empty, and name it
ObjectPools. In the Inspector view, in the Transform component, set X, Y, and Z to (
- Right-click on the new ObjectPools GameObject, select Create Empty, and name it
BasicWarriorObjectPool. In the Inspector view, in the Transform component...