Ejemplo n.º 1
0
        private static void OnProjectItemGUI(string guid, Rect selectionRect)
        {
            if (SettingsUpdater.ShowIcon == false)
            {
                return;
            }

            string assetPath = AssetDatabase.GUIDToAssetPath(guid);

            if (string.IsNullOrEmpty(assetPath))
            {
                return;
            }

            AssetStatus type = SVNFileStatusCache.GetStatus(assetPath);

            Texture icon = null;

            switch (type)
            {
            case AssetStatus.None:
                icon = committedTexture;
                break;

            case AssetStatus.Added:
                icon = addedTexture;
                break;

            case AssetStatus.Modify:
                icon = modifiedTexture;
                break;

            case AssetStatus.Delete:
                break;

            case AssetStatus.New:
                icon = newTexture;
                break;

            case AssetStatus.Conflict:
                icon = conflictedTexture;
                break;

            case AssetStatus.External:
                icon = externalTexture;
                break;
            }

            if (icon == null)
            {
                return;
            }

            GUI.DrawTexture(new Rect(selectionRect.xMin - 8, selectionRect.yMin - 2, 16, 16), icon);
        }
 private static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAssets, string[] movedAssets, string[] movedFromPath)
 {
     SVNFileStatusCache.Refresh(EditorApplication.RepaintProjectWindow);
 }
 private static void OnRefreshFileStatus()
 {
     SVNFileStatusCache.Refresh(EditorApplication.RepaintProjectWindow);
 }