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 Eco-Editor · Aug 16, 2017 at 07:41 AM · networkingmultiplayerscenespawnavatar

Why scene objects in multiplayer will not spawn, if enabled after scene is loaded?

Hello everybody, it took me time to understand my question, and here it is.

I have a scene of rooms with animated avatars. The first room is enabled when scene is loaded, while the others are disabled, but the avatars inside these rooms are set to be enabled (but the room is off, so they are "off" as well). Once I enable the next room, and thus disable the previous, the avatars automatically "active" and execute their script.

Now, in the network setting, avatars are scene objects. When scene is loaded they are loaded, but when the scene is loaded and they are in the "off" room, it seems they are actually not treated as those avatars who active in the first room, and then in NetworkIdentity, this button appears. alt text

I assume that because they where "already" disabled when the scene was loading, they did not have the authority of the initially enabled avatars. So when enabled, they play only bool animations, but not triggered animations (as explained [here][2]).

Also, following the logic of on level load, this can be solved by breaking the scene into rooms scenes, but before, I want to understand this.

networkidentityspawn.jpg (15.4 kB)
roomsettings.jpg (31.3 kB)
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

2 Replies

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by unidad2pete · Aug 17, 2017 at 10:08 PM

Objects with Network identity are scene objects and needs to be spawned on the scene by server. When you starts the server:

 NetworkServer.SpawnObjects();

I dont know if that is your problem but try it. And, if the object network identity is set to server only, only will be spawned on server client, maybe you dont need check server only , only empty.

Comment
Add comment · Show 1 · 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 Eco-Editor · Aug 18, 2017 at 09:35 AM 0
Share

Thank you Thank you Thank you!!!

You've directed me to the right direction: I used actually NetworkServer.Spawn(gameObject); in awake function, very simple and it works!!

....thanks again.

avatar image
0

Answer by Eco-Editor · Aug 22, 2017 at 08:12 AM

GOING BACK to this question!

It's not working very well for me after looking at it again: I have, on the client double of each character. Not on the server, just the client! I have double of each character, and unity actually create a clone of each spawned avatar! At first you don't see the clone, but when the server is joining the same room, you suddenly have two of each avatar! This is no go for me. I need to have only one avatar of it's kind in the scene, regardless if the server is joining the room.

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

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

Unity networking tutorial? 6 Answers

Trying to spawn players in multiple starting positions 1 Answer

How to sync a ball, where two players kick it in turns? (Multiplayer game using UNET) 0 Answers

UNET: NetworkServer.SpawnObjects() does not spawn objects loaded from Application.LoadLevelAdditiveAsync 2 Answers

Photon - Loads a level but doesn't spawn player. 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