Hi Booow,
Have you already tried to add Debug.Logs to your code to see what is going on during runtime? Does the if-block in CountBlocks get executed? If it does, log the value of breakableBlocks into your console.
If you see the expected value, make sure that you did not select the prefab in your Assets folder. During runtime, Unity works with the game objects in your Hierarchy. That’s why you have to select the game object with the Level component in the Hierarchy.
Did this help?
See also:
- Forum User Guides : How to mark a topic as solved