Scene takes a long time to load

I’m working on a tower defense game and currently I’m running into a problem with my last 2 levels and setting up an endless wave mode. My issue is that it tries to instantiate all the objects prior to loading and this has caused my game to slow on loading the level (one takes 3.5 minutes, the other takes 30+ minutes). Currently having some issues so a little help would be greatly appreciated.

I understand that I would want to set it to instantiate the objects when the wave is called, I’m just having an issue with getting the code layout because I’m still very new with the coding aspect of the game. Presently using C# so if you could follow suite that would be nice.

Thank you in advanced

Ok, first thank you for everyone that looked at this and thank you ScroodgeM for your assistance with helping me weed out my issue. you are correct that the code is fine and what I found is that the issue was the fact that my code was calculating all of the information all at once which is why it was taking a long time. I went the route of utilizing a for loop to calculate the HP instead of setting the hp initially.

Again, thank you for your help.