Place prefab at certain position with editor script

Hello,

I’m trying to get familiar with the unity editor extrension. I’m trying to write a script which allows me to place prefabs at specific positions. I can add the prefab with PrefabUtility.InstantiatePrefab so far. But the Object always appears at position 0,0,0 … I tried to manipulate the transform of the created object inside my editor script, but this seams to do nothing.

Hopefully some has a usefull hint for me :slight_smile:

Ok I fixed it myself. I accidentally commented out the section where I’m setting the x and z value for the position. It works now.

just make sure later on you be careful when editing the localPostition vs position.