- Home /
How can record the total amount of prefabs that are spawned during runtime?
Hello folks,
I want to create a script where prefabs of one kind will stop after 30 times of being spawned, After this, another prefabs of a different kind will follow up.
To create this script I need a part of code that will count my spawned prefabs but I couldn't find any information on how to do this?
From a script I found this:
var PrefabCount : int; // Number of Prefabs in the game at a time
but it says at a time, as my game is also deleting the prefabs out of sight it will not work. I need a script that will also take the deleted prefabs into account.
Any tips and suggestions are very welcome :)
Thanks anyway.
Your answer
Follow this Question
Related Questions
assign ui panel to a prefab object ? 2 Answers
Creating and saving prefabs during runtime 0 Answers
Changing Prefabs at Run time 1 Answer
Why does this script spawn 13 ClickEffect prefabs instead of 1? 2 Answers
snapping objects at runtime 2 Answers