Lock Object Position In Editor

This might be a stupid question, but is there any way to lock an objects postiion so it can't be move in the editor?

You could create a simple editor script like so,

public class LockPosEditor : Editor {
 LockPos obj;
 void Awake()
   	 obj = target as LockPos;
 void OnSceneGUI () {
   	 obj.transform.position = new Vector3(0,0,0);


That would lock the GameObject that has LockPos Attached. You could then modify it more to have a toggle or lock it’s current position.