Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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 NWin · Apr 07, 2015 at 04:01 AM · transformmultiplayerchildrensync

How to sync child objects of a transform in multiplayer

Basically there is an object in my scene that needs other objects as children to work right, but when I tell the network view to track the parent object's transform, it doesn't track the children (just that they exist and are children of the parent object). I also need it do be so that any client can add an object as a child... and I just can't figure it out. Thanks for reading, and hopefully answering if you can :)

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

3 Replies

· Add your reply
  • Sort: 
avatar image
2

Answer by Bryan-Legend · Sep 08, 2015 at 09:35 PM

Apparently there's a new component called NetworkTransformChild in 5.2 for this.

See http://docs.unity3d.com/ScriptReference/Networking.NetworkTransformChild.html

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
avatar image
1

Answer by winsjansen · Apr 07, 2015 at 09:22 AM

I'm not sure what your problem is, as if you add a networkVeiw to a parent it will send the transform of the parent over the network and move the parent at the other end and thus make the child follow it.

As for the client being able to add object as child, are you sure you are using Network.Instantiate?

Comment
Add comment · Show 2 · 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
avatar image NWin · Apr 07, 2015 at 05:06 PM 0
Share

what I'm trying to do is have all clients know what the children of a parent object is, assu$$anonymous$$g that the object starts with no children and the parent doesn't move. I basically just need each client to know that the child objects exist.

avatar image winsjansen · Apr 07, 2015 at 08:27 PM 0
Share

So you are saying that the other clients don't get the objects/childrens instantiated? If so, I'll need to see some code if you are certain that these objects are in fact insantiated through the network namespace!

avatar image
0

Answer by wesleywh · Apr 07, 2015 at 07:12 PM

Ya this is a weird problem. Just make sure your adding a "NetworkView" component to the parent and dragging the transform to it. That will make jerky movement but make sure that works before moving on. If it watches that correctly it will move your entire object including the children of it.

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

Network animations 2 Answers

Is that any way to pass list of array through photon? 0 Answers

all parents of a transform 1 Answer

get bone path from transform 1 Answer

How to sync players in multiplayer game 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