Search Unity

How to to dig further into this?

Discussion in 'Multiplayer' started by pKallv, May 13, 2017.

  1. pKallv

    pKallv

    Joined:
    Mar 2, 2014
    Posts:
    1,191
    I get this, kind of, common message when developing:

    However, i just can't find the source for it. It comes ONLY when i add player #3.

    I know what the prefabs are and am actively searching for the source of this bit cannot find it. I do not want to post the code as it is kind of complex and big but my question is if there is any good way of digging deeper into this to find where this is generated.

    i Tried:
    Code (CSharp):
    1. public void HandleLog(string logString, string stackTrace, LogType type) {
    2.    Cmd_Print("1) logString: " + logString + " type: " + type + " stacktrace: " + stackTrace);
    3.  
    4. Result:
    5. "1) logString: Command for object without authority [netId=9] type: Warning stacktrace: UnityEngine.Networking.NetworkIdentity:UNetStaticUpdate()"
    I also done prints in each module to try to identify where it is generated without being able to find the source.

    Question is if there is any other way of digging deeper into this?

    As it is "only" warnings and everything seems to work anyhow i guess i could just leave it but it annoys the hell out of me.

    Appreciate any ideas and help.
     
  2. TwoTen

    TwoTen

    Joined:
    May 25, 2016
    Posts:
    1,168
    You are trying to send a Command from a object you do not have authority for. The object has NetID 9.
    You probably forgot a if(isLocalPlayer) before the command. If you pastebin the code I could look into it.
     
  3. pKallv

    pKallv

    Joined:
    Mar 2, 2014
    Posts:
    1,191
    i know that but for some reason i am not able identify where. I have searched for every single command and added hasAuthority but still get this message. ...and it only show up with the third player of four??
     
  4. TwoTen

    TwoTen

    Joined:
    May 25, 2016
    Posts:
    1,168
    Without any code I cannot help you. Just make sure there are no commands on objects not owned by the local player.

    But is the object with netID 9 your own object? With local authority?

    Also, make sure you are not calling a command from server.
     
    Last edited: May 18, 2017
  5. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    3,296
    The easiest way for me to debug such messages is to just to through all NetworkIdentity components and check their Id for matching with the one from the message. Note that you must do this in runtime, otherwise you won't be able to tell which id is generated for which object.

    NetId is usually displayed in preview window.

    Check your scripts on that object, that's the closest advice I can give.
     
  6. TwoTen

    TwoTen

    Joined:
    May 25, 2016
    Posts:
    1,168
    A
    Alternativly change the log level on your networkmanager if you use one of those.