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 /
  • Help Room /
This question was closed Apr 18, 2016 at 10:14 PM by Le-Pampelmuse for the following reason:

The question is answered

avatar image
2
Question by aengesse · Apr 12, 2016 at 04:40 PM · networkingscenemultiplayer-networking

Can one scene have two NetworkManagers?

Hello Unity Answers,

I'm working on a game where I need to have two connections in the same scene. One as a server and one as a client. I'm trying to use Unet to build a Master Server to manage all of connections.

Can one scene have two NetworkManagers?

Thanks for any and all help!

Comment
Add comment · Show 5
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 Le-Pampelmuse · Apr 14, 2016 at 10:14 AM 2
Share

No you can't, that's not the purpose of the Network$$anonymous$$anager.

What exactly do you mean, you need two connections in the same scene, one as a server and one as a client?

The Network$$anonymous$$anager can already function as server only or client only, did you mean that or something else?

avatar image aengesse Le-Pampelmuse · Apr 15, 2016 at 02:19 PM 0
Share

I'm needing two Network$$anonymous$$anagers in the same scene. One to connect to a server (function as a client) and the other to be a server (to allow clients to connect to it). After one of the Network$$anonymous$$anagers establishes it's connection the other doesn't seem to connect.

avatar image Le-Pampelmuse aengesse · Apr 17, 2016 at 09:45 AM 2
Share

Well you can't. If I'm not completely mistaking, or something has changed in the last few months, they are a builtin simple support for networking out-of-the-box so to speak..

When having multiple in one scene, and you run it, you should see error messages like "there are more than one networkmanager in the scene.."

While you can run the manager as a host (client & server simultaneously) I think you need two seperate IP connections right? That is, as far as I know, not possible with the Network$$anonymous$$ananger. I'm sorry I could not understand your question the first time ;)

$$anonymous$$aybe you can do a kind of workaround making one small build be the masterserver and then make a seperate client exe? $$anonymous$$any games have it like that (Dedicated Servers).

I'm sorry I'm not much of a big help here, I haven't done networking in ages. :/

Show more comments
Show more comments

1 Reply

  • Sort: 
avatar image
-4

Answer by aditya · Apr 13, 2016 at 05:24 AM

Im not a Unet user but what i know is that GameObjects uses networkManagers to Receive and Send information over network, this means the objects that needs network should have a NetworkManager attached

Comment
Add comment · Show 4 · 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 aengesse · Apr 13, 2016 at 06:33 PM 0
Share

Thanks for your reply! However, from my limited experience, when there are more than one Network$$anonymous$$anagers in a single scene (even if the Network$$anonymous$$anager is associated with different GameObjects) only one Network$$anonymous$$anager will connect.

avatar image aditya aengesse · Apr 15, 2016 at 05:25 AM 0
Share

$$anonymous$$y bad, i typed GameObject ins$$anonymous$$d of Scene

avatar image ItTookMe2MonthsToCreateAnAccountHereSuccessfully · Apr 18, 2016 at 08:28 PM 2
Share

That's wrong, you should have written "Objects that needs network should have a NetworkIdentity attached", not a Network$$anonymous$$anager. Like Pampelmuse said, there can only be one Network$$anonymous$$anager in the scene. I tried it.

avatar image aengesse ItTookMe2MonthsToCreateAnAccountHereSuccessfully · Apr 18, 2016 at 09:18 PM 0
Share

Yep it sounds like I will have to figure out a different way. Thanks for replying though!

Follow this Question

Answers Answers and Comments

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

How can I send update to all clients from one client in Multiplayer game in Unity3d? 0 Answers

RPC sending Failed 0 Answers

UNET NetIDs for Scene Objects Mismatched Between Client and Server 1 Answer

Racing game using PUN 2 0 Answers

Exiting a UNET lobby causes future ClientRPC calls to be ignored. 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