Questions tagged [unity-networking]
Unity 5.1 introduced a new framework to handle client+server networking, also known as UNet.
146
questions
8
votes
1answer
10k 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
11k 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
13k 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
3k 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
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
7k 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 ...
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
176 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
1answer
807 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
272 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
809 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
1k 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
661 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
5k 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
657 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
352 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
2k 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
194 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
532 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
243 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
2answers
3k views
How to give and remove authority of an object between multiple clients (Or how to let the client controller push a rigidbody)
I'm doing a cooperation FPS game in which players can push big rigidbody cubes with their rigidbody characters (the one from the standard assets).
The problem is that the player hosting the game has ...
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
338 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
724 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
144 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
2answers
5k 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
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 ...
2
votes
1answer
739 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
222 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
479 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
0answers
225 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 ...
2
votes
1answer
695 views
problem using OnStartServer() for unity multiplayer networked game
UPDATE: i am still scratching my head over this. The way i see it, the Awake() function is only invoked when I load it in the Editor, but if I put the prefab Loading line into OnStartServer() it just ...
2
votes
1answer
1k 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 ...
2
votes
1answer
953 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
3k views
How can I use websockets in a Unity WebGL project?
There are plenty of good Websocket APIs for C#, but I run into trouble when targeting Unity WebGL due to this restriction described in the Unity documentation:
No direct socket access
Due to ...
1
vote
1answer
548 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
585 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
155 views
Mirror/Unet, RegisterSpawnHandler throws invalid asset Id error because assetId is 0 for dynamically loaded assetbundles
Its weird how documentation literally states that
For more advanced uses, such as object pools or dynamically created
Assets, you can use the ClientScene.RegisterSpawnHandler method
But seems like ...
1
vote
1answer
3k 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
1k 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
114 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
495 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.
...