- Home /
Question by
MesterMoon · Mar 12, 2021 at 10:52 PM ·
networkingnetworkmultiplayer-networkingspawningmirror
How to find gameobject through SpawnMessage?
Using Mirror Network, what is the easiest way to, through a SpawnMessage, find out which gameobject is being spawned by the server?
The spawnmessage that can be read in the spawnhandler consists of the following:
public struct SpawnMessage : NetworkMessage
{
public uint netId;
public bool isLocalPlayer;
public bool isOwner;
public ulong sceneId;
public Guid assetId;
public Vector3 position;
public Quaternion rotation;
public Vector3 scale;
public ArraySegment<byte> payload;
}
Now I've tried to find ways to translate the assetId to the prefab it is attached to, without any results.
Thanks in advance!
Comment
Your answer
Follow this Question
Related Questions
can't get clients to spawn object 0 Answers
Spawn Cube doesnt Show up on client. (Unity Networking) 0 Answers
Can i make multiplayer game without unity multiplayer service ? 1 Answer
When the game starts, how can I instantiate a ball onto a random client? 0 Answers
Player object on host can interact with objects, client players cannot. 0 Answers