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 JochenWinklerAtIKA · Aug 27, 2018 at 09:54 AM · networkinghierarchy

How do NetworkIdentity and Hierarchy interact?

There is documentation about the NetworkIdenty-Component: https://docs.unity3d.com/ScriptReference/Networking.NetworkIdentity.html

It says:

For complex objects with a hierarchy of subcomponents, the NetworkIdentity must be on the root of the hierarchy. It is not supported to have multiple NetworkIdentity components on subcomponents of a hierarchy.

This does seem to be specific... but it confuses me a lot:


1) Originally I assumed that this meant/impied:

"An object with NetworkIdentity cannot be child of an object which also has a NetworkIdentity."

Now I tried such a situation - and it did not cause any noticable problems. No errors, no warnings, and preexisting functionality worked.

a) Will problems turn up later / only in specific situations?

b) Did I missunderstand and it actually is allowed to have a NetworkIdentity as child of a NetworkIdentity?


2) First sentence:

For complex objects with a hierarchy of subcomponents, the NetworkIdentity must be on the root of the hierarchy.

Read as written, the statement cited above seems to imply the following:

Any object that has at least one child-object could be seen as a "complex object with a hierarchy". Therefor no object with a NetworkIdentity may ever have any other parent than the scene itself.

That, too, seems to be bogus. It does not seem to cause problems to have networkIdentities in some kind of group...

a) Is read-as-written wrong for this documentation?

b) Are there some problems that will come to haunt my team later?

c) Am I missunderstanding the documentation due to a lack of language-skills?

d) Are we missing something else?


3) Second sentence:

It is not supported to have multiple NetworkIdentity components on subcomponents of a hierarchy.

Now this second sentence speaks about multiple NetworkIdentities. Will there only be a problem when I have several of these a children of any other object? Or is that something that I got wrong, too?



Update: I finally got some warnings and errors. The Server is giving me the warning

Prefab 'DeviceDemonstrator' has several NetworkIdentity components attached to itself or its children, this is not supported. UnityEditor.Build.BuildPipelineInterfaces:OnSceneProcess(Scene, Boolean)

The client at the same time gives me the the following error lots of times:

IndexOutOfRangeException: NetworkReader:ReadByte out of range:NetBuf sz:7 pos:7 UnityEngine.Networking.NetBuffer.ReadByte () (at C:/buildslave/unity/build/Extensions/Networking/Runtime/NetworkBuffer.cs:35) UnityEngine.Networking.NetworkReader.ReadByte () (at C:/buildslave/unity/build/Extensions/Networking/Runtime/NetworkReader.cs:165)

I have not yet found out what finally triggered those errors... Or, to be more exact: I have not yet found out why those errors had not been triggered before.

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

0 Replies

· Add your reply
  • Sort: 

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

128 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Unity networking tutorial? 6 Answers

How [Command] and [ClientRpc] are made in that way that when you call them they notify the network to send the parameters but the code inside doesn't get executed. 1 Answer

isLocalPlayer set to true on child 0 Answers

UNET Buying/changing weapons ingame by players 0 Answers

Why when I make a Networking first person game it controls the other person? 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