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(); } }
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); } } }
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); }
public override void OnInspectorGUI() { BundleEditorDrawer.DrawInspector(); }