private void Awake() { if (!Instance) { Instance = this; DontDestroyOnLoad(this.gameObject); } else { Destroy(this.gameObject); } }
public OperationWrapper(ThisAddIn addIn) { _addIn = addIn; _statePreserver = addIn.Application.StatePreserver().FreezeScreenUpdating(); _undoer = new UndoerRedoer(addIn.ActiveDocument).TrackChanges(); }