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 coatol5 · Mar 13, 2018 at 05:50 AM · multiplayerphotonsyncplatforms

Do Photon networked scene objects have to be instantiated?

Hello,

In my multiplayer game I have a bunch of moving platforms that the players must jump across. I figure the best way to make sure the platforms are in sync between all of the players is to network the platforms. However, do I have to go through the PhotonNetwork.InstantiateSceneObject() call to have my networked objects in the scene?

The placement of the platforms through the editor is very specific and at-times painstaking. Grabbing all of their spawn transforms would be tedious and might break certain start functions in the game. So, is it possible to just give them photonViews in the scene and assume it will work?

Thank you.

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
1
Best Answer

Answer by ChristianSimon · Mar 13, 2018 at 10:48 AM

Hi,

yes, having those objects already placed in the editor is possible. They will be handled as Scene Objects this way.

Comment
Add comment · Show 3 · 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 coatol5 · Mar 15, 2018 at 08:25 AM 0
Share

Thanks for the response.

I'm still not too clear on this however. I have in my scene many moving platforms. Each platform has 3 main components: 1. A script that moves it (non networked). 2. A PhotonView 3. A PhotonTransformView In my scene, my platforms all have their respective PhotonTransformViews referenced in the "Observed components" of their PhotonView. Yet I'm getting an error like this when my second player joins:

The observed monobehaviour ($$anonymous$$ovingPlatform) of this PhotonView does not implement OnPhotonSerializeView()!

For each one of my networked platforms. In game, the non-master clients see my platforms move in a stall-stutter fashion. When I remove the observed component reference, I no longer get the error, but also my platforms are not synced.

Is there some kind of rule that you have to instantiate it over the network to utilize PhotonTransformView or something?

avatar image ChristianSimon coatol5 · Mar 15, 2018 at 09:45 AM 0
Share

The script that actually process the movement of the platform should not be added as an Observed Component. If this is currently the case, please remove this component from the list of Observed Components. Also when updating the platform, make sure that this step is surrounded with a if (photonView.is$$anonymous$$ine) condition to avoid updating the object on non-$$anonymous$$asterClients in this case.

Is there some kind of rule that you have to instantiate it over the network to utilize PhotonTransformView or something?

No.

avatar image coatol5 ChristianSimon · Mar 18, 2018 at 03:00 AM 0
Share

After playing around with it more, I think that bug was co$$anonymous$$g from somewhere else. I ended up placing my networked prefab in the Resources folder and that seemed to fix it.

Thanks for the assistance!

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

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

Related Questions

how to make game object animation without animator visible to all players in photon pun? 2 Answers

How do you sync animations in Photon (free version)?,How do you sync animations in Photon(free version)? 0 Answers

please help multiplayer question(photon). 1 Answer

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

how to sync audio in instantiated object so all players can hear it? 0 Answers


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