Questions tagged [unity-networking]

Unity 5.1 introduced a new framework to handle client+server networking, also known as UNet.

Filter by
Sorted by
Tagged with
0
votes
0answers
107 views

How is Unity's [Command] supposed to behave?

Here's a very simple class/call hierarchy: ...
1
vote
1answer
466 views

In Unity/UNet: How do you properly spawn a `NetworkPlayer`?

In Unity/UNet: How do you properly spawn a NetworkPlayer? Right now, I'm doing it like this from inside a NetworkManager ...
2
votes
1answer
550 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
1answer
140 views

Unity Network No sound on other clients

I'm trying to play sound on other clients, so they could hear gunfire in the distance, but sound only works for the shooter. Here's my code: ...
1
vote
1answer
391 views

Unity Network Flip sprite renderer

So my 2D characters turn by setting flipX on Sprite Renderer. I'm trying to turn them on other clients, but sprite is turning only on local client. And only host turns for all clients. Here's my code:...
1
vote
0answers
319 views

Unity multiple servers for rooms

I have an FPS game that I'd like to make multiplayer. It would need to support multiple matches at once with about 10 players in each. However I want physics to be server-authoritative so that means ...
0
votes
2answers
642 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
1k views

How do I use Unity's OnPlayerConnected method?

https://docs.unity3d.com/ScriptReference/MonoBehaviour.OnPlayerConnected.html ...
0
votes
2answers
2k 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 ...
-1
votes
1answer
98 views

How to make a player walk over the network

First of all, it is a newbie question and I am a noob so ya. I am working on Unity with low level network API. I am able to ...
1
vote
1answer
635 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 ...
1
vote
0answers
357 views

Help needed, following Unity multiplayer Health-Bar tutorial. Only working on Server Host instance of the game

was really hoping someone can be good enough to look over my code, I've been trying to fix it for several days. I followed the Unity tutorial which is fairly basic but the bit that confuses me (and ...
4
votes
2answers
11k 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 ...
1
vote
1answer
2k views

Unity multiplayer (online) - How to connect to a 'Client-Host' without using Unity Paid Service

I'm slightly annoyed with the official Unity guides here, because I have been following through some, and they have indeed helped me create a local network mulitplayer situation. However, at no point ...
0
votes
1answer
286 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
97 views

Are ClientRpc calls unsafe? How does a Unity server account for enforcing state concerning these?

I have recently picked up learning Unity3D's networking API, and have been following their multiplayer networking tutorial. I just got to the topic "Death and Respawning" and am concerned about the ...
2
votes
1answer
128 views

Load order of networked objects in Unity

I am making a 2D RTS, and am trying to get a multiplayer version working. I've run into some problems with the order that scripts are getting executed. For the host everything runs fine, but when a ...
0
votes
0answers
930 views

RTS Networking in Unity: Client-Server vs. Lockstep

I am trying to make a RTS game in Unity, and I've got a few non-networked features working and so I want to start working on the multiplayer aspect so I don't dig myself into too deep a hole with ...
2
votes
2answers
4k views

Unity - Manually sync location of players from server to client

I am new to Unity networking. I've set up my scene with NetworkManager and the Player prefab having NetworkIdentity. I originally had my players set up to sync with a NetworkTransform. This worked, ...
3
votes
1answer
495 views

Start Broadcast Unity Network Discovery

I am using the unity NetworkDiscovery component, and I am wondering how I can auto-start broadcasting when the server starts, instead of the client having to click ...
1
vote
0answers
249 views

How can I instantiate and sync a LineRenderer in multiplayer network?

I am trying to make a laser that will be visible to all clients in a multiplayer networked game on Unity. I've tried using a Command Attribute but that hasn't worked. I also found some ideas to use ...
0
votes
1answer
188 views

How to make local keyboard input move only the local player, not everyone in networked multiplayer?

I am working on Unity Networking and following this Tanks Networking tutorial: https://www.youtube.com/watch?v=V6wEvT6G92M Problem is that the keyboard inputs move all the tanks in the scene. It is ...
-3
votes
1answer
2k views

How is Forge Networking able to provide unlimited CCU?

I was wondering how Forge Networking could provide unlimited CCU for every user, since it is a one-time purchase. Is there something about networking I still do not understand or do they simply own a ...
0
votes
1answer
884 views

How to instantiate GameObject on client without network?

When I NetworkServer.Spawn(ob) a gameobject and make it a child of a transform.parent after it spawns on both the server and ...
2
votes
1answer
770 views

Delayed linear interpolation for networking

I'm trying to implement the delayed snapshot interpolation presented at Valve's article and also Gambetta's. My current implementation is almost identical as described in the 'Multiplayer object ...
1
vote
0answers
2k views

ClientDisconnected due to error: Timeout UnityEngine.Networking.NetworkIdentity:UNetStaticUpdate()

Why am I getting this error. I think it has problem with port so I change port number and still getting same error. yesterday it was working fine but when I start today it giving me error like this. ...
1
vote
1answer
1k 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? ...
1
vote
0answers
191 views

What is Unity NetworkTransport message encoding and signature

I'm new to exciting world of Unity, and I have problem establishing network connection using NetworkTransport API. I'm using NodeJS as server. And I have some questions. Does NetworkTransport....
1
vote
1answer
414 views

Two headphones for two players

We're looking to create a split screen game using Unity that is highly reliant on audio. We would need each player to have their own headphones and use positional audio to navigate through the map. ...
0
votes
0answers
453 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 ...
0
votes
1answer
416 views

Spawning/Updating objects from client

I hope this is the right place to ask my question... I have been working on a game (all 2D) and I'm facing some problem with the networking part (pretty much a beginner). My game idea is a shared ...
1
vote
0answers
525 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 [...
0
votes
1answer
213 views

Unity Multiplayer functionalities or Google's plug-in?

I want to add multiplayer matches to a game I'm making for Android/PC, and something echoed in my mind: would the network functionalities Unity provides work in Android? I ask this because Google has ...
1
vote
1answer
2k 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 ...
0
votes
1answer
41 views

unable to map one object position to another object over network

objective: I have a player which instantiate by network manager class. I want to map/sync its position/rotation to another object which is also instantiate by my player object. (what it i have tried) ...
2
votes
1answer
710 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
988 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
216 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, ...
7
votes
1answer
8k views

When to use Command and RpcClient

I'm working on a multiplayer turn-based project in unity 5.4 and Unity Networking. I'm trying to learn Networking and one thing I am wondering is when to use ...
3
votes
0answers
228 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
3answers
617 views

How do you get audio clips to play on all clients?

I am new to networking with so this is probably a noob question. For context I am trying to get a gunshot sound effect to play and be heard by all players.
3
votes
1answer
348 views

2 cameras that each player sees through a different one

Im very new to Networking in Unity 5. Im trying to bring the finished basis for my 2 player, 1 vs 1, turn-based game I made for local multiplayer (both players on same computer) to an online ...
-1
votes
1answer
197 views

MMORPG networkconnection like Vindictus [closed]

to be honest, I like to make "small" MMORPG with my frends. We are 4 guys and are using Unity3D and Blender. I am a Programmer and I am using Eclipse. I know, it's silly to start a Question like "How ...
3
votes
1answer
5k views

Unity and Thread for Reading UDP

I have a GameObject that reads sensor data coming in over UDP (formatted as JSON). What I am observing in that my handshake (dataReady) is getting cleared by the Update() cylcle fast enough, and I am ...
-3
votes
2answers
107 views

How can I test which of two gameobjects is closest to a third gameobject?

It would be nice if it was as simple as: public void Closest() { if (A.distance > B.distance) {} } But any sort of workaround would be ...
1
vote
1answer
540 views

Random Disconnects on UNET

Using UNET, I can't host a game for more than a few minutes unless both server and client are on the same computer. It appears that I am not alone in this. Essentially, any latency problems or ...
0
votes
1answer
640 views

Unity3d multiplayer canvas

so I am making multiplayer game and I stuck on one thing, I have blood overlay canvas in my scene(you know, in fps games if somebody shoots you your screen becomes red and this stuff), and when I ...
0
votes
1answer
355 views

UNET spawn dynamically generated object unity

Spawning works when all clients are connected, but if a client connects after I spawn all my prefabs there are errors. I spawn the object before changing its Rigidbody's velocity, which seems to ...
1
vote
0answers
1k views

UnityWebRequest and/or HttpWebRequest give 403 on Android with PUT

I am trying to post an image captured through my game to Facebook through their SDK, and as it requires a URI, I wrote a simple AWS Lambda function to take a byte array and upload it to an AWS bucket. ...
3
votes
1answer
620 views

How do you use SoundManager for multiple player games over the network?

I have created a basic sound manager according to this unity tutorial (https://unity3d.com/learn/tutorials/projects/2d-roguelike/audio). However, I need it to work for multiple players over the ...