Exemplo n.º 1
0
    void Update()
    {
        if (lastTimeSelection != LastSelection())
        {
            lastTimeSelection = LastSelection();
            BundleEditorDrawer.ShowBundle(BundleManager.GetBundleData(lastTimeSelection));
        }

        if (m_EditWaitBundle != "" && m_EditWaitStartTime > 0)
        {
            // See if we can start edit
            if (EditorApplication.timeSinceStartup - m_EditWaitStartTime > 0.6)
            {
                StartEditBundleName(m_EditWaitBundle);
            }
        }

        if (BMDataAccessor.ShouldSaveBundleData)
        {
            BMDataAccessor.ShouldSaveBundleData = false;
            BMDataAccessor.SaveBundleData();
        }
        if (BMDataAccessor.ShouldSaveBundleStates)
        {
            BMDataAccessor.ShouldSaveBundleStates = false;
            BMDataAccessor.SaveBundleBuildeStates();
        }
    }
Exemplo n.º 2
0
    void Update()
    {
        if (lastTimeSelection != LastSelection())
        {
            lastTimeSelection = LastSelection();
            BundleEditorDrawer.ShowBundle(BundleManager.GetBundleData(lastTimeSelection));
        }

        if (m_EditWaitBundle != "" && m_EditWaitStartTime > 0)
        {
            // See if we can start edit
            if (EditorApplication.timeSinceStartup - m_EditWaitStartTime > 0.6)
            {
                StartEditBundleName(m_EditWaitBundle);
            }
        }
    }
Exemplo n.º 3
0
    bool DragProcess(Rect itemRect, string bundleName)
    {
        if (Event.current.type == EventType.Repaint || itemRect.height <= 0)
        {
            return(false);
        }

        if (!IsMouseOn(itemRect))
        {
            if (m_CurrentRecieving != "" && m_CurrentRecieving == bundleName)
            {
                m_CurrentRecieving = "";
                Repaint();
            }

            return(false);
        }

        m_DragHandler.detectRect = itemRect;
        m_DragHandler.dragData.customDragData = (object)bundleName;
        m_DragHandler.dragAble = bundleName != "";

        var dragState = m_DragHandler.GUIDragUpdate();

        if (dragState == GUIDragHandler.DragState.Receiving)
        {
            m_CurrentRecieving = bundleName;
            Repaint();
        }
        else if (dragState == GUIDragHandler.DragState.Received)
        {
            BundleEditorDrawer.Refresh();
            m_CurrentRecieving = "";
        }
        else if (m_CurrentRecieving == bundleName)
        {
            // Drag cursor leaved
            m_CurrentRecieving = "";
            Repaint();
        }

        return(dragState == GUIDragHandler.DragState.Received);
    }
Exemplo n.º 4
0
 public override void OnInspectorGUI()
 {
     BundleEditorDrawer.DrawInspector();
 }