Tasharen Entertainment Forum

Support => TNet 3 Support => Topic started by: thelebaron on June 17, 2014, 02:18:41 AM

Title: stackoverflowexception tnet & astar pathfinding
Post by: thelebaron on June 17, 2014, 02:18:41 AM
I'm trying to couple the Astar pathfinding project with tnet, and sending the path over via rfc seems to cause a stackoverflowexception, maybe the path is too much data? Besides performance issues of sending alot of data, is there a limit of what can be sent(I believe what is being sent is a list of vector3's, how much exactly Im not sure). I was wondering if you knew of any multiplayer enabled pathfinding solutions, this seems to be something I havent had any success in finding for unity.
Title: Re: stackoverflowexception tnet & astar pathfinding
Post by: ArenMook on June 17, 2014, 02:25:03 PM
What are you sending exactly? What data type? Is it really a Vector3[] (array)?

Stack overflow generally would imply here that it interprets the incoming data as individual parameters rather than an array. Did you debug to see what type of data arrives and compared it to the type of data that was sent?
Title: Re: stackoverflowexception tnet & astar pathfinding
Post by: thelebaron on June 17, 2014, 07:00:34 PM
What Im trying to send is a System.Collections.Generic.List<Vector3>. How do I do a debug to verify the data?
Title: Re: stackoverflowexception tnet & astar pathfinding
Post by: ArenMook on June 17, 2014, 08:09:36 PM
TNManager.OnForwardPacket function, line 1041 and 1045 call ReadArray(), which in turn reads each parameter one at a time. Debug that function, see what you're getting, then add more debug code into the ReadObject() function. Make note of what types you're getting by printing the 'prefix'.