Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 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 skinstle · Mar 24 at 07:37 PM · spawn

Why do I get "Spawned object not found" when a player disconnects and remaining players try to communicate?

Simple 2D game - nothing is spawned except players when host or clients started. In this example, I had 3 players connected. I closed window to test disconnecting. OnServerDisconnect was invoked on host, which set that player's state to disconnected. No problem so far. In Unity window, I see disconnected player disappear; host and other player still there.

When remaining player tries to commuicate with host, I get Spawned object not found for any subsequent communication attempts (via Cmd or TargetRPC calls which normally work). In this test case, remaining player attempted to command the host to provide tourney info:

 public void GetTourneyInfo(string pName)                        // Player requests...
 {
     Debug.Log("Calling CmdGetTourneyInfo");
     CmdGetTourneyInfo(pName);  // MyPlayer.cs:377
 }
 [Command(requiresAuthority = false)]
 public void CmdGetTourneyInfo(string name)
 {
     Debug.Log("CmdGetTourneyInfo - calling RequestTourneyInfo(name) " + name);
     Dodeo.instance.RequestTourneyInfo(name);
 }
 [TargetRpc]
 public void TargetRpcTourneyInfo(NetworkConnection pConn, string tInfo)
 {
     tInfo += " ";   // Ensure string is not null
     Dodeo.instance.DisplayHelp(tInfo, false);
 }

Error details: Spawned object not found when handling Command message [netId=4] UnityEngine.Debug:LogWarning (object) Mirror.NetworkServer:OnCommandMessage (Mirror.NetworkConnectionToClient,Mirror.CommandMessage,int) (at Assets/Mirror/Runtime/NetworkServer.cs:943) Mirror.MessagePacking/<>c_DisplayClass6_0`2:b_0 (Mirror.NetworkConnection,Mirror.NetworkReader,int) (at Assets/Mirror/Runtime/MessagePacking.cs:126) Mirror.NetworkServer:UnpackAndInvoke (Mirror.NetworkConnectionToClient,Mirror.NetworkReader,int) (at Assets/Mirror/Runtime/NetworkServer.cs:455) Mirror.NetworkServer:OnTransportData (int,System.ArraySegment`1,int) (at Assets/Mirror/Runtime/NetworkServer.cs:518) Mirror.LocalConnectionToServer:Send (System.ArraySegment`1,int) (at Assets/Mirror/Runtime/LocalConnectionToServer.cs:45) Mirror.NetworkConnection:Send (Mirror.CommandMessage,int) (at Assets/Mirror/Runtime/NetworkConnection.cs:137) Mirror.NetworkBehaviour:SendCommandInternal (string,Mirror.NetworkWriter,int,bool) (at Assets/Mirror/Runtime/NetworkBehaviour.cs:249) MyPlayer:CmdGetTourneyInfo (string) MyPlayer:GetTourneyInfo (string) (at Assets/Scripts/MyPlayer.cs:377) Dodeo:ClickRightButton () (at Assets/Scripts/Dodeo.cs:1595) UnityEngine.EventSystems.EventSystem:Update () (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/EventSystem.cs:501)

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.

Follow this Question

Answers Answers and Comments

136 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 avatar image avatar image avatar image

Related Questions

Character Loading Location 2 Answers

Mouse Click and Spawn object 4 Answers

Spawn something 1 Answer

Character Born Position 2 Answers

Instantiating prefab at child (spawnlocations are arrays) 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