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
2 answers

How to access a script after object has spawned?

In unity multiplayer the player prefab spawns after the scene loads, what is the best way to declare scripts that are needed and avoid the NullReferenceException error?
0
votes
2 answers

NetworkServer is not active. Cannot spawn objects without an active server

I have been looking for the answer to this problem but have not found any that solves the problem. The prefab is registered. Here is the code piece, in the following class: "public class MyNetworkManager : NetworkManager" public override void…
PeterK
  • 4,243
  • 4
  • 44
  • 74
0
votes
0 answers

When a client connects to server do foreach UNET

How to make when a client connects to server, that my foreach is working. Because when I put the foreach in Update, it's working great. What's the problem? using UnityEngine; using UnityEngine.Networking; using System.Collections; public class Net…
0
votes
1 answer

Unity Networking - [command] function executes when it is not supposed to

I'm fairly new to unity networking and Networking itself. Game: I have 2 players multiplayer game where each player can shoot. Problem: Code 1 makes both players shoot (in the host game only) when host player press spacebar. The client player cannot…
0
votes
1 answer

How to send commands from non - player objects UNET

I am unable to send commands from my gun prefabs in my game. How can I send commands from non-player game objects? Every time I try to send a command, I get an error. I do not want to move my shooting scripts from my guns to my player, as this…
Aaron Ge
  • 258
  • 3
  • 21
0
votes
1 answer

Why is my UI panel moved on remote client vs. original position on the host client

I am testing UNET and UI. When i place a panel in the scene it is OK in the host-client but the panel have another position on the remote client. I am using the anchor points etc. Can anyone please explain? Host-client Remote Client Anchor Points
PeterK
  • 4,243
  • 4
  • 44
  • 74
0
votes
0 answers

Synchronizing an audio file over network in Unet

I have a gameObject "plane" that isn't controlled by the clients. it gets spawned with an audio source that plays a clip when the host clicks a certain button. i would like the sound to be heard by the clients, i tried using rpc but i can't seem to…
0
votes
1 answer

UNET: Command function CmdSpawnPlayer called on server

I got an error from Unity while I was busy executing a command for the server. The error is: Command function CmdSpawnPlayer called on server. UnityEngine.Debug:LogError(Object) NetworkHandler:CallCmdSpawnPlayer(Boolean) NetworkHandler:OnEnable()…
Skittluier
  • 31
  • 4
0
votes
2 answers

Unet Unity islocal player error

I am testing out the Unet multiplayer functionality on a basic 2d game. At the moment it consists of a single box/racket moving up and down. In the monobehaviour class the box moves up and down correctly, however when i include the islocalplayer in…
the_big_blackbox
  • 1,056
  • 2
  • 15
  • 35
0
votes
0 answers

Unable to connect to android server via android client using Unity 5

I am making an Android multiplayer game using WiFi in Unity 5. I open a hotspot on one Android device and connect the other Android device to it via WiFi. Then I start the game on both devices, host the game on one device and try to connect to the…
0
votes
1 answer

Unity3d Multiplayer Unet - multiple host in dedicated server

Before I come to this forum ... I was ask this question in unity's answers.unity3d and forum but after 2 month ... there is no one answer and help or guide me a little bit... anyway .... My question is : I am working on a simple multiplayer…
iman_sh
  • 420
  • 1
  • 8
  • 22
0
votes
2 answers

UNET: Differences in running with Unity Editor and application

I'm trying to figure out what is causing the following difference in errors when using UNET: I am running my project in the editor and in application form at the same time to test the multiplayer functionality. The functionality I am testing is…
0
votes
1 answer

UNET library server compatibility

firstly I have to say that I'm new to Unity3d, so please be kind to me :). I'm about to start a project with Unity3d and I read from Unity docs that for the networking part of the game can be used a class provided by the Unity staff called UNET, i…
MatteoP
  • 46
  • 2
  • 10
0
votes
1 answer

Unity Multiplayer Game Player Spawning Not Working

Hello, i have been working on this problem for 3 days and i cant figure out what is wrong with it. The error message i got is "SpawnObject for Player(Clone) (UnityEngine.GameObject), NetworkServer is not active. Cannot spawn objects without an…
0
votes
1 answer

GameObject Rotation does not happen on Client Side

Flip a 2d GameObject and place it on exact the same position works well on both sides. Rotating 2d GameObject works well on both sides However, if i flip the GameObject, by executing Cmd_DoTheSpawn, the rotation is not reflected on the "other"…
PeterK
  • 4,243
  • 4
  • 44
  • 74