Hi,
I'm trying to find a way to switch the current character to another one at runtime.
What i tried so far is :
spawn the localplayer with the 2 characters and disable the renderer on 1 of them and then switch the renderer on when needed. But i don't think thats the right way to handle it.
I also tried to destroy the localplayer and then instantiate the new one but when i call a destroy, it doesn't seem to work as expected. Even after destroying all the components on the gameObject. ( have to call the destroy multiple times to have all destroyed)
The character has also the scripts for the smartfox connection and i'm not sure if i have to do anything for those.
Maybe reinitialize the connection ? just a guess...
Also... how would i handle the remote players ?
Anyway... if someone could push me in the right direction, that would be awesome
Thanks.
switching character at runtime with smartfox scripts
-
- Posts: 1297
- Joined: 14 Mar 2008, 07:52
- Location: Sweden
Return to “.Net / Unity3D API”
Who is online
Users browsing this forum: No registered users and 17 guests