Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Cryoblast · Sep 28, 2015 at 06:39 AM · networkinglobbynetworkplayerauthoritative

NetworkIdentity.clientAuthorityOwner no set on NetworkLobbyManager's playerPrefab

Hi,

I use an override version of NetworkLobbyManager in order to spawn my playerPrefabs.

The NetworkIdentity.localPlayerAuthority flag of the playerPrefab is set.

According to my own understanding of the documentation, at runtime, the NetworkIdentity.clientAuthorityOwner attribut of the spawned playerPrefabs should be set.

But the probleme is : they are not. Is that a bug ?

My unity version is 5.2.0f3

EDIT :

Providing help without source code is not easy. I reproduced the issue on this minimalistic project : test-cltauthowner.zip. In this sample, the NetworkLobbyManager is not an override, but the behaviour remains the same.

When the players are ready the "XXX : clientAuthorityOwner is null" message is printed indefinitely (where XXX is "ServerSide" or "ClientSide" depending on which one is launched on the editor).

For those (like me) how don't trust zip files on a web page, here is a description of the project setting :

The gameScene :

The default unity scene scene

The lobbyScene : alt text

The PlayerBehaviour Script :

 using UnityEngine;
 using UnityEngine.Networking;
 using System.Collections;
 
 public class TEST_PlayerBehaviour : NetworkBehaviour {
     void Update()
     {
         //Retreive the NetworkIdentity on runtime
         NetworkIdentity networkIdentity = GetComponent<NetworkIdentity>();
 
         //Display clientAuthorityOwner on server side
         if (isServer)
         {
             if (networkIdentity.clientAuthorityOwner != null)
             {
                 Debug.Log("ServerSide : " + networkIdentity.clientAuthorityOwner.ToString());
             }
             else
             {
                 Debug.Log("ServerSide : clientAuthorityOwner is null");
             }
         }
         //Display clientAuthorityOwner on client side
         else
         {
             if (networkIdentity.clientAuthorityOwner != null)
             {
                 Debug.Log("ClientSide : " + networkIdentity.clientAuthorityOwner.ToString());
             }
             else
             {
                 Debug.Log("ClientSide : clientAuthorityOwner is null");
             }
         }
     }
 }

Thanks for your help.

editorsetting.jpg (236.2 kB)
test-cltauthowner.zip (49.6 kB)
Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Alexander-R-Young · Aug 05, 2016 at 07:25 AM

When I run your test-cltautowner as a host in editor, i got this:

ServerSide : hostId: 0 connectionId: 1 isReady: True channel count: 2

So i guess that clientAuthorityOwner can only be used on server.

You can use hasAuthority and localPlayerAuthority to pick part information we need on client.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

SetClientOwner m_ClientAuthorityOwner alread set! 2 Answers

Can I use the same game player prefab in lobby player prefab,by inheriting from lobby player and adding it to the lobby manager? 0 Answers

[UNET] how to correctly rehost the game? 0 Answers

[Multiplayer] Lobby/Staging/Matchmaking flow: Quickstart using NetworkLobbyManager? 2 Answers

Rotating character on server using camera angle on client 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges