Timeline for How to correctly instantiate prefab in Unity
Current License: CC BY-SA 4.0
6 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jan 4, 2021 at 4:06 | vote | accept | Dew | ||
| Jan 3, 2021 at 8:29 | answer | added | Philipp | timeline score: 1 | |
| Jan 3, 2021 at 7:30 | comment | added | D.Kallan | Is is possible that the issues are caused by trying to make a MonoBehaviour (GameGrid) as if it is a regular class with a constructor? GameGrid grid = new GameGrid(20, 10, 1); as far as I remember you shouldn't make objects like that, rather have it be a new GameObject and do gameObject.AddComponent(GameGrid) or something like that. Instead of your constructor you'd put the code in Awake() or Start(). (correct me if I'm wrong please.) | |
| Jan 3, 2021 at 7:19 | history | edited | Dew | CC BY-SA 4.0 | added 1728 characters in body |
| Jan 3, 2021 at 3:59 | history | edited | Dew | CC BY-SA 4.0 | added 4 characters in body |
| Jan 3, 2021 at 3:53 | history | asked | Dew | CC BY-SA 4.0 |