Advertisement
Vercon

Untitled

Nov 23rd, 2014
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. public class testMovement : MonoBehaviour
  2. {
  3. public GridManager GridMan;
  4. //List<GridTile> MovementPath = new List<GridTile>();
  5.  
  6. void Start ()
  7. {
  8. List<GridTile> MovementPath = Astar.Pathfinding(GridMan.Grid[1][1], GridMan.Grid[3][2], GridMan); //NullRef on this line
  9.  
  10. Debug.Log(MovementPath.Count);
  11.  
  12. for (int i = 0; i < MovementPath.Count; i++)
  13. {
  14. Debug.Log(MovementPath[i].GetIndex().x + " " + MovementPath[i].GetIndex().y);
  15. }
  16.  
  17.  
  18. }
  19. }
  20.  
  21.  
  22. NullReferenceException: Object reference not set to an instance of an object
  23. testMovement.Start () (at Assets/Scripts/testMovement.cs:12)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement