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 menep · Jun 20, 2012 at 05:54 PM · networkowner

Server 24/7 and NetworkID owner

I want to have server 24/7, and players who login and logout all the time. Users create own objects by Network.Instantiate(). Logout doesnt destroy them. When they login again, write proper user name and password they can take control over their objects again.

There is a problem. When they login again they have another ID Network.Player. I dont know which approach should I take. If I set player his old ID , there will be RPC error sending RPCs to non egzisted "new player". Setting all objects to new onwer is even worse idea.

Comment
Add comment · Show 2
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 ExTheSea · Jun 20, 2012 at 07:28 PM 0
Share

Why not safe the namee of the player/username by sending it to the server and linking it with the object with a RPC call?

avatar image menep · Jun 21, 2012 at 12:38 PM 0
Share

Because Im using the NetworkView, so if the owner changes something it changes as well on the other players maps.

If I would do as You say, I would need to write a lot of different RPC calls.

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by Bunny83 · Jun 21, 2012 at 12:48 PM

What ExTheSea said is the only way. Unity's networking system isn't ment for identifying players across sessions. You need your own management to handle such cases. NetworkViewIDs become invalid when the owner left the game. There's no way to "link" them back to a new owner. ViewIDs can't change the owner. So Network.Instantiate is a very bad idea for what you want to do.

When a player reconnects, the server have to recognise the player in some way (username / password ...) and the player have to recreate all ViewIDs of all objects that should belong to him, and you have to synchronise them with the objects on all peers.

Again, you have to ship your own object management and Network.Instantiate doesn't work in this case.

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 menep · Jun 21, 2012 at 06:13 PM 0
Share

So I should in approach Instate everything by main server? And players can access it by RPC calls?

Hmm, well there will be no errors with finding the owner of gameObject.

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

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Network Instantiate with wrong owner. 2 Answers

Assigning the owner of networkviews manually 1 Answer

Network view , ownership 1 Answer

Network - Best Way To View Players In Game? 1 Answer

discrepancy between networkviewID.owner on different clients? 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