I updated to 2017.1.1p2 yesterday and I’m seeing some weird behaviour with Instantiate. If I instantiate a prefab at a set location, when I check the location in Awake on a script attached to the prefab I get the wrong value. So:
GameObject.Instantiate(m_Prefab, new Vector3(123, 456, 789), Quaternion.identity);
I get this:
Awake: (0.0, 0.0, 0.0)
Start: (123.0, 456.0, 789.0)
I have tried this in a fresh new project and it always happens. I came from 5.6.2p2 and I’ve checked 2017.1.0p5 and this works fine (same test project). Anyone else seeing this?
Just checked it with 2017.1.2f1, still happens. Any idea on when a fix will be in? We spawn objects in Awake calls using position, so this is basically a show stopper for us.
It seems this is still the issue even in 2017.2, even though the previously linked bugreport is marked as resolved?
I encountered it today after upgrading from 5.6 to 2017.2… In the place I am dealing with it it is sort of solvable by delaying the functionality to the Start method, but I must say it is not elegant/does feel very wrong, and I’m not sure what other scripts might suffer from it that are used somewhere further in the game where I did not yet test.