Point light moves to origin

My code adds several point lights as follows:

GameObject lightObject = new GameObject(("Light_"+obj["Name"].str));
lightObject.AddComponent<Light>();
lightObject.GetComponent<Light>().type = LightType.Point;
lightObject.GetComponent<Light>().color = Color.white;
lightObject.GetComponent<Light>().intensity = 0.15f;
lightObject.GetComponent<Light>().range =15.0f;
lightObject.GetComponent<Light>().renderMode = LightRenderMode.ForcePixel;
lightObject.transform.position = new Vector3(xpos, zpos, ypos);

This runs on start(), and it works fine in unity 4, the lights are getting in their position as planned.

When I migrate the code to Unity 5 all my lights are in the origin, instead their assigned position by code.

Am I missing something for Unity 5?

Hi I haven’t compiled your code yet or read it in deapth but I would create a varable for your vector 3 positions and instead use them. Hope this helps I will get back to you after I’ve fully tested the script