- Home /
Question by
strikeric11 · Mar 28, 2021 at 08:51 AM ·
multiplayer networking
Add id to gameobject based on client who send the command to server
I'm instantiating a bullet in the network using this
void Start()
{
this.InstantiateHook()
}
[Command]
void InstantiateHook()
{
bullet = Instantiate(bulletPrefab, this.transform.position, Quaternion.identity);
NetworkServer.Spawn(bullet);
}
My problem is I want to put id in the gameobject based on the client/server who call the InstantiateHook() function so I can setActive later on that gamebject in the network. Is this possible?
Comment
Your answer
Follow this Question
Related Questions
How do you Change Color or any variable of non-player object on both client and server in uNet 0 Answers
[SOLVED] NETWORK SERVER IS NOT ACTIVE! It is only active on host! CANNOT SPAWN OBJECT 2 Answers
Multiplayer plugin 1 Answer
Multiplayer advanced - Single Player in Multiplayer game, using another Hosting services. 0 Answers
Having issues with deterministic physics in my multiplayer game. Any ideas? 0 Answers