public void Lock() { if (ApplicationModel.HasBeenUnlocked(path)) { return; // File was unlocked previously } locked = true; lockIcon.SetActive(true); }