• 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 Stand Alone OS · Jan 05, 2015 at 02:20 AM · networkingnetworkrpc

View ID AllocatedID: 50 not found during lookup.

When I have sever running and a player is connected and another connects I get these 2 errors:

 Could't invoke RPC function 'UpdateMovement' because the networkView 'AllocatedID: 50' doesn't exist
 
 View ID AllocatedID: 50 not found during lookup. Strange behaviour may occur


Im new to this so could anyone give me a hand? Here is the Movement update scipt which calls the UpdateMovement function. Also this script is attacted to my player with a network view component with stat sync off and no observed component.

 using UnityEngine;
 using System.Collections;
 
 public class MovementUpdate : MonoBehaviour 
 {
     private Vector3 lastPosition;
     private Quaternion lastRotation;
     private Transform myTransform;


 void Awake () 
 {
     if(networkView.isMine == true)
     {
         myTransform = transform;

         networkView.RPC("UpdateMovement", RPCMode.OthersBuffered, myTransform.position, myTransform.rotation);
     }else{enabled = false;}
 }

 void Update () 
 {
     if(Vector3.Distance(myTransform.position, lastPosition) >= 0.1)//If player moves
     {
         //Update position across the network
         lastPosition = myTransform.position;
         networkView.RPC("UpdateMovement", RPCMode.OthersBuffered, myTransform.position, myTransform.rotation);
     }

     if(Quaternion.Angle(myTransform.rotation, lastRotation) >= 1)//If player rotates
     {
         //Update rotation across the network
         lastPosition = myTransform.position;
         networkView.RPC("UpdateMovement", RPCMode.OthersBuffered, myTransform.position, myTransform.rotation);
     }
 }

 [RPC]
 void UpdateMovement(Vector3 newPosition, Quaternion newRotation)
 {
     transform.position = newPosition;
     transform.rotation = newRotation;
 }

}

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

0 Replies

· Add your reply
  • Sort: 

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.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

25 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

Related Questions

View ID AllocatedID: # not found during lookup. Strange behaviour may occur 1 Answer

How to use an RPC to send an animation over the network? 2 Answers

Multiplayer - Selected character to Network.guid? 0 Answers

How to use Unet to send network messages like RPC (Javascript) 0 Answers

RPCMode.AllBuffered Basic Question 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