TrueSyncBehaviour owner.Id is -1 in inspector but was 0 inside OnSyncedInput()

Hi,

Is it normal that a TrueSyncBehaviour shows its Onwer Index to -1 but during OnSyncedInput() is was actuall 0 or 1 or more?

Bye,

Jean

Comments

  • Hi @jeanfabre, just to make things clear, on the topic you have used "owner.Id" and on the question you have used "owner index", they have slightly different concepts. You want to know about the owner index?
  • Hi,

    uhm... yes I think I am getting confused here. I want to assign different position and look for each player, but It gives us trouble, so I think I want to check the Owner.Id but then I am curious now as to what is the owner index.

    Bye,

    Jean
  • The "owner index" it is used on the start of the game, if you have a GameObject on the scene you can alter the owner index to pre-assign that Go to some player. For example, if you have a ball you can set owner index to 0, so the first player will be the owner, if you set 1 so the second player will be the owner.. and so on.
  • Hi,

    I see, so it is linked basically. I would suggest making it clear in the interface, so that the owner Id is reflected properly, instead of just -1 it would help debugging and being sure of what is what :)

    Bye,

    Jean
  • Thanks for the feedback @jeanfabre.