Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class testMovement : MonoBehaviour
- {
- public GridManager GridMan;
- //List<GridTile> MovementPath = new List<GridTile>();
- void Start ()
- {
- List<GridTile> MovementPath = Astar.Pathfinding(GridMan.Grid[1][1], GridMan.Grid[3][2], GridMan); //NullRef on this line
- Debug.Log(MovementPath.Count);
- for (int i = 0; i < MovementPath.Count; i++)
- {
- Debug.Log(MovementPath[i].GetIndex().x + " " + MovementPath[i].GetIndex().y);
- }
- }
- }
- NullReferenceException: Object reference not set to an instance of an object
- testMovement.Start () (at Assets/Scripts/testMovement.cs:12)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement