I’ve made a game where you build a space station one floor tile at a time, each floor tile has a GraphUpdateScene script to define its area and adjust its tag to define who can walk on it. It was working fine until I just downloaded the latest version of A* and now GraphUpdateScene is no longer a MonoBehavior and I can’t access it to change the settings. Am I missing something? Is there a way I can access its attributes through a script?
Hi
GraphUpdateScene should still be a monobehaviour.
Hm, maybe it is unity being annoying again and not allowing monobehaviours inside namespaces for unclear reasons…
Maybe I’ve got it wrong, i’m only assuming it used to start
public class GraphUpdateScene : MonoBehavior {
because before because it was accessible and you could select the script at the top of the editor readout.
It is now
public class GraphUpdateScene : GraphModifier {
Is there a way to reference it I’m not thinking of?
Oh btw A* has served me freaking well so far and helped me to make Space Station Alpha which is currently doing quite well as an Early Access release.
Ah, fixed it! I just had to change my code from
worker.GetComponent<GraphUpdateScene>()
to
worker.GetComponent<Pathfinding.GraphUpdateScene>()
silly me
Cool!
Yeah, the GraphUpdateScene class inherits from the GraphModifier class which inherits from MonoBehaviour.