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
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 ...
5
votes
2answers
9k views

Why will my server not execute a command sent by the client in Unity 5.1?

I'm working on a very simple/basic client-server networking program, the basis of a future game I hope to create. Now the client program/project DOES successfully connect with the 'server program/...
5
votes
3answers
12k views

How do I Sync data from client to server?

I'm trying to Sync data from the client to the server using the new Unity Networking, and I'm failing for some reason. I've set up a prefab with a NetworkIdentity ...
5
votes
0answers
2k views

Unity3D LLAPI and Pyhton UDP communication

I need a Unity3D game on Android to receive UDP packages from a Python script running on a different device. Using System.Net is not (yet) an option, as it is only supported on Android with a valid ...
4
votes
4answers
2k views

How can one add a level to an already published ios/android unity3D game on a daily basis?

How can one add a level to an already published iOS/Android Unity3D game on a daily/weekly basis? I know this probably isn't feasible but it won't harm if I just made sure of it. Our game requires to ...
4
votes
1answer
1k views

AddComponent with Network* at runtime?

I am trying to figure out how to dynamically add network components to game objects that are managed by the network. I started unity about a month ago, and I started writing all sorts of components ...
4
votes
1answer
173 views

When creating a game, what are some architectural desgin concepts I can use to be able to port my game from single to multiplayer?

I am a software developer but, I mostly develop games in Unity. I have experience creating single player games as well as multiplayer games. I am at a crossroads where I am in the middle of ...
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 ...
4
votes
1answer
554 views

Moving a character based on a list of Vector 3's

I have a client server scenario. On the server there is an AI character who chooses a random point on the map and pathfinds to it, when at that point it chooses a new point and pathfinds again etc. ...
4
votes
1answer
5k views

How do I make the host work in UNet?

According to the "High Level API" documentation, unless I misread something, a Host "just" runs both as a Server and as a Client, so much that it would require no special support, i.e. it should run ...
4
votes
0answers
211 views

Networking and physics

Context I have been implementing my own networking for a third person multiplayer game, but controls and physics will be ala old school FPSs. I'm using Unity's transport layer, which allows me to ...
3
votes
1answer
342 views

How to store and retrieve user data in a multiplayer game

I am building a multiplayer game with a team and each player will have a multiplayer rank, a matchmaking rating (MMR), a username, and possibly a picture, a description etc. We are planning on ...
3
votes
1answer
930 views

Unity 5: Use Network Simulator, should I?

I am looking to test intelligent prioritisation of a client server game. In my scenario, two clients are connected to the server. I want one client to have a good connection to the server while the ...
3
votes
1answer
613 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 ...
3
votes
1answer
4k views

How can the Server send a message to a single Client?

I'm trying to send an Rpc, or any sort of message, to a specific client instead of to them all. I'm completely at the loss trying to associate a ...
3
votes
1answer
221 views

Unity3d UnityWebRequest EscapeURL standard does not match Swift url encoding. How to decode it?

How should I decode escaped URL by unity in Swift? I am developing a game with Unity3d. Something MMORPG. With server implemented by me in Swift under ...
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 ...
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
1answer
1k views

Using unity app how to read the asset in android SDCard?

I am trying to read one file from my android sd card from my unity application, but its not reading. using the asset bundle i have exported my file and kept in my android device sd card and i am ...
3
votes
0answers
102 views

Object pooling in Multiplayer Game. Physics not synchronizing well

I implemented object pooling for my multiplayer project. Following Unity Manual I used custom spawn handler for shooting bullets. Bullets game object has rigidbody so selected Sync Rigibody 3D in ...
3
votes
1answer
492 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 ...
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, ...
2
votes
1answer
2k views

RPC's in Legacy Unity, what to use in Unity 5.1?

I have created a small experiment in 5.1, a server has an AI character pathfinding around a map over a grid, so its a straight line node to node before it reaches the end. I would like for the ...
2
votes
1answer
232 views

Enter in a match that is already started

In my Unity mobile game, I need multiplayer online functionalities. All the players should be visible in the world at any given time (of course, with some filtering), and a player should be able to ...
2
votes
1answer
532 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 ...
2
votes
2answers
3k 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, ...
2
votes
1answer
699 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 ...
2
votes
1answer
195 views

Local player always at same position

I am trying out UNET ( Unity Multiplayer Service ) and I am building a space invaders like game but with two players at each side of the screen shooting at each other. I want the local player to ...
2
votes
1answer
441 views

Why is the ownership fixed when synching objects?

I'm creating a billiard game where one white ball will be controlled by two online players. I have set my object photonview to ownership takeover. When a player shoots the ball in one client, it is ...
2
votes
1answer
3k views

Making a master server in Photon Unity Network? [closed]

I am trying to make a game that requires a dedicated server running 24/7 and I would like to use Photon Networking but can Photon Network handle/do a dedicated server setup? The reason I ask is ...
2
votes
1answer
3k views

Unity 5 Client RPC call: Failed to Invoke ClientRpc

I have a Unity 5 client and server running. On the server a path is generated and I want the client to receive the position of each target node on this path. Following the Client RPC calls section ...
2
votes
1answer
118 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 ...
2
votes
1answer
930 views

Unity 5.x Network Synchronization Concepts

Bear with me, It will be long read^^ I am working on the new Unity Networking system. I was using Photon and old (legacy) unity network API's before. But as it seems there are some good benefits of ...
2
votes
1answer
2k views

Unity 5 Networking Send Rate: Send Rate is Zero but server movement is still happening

I have a client server scenario, just a player moving about on the client and he moves about on the server using the built in networking provided in Unity 5. I have my client scene running in the ...
2
votes
1answer
4k views

Spawn scene object not found for 1

I'm getting this error with the new Unity Networking (5.1): Spawn scene object not found for 1 UnityEngine.Networking.NetworkIdentity:UNetStaticUpdate() This ...
1
vote
1answer
385 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
2answers
1k views

Player shooting himself when moving - Unity UNET

Setting : Creating my first multiplayer game and running into an odd issue. it's a tank game where players can shoot bullets and kill each other Problem : When the client shoots while moving, the ...
1
vote
1answer
583 views

Can UNet do Rigidbody2D prediction? (i.e. using gravity)

Having a NetworkTransform with transformSyncMode set to SyncRigidbody2D (as opposite to a ...
1
vote
1answer
481 views

Peer-to-peer Multiplayer Game [closed]

I built a casual game where the user answer the right word in random question. Now I want to make this game multiplayer (4 players) working on smartphones and tablets (Androird & iOS) where all ...
1
vote
1answer
693 views

Weapon Switching - Unity 3d

when I switch between weapons by Number [1 2 3 4] the weapon don't switch between them but the variable " selected weapon value changed" anyone help me, this my Code and screenshots! ...
1
vote
1answer
109 views

How to release a new level without having to publish a new version

What can I do to extend the gameplay. So if I know that I will update the game with new levels and dont want to publish a new version every time I have a new level. How can I handle this. Ex: I have ...
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 ...
1
vote
1answer
399 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. ...
1
vote
1answer
215 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, ...
1
vote
3answers
594 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.
1
vote
1answer
535 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 ...
1
vote
2answers
390 views

List of Lists for sending paths from client to server? [closed]

I have a client server scenario and I'm looking into distributed AI. I want the server to move x amount of ai characters around a map by pathfinding and then send the x amount of paths to the client ...
1
vote
0answers
23 views

Destroying a networked projectile and creating a client side visual for all clients in Unity?

I'm making a shooter in Unity with UNET, and of course I handle projectile (like arrows) collision on the server. The arrows are Networked rigidbodies with NetworkBehaviours, and I would like to ...
1
vote
0answers
41 views

Simple networking, now that UNet is deprecated [duplicate]

I'm prototyping a two-player typing game in Unity. I don't have any experience making multiplayer games, so I'm not sure how to best approach the netcode. For this game all I think I really need is ...
1
vote
0answers
41 views

How to implement a network proximity checker in Unity using LLAPI?

I'm trying to implement a network proximity checker using my own functions in Unity, using LLAPI. How can I implemnet a network proximity checker, with similar functionalities than the ones in the ...