Did anyone of you made level changing feature in your games based on FPSSample? Now i have DM gamemode and 3 maps, but i can play only on one of them(to play others i should run anoter server). I want to make change_level command to change levels after round is finished. Main problem is that i dont really know how to make that, so your advices will be really helpful to me.
There is a runatserver command that you could use. On the server you can load any maps using load level.... I havn't tried it but something like, from the clients console: runatserver load levelname
i don't know why, but that does not work and crashes the server. maybe that is my fault and i should despawn all that replicated stuff before changing the level. here the result of
yes, there are unload but it is not implemented yet.. Code (CSharp): void UnloadLevel() { // TODO } Also i found boot command, that unloads current level and shutdowns and disposes all the stuff that should be. I think i'll just get some code from there to unload current level.
We have dug deep into this build. There’s no easy solution in our opinion. This will be an extremely high level modification utilizing the scene management systems that have been implemented. If your new or not a pro I wouldn’t even bother attempting it. There’s very little documentation on some of the new processes that have been implemented. That being said we have learned an awful lot about how this program works lol. Maybe the unity developers have some insight into how to go about this.
this would be very interesting for me as well - when a match is finished to automatically change the scene. I would very much appreciate any hint
you can send to clients reconnect event and then disconnect them, after that you should run "boot" and then "serve level_name". and on client side after recieving reconnect event you should reconnect to the last server. that is the easiest way i know.
thanks for your fast reply! have you been able to achieve it this way? Could you please give me some more details thanks a lot!
i haven't time to make this stuff, so i don't know many details. i just minded up possible ways to make this happen.
ok, thanks a lot. I will have to deep dive into this, as soon as I have a working solution I will share it here (if someone is able to achieve level switch after a match is finished it would be great to know how to achieve that)