Browse Source

Updated git merge modification for selective application

Syed zainul abedin 1 month ago
parent
commit
e03822afb2

BIN
Assets/GitMerge/Editor/.DS_Store


+ 80 - 0
Assets/GitMerge/Editor/ConflictWatcher.cs

@@ -0,0 +1,80 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using UnityEditor;
+using UnityEngine;
+
+namespace GitMerge
+{
+    [InitializeOnLoad]
+    public class ConflictWatcher
+{
+    private static FileSystemWatcher watcher;
+    private static FileSystemEventArgs e;
+    
+    public ConflictWatcher()
+    {
+        string assetPath = Application.dataPath;
+        watcher = new FileSystemWatcher(assetPath);
+        watcher.IncludeSubdirectories = true;
+        watcher.NotifyFilter = NotifyFilters.LastWrite | NotifyFilters.FileName;
+        watcher.Changed += OnFileChanged;
+        watcher.EnableRaisingEvents = true;
+    }
+
+    public event Action<string> OnConflict;
+
+    private void OnFileChanged(object sender, FileSystemEventArgs _e)
+    {
+        e = _e;
+        EditorApplication.update += CheckWindow;
+    }
+
+    private void CheckWindow()
+    {
+        AssetDatabase.Refresh();
+        EditorApplication.update -= CheckWindow;
+        var path = e.FullPath;
+        var relativePath = "Assets" + path.Substring(Application.dataPath.Length);
+        
+        Debug.Log(relativePath);
+        if (!path.EndsWith(".unity") && !path.EndsWith(".prefab")) return;
+        // Found it
+        UnityEngine.Object asset;
+        try
+        {
+            asset = AssetDatabase.LoadAssetAtPath<UnityEngine.Object>(relativePath);
+        }
+        catch (Exception exception)
+        {
+            Debug.Log(exception);
+            throw;
+        }
+        Debug.Log("asset" + asset);
+        if (asset != null)
+        {
+            Debug.Log("Found asset" + asset.GetType());
+            bool isBroken = asset is BrokenPrefabAsset;
+                
+            // Open merge conflict window
+            if (isBroken)
+            {
+                OnConflict?.Invoke(relativePath);
+            }
+        }
+    }
+    
+    static bool IsOpenForEdit(string[] paths, List<string> outNotEditablePaths, StatusQueryOptions statusQueryOptions)
+    {
+        Debug.Log("IsOpenForEdit:");
+        // TODO: Do locking/unlocking here
+
+        foreach (var path in paths)
+        {
+            // Check for lock
+            Debug.Log(path);
+        }
+        return true;
+    }
+}    
+}

+ 3 - 0
Assets/GitMerge/Editor/ConflictWatcher.cs.meta

@@ -0,0 +1,3 @@
+fileFormatVersion: 2
+guid: 9ae091f04bc04a648d5ced34878e7781
+timeCreated: 1750140128

+ 52 - 8
Assets/GitMerge/Editor/GameObjectMergeActions.cs

@@ -1,10 +1,13 @@
 
+using System;
+
 namespace GitMerge
 {
     using UnityEngine;
     using UnityEditor;
     using System.Collections.Generic;
     using System.Text;
+    
 
     /// <summary>
     /// One instance of this class represents one GameObject with relevance to the merge process.
@@ -22,6 +25,7 @@ namespace GitMerge
         /// </summary>
         public GameObject theirs { private set; get; }
 
+        public bool applied { protected set; get; }
         public string name { private set; get; }
         public bool merged { private set; get; }
         public bool hasActions
@@ -255,36 +259,55 @@ namespace GitMerge
         {
             merged = actions.TrueForAll(action => action.merged);
         }
+        
+        private static void RefreshPrefabInstance()
+        {
+            if (MergeManagerBase.isMergingPrefab)
+            {
+                PrefabUtility.RevertObjectOverride(MergeManagerPrefab.ourPrefabInstance, InteractionMode.AutomatedAction);
+            }
+        }
 
         /// <summary>
         /// Use "our" version for all conflicts.
         /// This is used on all GameObjectMergeActions objects when the merge is aborted.
         /// </summary>
-        public void UseOurs()
+        public void UseOurs(bool forceApply = false)
         {
             foreach (var action in actions)
             {
                 action.UseOurs();
             }
             merged = true;
+            applied = forceApply;
         }
 
         /// <summary>
         /// Use "their" version for all conflicts.
         /// </summary>
-        public void UseTheirs()
+        public void UseTheirs(bool forceApply = false)
         {
             foreach (var action in actions)
             {
                 action.UseTheirs();
             }
             merged = true;
+            applied = forceApply;
         }
 
         //If the foldout is open
         private bool open;
         public void OnGUI()
         {
+            // Show only the selected ones
+            var selection = Selection.activeGameObject;
+            var objectToHighlight = MergeManagerBase.isMergingPrefab ? MergeManagerPrefab.ourPrefabInstance.GetChildWithEqualPath(ours) : ours;
+
+            if (applied || selection == null || selection.gameObject != objectToHighlight)
+            {
+                return;
+            }
+            
             if (open)
             {
                 GUI.backgroundColor = new Color(0, 0, 0, .8f);
@@ -299,15 +322,36 @@ namespace GitMerge
             GUILayout.BeginHorizontal();
             open = EditorGUILayout.Foldout(open, new GUIContent(name));
 
-            if (ours && GUILayout.Button("Focus", EditorStyles.miniButton, GUILayout.Width(100)))
+            // if (ours && GUILayout.Button("Focus", EditorStyles.miniButton, GUILayout.Width(100)))
+            // {
+            //     // Highlight the instance of the prefab, not the prefab itself.
+            //     // Otherwise, "ours".
+            //     objectToHighlight.Highlight();
+            // }
+            
+            // Only show when we resolve the conflict for all merge actions
+            bool resolved = true;
+            foreach (var action in actions)
             {
-                // Highlight the instance of the prefab, not the prefab itself.
-                // Otherwise, "ours".
-                var objectToHighlight = MergeManagerBase.isMergingPrefab ? MergeManagerPrefab.ourPrefabInstance.GetChildWithEqualPath(ours) : ours;
-                objectToHighlight.Highlight();
+                if (action.merged == false)
+                {
+                    resolved = false;
+                }
             }
-            GUILayout.EndHorizontal();
 
+            if (resolved)
+            {
+                if (ours && GUILayout.Button("Apply", EditorStyles.miniButton, GUILayout.Width(100)))
+                {
+                    foreach (var action in actions)
+                    {
+                        action.mergeAction?.Invoke();
+                    }
+                    applied = true;
+                    RefreshPrefabInstance();
+                }
+            }
+            GUILayout.EndHorizontal();
             if (open)
             {
                 // Display all merge actions.

+ 131 - 27
Assets/GitMerge/Editor/GitMergeWindow.cs

@@ -1,9 +1,11 @@
-using UnityEngine;
+using System;
+using UnityEngine;
 using UnityEditor;
 using UnityEngine.SceneManagement;
 using System.Linq;
 using System.Collections.Generic;
 using GitMerge.Utilities;
+using Object = UnityEngine.Object;
 
 namespace GitMerge
 {
@@ -24,6 +26,7 @@ namespace GitMerge
 
         private MergeFilter filter = new MergeFilter();
         private MergeFilterBar filterBar = new MergeFilterBar();
+        private ConflictWatcher conflictWatcher = new ConflictWatcher();
 
         public bool mergeInProgress => mergeManager != null;
 
@@ -32,6 +35,9 @@ namespace GitMerge
         private int tab = 0;
         private List<GameObjectMergeActions> mergeActionsFiltered;
 
+        private Texture2D brokenLogo;
+        private Texture2D fixedLogo;
+        
         [MenuItem("Window/GitMerge")]
         static void OpenEditor()
         {
@@ -44,12 +50,22 @@ namespace GitMerge
 
         private void OnEnable()
         {
+            brokenLogo = UnityEngine.Resources.Load<Texture2D>("chain-broken");
+            fixedLogo = UnityEngine.Resources.Load<Texture2D>("check");
             pageView.NumElementsPerPage = 200;
             filterBar.filter = filter;
             filter.OnChanged += CacheMergeActions;
+            conflictWatcher.OnConflict += InitializeMerge;
+            Selection.selectionChanged += Repaint;
+            EditorApplication.hierarchyWindowItemOnGUI += HighlightItems;
             LoadSettings();
         }
 
+        private void OnDisable()
+        {
+            conflictWatcher.OnConflict -= InitializeMerge;
+        }
+
         private static void LoadSettings()
         {
             automerge = EditorPrefs.GetBool(EDITOR_PREFS_AUTOMERGE, true);
@@ -84,6 +100,9 @@ namespace GitMerge
         {
             Resources.DrawLogo();
             DrawTabButtons();
+            EditorGUILayout.Space();
+            DrawHorizontalDivider();
+            EditorGUILayout.Space();
             switch (tab)
             {
                 case 0:
@@ -138,28 +157,87 @@ namespace GitMerge
                 var path = PathDetectingDragAndDropField("Drag a scene or prefab here to start merging", 80);
                 if (path != null)
                 {
-                    var asset = AssetDatabase.LoadAssetAtPath<Object>(path);
+                    InitializeMerge(path);
+                }
+            }
+        }
+        
+        private void HighlightItems(int instanceID, Rect selectionRect)
+        {
+            var target = EditorUtility.InstanceIDToObject(instanceID) as GameObject;
+
+            Texture2D drawableLogo;
+            
+            if (target == null)
+            {
+                return;
+            }
+
+            bool isResolved = false;
+            bool found = false;
+            
+            if (mergeManager is { allMergeActions: not null })
+            {
+                GlobalObjectId targetId = GlobalObjectId.GetGlobalObjectIdSlow(target);
+                
+                foreach (var mergeAction in mergeManager.allMergeActions)
+                {
+                    GlobalObjectId actionId = GlobalObjectId.GetGlobalObjectIdSlow(mergeAction.ours);
                     
-                    if (IsPrefabAsset(asset))
-                    {
-                        var manager = new MergeManagerPrefab(this, vcs);
-                        if (manager.TryInitializeMerge(path))
-                        {
-                            this.mergeManager = manager;
-                            CacheMergeActions();
-                        }
-                    }
-                    else if (IsSceneAsset(asset))
+                    if (targetId.targetObjectId == actionId.targetObjectId)
                     {
-                        var manager = new MergeManagerScene(this, vcs);
-                        if (manager.TryInitializeMerge(path))
-                        {
-                            this.mergeManager = manager;
-                            CacheMergeActions();
-                        }
+                        found = true;
+                        isResolved = mergeAction.merged;
+                        break;
                     }
                 }
             }
+            if (!found) return;
+
+            if (!isResolved)
+            {
+                drawableLogo = brokenLogo;
+            }
+            else
+            {
+                drawableLogo = fixedLogo;
+            }
+
+            var iconSize = 16;
+            
+            var iconRect = new Rect(
+                selectionRect.xMax - iconSize - 2,
+                selectionRect.y + (selectionRect.height - iconSize) / 2f,
+                iconSize,
+                iconSize
+            );
+            
+            GUI.DrawTexture(iconRect, drawableLogo, ScaleMode.ScaleToFit);
+        }
+
+        private void InitializeMerge(string path)
+        {
+            if (path == null) return;
+            var asset = AssetDatabase.LoadAssetAtPath<Object>(path);
+                    
+            if (IsPrefabAsset(asset))
+            {
+                var manager = new MergeManagerPrefab(this, vcs);
+                if (manager.TryInitializeMerge(path))
+                {
+                    this.mergeManager = manager;
+                    CacheMergeActions();
+                }
+            }
+            else if (IsSceneAsset(asset))
+            {
+                var manager = new MergeManagerScene(this, vcs);
+                if (manager.TryInitializeMerge(path))
+                {
+                    this.mergeManager = manager;
+                    CacheMergeActions();
+                }
+            }
         }
 
         private static bool IsPrefabAsset(Object asset)
@@ -274,9 +352,25 @@ namespace GitMerge
                     mergeManager.AbortMerge();
                     mergeManager = null;
                 }
+                // Confirm merge if possible
+                if (mergeManager != null && mergeManager.isMergingDone)
+                {
+                    GUI.backgroundColor = Color.green;
+                    if (GUI.Button(new Rect(400, 36, 300, 22), "Confirm merge"))
+                    {
+                        mergeManager.CompleteMerge();
+                        mergeManager = null;
+                    }
+                }
                 GUI.backgroundColor = Color.white;
             }
         }
+        
+        private void DrawHorizontalDivider()
+        {
+            var rect = EditorGUILayout.GetControlRect(false, 1);
+            EditorGUI.DrawRect(rect, new Color(0.4f, 0.4f, 0.4f, 1f)); // Dark gray line
+        }
 
         /// <summary>
         /// Displays all MergeActions and the "apply merge" button if a merge is in progress.
@@ -284,15 +378,17 @@ namespace GitMerge
         private void DisplayMergeProcess()
         {
             DrawCommandBar();
+            EditorGUILayout.Space();
+            DrawHorizontalDivider();
 
             var done = DisplayMergeActions();
-            GUILayout.BeginHorizontal();
-            if (done && GUILayout.Button("Apply merge", GUILayout.Height(40)))
-            {
-                mergeManager.CompleteMerge();
-                mergeManager = null;
-            }
-            GUILayout.EndHorizontal();
+            // GUILayout.BeginHorizontal();
+            // if (done && GUILayout.Button("Apply merge", GUILayout.Height(40)))
+            // {
+            //     mergeManager.CompleteMerge();
+            //     mergeManager = null;
+            // }
+            // GUILayout.EndHorizontal();
         }
 
         /// <summary>
@@ -313,11 +409,17 @@ namespace GitMerge
             {
                 if (GUILayout.Button(new GUIContent("Use ours", "Use theirs for all. Do not apply merge automatically.")))
                 {
-                    mergeManager.allMergeActions.ForEach((action) => action.UseOurs());
+                    mergeManager.allMergeActions.ForEach((action) =>
+                    {
+                        action.UseOurs(true);
+                    });
                 }
                 if (GUILayout.Button(new GUIContent("Use theirs", "Use theirs for all. Do not apply merge automatically.")))
                 {
-                    mergeManager.allMergeActions.ForEach((action) => action.UseTheirs());
+                    mergeManager.allMergeActions.ForEach((action) =>
+                    {
+                        action.UseTheirs(true);
+                    });
                 }
                 GUILayout.FlexibleSpace();
             }
@@ -356,6 +458,8 @@ namespace GitMerge
             {
                 mergeActionsFiltered = mergeManager.allMergeActions;
             }
+
+            mergeActionsFiltered = mergeManager.allMergeActions.Where((actions) => !actions.applied).ToList();
         }
     }
 }

+ 6 - 3
Assets/GitMerge/Editor/MergeActions/MergeAction.cs

@@ -1,4 +1,6 @@
 
+using System;
+
 namespace GitMerge
 {
     using UnityEngine;
@@ -27,7 +29,8 @@ namespace GitMerge
         protected bool usingOurs;
         protected bool usingTheirs;
         protected bool usingNew;
-
+        
+        public Action mergeAction;
         protected bool wasResolvedAutomatically;
 
 
@@ -44,7 +47,7 @@ namespace GitMerge
         {
             try
             {
-                ApplyOurs();
+                mergeAction = ApplyOurs;
             }
             catch
             {
@@ -72,7 +75,7 @@ namespace GitMerge
         {
             try
             {
-                ApplyTheirs();
+                mergeAction = ApplyTheirs;
             }
             catch
             {

+ 21 - 20
Assets/GitMerge/Editor/MergeActions/MergeActionChangeValues.cs

@@ -35,31 +35,11 @@ namespace GitMerge
 
         protected override void ApplyOurs()
         {
-            ourProperty.SetValue(ourInitialValue);
             ourProperty.serializedObject.ApplyModifiedProperties();
         }
 
         protected override void ApplyTheirs()
         {
-            var value = theirInitialValue;
-
-            //If we're about references here, get "our" version of the object.
-            if (ourProperty.propertyType == SerializedPropertyType.ObjectReference)
-            {
-                var id = ObjectID.GetFor(theirInitialValue as Object);
-                var obj = ObjectDictionaries.GetOurObject(id);
-
-                //If we didn't have our own version of the object before, it must be new
-                if (!obj)
-                {
-                    //Get our copy of the new object if it exists
-                    obj = ObjectDictionaries.GetOurInstanceOfCopy(value as Object);
-                }
-
-                value = obj;
-            }
-
-            ourProperty.SetValue(value);
             ourProperty.serializedObject.ApplyModifiedProperties();
         }
 
@@ -77,7 +57,9 @@ namespace GitMerge
 
             if (MergeButton(">>>", usingOurs))
             {
+                ourProperty.SetValue(ourInitialValue);
                 UseOurs();
+                merged = true;
             }
 
             var c = GUI.backgroundColor;
@@ -90,6 +72,25 @@ namespace GitMerge
 
             if (MergeButton("<<<", usingTheirs))
             {
+                var value = theirInitialValue;
+
+                //If we're about references here, get "our" version of the object.
+                if (ourProperty.propertyType == SerializedPropertyType.ObjectReference)
+                {
+                    var id = ObjectID.GetFor(theirInitialValue as Object);
+                    var obj = ObjectDictionaries.GetOurObject(id);
+
+                    //If we didn't have our own version of the object before, it must be new
+                    if (!obj)
+                    {
+                        //Get our copy of the new object if it exists
+                        obj = ObjectDictionaries.GetOurInstanceOfCopy(value as Object);
+                    }
+
+                    value = obj;
+                }
+
+                ourProperty.SetValue(value);
                 UseTheirs();
             }
 

+ 2 - 0
Assets/GitMerge/Editor/MergeActions/MergeActionDeleteComponent.cs

@@ -29,6 +29,7 @@ namespace GitMerge
 
         protected override void ApplyOurs()
         {
+            Debug.Log("ApplyOurs deleting ours GameObject");
             if (ourComponent == null)
             {
                 ourComponent = ours.AddComponent(copy);
@@ -38,6 +39,7 @@ namespace GitMerge
 
         protected override void ApplyTheirs()
         {
+            Debug.Log("ApplyTheirs deleting their GameObject");
             if (ourComponent != null)
             {
                 ObjectDictionaries.RemoveOurObject(ourComponent);

+ 6 - 0
Assets/GitMerge/Editor/MergeActions/MergeActionDeleteGameObject.cs

@@ -18,17 +18,23 @@ namespace GitMerge
             if (GitMergeWindow.automerge)
             {
                 UseOurs();
+                merged = true;
+                usingTheirs = false;
+                usingOurs = true;
             }
         }
 
         protected override void ApplyOurs()
         {
+            Debug.Log("ApplyOurs called");
             ours.SetActiveForMerging(true);
             ours.SetActive(oursWasActive);
         }
 
         protected override void ApplyTheirs()
         {
+            Debug.Log("ApplyOurs deleting their GameObject");
+
             ours.SetActiveForMerging(false);
             SceneView.RepaintAll();
         }

+ 10 - 1
Assets/GitMerge/Editor/MergeManagerBase.cs

@@ -1,4 +1,6 @@
 
+using System.Linq;
+
 namespace GitMerge
 {
     using UnityEngine;
@@ -20,7 +22,14 @@ namespace GitMerge
 
         public static bool isMergingScene { protected set; get; }
         public static bool isMergingPrefab { get { return !isMergingScene; } }
-
+        public bool isMergingDone
+        {
+            get {
+                return
+                allMergeActions == null ||
+                allMergeActions.All(x => x.applied);
+            }
+        }
 
         public MergeManagerBase(GitMergeWindow window, VCS vcs)
         {

BIN
Assets/GitMerge/Editor/Resources/chain-broken.png


+ 140 - 0
Assets/GitMerge/Editor/Resources/chain-broken.png.meta

@@ -0,0 +1,140 @@
+fileFormatVersion: 2
+guid: 002e35acfa42d42bbbb1e04a67b28ee9
+TextureImporter:
+  internalIDToNameTable: []
+  externalObjects: {}
+  serializedVersion: 13
+  mipmaps:
+    mipMapMode: 0
+    enableMipMap: 0
+    sRGBTexture: 1
+    linearTexture: 0
+    fadeOut: 0
+    borderMipMap: 0
+    mipMapsPreserveCoverage: 0
+    alphaTestReferenceValue: 0.5
+    mipMapFadeDistanceStart: 1
+    mipMapFadeDistanceEnd: 3
+  bumpmap:
+    convertToNormalMap: 0
+    externalNormalMap: 0
+    heightScale: 0.25
+    normalMapFilter: 0
+    flipGreenChannel: 0
+  isReadable: 0
+  streamingMipmaps: 0
+  streamingMipmapsPriority: 0
+  vTOnly: 0
+  ignoreMipmapLimit: 0
+  grayScaleToAlpha: 0
+  generateCubemap: 6
+  cubemapConvolution: 0
+  seamlessCubemap: 0
+  textureFormat: 1
+  maxTextureSize: 2048
+  textureSettings:
+    serializedVersion: 2
+    filterMode: 1
+    aniso: 1
+    mipBias: 0
+    wrapU: 1
+    wrapV: 1
+    wrapW: 0
+  nPOTScale: 0
+  lightmap: 0
+  compressionQuality: 50
+  spriteMode: 1
+  spriteExtrude: 1
+  spriteMeshType: 1
+  alignment: 0
+  spritePivot: {x: 0.5, y: 0.5}
+  spritePixelsToUnits: 100
+  spriteBorder: {x: 0, y: 0, z: 0, w: 0}
+  spriteGenerateFallbackPhysicsShape: 1
+  alphaUsage: 1
+  alphaIsTransparency: 1
+  spriteTessellationDetail: -1
+  textureType: 2
+  textureShape: 1
+  singleChannelComponent: 0
+  flipbookRows: 1
+  flipbookColumns: 1
+  maxTextureSizeSet: 0
+  compressionQualitySet: 0
+  textureFormatSet: 0
+  ignorePngGamma: 0
+  applyGammaDecoding: 0
+  swizzle: 50462976
+  cookieLightType: 0
+  platformSettings:
+  - serializedVersion: 3
+    buildTarget: DefaultTexturePlatform
+    maxTextureSize: 2048
+    resizeAlgorithm: 0
+    textureFormat: -1
+    textureCompression: 1
+    compressionQuality: 50
+    crunchedCompression: 0
+    allowsAlphaSplitting: 0
+    overridden: 0
+    ignorePlatformSupport: 0
+    androidETC2FallbackOverride: 0
+    forceMaximumCompressionQuality_BC6H_BC7: 0
+  - serializedVersion: 3
+    buildTarget: Standalone
+    maxTextureSize: 2048
+    resizeAlgorithm: 0
+    textureFormat: -1
+    textureCompression: 1
+    compressionQuality: 50
+    crunchedCompression: 0
+    allowsAlphaSplitting: 0
+    overridden: 0
+    ignorePlatformSupport: 0
+    androidETC2FallbackOverride: 0
+    forceMaximumCompressionQuality_BC6H_BC7: 0
+  - serializedVersion: 3
+    buildTarget: iPhone
+    maxTextureSize: 2048
+    resizeAlgorithm: 0
+    textureFormat: -1
+    textureCompression: 1
+    compressionQuality: 50
+    crunchedCompression: 0
+    allowsAlphaSplitting: 0
+    overridden: 0
+    ignorePlatformSupport: 0
+    androidETC2FallbackOverride: 0
+    forceMaximumCompressionQuality_BC6H_BC7: 0
+  - serializedVersion: 3
+    buildTarget: Android
+    maxTextureSize: 2048
+    resizeAlgorithm: 0
+    textureFormat: -1
+    textureCompression: 1
+    compressionQuality: 50
+    crunchedCompression: 0
+    allowsAlphaSplitting: 0
+    overridden: 0
+    ignorePlatformSupport: 0
+    androidETC2FallbackOverride: 0
+    forceMaximumCompressionQuality_BC6H_BC7: 0
+  spriteSheet:
+    serializedVersion: 2
+    sprites: []
+    outline: []
+    physicsShape: []
+    bones: []
+    spriteID: 5e97eb03825dee720800000000000000
+    internalID: 0
+    vertices: []
+    indices: 
+    edges: []
+    weights: []
+    secondaryTextures: []
+    nameFileIdTable: {}
+  mipmapLimitGroupName: 
+  pSDRemoveMatte: 0
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

BIN
Assets/GitMerge/Editor/Resources/check.png


+ 140 - 0
Assets/GitMerge/Editor/Resources/check.png.meta

@@ -0,0 +1,140 @@
+fileFormatVersion: 2
+guid: 8a2c3717eae194e01bd7294c8809ee4e
+TextureImporter:
+  internalIDToNameTable: []
+  externalObjects: {}
+  serializedVersion: 13
+  mipmaps:
+    mipMapMode: 0
+    enableMipMap: 0
+    sRGBTexture: 1
+    linearTexture: 0
+    fadeOut: 0
+    borderMipMap: 0
+    mipMapsPreserveCoverage: 0
+    alphaTestReferenceValue: 0.5
+    mipMapFadeDistanceStart: 1
+    mipMapFadeDistanceEnd: 3
+  bumpmap:
+    convertToNormalMap: 0
+    externalNormalMap: 0
+    heightScale: 0.25
+    normalMapFilter: 0
+    flipGreenChannel: 0
+  isReadable: 0
+  streamingMipmaps: 0
+  streamingMipmapsPriority: 0
+  vTOnly: 0
+  ignoreMipmapLimit: 0
+  grayScaleToAlpha: 0
+  generateCubemap: 6
+  cubemapConvolution: 0
+  seamlessCubemap: 0
+  textureFormat: 1
+  maxTextureSize: 2048
+  textureSettings:
+    serializedVersion: 2
+    filterMode: 1
+    aniso: 1
+    mipBias: 0
+    wrapU: 1
+    wrapV: 1
+    wrapW: 0
+  nPOTScale: 0
+  lightmap: 0
+  compressionQuality: 50
+  spriteMode: 1
+  spriteExtrude: 1
+  spriteMeshType: 1
+  alignment: 0
+  spritePivot: {x: 0.5, y: 0.5}
+  spritePixelsToUnits: 100
+  spriteBorder: {x: 0, y: 0, z: 0, w: 0}
+  spriteGenerateFallbackPhysicsShape: 1
+  alphaUsage: 1
+  alphaIsTransparency: 1
+  spriteTessellationDetail: -1
+  textureType: 2
+  textureShape: 1
+  singleChannelComponent: 0
+  flipbookRows: 1
+  flipbookColumns: 1
+  maxTextureSizeSet: 0
+  compressionQualitySet: 0
+  textureFormatSet: 0
+  ignorePngGamma: 0
+  applyGammaDecoding: 0
+  swizzle: 50462976
+  cookieLightType: 0
+  platformSettings:
+  - serializedVersion: 3
+    buildTarget: DefaultTexturePlatform
+    maxTextureSize: 2048
+    resizeAlgorithm: 0
+    textureFormat: -1
+    textureCompression: 1
+    compressionQuality: 50
+    crunchedCompression: 0
+    allowsAlphaSplitting: 0
+    overridden: 0
+    ignorePlatformSupport: 0
+    androidETC2FallbackOverride: 0
+    forceMaximumCompressionQuality_BC6H_BC7: 0
+  - serializedVersion: 3
+    buildTarget: Standalone
+    maxTextureSize: 2048
+    resizeAlgorithm: 0
+    textureFormat: -1
+    textureCompression: 1
+    compressionQuality: 50
+    crunchedCompression: 0
+    allowsAlphaSplitting: 0
+    overridden: 0
+    ignorePlatformSupport: 0
+    androidETC2FallbackOverride: 0
+    forceMaximumCompressionQuality_BC6H_BC7: 0
+  - serializedVersion: 3
+    buildTarget: iPhone
+    maxTextureSize: 2048
+    resizeAlgorithm: 0
+    textureFormat: -1
+    textureCompression: 1
+    compressionQuality: 50
+    crunchedCompression: 0
+    allowsAlphaSplitting: 0
+    overridden: 0
+    ignorePlatformSupport: 0
+    androidETC2FallbackOverride: 0
+    forceMaximumCompressionQuality_BC6H_BC7: 0
+  - serializedVersion: 3
+    buildTarget: Android
+    maxTextureSize: 2048
+    resizeAlgorithm: 0
+    textureFormat: -1
+    textureCompression: 1
+    compressionQuality: 50
+    crunchedCompression: 0
+    allowsAlphaSplitting: 0
+    overridden: 0
+    ignorePlatformSupport: 0
+    androidETC2FallbackOverride: 0
+    forceMaximumCompressionQuality_BC6H_BC7: 0
+  spriteSheet:
+    serializedVersion: 2
+    sprites: []
+    outline: []
+    physicsShape: []
+    bones: []
+    spriteID: 
+    internalID: 0
+    vertices: []
+    indices: 
+    edges: []
+    weights: []
+    secondaryTextures: []
+    nameFileIdTable: {}
+  mipmapLimitGroupName: 
+  pSDRemoveMatte: 0
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: