U
U
Uncle Bogdan2021-08-20 20:51:01
Unity
Uncle Bogdan, 2021-08-20 20:51:01

How to make the sheet not cleared at startup?

Like there is a sheet:

[System.Serializable]
public static class GridActions
{
    [SerializeField] public static List<Cell> AllCell = new List<Cell>();
}


It is filled like this:

GridActions.AllCell.Add(cell);

After filling (through the code). I check the content without running.

[ContextMenu("Test")]
    public void Check()
    {
        GridActions.AllCell.ForEach(cell => print(cell.name));
    }


Everything is fine without starting. It's full.

Then I launch and the sheet is empty (nothing came up). I turn it off, I try to start it and it does not display anything. The sheet is cleared on startup. How to fix?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question