#RTS - migration from Unet, client not spawning units.
8 messages · Page 1 of 1 (latest)
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
I tried looking at the custom character spawning examples that are in the mirror docs and the examples scenes but still can't figure out what I'm doing wrong.
I tried looking at the script but it's huge, does way too much, and needs to be broken down to smaller components, and some of the code looks to belong on other objects that you're spawning, and likely throws errors where you're calling an Rpc right after spawning something with the new object as param (race condition). You didn't provide your custom network manager, or screenshots of inspectors of relevant things, so can't really guess what your issue is, but I'd say you have a bunch of issues here.
Give me a second. I'll provide all the relevant scripts and thank you.
There are all the relevant Network scripts. IF I'll have to modify and rewrite them, I'll do it. I'm still a programming newbie but I'll do my best to follow. Thanks again for your help.
I'll provide relevant screenshots when I'll get home, I'm at work atm.
Honestly, UNET was many years ago, and a rewrite is in order. In a new clean project, use our Script Templates to make your network manager, and don't just bulk copy-paste code from the old project. Make separate player and other scripts individual to their purpose, which will make debugging far easier. Copy the art, but make all the code fresh.