I’ve run into a bug where if I instantiate a new game object I cant instantiate another game object as a child. For some reason I cant reproduce this in an empty project but I come across it all the time. A possible example:
GameObject object = new GameObject();
GameObject childObject = new GameObject();
childObject.transform.SetParent(object.transform);
I did manage to find a half solution which is to use a coroutine to wait a millisecond and then create the other object. The problem with this is it causes noticeable flashes.