Search Issue Tracker

Fixed in future release

Votes

36

Found in

5.6.3p3

Issue ID

953068

Regression

Yes

Game object transform.position is incorrect after Object.Instantiate after Awake() function call

Asset and Scene Management

-

-

Priority: 2Necessary for shipping a final release

-

Severity: 3Workaround is possible

How to reproduce:
1. Download attached project files and open "test" Scene
2. Enter Play mode. Notice now the world-space location in Awake is printing the prefab location as opposed to the location passed to instantiate:
Parent(Clone): World-space location: (-10.0, 20.0, 0.0)
Child: World-space location: (-10.0, 20.0, 0.0)

Not reproduced:
1. Open project with Unity 5.6.3p2 and hit "play". Notice that "World-space location" printed in SpawnLog.Awake now outputs location as expected according to SpawnPrefab-script:
Parent(Clone): World-space location: (50.0, 100.0, 0.0)
Child: World-space location: (50.0, 100.0, 0.0)

Actual result: Instantiate(Prefab, new Vector3(50, 100, 0), Quaternion.identity) applies world position incorect in Debug.Log(transform.postion) after Awake() function call

Reproduced with: 5.6.3p4, 2017.1.1p3, 2017.2.0f1, 2017.3.0b2
Not reproduced with: 5.6.3p2, 2017.1f1, 2017.2.0b8, 2017.3.0a5
Regression since: 5.6.3p3

Response avatar

karl_jones

Oct 19, 2017

The fix for this will be available in the following patches:
2017.1.2p3
2017.2.0p1

Comments (7)

  1. F74a5d0646a3fe1aebde2c436e7a3c9c?d=mm

    TheJimz

    Oct 16, 2017 21:35

    This is not fixed in 5.6.4f1.

  2. 0927b87e0d6cf58e6a225245a3d45bcc?d=mm

    Jodwig

    Oct 13, 2017 17:05

    It happened in 2017.1.p1 and in future patches too, while it was totally fine still in 2017.1.f1.

  3. F7dd45640ced2bc8b5c72357650d18fd?d=mm

    dvoidis

    Oct 13, 2017 12:17

    Still same problem i 2017.2.0f3 . Can somebody please look into this?
    Why is this bug set to FIXED when its clearly not.

  4. 584d5bd0fc4b47548ca13a1e5594ec1b?d=mm

    nas4eva

    Sep 26, 2017 02:16

    This issue produce critical bug. Our company's project were stuck.

  5. A921920aa16bcd27426578708d5384f5?d=mm

    adex0909

    Sep 25, 2017 10:33

    I am having the same problem.

    Character character = Instantiate(loadedObject, position, rotation) .GetComponent<Character>();

    // class Implementation
    class Character : MonoBehavior
    {
    void Awake()
    {
    // "forward" value is not applying rotation (working in 5.6.3p2)
    myForward = transform.forward;
    }

    void Start()
    {
    // "forward" value is applying rotation
    myForward = transform.forward;
    }
    }

  6. 999bd6bc8597052c3d827bb649a1b3a5?d=mm

    jannis99

    Sep 23, 2017 16:31

    This may be connected to this fix in 5.6.3p3: (none) - Graphics : Fixed TrailRenderer not recording the first position when instantiated using a position and rotation value.

  7. F7dd45640ced2bc8b5c72357650d18fd?d=mm

    dvoidis

    Sep 23, 2017 12:51

    having this issue since 2017.2.b11 . object position is the prefab position in Awake and OnEnable instead of the one supplied to Instatiate. it totally ruins my project :(.
    same issue with 2017.2.0f1

    problem does not occur in 2017.2.0xb6

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.