I made a prefab and drag drop it to the Tile Prefab slot as shown in the picture
In my code
1.It throw out error, ArgumentException: The Object you want to instantiate is null, it is very strange because I have the Prefab assigned in the inspector, what could ran wrong, and it is strange that the console did not tell me which line is wrong.
2.Another error is “You are trying to create a MonoBehaviour using the ‘new’ keyword. This is not allowed”, it confused me because I did not new anything.
3.This line of code “tile.transform.SetParent(transform, false);” I copied from other resource which I do not fully understand, I looked to the Unity menu still did not get any idea of what it does, it setParent but what parent property this function tries to setup, is it trying to set its parent’s transform or what?
Thanks very much I’m still new to Unity.