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

A multiplayer technology developed by Unity allowing easy multiplayer.

0
votes
1answer
54 views

Help needed with syncing animation speed of a player in a Networked game (Unity)

Follow-up with new code, as per below answer. Unfornutely i still have it wrong and now the character doesn't animate at all (it seems to stay at 0.00 of the clip for ever or constantly resets to 0.00 ...
0
votes
1answer
11 views

How to use SyncVar/Command/Rpc in Unity to set the AnimSpeed for each player in the scene separately

Im making a simple as possible scene in Unity for mulitplayer game. The character has a walking animation of which the speed is to be set exactly the same as the Z velocity relative to the object. I ...
0
votes
0answers
11 views

Unity HLAPI Connecting to server problem after some hours

I have a serious problem whit UNET. I created a fps shooter multiplayer game with 12 player, and I use a dedicated server for my game. Players can join to servers via internet. My problem is : ...
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
63 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 ...
0
votes
0answers
34 views

Does Unity's Unet LLAPI compress data?

Does the NetworkTransport compress and decompress the data sent through the network?
0
votes
1answer
16 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
111 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
80 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
65 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
39 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
58 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
22 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
632 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
26 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
259 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
54 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
2answers
216 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
525 views

How do I use Unity's OnPlayerConnected method?

https://docs.unity3d.com/ScriptReference/MonoBehaviour.OnPlayerConnected.html ...
0
votes
2answers
734 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
120 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
208 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
316 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 ...
4
votes
2answers
6k 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
1answer
166 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 ...
1
vote
0answers
190 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
58 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
909 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? ...
8
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
233 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
1k 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
252 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
285 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
347 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
1k 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
325 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
528 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
686 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
167 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
708 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
206 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
35 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
261 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
75 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 ...