I don't see the grid

I hope I did everything right, but the grid doesn’t appear and this message pops up:


using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Testing : MonoBehaviour
{

    [SerializeField] private Transform gridDebugObjectPrefab;


    private GridSystem gridSystem;


    private void Start()
    {
        gridSystem = new GridSystem(10, 10, 2f);
        gridSystem.CreateDebugObjects(gridDebugObjectPrefab);

        Debug.Log(new GridPosition(5, 7));
    }
}

The error appears in GridSystem.cs on line 52. Check that and see what is null at that point

There is a fault in the code in GITLAB (it is different from what is written in the video) I have to choose one of the options that are written and even then I had to add an object in order for it to work (I am attaching what I did in order for it to work).

It does look like the repo commit for this lecture is actually at the end of the next lecture. Sometimes, when a concept like this is split over multiple videos, one commit will cover a couple of lectures. Usually this is because the decision was made to split a video into two sections to keep any one video from being too long. Sorry about any confusion this may have caused. By the end of the next lecture, the GridDebugObjects will be implemented and the repo will make more sense.

Privacy & Terms