Author Topic: TNManager.Create() is giving error  (Read 2168 times)

Doomlazy

  • Newbie
  • *
  • Thank You
  • -Given: 5
  • -Receive: 1
  • Posts: 28
    • View Profile
TNManager.Create() is giving error
« on: October 20, 2015, 11:56:43 AM »
When I use TNManager.Create() I get this error:

[TNet] Failed to call RCC #1.
Did you forget to register it in Awake() via TNManager.AddRCCs?
UnityEngine.Debug:LogError(Object)
TNManager:CreateGameObject(GameObject, BinaryReader) (at Assets/TNet/Client/TNManager.cs:1357)
TNManager:OnCreateObject(Int32, Int32, UInt32, BinaryReader) (at Assets/TNet/Client/TNManager.cs:1312)
TNet.GameClient:ProcessPacket(Buffer, IPEndPoint) (at Assets/TNet/Client/TNGameClient.cs:1117)
TNet.GameClient:ProcessPackets() (at Assets/TNet/Client/TNGameClient.cs:879)
TNManager:Update() (at Assets/TNet/Client/TNManager.cs:1426)


I have no idea what to do about this error  ???
Please help :)

devomage

  • Sr. Member
  • ****
  • Thank You
  • -Given: 7
  • -Receive: 67
  • Posts: 250
    • View Profile
Re: TNManager.Create() is giving error
« Reply #1 on: October 20, 2015, 04:19:14 PM »
ensure you have added the prefab(s) that you are trying to instantiate to the TNManager Objects array.

and like the error implies, be sure to add the method call to Awake()...

  1. void Awake()
  2. {
  3.         TNManager.AddRCCs<myscript>();
  4. }
  5.  
  6.  

Doomlazy

  • Newbie
  • *
  • Thank You
  • -Given: 5
  • -Receive: 1
  • Posts: 28
    • View Profile
Re: TNManager.Create() is giving error
« Reply #2 on: October 21, 2015, 12:31:34 PM »
Problem solved.