Does the pathfinding package support nintendo switch? It seems not to work for our project, but it could be another factor as well - there appears to be a similar question from earlier. Is there a new version that would work better w/ the switch?
Update - disabled the RVO stuff and can confirm that it was preventing the game from working. We’re using an earlier beta that had 2D RVO functionality.
I can verify that it’s hanging on the Switch as well. I’m still trying to figure out how to debug on this hardware so I can’t share any more details yet. I had been running a pretty old version of a*, and just upgraded to the latest with the same issue.
Ok @Noogy.
I don’t have a switch myself so it is hard for me to debug it. Any details you can share will be helpful.
Try to disable multithreading. That is the most common thing that fails on new platforms.
Disable multithreading… as in under the Astar Path ‘Settings’ tab? I currently have the Thread Count set to ‘None’, “Using a single coroutine (no threads)”
So I don’t think that’s it. I’ll try to narrow it down, but it’s a bit tedious as I’m not receiving any debug feedback from the device. It literally just hangs somewhere, but everything else (such as audio) continues to run fine.
but everything else (such as audio) continues to run fine.
Audio in particular is usually run by another thread or possibly even another process, so it often continues to run even when the main application is completely frozen.
I’m using grid graphs exclusively. Tonight I’ll try to step through things and be more specific as to where it’s hanging. I know I’ve never had issues before on PC and iOS, so it’s definitely Switch specific.
I am actually already using Spheres for collision testing.
I wish I could step through the code but right now my best bet is just process of elimination.
I’m adding AstarPath and creating the graphs completely via script. I’ve found that it halts when i first add an AstarPath component. This is BEFORE I actually add, scan, or access any graphs.
gameObject.AddComponent<AstarPath>();
I suspect it must be somewhere in your Awake? I’ll try to work through it, it’s just slow since it takes several minutes to redeploy each time.
Everything up to the following works fine in the AstarPath.Awake(), at which point it’ll crash:
if (scanOnStartup && (!data.cacheStartup || data.file_cachedStartup == null)) {
Scan();
I’m currently commenting out the entire AstarPath.Update() method as that’s causing issues.
Edit: this is the only offending method in Update(), going to delve deeper:
pathReturnQueue.ReturnPaths(true);
Double Edit: crashing in the following method in ReturnPaths:
Path p = pathReturnStack.PopAll();
Ah, ok, got one step closer. At least it’s not crashing now… simply added ’ || UNITY_SWITCH’ in a few #if spots in the LockFreeStack.cs. New issues arose but I’m looking into it.
Update, so yeah I think all is solved. Some of the other issues were just me adding a ton of debug code trying to figure out the issue, which really was just as simple as adding the || UNITY_SWITCH in the right places. I wish I had saved quite a few hours checking the usings in the first place! Anyway, I can confirm your asset is running fine on Switch
I cannot say if RVO works on Nintendo Switch since I haven’t had the means to debug it. 2D RVO is included in that beta however. 2D RVO has been included in all releases since 4.0.
You can download the beta here: https://www.arongranberg.com/astar/download
I do unfortunately not have a Switch of my own to test it with, so it is very hard for me to say. I will try to fix any bugs that are reported but I cannot guarantee that it will work out of the box. I haven’t had any users report that something on the Switch is not working in a very long time though, so I think it should be fine.
Sorry, I should have jumped in earlier, but I just wanted to say that Switch functionality was solid. I shipped a game last year (Never Stop Sneakin’) on Switch which made heavy use of Aron’s excellent asset.