瀏覽代碼

修改完DragonBone图集

jet 8 年之前
父節點
當前提交
2dc4b79a19
共有 26 個文件被更改,包括 421 次插入688 次删除
  1. 2 0
      Assets/AtlasUtility/Script/AtlasUtility.cs
  2. 88 10
      Assets/AtlasUtility/Script/Editor/AtlasUtilityWindow.cs
  3. 1 0
      Assets/AtlasUtility/Script/Editor/Postprocess.cs
  4. 4 4
      Assets/AtlasUtility/Script/Editor/ReferenceManager.cs
  5. 1 45
      Assets/AtlasUtility/Script/Editor/ReferenceTable.cs
  6. 0 66
      Assets/AtlasUtility/Script/Editor/SerializeObject.cs
  7. 0 12
      Assets/AtlasUtility/Script/Editor/SerializeObject.cs.meta
  8. 0 8
      Assets/AtlasUtility/Script/Editor/Startup.cs
  9. 5 0
      Assets/AtlasUtility/Script/Editor/TestEditor.cs
  10. 12 11
      Assets/AtlasUtility/SerializeObject.prefab
  11. 1 1
      Assets/AtlasUtility/SerializeObject.prefab.meta
  12. 0 0
      Assets/Resource/Animations/人物动画/Closet_ske.json
  13. 1 1
      Assets/Resource/Animations/人物动画/Closet_ske.json.meta
  14. 0 0
      Assets/Resource/Animations/人物动画/Closet_tex.json
  15. 2 2
      Assets/Resource/Animations/人物动画/Closet_tex.json.meta
  16. 二進制
      Assets/Resource/Animations/人物动画/Closet_texture.png
  17. 245 240
      Assets/Resource/Animations/人物动画/Closet_texture.png.meta
  18. 0 0
      Assets/Resource/Animations/人物动画/stand_ske.json
  19. 1 1
      Assets/Resource/Animations/人物动画/stand_ske.json.meta
  20. 0 1
      Assets/Resource/Animations/人物动画/stand_tex.json
  21. 0 8
      Assets/Resource/Animations/人物动画/stand_tex.json.meta
  22. 二進制
      Assets/Resource/Animations/人物动画/stand_texture.png
  23. 0 260
      Assets/Resource/Animations/人物动画/stand_texture.png.meta
  24. 8 8
      Assets/Script/Manage/ManaPlayer.cs
  25. 47 7
      Assets/Script/Object/Player.cs
  26. 3 3
      ProjectSettings/GraphicsSettings.asset

+ 2 - 0
Assets/AtlasUtility/Script/AtlasUtility.cs

@@ -42,6 +42,8 @@
         public List<Texture2D> TextureList = new List<Texture2D>();
         public List<VirtualTexture> VirtualTextureList = new List<VirtualTexture>();
 
+        public TextAsset ReferenceTable;
+
         #endregion
     }
 }

+ 88 - 10
Assets/AtlasUtility/Script/Editor/AtlasUtilityWindow.cs

@@ -446,6 +446,8 @@
         {
             public int Width;
             public int Height;
+            public string AssetBundleName;
+            public string AssetBundleVariant;
 
             public List<TextureInfo> TextureInfoList;
 
@@ -506,6 +508,11 @@
 
                 if (File.Exists(path))
                 {
+                    TextureImporter importer = (TextureImporter)AssetImporter.GetAtPath(path);
+
+                    AssetBundleName = importer.assetBundleName;
+                    AssetBundleVariant = importer.assetBundleVariant;
+
                     AssetDatabase.DeleteAsset(path);
 
                     AssetDatabase.Refresh();
@@ -524,6 +531,16 @@
 
                 TextureImporter textureImporter = (TextureImporter)AssetImporter.GetAtPath(path);
 
+                if (!string.IsNullOrEmpty(AssetBundleName))
+                {
+                    textureImporter.assetBundleName = AssetBundleName;
+                }
+
+                if (!string.IsNullOrEmpty(AssetBundleVariant))
+                {
+                    textureImporter.assetBundleVariant = AssetBundleVariant;
+                }
+
                 textureImporter.spritesheet = spriteMetaDatas;
                 textureImporter.maxTextureSize = Mathf.Max(Width, Height);
                 textureImporter.isReadable = true;
@@ -619,7 +636,7 @@
 
         public void OnEnable()
         {
-            Script = SerializeObject.GetAtlasUtility();
+            Script = GetAtlasUtility();
             SerializedObject = new SerializedObject(Script);
 
             PackSize = SerializedObject.FindProperty("PackSize");
@@ -656,6 +673,21 @@
             window.Show();
         }
 
+        public static AtlasUtility GetAtlasUtility()
+        {
+            foreach (var path in Directory.GetFiles(Application.dataPath, "*SerializeObject.prefab", SearchOption.AllDirectories))
+            {
+                AtlasUtility atlasUtility = AssetDatabase.LoadAssetAtPath<GameObject>(path.GetRelativePath()).GetComponent<AtlasUtility>();
+
+                if (atlasUtility != null)
+                {
+                    return atlasUtility;
+                }
+            }
+
+            throw new Exception();
+        }
+
 
         protected void Pack()
         {
@@ -750,6 +782,17 @@
                 }
             }
 
+            for (int i = 0; i < Script.TextureList.Count; i++)
+            {
+                for (int j = i+1; j < Script.TextureList.Count; j++)
+                {
+                    if (Script.TextureList[i].name == Script.TextureList[j].name)
+                    {
+                        Debug.LogWarning($"发现名字相同的图片 {Script.TextureList[i].name}");
+                    }
+                }
+            }
+
             Parameter parameter = new Parameter
             {
                 Path = directory + Script.PackName,
@@ -1171,7 +1214,7 @@
         }
 
 
-        protected void GetSelectedPath()
+        protected void GetSelectedPath(ref string value)
         {
             if (Selection.assetGUIDs.Length > 0)
             {
@@ -1181,11 +1224,11 @@
 
                 if (string.IsNullOrEmpty(path))
                 {
-                    Script.PackPath = "Assets";
+                    value = "Assets";
                 }
                 else
                 {
-                    Script.PackPath = path;
+                    value = path;
                 }
             }
         }
@@ -1197,15 +1240,30 @@
             
             ScrollPosition = EditorGUILayout.BeginScrollView(ScrollPosition);
 
+            DrawPackArea();
+
+            DrawSliceArea();
+
+            DrawSearchReferenceArea();
+
+            DrawSetReferenceArea();
+
+            DrawDebugArea();
+
+            SerializedObject.ApplyModifiedProperties();
+        }
+
+        public void DrawPackArea()
+        {
             EditorGUILayout.LabelField("AtlasUtility", TitleGuiStyle, GUILayout.Height(30));
 
             EditorGUILayout.BeginHorizontal();
 
             EditorGUILayout.PropertyField(PackPath);
 
-            if (GUILayout.Button("GetSelectedPath"))
+            if (GUILayout.Button("UseSelectedPath"))
             {
-                GetSelectedPath();
+                GetSelectedPath(ref Script.PackPath);
             }
 
             EditorGUILayout.EndHorizontal();
@@ -1247,12 +1305,25 @@
             }
 
             EditorGUILayout.Separator();
+        }
 
-
+        public void DrawSliceArea()
+        {
             EditorGUILayout.Separator();
 
             EditorGUILayout.PropertyField(SlicePadding, new GUIContent("Padding"));
+
+            EditorGUILayout.BeginHorizontal();
+
             EditorGUILayout.PropertyField(SlicePath);
+
+            if (GUILayout.Button("UseSelectedPath"))
+            {
+                GetSelectedPath(ref Script.SlicePath);
+            }
+
+            EditorGUILayout.EndHorizontal();
+
             EditorGUILayout.PropertyField(SpriteSheet);
 
             if (GUILayout.Button("Slice", GUILayout.Height(30)))
@@ -1261,18 +1332,24 @@
             }
 
             EditorGUILayout.Separator();
+        }
 
+        public void DrawSearchReferenceArea()
+        {
             EditorGUILayout.Separator();
 
             EditorGUILayout.PropertyField(Target);
 
-            if (GUILayout.Button("FindReference", GUILayout.Height(30)))
+            if (GUILayout.Button("SearchReference", GUILayout.Height(30)))
             {
                 ReferenceManager.FindReference(AssetDatabase.GetAssetPath(Script.Target));
             }
 
             EditorGUILayout.Separator();
+        }
 
+        public void DrawSetReferenceArea()
+        {
             EditorGUILayout.Separator();
 
             if (GUILayout.Button("ChangeReference", GUILayout.Height(30)))
@@ -1290,7 +1367,10 @@
             }
 
             EditorGUILayout.Separator();
+        }
 
+        public void DrawDebugArea()
+        {
             EditorGUILayout.Separator();
 
             if (GUILayout.Button("CollectDebugInfo", GUILayout.Height(30)))
@@ -1299,8 +1379,6 @@
             }
 
             EditorGUILayout.EndScrollView();
-
-            SerializedObject.ApplyModifiedProperties();
         }
     }
 }

+ 1 - 0
Assets/AtlasUtility/Script/Editor/Postprocess.cs

@@ -4,6 +4,7 @@
     using UnityEngine;
 
     using System.IO;
+    using System.Reflection;
     using System.Collections.Generic;
 
     public class Postprocess : AssetPostprocessor

+ 4 - 4
Assets/AtlasUtility/Script/Editor/ReferenceManager.cs

@@ -97,7 +97,7 @@
             {
                 return;
             }
-
+            
             List<string> fromReferenceList = new List<string>();
             List<string> toReferenceList = new List<string>();
 
@@ -122,11 +122,11 @@
                         itemList.RemoveAt(i--);
                     }
                 }
+            }
 
-                ChangeReference(fromReferenceList, toReferenceList);
+            ChangeReference(fromReferenceList, toReferenceList);
 
-                ReferenceTable.WriteAllLine(itemList);
-            }
+            ReferenceTable.WriteAllLine(itemList);
         }
 
         public static void ResetAllReference()

+ 1 - 45
Assets/AtlasUtility/Script/Editor/ReferenceTable.cs

@@ -12,36 +12,15 @@
     {
         #region Variable
 
-        public static string DefaultPath
-        {
-            get { return DefaultDirectory + DefaultName; }
-        }
-
         public static string ReferenceTablePath
         {
-            get { return AssetDatabase.GUIDToAssetPath(ReferenceTableGUID); }
-        }
-
-        public static string ReferenceTableGUID
-        {
-            get { return PlayerPrefs.GetString(Key_ReferenceTableGUID, ""); }
+            get { return AssetDatabase.GetAssetPath(AtlasUtilityWindow.GetAtlasUtility().ReferenceTable); }
         }
 
-        private static string DefaultName = "ReferenceTable.txt";
-        private static string DefaultDirectory = "Assets/AtlasUtility/";
-
-        private static string Key_ReferenceTableText = "AtlasUtility_ReferenceTableText";
-        private static string Key_ReferenceTableGUID = "AtlasUtility_ReferenceTableGUID";
-
         #endregion
 
         public static List<string> ReadAllLine()
         {
-            if (!File.Exists(ReferenceTablePath))
-            {
-                Create();
-            }
-
             StreamReader streamReader = new StreamReader(ReferenceTablePath);
 
             string referenceTable = streamReader.ReadToEnd().TrimEnd('\n');
@@ -62,13 +41,6 @@
 
         public static void WriteAllLine(List<string> lineList)
         {
-            if (!File.Exists(ReferenceTablePath))
-            {
-                Create();
-            }
-
-            //File.SetAttributes(ReferenceTablePath, FileAttributes.Normal);
-
             StreamWriter streamWriter = new StreamWriter(ReferenceTablePath);
 
             for (int i = 0; i < lineList.Count; i++)
@@ -77,22 +49,6 @@
             }
 
             streamWriter.Close();
-
-            PlayerPrefs.SetString(Key_ReferenceTableText, File.ReadAllText(ReferenceTablePath));
-
-            //File.SetAttributes(ReferenceTablePath, FileAttributes.ReadOnly);
-        }
-
-        public static void Create()
-        {
-            if (!Directory.Exists(DefaultDirectory))
-            {
-                Directory.CreateDirectory(DefaultDirectory);
-            }
-
-            File.WriteAllText(DefaultPath, PlayerPrefs.GetString(Key_ReferenceTableText, ""));
-
-            PlayerPrefs.SetString(Key_ReferenceTableGUID, AssetDatabase.AssetPathToGUID(DefaultPath));
         }
     }
 }

+ 0 - 66
Assets/AtlasUtility/Script/Editor/SerializeObject.cs

@@ -1,66 +0,0 @@
-namespace AtlasUtility
-{
-    using UnityEditor;
-    using UnityEngine;
-
-    using System.IO;
-
-    public class SerializeObject : MonoBehaviour
-    {
-        #region Variable
-
-        public static string DefaultPath
-        {
-            get { return DefaultDirectory + DefaultName; }
-        }
-
-        public static string SerializeObjectPath
-        {
-            get { return AssetDatabase.GUIDToAssetPath(SerializeObjectGUID); }
-        }
-
-        public static string SerializeObjectGUID
-        {
-            get { return PlayerPrefs.GetString(Key_SerializeObjectGUID, ""); }
-        }
-
-        private static string DefaultName = "SerializeObject.prefab";
-        private static string DefaultDirectory = "Assets/AtlasUtility/";
-
-        private static string Key_SerializeObjectGUID = "AtlasUtility_SerializeObjectGUID";
-
-        #endregion
-
-        public static AtlasUtility GetAtlasUtility()
-        {
-            if (File.Exists(SerializeObjectPath))
-            {
-                return AssetDatabase.LoadAssetAtPath<AtlasUtility>(SerializeObjectPath);
-            }
-            else
-            {
-                Create();
-
-                return AssetDatabase.LoadAssetAtPath<AtlasUtility>(SerializeObjectPath);
-            }
-        }
-
-        public static void Create()
-        {
-            if (!Directory.Exists(DefaultDirectory))
-            {
-                Directory.CreateDirectory(DefaultDirectory);
-            }
-
-            GameObject serializeObject = new GameObject("AtlasUtility_SerializeObject");
-
-            serializeObject.AddComponent<AtlasUtility>();
-
-            PrefabUtility.CreatePrefab(DefaultPath, serializeObject);
-
-            DestroyImmediate(serializeObject);
-
-            PlayerPrefs.SetString(Key_SerializeObjectGUID, AssetDatabase.AssetPathToGUID(DefaultPath));
-        }
-    }
-}

+ 0 - 12
Assets/AtlasUtility/Script/Editor/SerializeObject.cs.meta

@@ -1,12 +0,0 @@
-fileFormatVersion: 2
-guid: 7cdf4427102383842b3d55d1d82c6b23
-timeCreated: 1501836794
-licenseType: Pro
-MonoImporter:
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 8
Assets/AtlasUtility/Script/Editor/Startup.cs

@@ -9,15 +9,7 @@
     {
         static Startup()
         {
-            if (!File.Exists(ReferenceTable.ReferenceTablePath))
-            {
-                ReferenceTable.Create();
-            }
 
-            if (!File.Exists(SerializeObject.SerializeObjectPath))
-            {
-                SerializeObject.Create();
-            }
         }
     }
 }

+ 5 - 0
Assets/AtlasUtility/Script/Editor/TestEditor.cs

@@ -6,6 +6,7 @@
 
     using UnityEditor;
     using UnityEngine;
+    using UnityEngine.UI;
 
     [CustomEditor(typeof(Test))]
     public class TestEditor : Editor
@@ -27,6 +28,10 @@
 
             if (GUILayout.Button("Test"))
             {
+                Debug.Log(Script.GetComponent<Graphic>().depth);
+
+                //EditorUtility.CompileCSharp("AtlasUtility.cs", )
+
                 //Texture2D texture2D = new Texture2D(Script.Texture2D.width, Script.Texture2D.height, TextureFormat.RGBA32, false);
 
                 //for (int i = 0; i < texture2D.width; i++)

+ 12 - 11
Assets/AtlasUtility/SerializeObject.prefab

@@ -9,17 +9,17 @@ Prefab:
     m_Modifications: []
     m_RemovedComponents: []
   m_ParentPrefab: {fileID: 0}
-  m_RootGameObject: {fileID: 1170157383472358}
+  m_RootGameObject: {fileID: 1365587588779566}
   m_IsPrefabParent: 1
---- !u!1 &1170157383472358
+--- !u!1 &1365587588779566
 GameObject:
   m_ObjectHideFlags: 0
   m_PrefabParentObject: {fileID: 0}
   m_PrefabInternal: {fileID: 100100000}
   serializedVersion: 5
   m_Component:
-  - component: {fileID: 4117573021518128}
-  - component: {fileID: 114982218461035774}
+  - component: {fileID: 4611373381130502}
+  - component: {fileID: 114804911014545120}
   m_Layer: 0
   m_Name: SerializeObject
   m_TagString: Untagged
@@ -27,12 +27,12 @@ GameObject:
   m_NavMeshLayer: 0
   m_StaticEditorFlags: 0
   m_IsActive: 1
---- !u!4 &4117573021518128
+--- !u!4 &4611373381130502
 Transform:
   m_ObjectHideFlags: 1
   m_PrefabParentObject: {fileID: 0}
   m_PrefabInternal: {fileID: 100100000}
-  m_GameObject: {fileID: 1170157383472358}
+  m_GameObject: {fileID: 1365587588779566}
   m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
   m_LocalPosition: {x: 0, y: 0, z: 0}
   m_LocalScale: {x: 1, y: 1, z: 1}
@@ -40,12 +40,12 @@ Transform:
   m_Father: {fileID: 0}
   m_RootOrder: 0
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
---- !u!114 &114982218461035774
+--- !u!114 &114804911014545120
 MonoBehaviour:
   m_ObjectHideFlags: 1
   m_PrefabParentObject: {fileID: 0}
   m_PrefabInternal: {fileID: 100100000}
-  m_GameObject: {fileID: 1170157383472358}
+  m_GameObject: {fileID: 1365587588779566}
   m_Enabled: 1
   m_EditorHideFlags: 0
   m_Script: {fileID: 11500000, guid: b95c390c169d0c342a44bf125aefc458, type: 3}
@@ -56,10 +56,11 @@ MonoBehaviour:
   PackSize: 2048
   SlicePadding: 0
   PackPadding: 1
-  PackPath: Assets/Resource/Sprite/SpriteUI
+  PackPath: Assets/AtlasUtility
   SlicePath: Assets/AtlasUtility/Slice
-  PackName: PanelAtlas
+  PackName: Atlas
   Atlas: {fileID: 0}
-  Target: {fileID: 2800000, guid: f6baf652ebcd8ed4093bcf36bbc8a007, type: 3}
+  Target: {fileID: 0}
   TextureList: []
   VirtualTextureList: []
+  ReferenceTable: {fileID: 4900000, guid: e61ffc7d134032b48a4366dfa7284499, type: 3}

+ 1 - 1
Assets/AtlasUtility/SerializeObject.prefab.meta

@@ -1,6 +1,6 @@
 fileFormatVersion: 2
 guid: 26b234a9acb6d09488ac93a7366e5dec
-timeCreated: 1502506067
+timeCreated: 1502680494
 licenseType: Pro
 NativeFormatImporter:
   userData: 

File diff suppressed because it is too large
+ 0 - 0
Assets/Resource/Animations/人物动画/Closet_ske.json


+ 1 - 1
Assets/Resource/Animations/人物动画/Closet_ske.json.meta

@@ -1,6 +1,6 @@
 fileFormatVersion: 2
 guid: 0cad47e5fe7664c4889face32561e5f3
-timeCreated: 1500270729
+timeCreated: 1502687711
 licenseType: Pro
 TextScriptImporter:
   userData: 

File diff suppressed because it is too large
+ 0 - 0
Assets/Resource/Animations/人物动画/Closet_tex.json


+ 2 - 2
Assets/Resource/Animations/人物动画/Closet_tex.json.meta

@@ -1,6 +1,6 @@
 fileFormatVersion: 2
-guid: cf10bfe715240ea4e87102475ca55678
-timeCreated: 1500270729
+guid: eac83164cf84fd84999cc3623ed9d406
+timeCreated: 1502687711
 licenseType: Pro
 TextScriptImporter:
   userData: 

二進制
Assets/Resource/Animations/人物动画/Closet_texture.png


File diff suppressed because it is too large
+ 245 - 240
Assets/Resource/Animations/人物动画/Closet_texture.png.meta


File diff suppressed because it is too large
+ 0 - 0
Assets/Resource/Animations/人物动画/stand_ske.json


+ 1 - 1
Assets/Resource/Animations/人物动画/stand_ske.json.meta

@@ -1,6 +1,6 @@
 fileFormatVersion: 2
 guid: d9cae0096b575ad439815b89ff28bbf0
-timeCreated: 1500270729
+timeCreated: 1502687711
 licenseType: Pro
 TextScriptImporter:
   userData: 

+ 0 - 1
Assets/Resource/Animations/人物动画/stand_tex.json

@@ -1 +0,0 @@
-{"imagePath":"stand_tex.png","SubTexture":[{"width":646,"y":1,"height":391,"name":"脑壳1","x":1},{"width":45,"y":370,"height":188,"name":"腿2个提供1个","x":915},{"width":62,"y":185,"height":183,"name":"右手你的右手!!","x":915},{"frameWidth":212,"y":217,"frameHeight":142,"width":212,"frameX":0,"height":135,"name":"裙子1","frameY":-3,"x":649},{"width":86,"y":1,"height":182,"name":"左手看清左手你的左手!!","x":877},{"width":35,"y":185,"height":51,"name":"脖子","x":877},{"frameWidth":44,"y":238,"frameHeight":48,"width":31,"frameX":0,"height":38,"name":"鞋子1","frameY":-10,"x":863},{"frameWidth":56,"y":217,"frameHeight":35,"width":12,"frameX":-22,"height":10,"name":"嘴巴1","frameY":-12,"x":863},{"width":227,"y":394,"height":40,"name":"眼睛表情1","x":168},{"width":264,"y":354,"height":95,"name":"眼睛1","x":649},{"width":226,"y":1,"height":214,"name":"头饰品1","x":649},{"width":165,"y":394,"height":111,"name":"上衣1","x":1}],"name":"stand_ske"}

+ 0 - 8
Assets/Resource/Animations/人物动画/stand_tex.json.meta

@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: 05b6fcf2910d93d4886759a50c715ede
-timeCreated: 1500270729
-licenseType: Pro
-TextScriptImporter:
-  userData: 
-  assetBundleName: config
-  assetBundleVariant: 

二進制
Assets/Resource/Animations/人物动画/stand_texture.png


+ 0 - 260
Assets/Resource/Animations/人物动画/stand_texture.png.meta

@@ -1,260 +0,0 @@
-fileFormatVersion: 2
-guid: 650acd38d498d664185f2a3b2cf387e9
-timeCreated: 1500374857
-licenseType: Pro
-TextureImporter:
-  fileIDToRecycleName:
-    21300000: "\u8111\u58F31"
-    21300002: "\u817F2\u4E2A\u63D0\u4F9B1\u4E2A"
-    21300004: "\u53F3\u624B\u4F60\u7684\u53F3\u624B\uFF01\uFF01"
-    21300006: "\u88D9\u5B501"
-    21300008: "\u5DE6\u624B\u770B\u6E05\u5DE6\u624B\u4F60\u7684\u5DE6\u624B\uFF01\uFF01"
-    21300010: "\u8116\u5B50"
-    21300012: "\u978B\u5B501"
-    21300014: "\u5634\u5DF41"
-    21300016: "\u773C\u775B\u8868\u60C51"
-    21300018: "\u773C\u775B1"
-    21300020: "\u5934\u9970\u54C11"
-    21300022: "\u4E0A\u88631"
-  serializedVersion: 4
-  mipmaps:
-    mipMapMode: 0
-    enableMipMap: 0
-    sRGBTexture: 1
-    linearTexture: 0
-    fadeOut: 0
-    borderMipMap: 0
-    mipMapFadeDistanceStart: 1
-    mipMapFadeDistanceEnd: 3
-  bumpmap:
-    convertToNormalMap: 0
-    externalNormalMap: 0
-    heightScale: 0.25
-    normalMapFilter: 0
-  isReadable: 1
-  grayScaleToAlpha: 0
-  generateCubemap: 6
-  cubemapConvolution: 0
-  seamlessCubemap: 0
-  textureFormat: 1
-  maxTextureSize: 2048
-  textureSettings:
-    filterMode: -1
-    aniso: -1
-    mipBias: -1
-    wrapMode: 1
-  nPOTScale: 0
-  lightmap: 0
-  compressionQuality: 50
-  spriteMode: 2
-  spriteExtrude: 1
-  spriteMeshType: 1
-  alignment: 0
-  spritePivot: {x: 0.5, y: 0.5}
-  spriteBorder: {x: 0, y: 0, z: 0, w: 0}
-  spritePixelsToUnits: 100
-  alphaUsage: 1
-  alphaIsTransparency: 1
-  spriteTessellationDetail: -1
-  textureType: 8
-  textureShape: 1
-  maxTextureSizeSet: 0
-  compressionQualitySet: 0
-  textureFormatSet: 0
-  platformSettings:
-  - buildTarget: DefaultTexturePlatform
-    maxTextureSize: 2048
-    textureFormat: -1
-    textureCompression: 1
-    compressionQuality: 50
-    crunchedCompression: 0
-    allowsAlphaSplitting: 0
-    overridden: 0
-  - buildTarget: Standalone
-    maxTextureSize: 2048
-    textureFormat: -1
-    textureCompression: 1
-    compressionQuality: 50
-    crunchedCompression: 0
-    allowsAlphaSplitting: 0
-    overridden: 0
-  - buildTarget: Android
-    maxTextureSize: 2048
-    textureFormat: -1
-    textureCompression: 1
-    compressionQuality: 50
-    crunchedCompression: 0
-    allowsAlphaSplitting: 0
-    overridden: 0
-  - buildTarget: iPhone
-    maxTextureSize: 2048
-    textureFormat: -1
-    textureCompression: 1
-    compressionQuality: 50
-    crunchedCompression: 0
-    allowsAlphaSplitting: 0
-    overridden: 0
-  spriteSheet:
-    serializedVersion: 2
-    sprites:
-    - serializedVersion: 2
-      name: "\u8111\u58F31"
-      rect:
-        serializedVersion: 2
-        x: 1
-        y: 632
-        width: 646
-        height: 391
-      alignment: 0
-      pivot: {x: 0, y: 0}
-      border: {x: 0, y: 0, z: 0, w: 0}
-      outline: []
-      tessellationDetail: -1
-    - serializedVersion: 2
-      name: "\u817F2\u4E2A\u63D0\u4F9B1\u4E2A"
-      rect:
-        serializedVersion: 2
-        x: 915
-        y: 466
-        width: 45
-        height: 188
-      alignment: 0
-      pivot: {x: 0, y: 0}
-      border: {x: 0, y: 0, z: 0, w: 0}
-      outline: []
-      tessellationDetail: -1
-    - serializedVersion: 2
-      name: "\u53F3\u624B\u4F60\u7684\u53F3\u624B\uFF01\uFF01"
-      rect:
-        serializedVersion: 2
-        x: 915
-        y: 656
-        width: 62
-        height: 183
-      alignment: 0
-      pivot: {x: 0, y: 0}
-      border: {x: 0, y: 0, z: 0, w: 0}
-      outline: []
-      tessellationDetail: -1
-    - serializedVersion: 2
-      name: "\u88D9\u5B501"
-      rect:
-        serializedVersion: 2
-        x: 649
-        y: 672
-        width: 212
-        height: 135
-      alignment: 0
-      pivot: {x: 0, y: 0}
-      border: {x: 0, y: 0, z: 0, w: 0}
-      outline: []
-      tessellationDetail: -1
-    - serializedVersion: 2
-      name: "\u5DE6\u624B\u770B\u6E05\u5DE6\u624B\u4F60\u7684\u5DE6\u624B\uFF01\uFF01"
-      rect:
-        serializedVersion: 2
-        x: 877
-        y: 841
-        width: 86
-        height: 182
-      alignment: 0
-      pivot: {x: 0, y: 0}
-      border: {x: 0, y: 0, z: 0, w: 0}
-      outline: []
-      tessellationDetail: -1
-    - serializedVersion: 2
-      name: "\u8116\u5B50"
-      rect:
-        serializedVersion: 2
-        x: 877
-        y: 788
-        width: 35
-        height: 51
-      alignment: 0
-      pivot: {x: 0, y: 0}
-      border: {x: 0, y: 0, z: 0, w: 0}
-      outline: []
-      tessellationDetail: -1
-    - serializedVersion: 2
-      name: "\u978B\u5B501"
-      rect:
-        serializedVersion: 2
-        x: 863
-        y: 748
-        width: 31
-        height: 38
-      alignment: 0
-      pivot: {x: 0, y: 0}
-      border: {x: 0, y: 0, z: 0, w: 0}
-      outline: []
-      tessellationDetail: -1
-    - serializedVersion: 2
-      name: "\u5634\u5DF41"
-      rect:
-        serializedVersion: 2
-        x: 863
-        y: 797
-        width: 12
-        height: 10
-      alignment: 0
-      pivot: {x: 0, y: 0}
-      border: {x: 0, y: 0, z: 0, w: 0}
-      outline: []
-      tessellationDetail: -1
-    - serializedVersion: 2
-      name: "\u773C\u775B\u8868\u60C51"
-      rect:
-        serializedVersion: 2
-        x: 168
-        y: 590
-        width: 227
-        height: 40
-      alignment: 0
-      pivot: {x: 0, y: 0}
-      border: {x: 0, y: 0, z: 0, w: 0}
-      outline: []
-      tessellationDetail: -1
-    - serializedVersion: 2
-      name: "\u773C\u775B1"
-      rect:
-        serializedVersion: 2
-        x: 649
-        y: 575
-        width: 264
-        height: 95
-      alignment: 0
-      pivot: {x: 0, y: 0}
-      border: {x: 0, y: 0, z: 0, w: 0}
-      outline: []
-      tessellationDetail: -1
-    - serializedVersion: 2
-      name: "\u5934\u9970\u54C11"
-      rect:
-        serializedVersion: 2
-        x: 649
-        y: 809
-        width: 226
-        height: 214
-      alignment: 0
-      pivot: {x: 0, y: 0}
-      border: {x: 0, y: 0, z: 0, w: 0}
-      outline: []
-      tessellationDetail: -1
-    - serializedVersion: 2
-      name: "\u4E0A\u88631"
-      rect:
-        serializedVersion: 2
-        x: 1
-        y: 519
-        width: 165
-        height: 111
-      alignment: 0
-      pivot: {x: 0, y: 0}
-      border: {x: 0, y: 0, z: 0, w: 0}
-      outline: []
-      tessellationDetail: -1
-    outline: []
-  spritePackingTag: 
-  userData: 
-  assetBundleName: scene
-  assetBundleVariant: 

+ 8 - 8
Assets/Script/Manage/ManaPlayer.cs

@@ -49,7 +49,7 @@ public class ManaPlayer : Regist
             UnityFactory.factory.LoadDragonBonesData(ManaReso.Load<TextAsset>("stand_ske", Folder.Config));
             UnityFactory.factory.LoadDragonBonesData(ManaReso.Load<TextAsset>("Closet_ske", Folder.Config));
 
-            UnityFactory.factory.LoadTextureAtlasData(ManaReso.Load<TextAsset>("stand_tex", Folder.Config), "stand_texture");
+            //UnityFactory.factory.LoadTextureAtlasData(ManaReso.Load<TextAsset>("stand_tex", Folder.Config), "stand_texture");
             UnityFactory.factory.LoadTextureAtlasData(ManaReso.Load<TextAsset>("Closet_tex", Folder.Config), "Closet_texture");
 
             Complete = true;
@@ -157,16 +157,16 @@ public class ManaPlayer : Regist
         }
         else
         {
-            Object[] objects = Bundle.Scene.LoadAssetWithSubAssets("stand_texture", typeof(Sprite));
+            //Object[] objects = Bundle.Scene.LoadAssetWithSubAssets("stand_texture", typeof(Sprite));
 
-            for (int i = 0; i < objects.Length; i++)
-            {
-                Sprite sprite = (Sprite)objects[i];
+            //for (int i = 0; i < objects.Length; i++)
+            //{
+            //    Sprite sprite = (Sprite)objects[i];
 
-                CloseSpriteDic.Add(sprite.name, sprite);
-            }
+            //    CloseSpriteDic.Add(sprite.name, sprite);
+            //}
 
-            objects = Bundle.Scene.LoadAssetWithSubAssets("Closet_texture", typeof(Sprite));
+            Object[] objects = Bundle.Scene.LoadAssetWithSubAssets("Closet_texture", typeof(Sprite));
 
             for (int i = 0; i < objects.Length; i++)
             {

+ 47 - 7
Assets/Script/Object/Player.cs

@@ -16,6 +16,10 @@ using Transform = UnityEngine.Transform;
 
 public enum BodyPart
 {
+    Leg,
+    LeftHand,
+    RightHand,
+    Neck,
     Eye,
     Top,
     Shoe,
@@ -318,7 +322,7 @@ public class CloseUnit
                     Unlock();
 
                     ManaAudio.PlayClip(Clip.CurrentClip);
-                    Debug.Log(ID);
+
                     ManaPlayer.BoughtCloseList.UniqueAdd(ID);
 
                     ManaReso.Get("Pa_Info").TweenBacCG();
@@ -361,6 +365,12 @@ public class Player : Regist , IPointerClickHandler
     private string HeadWear;
     private string TempClose;
 
+    public DragonBones.Slot NeckSlot;
+    public DragonBones.Slot LeftHandSlot;
+    public DragonBones.Slot RightHandSlot;
+    public DragonBones.Slot LeftLegSlot;
+    public DragonBones.Slot RightLegSlot;
+
     public DragonBones.Slot EyeSlot;
     public DragonBones.Slot TopSlot;
     public DragonBones.Slot HeadSlot;
@@ -749,7 +759,7 @@ public class Player : Regist , IPointerClickHandler
             UnityFactory.factory.LoadDragonBonesData(ManaReso.Load<TextAsset>("stand_ske", Folder.Config));
             UnityFactory.factory.LoadDragonBonesData(ManaReso.Load<TextAsset>("Closet_ske", Folder.Config));
 
-            UnityFactory.factory.LoadTextureAtlasData(ManaReso.Load<TextAsset>("stand_tex", Folder.Config), "stand_texture");
+            //UnityFactory.factory.LoadTextureAtlasData(ManaReso.Load<TextAsset>("stand_tex", Folder.Config), "stand_texture");
             UnityFactory.factory.LoadTextureAtlasData(ManaReso.Load<TextAsset>("Closet_tex", Folder.Config), "Closet_texture");
 
             ManaPlayer.Complete = true;
@@ -765,7 +775,6 @@ public class Player : Regist , IPointerClickHandler
 
         UAC.AddEventListener(EventObject.START, OnStart);
 
-
         Eye = "眼睛1";
         Top = "上衣1";
         Shoe = "鞋子1";
@@ -775,6 +784,12 @@ public class Player : Regist , IPointerClickHandler
         Mouse = "嘴巴1";
         HeadWear = "头饰品1";
 
+        NeckSlot = UAC.armature.GetSlot("脖子");
+        LeftHandSlot = UAC.armature.GetSlot("左手");
+        RightHandSlot = UAC.armature.GetSlot("右手");
+        LeftLegSlot = UAC.armature.GetSlot("左腿");
+        RightLegSlot = UAC.armature.GetSlot("右腿");
+
         EyeSlot = UAC.armature.GetSlot("眼睛");
         TopSlot = UAC.armature.GetSlot("上衣");
         HeadSlot = UAC.armature.GetSlot("脑壳");
@@ -785,6 +800,11 @@ public class Player : Regist , IPointerClickHandler
         RightShoeSlot = UAC.armature.GetSlot("鞋子右");
         HeadWearSlot = UAC.armature.GetSlot("头饰品");
 
+        ChangeClose(BodyPart.Leg, "腿2个提供1个", false);
+        ChangeClose(BodyPart.Neck, "脖子", false);
+        ChangeClose(BodyPart.LeftHand, "左手看清左手你的左手!!", false);
+        ChangeClose(BodyPart.RightHand, "右手你的右手!!", false);
+
         ChangeClose(BodyPart.Eye, "眼睛1", false);
         ChangeClose(BodyPart.Top, "上衣1", false);
         ChangeClose(BodyPart.Shoe, "鞋子1", false);
@@ -883,11 +903,14 @@ public class Player : Regist , IPointerClickHandler
         transform.FindChild("Armature").GetChild(tempTra.GetSiblingIndex() + 1).SetLZ(-0.001f);
 
 
-        transform.FindChild("Armature/左腿").SetLZ(0);
-        transform.FindChild("Armature/右腿").SetLZ(0);
+        tempTra = transform.FindChild("Armature/腿2个提供1个");
+        tempTra.SetLZ(0);
+
+        transform.FindChild("Armature").GetChild(tempTra.GetSiblingIndex() + 1).SetLZ(0);
+
         transform.FindChild("Armature/脖子").SetLZ(0.001f);
-        transform.FindChild("Armature/左手").SetLZ(-0.001f);
-        transform.FindChild("Armature/右手").SetLZ(-0.001f);
+        transform.FindChild("Armature/左手看清左手你的左手!!").SetLZ(-0.001f);
+        transform.FindChild("Armature/右手你的右手!!").SetLZ(-0.001f);
     }
 
     public void ChangeClose(BodyPart bodyPart, string armatureName, bool setDepth = true)
@@ -950,6 +973,23 @@ public class Player : Regist , IPointerClickHandler
 
             slotList.Add(HeadWearSlot);
         }
+        else if (bodyPart == BodyPart.Leg)
+        {
+            slotList.Add(LeftLegSlot);
+            slotList.Add(RightLegSlot);
+        }
+        else if (bodyPart == BodyPart.LeftHand)
+        {
+            slotList.Add(LeftHandSlot);
+        }
+        else if (bodyPart == BodyPart.RightHand)
+        {
+            slotList.Add(RightHandSlot);
+        }
+        else if (bodyPart == BodyPart.Neck)
+        {
+            slotList.Add(NeckSlot);
+        }
         else
         {
             throw new Exception();

+ 3 - 3
ProjectSettings/GraphicsSettings.asset

@@ -43,13 +43,13 @@ GraphicsSettings:
     type: 0}
   m_TierSettings_Tier1:
     renderingPath: 1
-    useCascadedShadowMaps: 0
+    useCascadedShadowMaps: 1
   m_TierSettings_Tier2:
     renderingPath: 1
-    useCascadedShadowMaps: 0
+    useCascadedShadowMaps: 1
   m_TierSettings_Tier3:
     renderingPath: 1
-    useCascadedShadowMaps: 0
+    useCascadedShadowMaps: 1
   m_DefaultRenderingPath: 1
   m_DefaultMobileRenderingPath: 1
   m_TierSettings: []

Some files were not shown because too many files changed in this diff