Hi,
I’m currently working at my first “bigger” game with unity. It’s some kind of round based strategic rpg.
I have a question with my testlevel. The level itself it build up with small 2D planes, because it is a tile based game board. Now I have a testlevel where I generate at startup out of an csv file all possible characters in game. Because I want one level where I can see all characters at once can test movement, fighting, etc.
Currently I have up to ~200 different characters. Each character has some sprites and animations and some scripts at his gameobject. The character itself is saved as prefab und will be instanciated and filled for each individual character from the csv file.
So far so good, this works very well and makes it very flexible to create new characters without writting a line of code.
My problem is now that the first time I load the level in the editor (press the play button) it takes up to 30seconds until the game is started. If I stop and press again of play it is loaded in 2-3 seconds. So I guess it is some kind of caching or so what happens.
The scenes have no lighting ( I turned everything off I found in the lighting window), because it is just a 2D sprite based game. No need yet for real lighting effects.
I also tried to put in some time measurings in the code but everything is very ast as far as I can see. It also looks like that the time is consumed before the game is started. Because the first Debug log outputs are appeareing after this extreme long loading time.
Has anyone an idea what it can be?
The only thing is that of course I have to load many many different sprites, animations, etc from the ressources folder at startup. But this is at each start, so dont know why it is a factor 10 faster the second time I start the level.
If I build the game the performance seems to be very fast and it looks not like that there is such a delay the for the first startup.
Best regards
L_tD