Questions tagged [unity3d-unet]

UNET is the native Unity3D network system. It is the short form of unity networking. Use this tag to ask questions related to Unity3d networking.

UNET is the new native Unity3D network system (since Unity 5). It is the short form of unity networking.

http://docs.unity3d.com/Manual/UNetOverview.html

This tag covers :

  • High level scripting API, LLAPI, and all underlying concepts
  • GameDev network programming algorithms and concepts applied to Unity scripting.
  • Old (legacy) networking system.

Related tags

241 questions
0
votes
0 answers

Custom Spawn Functions - spawn rotation

I'm trying to do some object pooling in my networked game. I'm following this piece of documentation. The issue is: how do I set the right rotation to the pooled object? The delegate gives me the spawn position, but no rotation. The objects I'm…
Massimo Frasson
  • 427
  • 3
  • 10
0
votes
1 answer

Object visible on host but not client

EDIT: In addition to thr answer below, these links helped resolve the…
tintyethan
  • 1,772
  • 3
  • 20
  • 44
0
votes
0 answers

Networking lobby player image not working on host and other clients

I am trying to create a lobby for my game. I need to set a profile image for every player, but I can't send to texture from each player profile image to the server anny sugestions? I have tried using Command like this [Command] public void…
0
votes
1 answer

Unity: InvalidProgramException: Invalid IL code XXX(): IL_0011

So the project is an online MMO. It uses the uMMORPG2D asset (which in turn uses UNET). The code in question has been working fine for the last week without incident, and hasn't been modified in any way in that time at all. However now it suddenly…
NeoKuro
  • 457
  • 1
  • 5
  • 21
0
votes
1 answer

Spawn prefabs according to player platform with LobbyManager

I'm trying to spawn different prefabs depending on the player platform. So I'm overriding the NetworkLobbyManager to spawn objects the way I want. So I create a Dictionnary that associates a connectionId to an index of a prefab and then I…
Kalixio
  • 1
  • 1
0
votes
1 answer

Unet Non-Player non-server Health syncing

I have enemy objects spawned by the server. When they get hit, a function on them gets called to apply damage. I can't move or rename this function as it is part of a Unity asset package that has lots of interconnected parts. I can't apply damage…
Lokiare
  • 1,238
  • 1
  • 15
  • 23
0
votes
0 answers

Null reference Error in UNET

Using this script i can shoot the projectiles from Server to Client. But when i try to shoot the projectiles in the client it shows null reference error. Can someone help me? This is the error : NullReferenceException: Object reference not set to an…
Devender Gupta
  • 496
  • 5
  • 22
0
votes
1 answer

Child Objects of LocalPlayer is not localplayer?

In the screenshot the PlayerPrefab is the gameobject that is spawned when a player connects the server. So the root gameobject i.e PlayerPrefab has the localplayer authority. Where in the child objects the localplayerauthority is checked and still…
Devender Gupta
  • 496
  • 5
  • 22
0
votes
1 answer

Referencing child objects of an object with a network identity Unity UNET?

So I have an object that I am trying to manipulate through UNET. What I am doing is basically spawning an object onto the server and then I perform a ray cast, if the ray cast comes back and I hit a child of that spawned object then I want to change…
Dtb49
  • 1,211
  • 2
  • 19
  • 48
0
votes
1 answer

Implementing a spawn method in UNET

I wanted to implement a spawn method of my own in NetworkManager. The code for spawning players is shown below. Can someone tell me how to implement this in NetworkManager by overriding the normal spawn function. public void Spawn() { int…
Devender Gupta
  • 496
  • 5
  • 22
0
votes
1 answer

Unity - Network manager not working properly outside Unity Editor

I'm making a game in Unity, I want to instantiate the network manager at a certain screen, so I use a prefab for the network manager, my code is as follows:- void Start() { Transform cloneNetworkManager = Instantiate(networkManager, new…
0
votes
4 answers

Cast different subclasses in a method

I'd like to send, receive and cast a subclass of a SkillEvent class and be able to grab custom parameters inside, depending of it's type. There could be a lot of different subclasses with different parameters. Is there a way to avoid writing a…
FLX
  • 2,626
  • 4
  • 26
  • 57
0
votes
2 answers

Object not set to an instance of an object [UNET]

Just recently started using UNET and it has been difficult, to say the least. I'm trying execute a few lines of code to essentially have the server assign a spawned prefab (aka the Player) a camera, set it's position and parent it to said prefab.…
0
votes
1 answer

Unity UNET - Client unable to move

Im using UNET to make a multiplayer FPS.I have a player prefab for which the network identity script has an attribute local player authority that i have enabled. My PlayerMotor Script is as below: using…
0
votes
1 answer

Unity UNET - A Server (Not Host) is calling [ClientRpc]s on itself

I have a NetworkManager started in Server Mode, using StartServer, not Host Before any clients connect, I set my code to do this: public override void OnStartServer() { base.OnStartServer (); Debug.Log("// " + name + " has…
Jethro
  • 3,029
  • 3
  • 27
  • 56