private void OnEnable()
        {
            this.minSize = new Vector2(600.0f, 300.0f);

            this.previewPanelScrollPosition = Vector2.zero;

            this.bulkRenamer             = new BulkRenamer();
            this.renameOperationsToApply = new List <BaseRenameOperation>();
            this.renameOperationsToApply.Add(new ReplaceStringOperation());

            // Cache all valid Rename Operations
            this.renameOperationsFactory = new List <BaseRenameOperation>();
            var assembly        = Assembly.Load(new AssemblyName("Assembly-CSharp-Editor"));
            var typesInAssembly = assembly.GetTypes();

            foreach (var type in typesInAssembly)
            {
                if (type.IsSubclassOf(typeof(BaseRenameOperation)))
                {
                    var renameOp = (BaseRenameOperation)System.Activator.CreateInstance(type);
                    this.renameOperationsFactory.Add(renameOp);
                }
            }

            this.renameOperationsFactory.Sort((x, y) =>
            {
                return(x.MenuOrder.CompareTo(y.MenuOrder));
            });

            Selection.selectionChanged += this.Repaint;
        }
        private void OnEnable()
        {
            this.minSize = new Vector2(600.0f, 300.0f);

            this.previewPanelScrollPosition = Vector2.zero;

            this.bulkRenamer             = new BulkRenamer();
            this.renameOperationsToApply = new List <BaseRenameOperation> ();
            this.renameOperationsToApply.Add(new ReplaceStringOperation());

            this.CacheRenameOperationsToClone();

            Selection.selectionChanged += this.Repaint;
        }