Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

A multiplayer technology developed by Unity allowing easy multiplayer.

0
votes
0answers
30 views

How to distinguish the server and the client

As I understand it, when a player in UNET hosts, he has 2 threads. One of them is a server, and the other is a client. But the problem is that in all two threads the variables isServer and isClient ...
1
vote
0answers
54 views

Spawn network objects in generated map

In my game, the server generates a procedural map, after send generation seed to generate it on the client. The client generates exactly the same map. In the map, I need to synchronize objects with ...
-1
votes
0answers
48 views

Why are my Unity Network matches ending in only 2 minutes?

I am creating and finishing my game that works exactly like Slither.io. Some matches created on internet and you just go inside. Multiplayer game with unity. Now i have unity free that allows 20 ...
0
votes
0answers
26 views

Does Unity's Unet LLAPI compress data?

Does the NetworkTransport compress and decompress the data sent through the network?
0
votes
1answer
15 views

Message Passing b/w “LAN Server Only” and “LAN Client” on Different Scenes in Unity

I want to pass message back and forth on client and server which are on different scenes, how can I do that in Unity?** Following is my Scenario:- I have 5 scenes- BaseScene (2) OfflineScene (3) ...
0
votes
1answer
38 views

Unity UNET, problems spawning and then destroying that instantiated prefab

I am very new to networking, and have ran into an issue, read below. I have multiplayer system setup, where players can spawn, they can pick up weapons and drop them, there is an object representing ...
1
vote
1answer
60 views

In Unity, how do I set constant player numbers such that all network clients agree on them?

We are currently writing an online game in Unity. The essential idea is that it is structured like a split-screen, couch co-op game, with the online being offered as an extension to allow multiple ...
0
votes
0answers
55 views

Unet, how to sync a counter to check if all players are ready

I'm making a multiplayer bomberman game using Unet. I'm trying to create a ready check to start the game when everyone else is ready. I tried using a sync var,Command and Rpc calls, but nothing seems ...
0
votes
0answers
31 views

Subscribing to and sending events on UNET

I am working on large distances, where the clients only need to receive information about other players when they are nearby. I've been doing a little bit of homework and (thanks to another answer on ...
0
votes
1answer
56 views

How can I send commands to only certain clients?

I am building a multiplayer game server with Unity. In the game there are players moving around the map. Now, because this map is quite large compared to the number of players, I was thinking to have ...
0
votes
0answers
19 views

Floating Jumping in UNET

I am playing around with UNET and have a character that jumps around the screen in 2D... When i test it on my local machine with two instances I notice that the location streaming is pretty good but ...
3
votes
2answers
462 views

How do I resolve the error “Trying to send command for object without authority.”?

I don't know what I did wrong I tried couple different ways from not using commands to using SpawnWithClientAuthority. But It either gives build and compile errors ...
0
votes
0answers
23 views

How to control a network ball with client

I have a multiplayer turn based ball game. I using Network HUD for now. The Player Prefab in Network Manager has an Empty GameObject assigned with 3 things(Network Identity, BallControl Script, ...
3
votes
1answer
195 views

Unity/UNet without a lobby: How do you get an ordered list of participants (network players)?

Please imagine a turn based multiplayer game. Right now there's no lobby in place and connections are established using Unity's Network Manager HUD. Now on the ...
0
votes
0answers
45 views

How to send and get data in unet

I'm new to unity and unet. I'm trying to make a cricket game. I want to share a boolean variable between two clients. ...
0
votes
1answer
152 views

Unity - DontDestroyOnLoad - FindObjectsOfType(GetType()).Length is always returning 1

I'm trying to have an object with the DontDestroyOnLoad property. I want an object with NetworkIdentity to persist across scenes, so I can have a holder script for ...
0
votes
1answer
433 views

How do I use Unity's OnPlayerConnected method?

https://docs.unity3d.com/ScriptReference/MonoBehaviour.OnPlayerConnected.html ...
0
votes
2answers
561 views

How do I use Unity's TargetRPC calls? Trying to send data from the server to a client

I want to send a large amount of data to only one player, as it would be wasteful to do this for every player when only one player needs the data. After a bit of research, it appears that TargetRPC is ...
0
votes
1answer
86 views

How to change a Variable on an Instance of a Player with Network Manager?

So I am trying to change a variable on a player object by clicking a button using Unet. However, I am having trouble getting the instance of the player object. Is there a way to get the instance of a ...
1
vote
1answer
172 views

Update and merge Unity coordinate systems multiplayer - Hololens

Project Summary Creating a multiplayer HoloLens app that allows players to spawn and move objects around the local space they share. Problem I am able to connect to the other HoloLens and see the ...
1
vote
1answer
218 views

Client not executing commands in Unet

Edit Okay, so I partially solved the problem by adding a rigid body component to the capsule. I read somewhere that apparently you have to have one in order to move on the server. Problem 2 The ...
0
votes
0answers
92 views

How to destroy child object of other player in UNET?

Right now, I have a multiplayer game where the player fires projectiles at other players that have a certain amount of bubbles. Once a player has lost all of their bubbles, they lose. The issue I had ...
3
votes
2answers
4k views

Creating a master server for Unity game (Unity 2017)

I have a basic FPS game made in Unity. I am using the Unity NetworkManager, NetworkManagerUI and NetworkIdentity components that came with Unity. The game is working fine on my local network when I ...
0
votes
0answers
92 views

Unet: Sync Rotation Top down 2D does not properly work

The rotation axis is Y on the rotation sync mode Normal movement: I'm using the sync rotation for the Top Down game, but it seems to work only one way on the client, here is the code ...
0
votes
1answer
143 views

Unity low level network API

I was trying out Unity Network LLAPI, I am following the this tutorial. I wrote everything the same, my server starts well and good with no errors. When my ...
0
votes
0answers
487 views

Start Server or Join Existing Server as client automatically

I'm trying to get this small application working, where a game starts the server and any other instances game when run, directly joins in as the client, without any GUI. For now, I could do so, with ...
1
vote
0answers
172 views

[SyncVar]s in Unity with client authority

I'm making an networked RTS in Unity, and I have a problem with syncing a boolean on a non-player object. I create the object (which is a boat) using ...
1
vote
0answers
54 views

Unity uNet Low Level API - which values should I snyc?

I am using unitys unet low level api: TransportLayer. I send my own message by converting strings to byte-arrays. I want a server authoritive setting, so that I can try to implement my own client ...
1
vote
1answer
786 views

Unity Network how to move noplayer object from client side

When i drag a nonplayer object from host, client can see it, but when move the object from client, host player doesnt see any changes. How can i fix it? ...
7
votes
1answer
2k views

How to Send Voice over Unity Networking - UNET

I am able to Record and Run Audio from my Microphone using this code snippet: ...
0
votes
0answers
197 views

why command is not executing on local player

I am getting very strange behavior, if my player instantiate as host (Server+Player) then my command function runs perfectly and certain object become instantiate but if I join the host then my ...
3
votes
0answers
919 views

How to override the NetworkManager in Unet properly?

I need some customization on the NetworkManager Class for my game I'm working on. I've read, that it's pretty common to override stuff from the NetworkManager. So I've implemented the NetworkManager ...
1
vote
0answers
217 views

Additive scene loading to UNet

I have a main scene where my player is loading as I start or join the server. On some player action, I want to load additive scenes in to my main scene. It is loading fine on the client, but not ...
0
votes
0answers
261 views

How to access network player from internet

I just followed a guide about basic UNet tut Here, Its spawning network car player which can be controlled by local player. I can make or join server through Network Manager HUD which is provide by ...
1
vote
0answers
308 views

UNET (Multiplayer) calling [command] function twice

I am playing around with UNET but stuck into this weird problem/scenario while testing on same machine (unityEditor and buildRun to create "2 players/instances" The problem is weird interaction of [...
1
vote
1answer
1k views

uNet - Client cant see server spawned objects

I'm facing a problem where when I connect with the host, all the towers spawn. After I connect with a client only to find out there are no towers visible and I can walk through them when looking at ...
1
vote
2answers
924 views

Unet how to control child gameobject?

I'm currently getting into the Unity networking system called unet. I have a child of the local player authority, the weapon. The weapon (PlasmaCannon_left and right) have a script handling firing, ...
1
vote
0answers
35 views

Still players keep moving on the clients

With UNET, despite Interpolation is set to None in the NetworkTransform, I've noticed that ...
0
votes
0answers
299 views

How to stop a host from the client script?

I am developing a two player multiplayer game. Since its only two players, I don't want to keep my connection open if a player disconnects. Now this works well from the host side, through usage of <...
2
votes
1answer
481 views

Unet, client is unable to control spawned units

I am trying to create a simple table top game with Unet. Right now I am just trying to get simple spawn mechanics working. The issue I am having is that the host computer can spawn and control objects ...
0
votes
1answer
619 views

How to sync a LineRenderer in a multiplayer game?

After a lot of searching online, I have come here as a last resort for my problem. The question says it all. How to sync a LineRenderer? One answer I found was to use a ClientRpc. I tried it with no ...
1
vote
1answer
160 views

Unity networking, make player disappear for all clients

As title says I need to make the player disappear when he gets in car. Right now, it works as a single-player, but since I am new to unet I don't really know how to achieve this, I tried some ways, ...
0
votes
1answer
647 views

Server and client showing different spawned object - How do I unify them?

I have overridden OnServerAddPlayer and put some custom logic in place to set the rendered prefabs color. Something like this: ...
2
votes
0answers
196 views

UNET Performance of (many) Kinematic Rigidbodies

I am building a game in Unity in C# using the UNET networking elements. I am trying to figure out what is the performance cost of kinematic rigidbodies? My understanding is that, when kinematic, ...
1
vote
0answers
33 views

Kinematic rigidbodies push each other in unet

https://youtu.be/j3f44E-ExLc I have a bunch of rigidbodies on each player, ALL set to kinematic. And this stuff happens. All the sword swinging is animation state driven, and basic back and forth and ...
2
votes
0answers
238 views

Unet spawning my 2 players in same location [closed]

I have min and max number of players set to 2. I have 2 empty game objects in my scene with Network Start Position scripts attached. I have "Round Robin" as the player spawn method in my Network ...
1
vote
0answers
69 views

UDP client code throwing a very nonspecific exception

so I'm writing a UDP server and client on a couple of the machines in my virtual reality environment to allow (in this case) data from the location in the environment to trigger some air nozzles. The ...