Unity 3D and Playmaker - Creating and Animating Enemy Spikes using Playmaker and Pro Builder
In this tutorial, we will create enemy spikes using ProBuilder and then animating the spikes with Playmaker and creating a reusable Prefab. Also check out How to Make a Bounce Game Series https://bit.ly/39HIYBU. //TIMESTAMPS 0:00 Introduction 0:47 Starting to use ProBuilder 1:19 Making a Enemy Sp
This guide adds the first enemy to a tile-based puzzle game: a spike that rises and retracts on its own timing. You'll model it in ProBuilder, telegraph its position with a hole marker, animate it with Playmaker tweens, and turn it into a reusable prefab you can scatter across the board.
Model the spike in ProBuilder
Open ProBuilder (install from Package Manager if needed) and use the Shape Editor set to Cone. Keep it aggressive rather than smooth: 4 sides for a sharp pyramid, radius about 0.1, height about 0.3 to suit the character scale — more sides would round it off. Build it, then create an empty parent named enemy spike, drop the cone inside renamed spike, zero its local position, and center it on a tile. Give it a new material tinted red-orange so it reads as danger.
Add a hole marker so it's telegraphed
So players can see which tile is dangerous even when the spike is hidden, add a 3D cube inside the parent, scale it slightly larger than the spike but very flat (Y around 0.01), and rotate it to match the spike's angle. Give it a new spike hole material colored black so the tile looks like an opening the spike emerges from — a small fairness touch that warns the player.
Animate the spike rising
Set the spike's scale to 1,0,1 so it starts invisibly flat. On the parent add an FSM beginning with a Random Wait (around 3 to 6 seconds) so multiple spikes don't fire in unison, finishing into a Scale Spike Up state. There use Tween Scale on the specified spike object (not the owner), from 1,0,1 to 1,1,1, with Ease In Quad easing over a short time and no looping — you control up and down separately for randomness rather than a constant loop.
Retract and loop with pauses
Duplicate the scale state into Scale Spike Down, tweening back to 1,0,1, and transition Scale Spike Up into it. For a more dynamic rhythm, insert a short Random Wait (about 0.5 to 1 second) between up and down, then loop the whole chain back to the opening Random Wait: wait, rise, pause, retract, wait again. Testing shows each spike pokes up and drops on its own schedule.
Make it a prefab and populate the board
Drag the enemy spike parent into a prefabs folder — it turns blue to confirm it's a prefab. Now drag copies onto different tiles and duplicate them around the puzzle; because each carries its own Random Wait, they rise at staggered times for organic movement. Editing the prefab later updates every instance at once.





