Hi, I’m using unity 4.3 and A* 3.3.10. I have a recast graph on some procedural terrain which is started via script by AstarPath.active.Awake();. This works fine and my seeker moves around. However, if I modify the terrain dynamically and try to update it for A* by using:
Bounds currentBounds = new Bounds (transform.position, new Vector3 (4, 4, 4));
AstarPath.active.UpdateGraphs(currentBounds, 1);
I get two errors:
CompareBaseObjectsInternal can only be called from the main thread.
Constructors and field initializers will be executed from the loading thread when loading a scene.
Don’t use this function in the constructor or field initializers, instead move initialization code to the Awake or Start function.
Exception while updating graphs:
System.ArgumentException: CompareBaseObjectsInternal can only be called from the main thread.
Constructors and field initializers will be executed from the loading thread when loading a scene.
Don’t use this function in the constructor or field initializers, instead move initialization code to the Awake or Start function.
at (wrapper managed-to-native) UnityEngine.Object:CompareBaseObjectsInternal (UnityEngine.Object,UnityEngine.Object)
at UnityEngine.Object.CompareBaseObjects (UnityEngine.Object lhs, UnityEngine.Object rhs)
I’ve tried turning off multithreading and pretty much all the other optimizations that look relevant. Any idea?