Hello all!
I’m creating a 2d game, using NGUI and A* pathfinding algorithm. Everything was fine, until one day, I started my game on phone and AI objects didn’t run. After some researches, I found out that it’s a problem with A* function “OnPathComplete”. It just doesn’t call when we get path back.
Everything works fine on PC, but with this problem on devices (Samsung Galaxy mini 2; Samsung Galaxy Tab 2). I had tried to reload A* package to recover all scripts but it didn’t help.
Who knows why this problem appears - help me, please ![]()
1 Answer
1First A* is just an algorithm and there are tons of implementations of it. You probably talk about one implementation of arongranberg.
I can tell you for sure that it works on Android
In my last company we used it and ir worked as it should on Android (different models) and iPad.
You probably doing something wrong. Well now i can stop here since we don’t know what your code looks like or where it goes wrong.
Some additional points:
- Do you have any platform dependend compilation? (
#if UNITY_ANDROID…)? - Do you have checked your logcat for any errors?
Thanks for reply :) Yes, you're right, I'm using arongranberg's implementation. I know that it works for Android, it worked on my devices too, but something happened and it stopped working :( Do you have any platform dependend compilation? (#if UNITY_ANDROID ...)? - Yes, some string in NGUI scripts, but it worked before, and I didn't add anything like this Do you have checked your logcat for any errors? - For debug, I just showed strings on the screen like Debug.Log, and the string from OnPathComplete didn't showed up.
– Evgenius