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
8
Question by paulsz · Nov 25, 2010 at 12:40 PM · viewnetworkviewidstrange

How can the "View ID AllocatedID: X not found during lookup. Strange behaviour may occur" error be ignored ?

This exception is thrown whenever a networkview on one machine starts updating states and the network view on the other machine does not (yet) exist simply because the gameObject it is on is not activated (yet) and the gameObject in question is not created with Network.Instantiate, but it is already in the scene.

I want to bypass this error by simply ignoring it because when the networkView that is not found, gets finally activated on the machine that threw the exception, everything is all well and the states are updated correctly.

In other words, my question would be: Is there an elegant way to ignore this error say by using a try{}catch{} statement somewhere in the code, and if yes, where ?

This error is really a pain and in my case ignoring it solves the problem and should not be considered an error at all.

I am using for now a very non-elegant solution:

1. Initially the states synchronization is set to off

2. Only a few seconds after activation it is turned on (Unreliable or DeltaCompressed) to make sure the corresponding gameObject on the other machine has enough time to be activated by the time the server starts synchronizing states.

Additional note:

Network.Instantiate is not a valid solution for my problem since everything is already in the scene, plus instantiating prefabs at runtime creates a lot of undesired lag.

I hope I exposed the problem as clearly as possible and any help will be greatly appreciated :)

Paul

Comment
Add comment · Show 1
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 PixelFireXY · Dec 14, 2012 at 10:44 AM 0
Share

Hi, i have your same problem, have you solved this error? I dont understand how to fix that, can you answer me plz? =) Thanks in advance

4 Replies

· Add your reply
  • Sort: 
avatar image
2

Answer by Bunny83 · Feb 22, 2011 at 02:14 PM

To ignore errors is never a good solution. Try to avoid it. You can use SetScope on the NetworkView on the server to enable/disable updates for a specific user.

You may also have a look at Network.isMessageQueueRunning and Network.SetReceivingEnabled or Network.SetSendingEnabled

There is a level-loading-example that explains how you can use isMessageQueueRunning.

With groups you can group up specific things and disable the group if it should not be updated.

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
0

Answer by benni05 · Sep 26, 2012 at 02:13 PM

In my case the error was caused by a network instantiated game object whose NetworkView instance stemmed from a previous connection to a server. I got rid of it by destroying the game object and setting any references to null on the client.

 Destroy(netSync.gameObject);
 netSync = null;

(with netSync being the network instantiated game object)

Only then does another connection to a server not lead to this error message. This is because the NetworkView id that is complained about results from a previous connection.

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
0

Answer by CollosalChris · Jul 21, 2014 at 08:10 PM

Saw this issue by deleting a gameobject whose prefab had a networkView on it that was not really neaded, I had turned Network.Destroy into just Destroy but had forgotten to remove the networkView from the prefab! Ha ha, stupid me!

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
0

Answer by kimsjar · Dec 03, 2016 at 09:35 AM

if GameObject have NetworkView component, you must Network.Destroy.

Network.Instantiate, Network.Destroy is pair.

so you want only see yourself, then you don't need NetworkView Component.

but you want see all clients, then you need NetworkView and Network.Instantiate, Network.Destroy.

if you want Network.Destroy, then carefully consideration to networkview.isMine.

for example :

if(_networkview.isMine) Network.Destroy(gameObject);

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

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Give a NetworkView a predetermined ID 0 Answers

Sending info to/from different networkViews 1 Answer

MultiPlayer - NetworkPlayer Event 2 Answers

Assigning the owner of networkviews manually 1 Answer

Network Instantiate with wrong owner. 2 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