Unity 5.1 introduced a new framework to handle client+server networking, also known as UNet.
0
votes
0answers
14 views
What are pros and cons of Node.JS/Socket.IO vs Photon Server? [on hold]
I've built a simple chat demo using NodeJS/Socket.IO, but I wonder if it is good enough to build my final real-time multiplayer game?
0
votes
1answer
21 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
0answers
22 views
You are trying to load data from a www stream which had the following error when downloading. 400 Bad Request
I have multiple ui image elements that get their data from a server.
The problem is that some times all of them load properly and without any problem and some times some of them randomly fail, it's ...
0
votes
0answers
56 views
Unity Multiplayer non-player object destroy
I am trying to create a 2D top down multiplayer game where the players move and pickup objects.
Below is the spawning of 6 pick-up objects on a random 2D position. This script is attached to a game ...
0
votes
1answer
18 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)
...
0
votes
0answers
13 views
State synchronization of complex instance classes over Unity UNET?
So this is more of a design question.
I have a Unity code base that I'm adding Multiplayer and Networking elements to. I'm using UNET. The codebase was originally made for a single player educational ...
0
votes
0answers
21 views
Networking in unity
I have a game I developed in XNA (as the client) and a server (that's has little dependency with XNA, which can easily be removed). Currently I don't want to continue developing my XNA game, since it'...
0
votes
1answer
24 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
34 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 ...
0
votes
0answers
34 views
Why unity use UDP protocol? [duplicate]
Why unity use UDP protocol? What's the benefit of using UDP with multiplayers game and give me some example where i use udp protocol for which data ?
Thanks Regards
0
votes
0answers
27 views
Multiplayer using Unity 5.4.1: Commands, ClientRpcs and SyncVars
I'm making a network game using unity. I am wondering about the following:
Are Commands, ClientRpcs and SyncVars guaranteed to be executed when called, or are they fire and forget?
0
votes
0answers
23 views
Attaching a camera to a client via NetworkLobbyManager
I'm using NetworkLobbyManager to co-ordinate a multiplayer unity game and need to set the client camera to follow each client.
What's the best hook to get the GamePlayer on the client so I can tell ...
0
votes
0answers
32 views
What are the performance implications of using SyncVar?
I have an application which is using a [SyncVar].
I'd like to understand the implications of using this for a frequently changing variable. In my case, this is a timer which is updated each frame.
...
1
vote
1answer
56 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
0answers
60 views
Unity3D Photon Multiplayer Movement Synchronization
I'm making a billiard game and I wanna sync the balls' movement. I'm using Photon network and this is my code so far:
Vector3 vel;
Vector3 angularVelocity;
Vector3 pos;
void Update()
{
...
5
votes
1answer
133 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 [Command] and [RpcClient].
I know the ...
0
votes
0answers
56 views
Unity UI Button Not Appearing (listItemPrefab)
Following a tutorial from brackeys (FPS 20) I has the following issue.
https://www.youtube.com/user/Brackeys
The issue is with joining servers in the 3d fps tutorial . When I host a game in a quick ...
1
vote
0answers
64 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
89 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
140 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
114 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 ...
4
votes
1answer
124 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
2answers
81 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 acceptable.
1
vote
1answer
104 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
0answers
44 views
Unet 2D sync problems
I've studied Unet but I still can't get it to work right :(
I have 3 problems.
The first: I can't force player 1 to always spawn from a specific spawn point (and same with player 2). Therefore I've ...
0
votes
0answers
25 views
Reference lost in NetworkEntity
I'm a newbie in the use of the UNET on Unity5 and I encounter some issue I quite not understand :
My player is a Tank which can shoot "Shells".
So, my GameObject "Tank" has a component script named "...
0
votes
1answer
151 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
138 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
303 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. ...
0
votes
0answers
105 views
Networking issue in Unity - listening port is already in use
I am trying to Network a small 2 player Unity game. This is my first go at networking, so please feel free to correct me on anything I am doing wrong. I am attempting to make a simple matchmaking ...
0
votes
0answers
65 views
Method with Command Attribute not executed on Client (Unity, Unet)
The firing command doesn't work on the client. It shows on the server but the client does nothing even though I'm calling this from the client. It's supposed to shoot which it does on the server but ...
3
votes
1answer
164 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 ...
0
votes
0answers
366 views
UNet - Local Player Authority
I have an NPC. I would like to give the player the ability to possess the NPC by clicking on it.
//Prefab is spawned with networkIdentity.localPlayerAuthority = true
networkIdentity....
0
votes
1answer
53 views
Physics Object on Client moving too quickly in comparison to the Server: Should be a copy
I have a client server scenario. On the Server a force is applied to a 2d object. I want the client to copy the movements of the server but not through constant positional updates. My current approach ...
1
vote
2answers
361 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 ...
0
votes
1answer
288 views
Object spawn only on Server in multiplayer unity3d game
In my game I have an object let say food, whoever eat that food that player will spawn one more element. I am sharing code here :- I am checking collision in Update. Following code is working fine on ...
1
vote
1answer
197 views
Communication between Photon Cloud game and web server [Unity3D; Photon]
I am creating a multiplayer game using Photon Cloud (Photon Unity Network). For storage of player data (profile, inventory, achievments) I use web server (asp.net mvc & sql server). How to ...
4
votes
1answer
174 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 ...
0
votes
0answers
57 views
Animation with pivot-modification in Mecanim
Assume I have two animation cycles:
Walking
Crouching
Both assume that the model's pivot is on the same level as the model's feet.
Now I also have two animated transitions:
Get on all fours while ...
1
vote
3answers
1k views
How to receive broadcast message in Unity?
I am trying to get the broadcasted message in overridden method of NetworkDiscovery.OnReceivedBroadcast(). For that what I had done is below:
I create class which implements NetworkDiscovery where I ...
1
vote
1answer
581 views
Unity 5 Command not being sent
I have a client server build in Unity 5. I want to send a command from the client to the server with a GUI button click, this is for testing purposes. So on my client all I want is to click a button ...
0
votes
0answers
20 views
Creating 2vs2 room with friends in Unity with PUN
I would like to create a game mode 2vs2 with our friends. I have no idea where to start off. How can we send them notification regarding some of our friends is looking for party. I think this is ...
1
vote
0answers
245 views
UNet send message by Client.Send error
I'm try to implement client-server communication base on UNET.
The problem i got now is send custom message to server, but the Client.Send always show error without my understanding.
So what i'm wrong?...
0
votes
1answer
76 views
The best way to pass data between clients in a room
I am developing a backgammon game in Unity and tried to use Photon. But I could not find a step by step help for it and I also know that photon in real-time and it syncs data over 10 times per second. ...
1
vote
0answers
79 views
How do I allow clients to move a GameObject that exists on the server?
I started to delve into the UNet system for the first time the other day and I've run into a bit of an issue while testing on a localhost server. In the scene there is a Rigidbody ball that I want ...
-1
votes
1answer
2k views
How to correctly sync an ArrayList of GameObjects on a server/client
I'm experimenting with networking in Unity and I can't seem to get an ArrayList of GameObjects to sync from the server to the client.
Here is the relevant code:
[SyncVar]
ArrayList walls = new ...
1
vote
0answers
151 views
Unity3D Photon - Failed to 'network-remove' GameObject"
Failed to 'network-remove' GameObject. Client is neither owner nor masterClient taking over for owner who left: View (0)2001 on Player(Clone)
This is the error I repeatedly get. I'm using ...
2
votes
1answer
72 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 ...
3
votes
1answer
237 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 ...
1
vote
0answers
258 views
Unity nested network identity
I have a problem with nested GameObjects in Unity Networking (5.2);
One of my GameObjects (lets call it mother) has a network transform component.
Now the mother can have a variable number of childs ...