private void OnEnable()
        {
            simpleSideMenu = target as SimpleSideMenu;

            //Serialized Properties
            placement                = serializedObject.FindProperty("placement");
            defaultState             = serializedObject.FindProperty("defaultState");
            transitionSpeed          = serializedObject.FindProperty("transitionSpeed");
            thresholdDragSpeed       = serializedObject.FindProperty("thresholdDragSpeed");
            thresholdDraggedFraction = serializedObject.FindProperty("thresholdDraggedFraction");
            handle                     = serializedObject.FindProperty("handle");
            handleDraggable            = serializedObject.FindProperty("handleDraggable");
            handleToggleStateOnPressed = serializedObject.FindProperty("handleToggleStateOnPressed");
            menuDraggable              = serializedObject.FindProperty("menuDraggable");
            useOverlay                 = serializedObject.FindProperty("useOverlay");
            overlayColour              = serializedObject.FindProperty("overlayColour");
            useBlur                    = serializedObject.FindProperty("useBlur");
            blurMaterial               = serializedObject.FindProperty("blurMaterial");
            blurRadius                 = serializedObject.FindProperty("blurRadius");
            overlayRetractOnPressed    = serializedObject.FindProperty("overlayCloseOnPressed");
            onStateSelected            = serializedObject.FindProperty("onStateSelected");
            onStateSelecting           = serializedObject.FindProperty("onStateSelecting");
            onStateChanging            = serializedObject.FindProperty("onStateChanging");
            onStateChanged             = serializedObject.FindProperty("onStateChanged");
        }
        private static void CreateBottomSideMenu()
        {
            // Canvas
            Canvas canvas = FindObjectOfType <Canvas>();

            if (canvas == null)
            {
                GameObject canvasObject = new GameObject("Canvas");
                canvas            = canvasObject.AddComponent <Canvas>();
                canvas.renderMode = RenderMode.ScreenSpaceOverlay;
                canvas.gameObject.AddComponent <GraphicRaycaster>();
                Undo.RegisterCreatedObjectUndo(canvasObject, "Create " + canvasObject.name);
            }

            // Side-Menu
            GameObject    sideMenu = new GameObject("Bottom Side-Menu");
            RectTransform sideMenuRectTransform = sideMenu.AddComponent <RectTransform>();

            sideMenuRectTransform.anchorMin = new Vector2(0, 0);
            sideMenuRectTransform.anchorMax = new Vector2(1, 0);
            sideMenuRectTransform.pivot     = new Vector2(0.5f, 1);
            sideMenuRectTransform.sizeDelta = new Vector2(0, 500);
            sideMenu.AddComponent <Image>();
            SimpleSideMenu sideMenuSimpleSideMenu = sideMenu.AddComponent <SimpleSideMenu>();

            sideMenuSimpleSideMenu.placement = SimpleSideMenu.Placement.Bottom;
            GameObjectUtility.SetParentAndAlign(sideMenu, canvas.gameObject);

            // Side-Menu Handle
            GameObject    sideMenuHandle = new GameObject("Handle");
            RectTransform sideMenuHandleRectTransform = sideMenuHandle.AddComponent <RectTransform>();

            sideMenuHandleRectTransform.anchorMin        = new Vector2(0.5f, 1);
            sideMenuHandleRectTransform.anchorMax        = new Vector2(0.5f, 1);
            sideMenuHandleRectTransform.pivot            = new Vector2(0.5f, 0);
            sideMenuHandleRectTransform.offsetMin        = Vector2.zero;
            sideMenuHandleRectTransform.offsetMax        = Vector2.zero;
            sideMenuHandleRectTransform.anchoredPosition = Vector2.zero;
            sideMenuHandleRectTransform.sizeDelta        = new Vector2(200, 75);
            sideMenuHandle.AddComponent <Image>();
            sideMenuHandle.AddComponent <Button>();
            sideMenuSimpleSideMenu.handle = sideMenuHandle;
            GameObjectUtility.SetParentAndAlign(sideMenuHandle, sideMenu);

            // Event System
            if (!FindObjectOfType <EventSystem>())
            {
                GameObject eventObject = new GameObject("EventSystem", typeof(EventSystem));
                eventObject.AddComponent <StandaloneInputModule>();
                Undo.RegisterCreatedObjectUndo(eventObject, "Create " + eventObject.name);
            }

            // Editor
            Selection.activeGameObject = sideMenu;
            Undo.RegisterCreatedObjectUndo(sideMenu, "Create " + sideMenu.name);
        }