Hi everyone!
I am making my second game totally with playmaker and wanting to make it better that the first. My question - is there a best way to go about loading levels/objects/prefabs etc. at the start of the level? Until now I was simply using "Load level" action.
In my first game, which used enemy prefabs, I had a problem, that the level loads fine, but then on the first enemy spawn the game lags for a second (seems like it's loading the prefab), but on the all next spawns there's no lag.
I've tried looking up how to fix this but could not find a solution that worked - in unity settings the setting to preload that enemy prefab at game start did not help.
Also, at the start of the level, sometimes some of the FSM did not get some objects, for example, using "Get Game Object" action, making some game systems not work properly. I put some of the game system managing FSMs on wait action for 1-2 seconds at the start and then the "Get Game Object" worked.
So it seems there's some sort of importance to the order of loading FSMs and prefabs to avoid the bugs and make the game smoother, but I can't figure it out. Maybe because I have absolutely no programming background and it's something obvious? Maybe I should always put game initialising FSMs on wait at the start of the game?
Maybe somebody can guide me into the right direction?