void OnPrefabSelect(EditorDisplayObject info)
    {
        selectedInfo    = info;
        currentRotation = Vector3.zero;

        //Debug.Log(info.pid);
        //Debug.Log(prefabManager.GetGameObject(info.pid));
    }
    // Update is called once per frame
    void Update()
    {
        BackButton();

        if (Input.GetButtonDown("Fire2"))
        {
            selectedInfo = null;
            Destroy(indicatorCube);
        }

        var isPointerOverGameObject = EventSystem.current.IsPointerOverGameObject();

        if (!isPointerOverGameObject)
        {
            HighlightSquare();

            if (Input.GetButtonDown("Fire1") || Input.GetButtonDown("Fire2"))
            {
                if (indicatorCube == null)
                {
                    EditorScriptActions();
                }
            }

            if (Input.GetButton("Fire1"))
            {
                if (clicked == false)
                {
                    clicked = true;
                    PlaceNewObject();
                }
            }
            else
            {
                clicked = false;
            }
        }
        else
        {
            if (indicatorCube != null)
            {
                Destroy(indicatorCube);
            }
        }
    }
    public void EditorScriptActions()
    {
        Ray        ray = Camera.main.ScreenPointToRay(Input.mousePosition);
        RaycastHit hit;

        if (Physics.Raycast(ray, out hit, 100, editorObjectMask))
        {
            var editorScript = hit.transform.gameObject.GetComponent <EditorDisplayObject>();

            if (editorScript != null)
            {
                stageSelectedScript = editorScript;
                //EraseButton.SetActive(true);

                if (Input.GetButtonDown("Fire2"))
                {
                    RemoveObject();
                }
            }
        }
    }