Instantiate ignores position

This was working until I updated unity to 2017.3.0f3 now Instantiate just ignores whatever position I enter and only instantiates at the prefabs location. I can put any trivial vector value in the position property and it simply does not change the objects position. If I add the line:

knife.transform.position = firePosition

It puts the object in the correct place. Is this a known issue or did something change in the Instantiate function?

Example code is below

 void ThrowKnife(float stickAngle, Vector2 forceVector)
    {
        Bounds bounds = GetComponent<Collider2D>().bounds;
        Vector2 firePosition;
        float yPos = bounds.center.y;
        if (FacingRight)
        {
            Debug.Log("Facing Right");
            firePosition = new Vector2(bounds.max.x + .1f, yPos);
        }
        else
        {
            firePosition = new Vector2(bounds.min.x + .1f, yPos);
        }
        GameObject knife = Instantiate(Knife, firePosition, new Quaternion(), transform.parent);
        knife.transform.eulerAngles = new Vector3(0, 0, stickAngle);
        knife.GetComponent<Knife>().ForceAngle = forceVector * ThrowSpeed;
    }

I haven’t used this overload of Instantiate(), but I’m guessing that specifying the parent will modify the position and rotation. As you are also assigning a specific angle after, why don’t you do it like this?

GameObject knife = Instantiate(Knife);
knife.transform.SetParent(transform.parent);
knife.transform.position = firePosition;
knife.transform.eulerAngles = new Vector3(0, 0, stickAngle);

Another option is:

GameObject knife = Instantiate(Knife, firePosition, Quaternion.Euler(0, 0, stickAngle));
knife.transform.SetParent(transform.parent, true);

Hello, I am having the same problem after updating to the same version. I was using the 2017.0 and upgraded to 2017.3.

All my instantiated objects used the position set in the pre-fab instead of the position I requested in the function.

I found that in 2017.3 you can no longer set the position at the same time that you instantiate. You must set the position AFTER. So just add this line to your code right after instantiating, it does not appear to cause any screen flickers but it would be good to know why this was changed.

knife.transform.position = firePosition;