DESKTOP-FB72PO8\Administrator před 5 měsíci
rodič
revize
e3149432f4
41 změnil soubory, kde provedl 699 přidání a 3 odebrání
  1. 8 0
      Assets/Scripts/Core/DownloadFile.meta
  2. 30 0
      Assets/Scripts/Core/DownloadFile/WXDownload.cs
  3. 11 0
      Assets/Scripts/Core/DownloadFile/WXDownload.cs.meta
  4. 8 0
      Assets/Scripts/Core/Editor/ParticleEffectForUGUI.meta
  5. 123 0
      Assets/Scripts/Core/Editor/ParticleEffectForUGUI/AnimatedPropertiesEditor.cs
  6. 11 0
      Assets/Scripts/Core/Editor/ParticleEffectForUGUI/AnimatedPropertiesEditor.cs.meta
  7. 79 0
      Assets/Scripts/Core/Editor/ParticleEffectForUGUI/ImportSampleMenu.cs
  8. 11 0
      Assets/Scripts/Core/Editor/ParticleEffectForUGUI/ImportSampleMenu.cs.meta
  9. 286 0
      Assets/Scripts/Core/Editor/ParticleEffectForUGUI/UIParticleEditor.cs
  10. 11 0
      Assets/Scripts/Core/Editor/ParticleEffectForUGUI/UIParticleEditor.cs.meta
  11. 46 0
      Assets/Scripts/Core/Editor/ParticleEffectForUGUI/UIParticleMenu.cs
  12. 11 0
      Assets/Scripts/Core/Editor/ParticleEffectForUGUI/UIParticleMenu.cs.meta
  13. 2 1
      Assets/Scripts/Core/Fort23.Core.asmdef
  14. 0 0
      Assets/Scripts/Core/UI/UTool/ParticleEffectForUGUI.meta
  15. 0 0
      Assets/Scripts/Core/UI/UTool/ParticleEffectForUGUI/Scripts.meta
  16. 0 0
      Assets/Scripts/Core/UI/UTool/ParticleEffectForUGUI/Scripts/AnimatableProperty.cs
  17. 0 0
      Assets/Scripts/Core/UI/UTool/ParticleEffectForUGUI/Scripts/AnimatableProperty.cs.meta
  18. 0 0
      Assets/Scripts/Core/UI/UTool/ParticleEffectForUGUI/Scripts/BakingCamera.cs
  19. 0 0
      Assets/Scripts/Core/UI/UTool/ParticleEffectForUGUI/Scripts/BakingCamera.cs.meta
  20. 0 0
      Assets/Scripts/Core/UI/UTool/ParticleEffectForUGUI/Scripts/CombineInstanceEx.cs
  21. 0 0
      Assets/Scripts/Core/UI/UTool/ParticleEffectForUGUI/Scripts/CombineInstanceEx.cs.meta
  22. 0 0
      Assets/Scripts/Core/UI/UTool/ParticleEffectForUGUI/Scripts/MeshHelper.cs
  23. 0 0
      Assets/Scripts/Core/UI/UTool/ParticleEffectForUGUI/Scripts/MeshHelper.cs.meta
  24. 0 0
      Assets/Scripts/Core/UI/UTool/ParticleEffectForUGUI/Scripts/ModifiedMaterial.cs
  25. 0 0
      Assets/Scripts/Core/UI/UTool/ParticleEffectForUGUI/Scripts/ModifiedMaterial.cs.meta
  26. 1 1
      Assets/Scripts/Core/UI/UTool/ParticleEffectForUGUI/Scripts/UIParticle.cs
  27. 0 0
      Assets/Scripts/Core/UI/UTool/ParticleEffectForUGUI/Scripts/UIParticle.cs.meta
  28. 0 0
      Assets/Scripts/Core/UI/UTool/ParticleEffectForUGUI/Scripts/UIParticleUpdater.cs
  29. 0 0
      Assets/Scripts/Core/UI/UTool/ParticleEffectForUGUI/Scripts/UIParticleUpdater.cs.meta
  30. 0 0
      Assets/Scripts/Core/UI/UTool/ParticleEffectForUGUI/Scripts/Utils.cs
  31. 0 0
      Assets/Scripts/Core/UI/UTool/ParticleEffectForUGUI/Scripts/Utils.cs.meta
  32. 0 0
      Assets/Scripts/Core/UI/UTool/ParticleEffectForUGUI/说明.txt
  33. 0 0
      Assets/Scripts/Core/UI/UTool/ParticleEffectForUGUI/说明.txt.meta
  34. 2 0
      Assets/Scripts/GameLogic/Combat/CombatTool/CombatCameraControllder.cs
  35. 8 0
      Assets/Scripts/GameLogic/Combat/Hero/CombatHeroEntity.cs
  36. 2 1
      Assets/Scripts/GameUI/Fort23.Mono.asmdef
  37. 2 0
      Assets/Scripts/GameUI/GameApplction.cs
  38. 3 0
      Assets/Scripts/GameUI/UI/UpdateAsset.meta
  39. 41 0
      Assets/Scripts/GameUI/UI/UpdateAsset/GameUpdateAsset.cs
  40. 3 0
      Assets/Scripts/GameUI/UI/UpdateAsset/GameUpdateAsset.cs.meta
  41. 0 0
      Assets/StreamingAssets/assetConfig.txt

+ 8 - 0
Assets/Scripts/Core/DownloadFile.meta

@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: W31K5HysUHk01N37r9L23iPGo/kQiYByIgvNms7zeIgDkqR3t7IlgQ0=
+folderAsset: yes
+DefaultImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 30 - 0
Assets/Scripts/Core/DownloadFile/WXDownload.cs

@@ -0,0 +1,30 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+using Utility;
+using WeChatWASM;
+
+public class WXDownload : Singleton<WXDownload>
+{
+    public void DownLoad(string url, string fileName, System.Action<bool> finish)
+    {
+        DownloadFileOption fileOption = new DownloadFileOption();
+        fileOption.url = url;
+        fileOption.filePath = WX.PluginCachePath + "/" + fileName;
+        fileOption.fail = delegate(GeneralCallbackResult result)
+        {
+            Debug.LogError(url + "下载失败" + result.errMsg);
+            finish?.Invoke(false);
+        };
+        fileOption.success = delegate(DownloadFileSuccessCallbackResult result)
+        {
+            finish?.Invoke(true);
+            // Debug.Log(url + "下载成功");
+        };
+        WX.DownloadFile(fileOption);
+    }
+    public string GetCachePath(string url)
+    { 
+        return WX.GetCachePath(url);
+    }
+}

+ 11 - 0
Assets/Scripts/Core/DownloadFile/WXDownload.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: BntJ4yilU38Ms/SL/WMeLKokkqvjf38Q1Pw7ARXmaGldoAtSi3B18Jo=
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 8 - 0
Assets/Scripts/Core/Editor/ParticleEffectForUGUI.meta

@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: Bnkc5iykAi3NTkBz0GC4WUwG3lALmqiyXrH+OSI18m+9CxlE/1XoeoI=
+folderAsset: yes
+DefaultImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 123 - 0
Assets/Scripts/Core/Editor/ParticleEffectForUGUI/AnimatedPropertiesEditor.cs

@@ -0,0 +1,123 @@
+using UnityEditor;
+using UnityEngine;
+using System.Collections.Generic;
+using System.Linq;
+using ShaderPropertyType = Coffee.UIExtensions.AnimatableProperty.ShaderPropertyType;
+
+namespace Coffee.UIExtensions
+{
+    internal class AnimatedPropertiesEditor
+    {
+        private static readonly List<string> s_ActiveNames = new List<string>();
+        private static readonly System.Text.StringBuilder s_Sb = new System.Text.StringBuilder();
+        private static readonly HashSet<string> s_Names = new HashSet<string>();
+
+        private string _name;
+        private ShaderPropertyType _type;
+
+        static string CollectActiveNames(SerializedProperty sp, List<string> result)
+        {
+            result.Clear();
+            for (var i = 0; i < sp.arraySize; i++)
+            {
+                var spName = sp.GetArrayElementAtIndex(i).FindPropertyRelative("m_Name");
+                if (spName == null) continue;
+
+                result.Add(spName.stringValue);
+            }
+
+            s_Sb.Length = 0;
+            if (result.Count == 0)
+            {
+                s_Sb.Append("Nothing");
+            }
+            else
+            {
+                result.Aggregate(s_Sb, (a, b) => s_Sb.AppendFormat("{0}, ", b));
+                s_Sb.Length -= 2;
+            }
+
+            return s_Sb.ToString();
+        }
+
+        public static void DrawAnimatableProperties(SerializedProperty sp, Material[] mats)
+        {
+            bool isClicked;
+            using (new EditorGUILayout.HorizontalScope(GUILayout.ExpandWidth(false)))
+            {
+                var r = EditorGUI.PrefixLabel(EditorGUILayout.GetControlRect(true), new GUIContent(sp.displayName, sp.tooltip));
+                var text = sp.hasMultipleDifferentValues ? "-" : CollectActiveNames(sp, s_ActiveNames);
+                isClicked = GUI.Button(r, text, EditorStyles.popup);
+            }
+
+            if (!isClicked) return;
+
+            var gm = new GenericMenu();
+            gm.AddItem(new GUIContent("Nothing"), s_ActiveNames.Count == 0, () =>
+            {
+                sp.ClearArray();
+                sp.serializedObject.ApplyModifiedProperties();
+            });
+
+
+            if (!sp.hasMultipleDifferentValues)
+            {
+                for (var i = 0; i < sp.arraySize; i++)
+                {
+                    var p = sp.GetArrayElementAtIndex(i);
+                    var name = p.FindPropertyRelative("m_Name").stringValue;
+                    var type = (ShaderPropertyType) p.FindPropertyRelative("m_Type").intValue;
+                    AddMenu(gm, sp, new AnimatedPropertiesEditor {_name = name, _type = type}, false);
+                }
+            }
+
+            s_Names.Clear();
+            foreach (var mat in mats)
+            {
+                if (!mat || !mat.shader) continue;
+
+                for (var i = 0; i < ShaderUtil.GetPropertyCount(mat.shader); i++)
+                {
+                    var pName = ShaderUtil.GetPropertyName(mat.shader, i);
+                    var type = (ShaderPropertyType) ShaderUtil.GetPropertyType(mat.shader, i);
+                    var name = string.Format("{0} ({1})", pName, type);
+                    if (s_Names.Contains(name)) continue;
+                    s_Names.Add(name);
+
+                    AddMenu(gm, sp, new AnimatedPropertiesEditor {_name = pName, _type = type}, true);
+
+                    if (type != ShaderPropertyType.Texture) continue;
+
+                    AddMenu(gm, sp, new AnimatedPropertiesEditor {_name = pName + "_ST", _type = ShaderPropertyType.Vector}, true);
+                    AddMenu(gm, sp, new AnimatedPropertiesEditor {_name = pName + "_HDR", _type = ShaderPropertyType.Vector}, true);
+                    AddMenu(gm, sp, new AnimatedPropertiesEditor {_name = pName + "_TexelSize", _type = ShaderPropertyType.Vector}, true);
+                }
+            }
+
+            gm.ShowAsContext();
+        }
+
+        private static void AddMenu(GenericMenu menu, SerializedProperty sp, AnimatedPropertiesEditor property, bool add)
+        {
+            if (add && s_ActiveNames.Contains(property._name)) return;
+
+            menu.AddItem(new GUIContent(string.Format("{0} ({1})", property._name, property._type)), s_ActiveNames.Contains(property._name), () =>
+            {
+                var index = s_ActiveNames.IndexOf(property._name);
+                if (0 <= index)
+                {
+                    sp.DeleteArrayElementAtIndex(index);
+                }
+                else
+                {
+                    sp.InsertArrayElementAtIndex(sp.arraySize);
+                    var p = sp.GetArrayElementAtIndex(sp.arraySize - 1);
+                    p.FindPropertyRelative("m_Name").stringValue = property._name;
+                    p.FindPropertyRelative("m_Type").intValue = (int) property._type;
+                }
+
+                sp.serializedObject.ApplyModifiedProperties();
+            });
+        }
+    }
+}

+ 11 - 0
Assets/Scripts/Core/Editor/ParticleEffectForUGUI/AnimatedPropertiesEditor.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 7a8b36ea907d81943b778f35d06f4c5b
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 79 - 0
Assets/Scripts/Core/Editor/ParticleEffectForUGUI/ImportSampleMenu.cs

@@ -0,0 +1,79 @@
+#if !UNITY_2019_1_OR_NEWER
+using System.IO;
+using System.Linq;
+using System.Text.RegularExpressions;
+using UnityEditor;
+
+namespace Coffee.UIExtensions
+{
+    internal static class ImportSampleMenu_UIParticle
+    {
+        private const string k_DisplayName = "UI Particle";
+        private const string k_JsonGuid = "823dc693d087a4b559c7e1547274cc7d";
+
+        [MenuItem("Assets/Samples/" + k_DisplayName + "/Demo")]
+        private static void ImportSample()
+        {
+            ImportSample(k_JsonGuid, "Demo");
+        }
+
+        [MenuItem("Assets/Samples/" + k_DisplayName + "/Cartoon FX & War FX Demo")]
+        private static void ImportSample_CFX()
+        {
+            ImportSample(k_JsonGuid, "Cartoon FX & War FX Demo");
+        }
+
+        private static void ImportSample(string jsonGuid, string sampleName)
+        {
+            var jsonPath = AssetDatabase.GUIDToAssetPath(jsonGuid);
+            var packageRoot = Path.GetDirectoryName(jsonPath).Replace('\\', '/');
+            var json = File.ReadAllText(jsonPath);
+            var version = Regex.Match(json, "\"version\"\\s*:\\s*\"([^\"]+)\"").Groups[1].Value;
+            var src = string.Format("{0}/Samples~/{1}", packageRoot, sampleName);
+            var dst = string.Format("Assets/Samples/{0}/{1}/{2}", k_DisplayName, version, sampleName);
+            var previousPath = GetPreviousSamplePath(k_DisplayName, sampleName);
+
+            // Remove the previous sample directory.
+            if (!string.IsNullOrEmpty(previousPath))
+            {
+                var msg = "A different version of the sample is already imported at\n\n"
+                          + previousPath
+                          + "\n\nIt will be deleted when you update. Are you sure you want to continue?";
+                if (!EditorUtility.DisplayDialog("Sample Importer", msg, "OK", "Cancel"))
+                    return;
+
+                FileUtil.DeleteFileOrDirectory(previousPath);
+
+                var metaFile = previousPath + ".meta";
+                if (File.Exists(metaFile))
+                    FileUtil.DeleteFileOrDirectory(metaFile);
+            }
+
+            if (!Directory.Exists(dst))
+                FileUtil.DeleteFileOrDirectory(dst);
+
+            var dstDir = Path.GetDirectoryName(dst);
+            if (!Directory.Exists(dstDir))
+                Directory.CreateDirectory(dstDir);
+
+            if (Directory.Exists(src))
+                FileUtil.CopyFileOrDirectory(src, dst);
+            else
+                throw new DirectoryNotFoundException(src);
+
+            AssetDatabase.Refresh(ImportAssetOptions.ImportRecursive);
+        }
+
+        private static string GetPreviousSamplePath(string displayName, string sampleName)
+        {
+            var sampleRoot = string.Format("Assets/Samples/{0}", displayName);
+            var sampleRootInfo = new DirectoryInfo(sampleRoot);
+            if (!sampleRootInfo.Exists) return null;
+
+            return sampleRootInfo.GetDirectories()
+                .Select(versionDir => Path.Combine(versionDir.SplitToString(), sampleName))
+                .FirstOrDefault(Directory.Exists);
+        }
+    }
+}
+#endif

+ 11 - 0
Assets/Scripts/Core/Editor/ParticleEffectForUGUI/ImportSampleMenu.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: cac988294bbb82c4a867e953e0faa51a
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 286 - 0
Assets/Scripts/Core/Editor/ParticleEffectForUGUI/UIParticleEditor.cs

@@ -0,0 +1,286 @@
+using UnityEditor;
+using UnityEditor.UI;
+using UnityEngine;
+using System.Collections.Generic;
+using System.Linq;
+using UnityEditorInternal;
+using UnityEngine.UI;
+
+namespace Coffee.UIExtensions
+{
+    [CustomEditor(typeof(UIParticle))]
+    [CanEditMultipleObjects]
+    internal class UIParticleEditor : GraphicEditor
+    {
+        //################################
+        // Constant or Static Members.
+        //################################
+        private static readonly GUIContent s_ContentRenderingOrder = new GUIContent("Rendering Order");
+        private static readonly GUIContent s_ContentRefresh = new GUIContent("Refresh");
+        private static readonly GUIContent s_ContentFix = new GUIContent("Fix");
+        private static readonly GUIContent s_ContentMaterial = new GUIContent("Material");
+        private static readonly GUIContent s_ContentTrailMaterial = new GUIContent("Trail Material");
+        private static readonly GUIContent s_Content3D = new GUIContent("3D");
+        private static readonly GUIContent s_ContentScale = new GUIContent("Scale");
+
+        private SerializedProperty _spMaskable;
+        private SerializedProperty _spScale;
+        private SerializedProperty _spIgnoreCanvasScaler;
+        private SerializedProperty _spAnimatableProperties;
+        private SerializedProperty _spShrinkByMaterial;
+
+        private ReorderableList _ro;
+        private bool _xyzMode;
+        private bool _showMaterials;
+
+        private static readonly List<string> s_MaskablePropertyNames = new List<string>
+        {
+            "_Stencil",
+            "_StencilComp",
+            "_StencilOp",
+            "_StencilWriteMask",
+            "_StencilReadMask",
+            "_ColorMask",
+        };
+
+
+        //################################
+        // Public/Protected Members.
+        //################################
+        /// <summary>
+        /// This function is called when the object becomes enabled and active.
+        /// </summary>
+        protected override void OnEnable()
+        {
+            base.OnEnable();
+            _spMaskable = serializedObject.FindProperty("m_Maskable");
+            _spScale = serializedObject.FindProperty("m_Scale3D");
+            _spIgnoreCanvasScaler = serializedObject.FindProperty("m_IgnoreCanvasScaler");
+            _spAnimatableProperties = serializedObject.FindProperty("m_AnimatableProperties");
+            _spShrinkByMaterial = serializedObject.FindProperty("m_ShrinkByMaterial");
+            _showMaterials = EditorPrefs.GetBool("Coffee.UIExtensions.UIParticleEditor._showMaterials", true);
+
+            var sp = serializedObject.FindProperty("m_Particles");
+            _ro = new ReorderableList(sp.serializedObject, sp, true, true, true, true);
+            _ro.elementHeight = EditorGUIUtility.singleLineHeight * 3 + 4;
+            _ro.elementHeightCallback = _ => _showMaterials
+                ? 3 * (EditorGUIUtility.singleLineHeight + 2)
+                : EditorGUIUtility.singleLineHeight + 2;
+            _ro.drawElementCallback = (rect, index, active, focused) =>
+            {
+                EditorGUI.BeginDisabledGroup(sp.hasMultipleDifferentValues);
+                rect.y += 1;
+                rect.height = EditorGUIUtility.singleLineHeight;
+                var p = sp.GetArrayElementAtIndex(index);
+                EditorGUI.ObjectField(rect, p, GUIContent.none);
+                if (!_showMaterials) return;
+
+                rect.x += 15;
+                rect.width -= 15;
+                var ps = p.objectReferenceValue as ParticleSystem;
+                var materials = ps
+                    ? new SerializedObject(ps.GetComponent<ParticleSystemRenderer>()).FindProperty("m_Materials")
+                    : null;
+                rect.y += rect.height + 1;
+                MaterialField(rect, s_ContentMaterial, materials, 0);
+                rect.y += rect.height + 1;
+                MaterialField(rect, s_ContentTrailMaterial, materials, 1);
+                EditorGUI.EndDisabledGroup();
+                if (materials != null)
+                {
+                    materials.serializedObject.ApplyModifiedProperties();
+                }
+            };
+            _ro.drawHeaderCallback += rect =>
+            {
+#if !UNITY_2019_3_OR_NEWER
+                rect.y -= 1;
+#endif
+                EditorGUI.LabelField(new Rect(rect.x, rect.y, 150, rect.height), s_ContentRenderingOrder);
+
+                var content = EditorGUIUtility.IconContent(_showMaterials ? "VisibilityOn" : "VisibilityOff");
+                _showMaterials = GUI.Toggle(new Rect(rect.width - 55, rect.y, 24, 20), _showMaterials, content, EditorStyles.label);
+
+                if (GUI.Button(new Rect(rect.width - 35, rect.y, 60, rect.height), s_ContentRefresh, EditorStyles.miniButton))
+                {
+                    foreach (UIParticle t in targets)
+                    {
+                        t.RefreshParticles();
+                    }
+                }
+            };
+        }
+
+        private static void MaterialField(Rect rect, GUIContent label, SerializedProperty sp, int index)
+        {
+            if (sp == null || sp.arraySize <= index)
+            {
+                EditorGUI.BeginDisabledGroup(true);
+                EditorGUI.ObjectField(rect, label, null, typeof(Material), true);
+                EditorGUI.EndDisabledGroup();
+            }
+            else
+            {
+                EditorGUI.PropertyField(rect, sp.GetArrayElementAtIndex(index), label);
+            }
+        }
+
+        /// <summary>
+        /// Implement this function to make a custom inspector.
+        /// </summary>
+        public override void OnInspectorGUI()
+        {
+            var current = target as UIParticle;
+            if (current == null) return;
+
+            serializedObject.Update();
+
+            // Maskable
+            EditorGUILayout.PropertyField(_spMaskable);
+
+            // IgnoreCanvasScaler
+            using (var ccs = new EditorGUI.ChangeCheckScope())
+            {
+                EditorGUILayout.PropertyField(_spIgnoreCanvasScaler);
+                if (ccs.changed)
+                {
+                    foreach (UIParticle p in targets)
+                    {
+                        p.ignoreCanvasScaler = _spIgnoreCanvasScaler.boolValue;
+                    }
+                }
+            }
+
+            // Scale
+            _xyzMode = DrawFloatOrVector3Field(_spScale, _xyzMode);
+
+            // AnimatableProperties
+            var mats = current.particles
+                .Where(x => x)
+                .Select(x => x.GetComponent<ParticleSystemRenderer>().sharedMaterial)
+                .Where(x => x)
+                .ToArray();
+
+            // Animated properties
+            EditorGUI.BeginChangeCheck();
+            AnimatedPropertiesEditor.DrawAnimatableProperties(_spAnimatableProperties, mats);
+            if (EditorGUI.EndChangeCheck())
+            {
+                foreach (UIParticle t in targets)
+                    t.SetMaterialDirty();
+            }
+
+            // ShrinkByMaterial
+            EditorGUILayout.PropertyField(_spShrinkByMaterial);
+
+            // Target ParticleSystems.
+            _ro.DoLayoutList();
+
+            serializedObject.ApplyModifiedProperties();
+
+            // Does the shader support UI masks?
+            if (current.maskable && current.GetComponentInParent<Mask>())
+            {
+                foreach (var mat in current.materials)
+                {
+                    if (!mat || !mat.shader) continue;
+                    var shader = mat.shader;
+                    foreach (var propName in s_MaskablePropertyNames)
+                    {
+                        if (mat.HasProperty(propName)) continue;
+
+                        EditorGUILayout.HelpBox(string.Format("Shader '{0}' doesn't have '{1}' property. This graphic cannot be masked.", shader.name, propName), MessageType.Warning);
+                        break;
+                    }
+                }
+            }
+
+            // Does the shader support UI masks?
+
+            if (FixButton(current.m_IsTrail, "This UIParticle component should be removed. The UIParticle for trails is no longer needed."))
+            {
+                DestroyUIParticle(current);
+                return;
+            }
+        }
+
+        void DestroyUIParticle(UIParticle p, bool ignoreCurrent = false)
+        {
+            if (!p || ignoreCurrent && target == p) return;
+
+            var cr = p.canvasRenderer;
+            DestroyImmediate(p);
+            DestroyImmediate(cr);
+
+// #if UNITY_2018_3_OR_NEWER
+//             var stage = UnityEditor.SceneManagement.PrefabStageUtility.GetCurrentPrefabStage();
+//             if (stage != null && stage.scene.isLoaded)
+//             {
+// #if UNITY_2020_1_OR_NEWER
+//                 string prefabAssetPath = stage.assetPath;
+// #else
+//                 string prefabAssetPath = stage.prefabAssetPath;
+// #endif
+//                 PrefabUtility.SaveAsPrefabAsset(stage.prefabContentsRoot, prefabAssetPath);
+//             }
+// #endif
+        }
+
+        bool FixButton(bool show, string text)
+        {
+            if (!show) return false;
+            using (new EditorGUILayout.HorizontalScope(GUILayout.ExpandWidth(true)))
+            {
+                EditorGUILayout.HelpBox(text, MessageType.Warning, true);
+                using (new EditorGUILayout.VerticalScope())
+                {
+                    return GUILayout.Button(s_ContentFix, GUILayout.Width(30));
+                }
+            }
+        }
+
+        private static bool DrawFloatOrVector3Field(SerializedProperty sp, bool showXyz)
+        {
+            var x = sp.FindPropertyRelative("x");
+            var y = sp.FindPropertyRelative("y");
+            var z = sp.FindPropertyRelative("z");
+
+            showXyz |= !Mathf.Approximately(x.floatValue, y.floatValue) ||
+                       !Mathf.Approximately(y.floatValue, z.floatValue) ||
+                       y.hasMultipleDifferentValues ||
+                       z.hasMultipleDifferentValues;
+
+            EditorGUILayout.BeginHorizontal();
+            if (showXyz)
+            {
+                EditorGUI.BeginChangeCheck();
+                EditorGUILayout.PropertyField(sp);
+                if (EditorGUI.EndChangeCheck())
+                {
+                    x.floatValue = Mathf.Max(0.001f, x.floatValue);
+                    y.floatValue = Mathf.Max(0.001f, y.floatValue);
+                    z.floatValue = Mathf.Max(0.001f, z.floatValue);
+                }
+            }
+            else
+            {
+                EditorGUI.BeginChangeCheck();
+                EditorGUILayout.PropertyField(x, s_ContentScale);
+                if (EditorGUI.EndChangeCheck())
+                {
+                    x.floatValue = Mathf.Max(0.001f, x.floatValue);
+                    y.floatValue = Mathf.Max(0.001f, x.floatValue);
+                    z.floatValue = Mathf.Max(0.001f, x.floatValue);
+                }
+            }
+
+            EditorGUI.BeginChangeCheck();
+            showXyz = GUILayout.Toggle(showXyz, s_Content3D, EditorStyles.miniButton, GUILayout.Width(30));
+            if (EditorGUI.EndChangeCheck() && !showXyz)
+                z.floatValue = y.floatValue = x.floatValue;
+            EditorGUILayout.EndHorizontal();
+
+            return showXyz;
+        }
+    }
+}

+ 11 - 0
Assets/Scripts/Core/Editor/ParticleEffectForUGUI/UIParticleEditor.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: a198feb89b0ae4d47aa0d4e2e59cbbee
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 46 - 0
Assets/Scripts/Core/Editor/ParticleEffectForUGUI/UIParticleMenu.cs

@@ -0,0 +1,46 @@
+using UnityEditor;
+using UnityEngine;
+using UnityEngine.UI;
+
+namespace Coffee.UIExtensions
+{
+    internal class UIParticleMenu
+    {
+        [MenuItem("GameObject/UI/Particle System (Empty)", false, 2018)]
+        private static void AddParticleEmpty(MenuCommand menuCommand)
+        {
+            // Create empty UI element.
+            EditorApplication.ExecuteMenuItem("GameObject/UI/Image");
+            var ui = Selection.activeGameObject;
+            Object.DestroyImmediate(ui.GetComponent<Image>());
+
+            // Add UIParticle.
+            var uiParticle = ui.AddComponent<UIParticle>();
+            uiParticle.name = "UIParticle";
+            uiParticle.scale = 10;
+            uiParticle.rectTransform.sizeDelta = Vector2.zero;
+        }
+
+        [MenuItem("GameObject/UI/Particle System", false, 2019)]
+        private static void AddParticle(MenuCommand menuCommand)
+        {
+            // Create empty UIEffect.
+            AddParticleEmpty(menuCommand);
+            var uiParticle = Selection.activeGameObject.GetComponent<UIParticle>();
+
+            // Create ParticleSystem.
+            EditorApplication.ExecuteMenuItem("GameObject/Effects/Particle System");
+            var ps = Selection.activeGameObject;
+            ps.transform.SetParent(uiParticle.transform, false);
+            ps.transform.localPosition = Vector3.zero;
+
+            // Assign default material.
+            var renderer = ps.GetComponent<ParticleSystemRenderer>();
+            var defaultMat = AssetDatabase.GetBuiltinExtraResource<Material>("Default-Particle.mat");
+            renderer.material = defaultMat ? defaultMat : renderer.material;
+
+            // Refresh particles.
+            uiParticle.RefreshParticles();
+        }
+    }
+}

+ 11 - 0
Assets/Scripts/Core/Editor/ParticleEffectForUGUI/UIParticleMenu.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 347cafd6db4cd8c4996c9fd3fba18f6c
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 2 - 1
Assets/Scripts/Core/Fort23.Core.asmdef

@@ -8,7 +8,8 @@
         "GUID:15fc0a57446b3144c949da3e2b9737a9",
         "GUID:4c25c05f410a3a447a75c3b0909152ef",
         "GUID:fdb14afa911c65e4982db867bfd7afce",
-        "GUID:d8b63aba1907145bea998dd612889d6b"
+        "GUID:d8b63aba1907145bea998dd612889d6b",
+        "GUID:5efd170ecd8084500bed5692932fe14e"
     ],
     "includePlatforms": [],
     "excludePlatforms": [],

+ 0 - 0
Assets/Scripts/ThirdParty/ParticleEffectForUGUI.meta → Assets/Scripts/Core/UI/UTool/ParticleEffectForUGUI.meta


+ 0 - 0
Assets/Scripts/ThirdParty/ParticleEffectForUGUI/Scripts.meta → Assets/Scripts/Core/UI/UTool/ParticleEffectForUGUI/Scripts.meta


+ 0 - 0
Assets/Scripts/ThirdParty/ParticleEffectForUGUI/Scripts/AnimatableProperty.cs → Assets/Scripts/Core/UI/UTool/ParticleEffectForUGUI/Scripts/AnimatableProperty.cs


+ 0 - 0
Assets/Scripts/ThirdParty/ParticleEffectForUGUI/Scripts/AnimatableProperty.cs.meta → Assets/Scripts/Core/UI/UTool/ParticleEffectForUGUI/Scripts/AnimatableProperty.cs.meta


+ 0 - 0
Assets/Scripts/ThirdParty/ParticleEffectForUGUI/Scripts/BakingCamera.cs → Assets/Scripts/Core/UI/UTool/ParticleEffectForUGUI/Scripts/BakingCamera.cs


+ 0 - 0
Assets/Scripts/ThirdParty/ParticleEffectForUGUI/Scripts/BakingCamera.cs.meta → Assets/Scripts/Core/UI/UTool/ParticleEffectForUGUI/Scripts/BakingCamera.cs.meta


+ 0 - 0
Assets/Scripts/ThirdParty/ParticleEffectForUGUI/Scripts/CombineInstanceEx.cs → Assets/Scripts/Core/UI/UTool/ParticleEffectForUGUI/Scripts/CombineInstanceEx.cs


+ 0 - 0
Assets/Scripts/ThirdParty/ParticleEffectForUGUI/Scripts/CombineInstanceEx.cs.meta → Assets/Scripts/Core/UI/UTool/ParticleEffectForUGUI/Scripts/CombineInstanceEx.cs.meta


+ 0 - 0
Assets/Scripts/ThirdParty/ParticleEffectForUGUI/Scripts/MeshHelper.cs → Assets/Scripts/Core/UI/UTool/ParticleEffectForUGUI/Scripts/MeshHelper.cs


+ 0 - 0
Assets/Scripts/ThirdParty/ParticleEffectForUGUI/Scripts/MeshHelper.cs.meta → Assets/Scripts/Core/UI/UTool/ParticleEffectForUGUI/Scripts/MeshHelper.cs.meta


+ 0 - 0
Assets/Scripts/ThirdParty/ParticleEffectForUGUI/Scripts/ModifiedMaterial.cs → Assets/Scripts/Core/UI/UTool/ParticleEffectForUGUI/Scripts/ModifiedMaterial.cs


+ 0 - 0
Assets/Scripts/ThirdParty/ParticleEffectForUGUI/Scripts/ModifiedMaterial.cs.meta → Assets/Scripts/Core/UI/UTool/ParticleEffectForUGUI/Scripts/ModifiedMaterial.cs.meta


+ 1 - 1
Assets/Scripts/ThirdParty/ParticleEffectForUGUI/Scripts/UIParticle.cs → Assets/Scripts/Core/UI/UTool/ParticleEffectForUGUI/Scripts/UIParticle.cs

@@ -25,7 +25,7 @@ namespace Coffee.UIExtensions
         , ISerializationCallbackReceiver
 #endif
     {
-        [HideInInspector] [SerializeField] internal bool m_IsTrail = false;
+        [HideInInspector] [SerializeField] public bool m_IsTrail = false;
 
         [Tooltip("Ignore canvas scaler")] [SerializeField] [FormerlySerializedAs("m_IgnoreParent")]
         bool m_IgnoreCanvasScaler = true;

+ 0 - 0
Assets/Scripts/ThirdParty/ParticleEffectForUGUI/Scripts/UIParticle.cs.meta → Assets/Scripts/Core/UI/UTool/ParticleEffectForUGUI/Scripts/UIParticle.cs.meta


+ 0 - 0
Assets/Scripts/ThirdParty/ParticleEffectForUGUI/Scripts/UIParticleUpdater.cs → Assets/Scripts/Core/UI/UTool/ParticleEffectForUGUI/Scripts/UIParticleUpdater.cs


+ 0 - 0
Assets/Scripts/ThirdParty/ParticleEffectForUGUI/Scripts/UIParticleUpdater.cs.meta → Assets/Scripts/Core/UI/UTool/ParticleEffectForUGUI/Scripts/UIParticleUpdater.cs.meta


+ 0 - 0
Assets/Scripts/ThirdParty/ParticleEffectForUGUI/Scripts/Utils.cs → Assets/Scripts/Core/UI/UTool/ParticleEffectForUGUI/Scripts/Utils.cs


+ 0 - 0
Assets/Scripts/ThirdParty/ParticleEffectForUGUI/Scripts/Utils.cs.meta → Assets/Scripts/Core/UI/UTool/ParticleEffectForUGUI/Scripts/Utils.cs.meta


+ 0 - 0
Assets/Scripts/ThirdParty/ParticleEffectForUGUI/说明.txt → Assets/Scripts/Core/UI/UTool/ParticleEffectForUGUI/说明.txt


+ 0 - 0
Assets/Scripts/ThirdParty/ParticleEffectForUGUI/说明.txt.meta → Assets/Scripts/Core/UI/UTool/ParticleEffectForUGUI/说明.txt.meta


+ 2 - 0
Assets/Scripts/GameLogic/Combat/CombatTool/CombatCameraControllder.cs

@@ -43,6 +43,8 @@ namespace GameLogic.Combat.CombatTool
             {
                 _followHeroId = heroId;
             }
+            
+            
         }
 
         private void ShakeFinish()

+ 8 - 0
Assets/Scripts/GameLogic/Combat/Hero/CombatHeroEntity.cs

@@ -81,6 +81,13 @@ public class CombatHeroEntity : ITimeLineSpecialDotPos, ILifeCycle, ITimeLineAni
             return null;
         }
 
+        if (!IsEnemy)
+        {
+            GameObjectPool fx_hero_quan =
+                await GObjectPool.Instance.FetchAsync<GameObjectPool>("fx_hero_quan.prefab", null);
+            fx_hero_quan.own.transform.SetParent(poolInterface.own.transform);
+        }
+
         poolInterface.own.SetActive(false);
         AssetHandle assetHandle =
             await AssetBundleLoadManager.Instance.LoadAssetAsyncTask<TextAsset>(combatHeroInfo.modelName + "_TD.txt");
@@ -148,6 +155,7 @@ public class CombatHeroEntity : ITimeLineSpecialDotPos, ILifeCycle, ITimeLineAni
         {
             CombatAIBasic.Update(t);
         }
+
         CombatHeroSkillControl.Update(t);
         combatHeroTimeLineControl.Update(t);
         combatHeroAnimtion.Update(t);

+ 2 - 1
Assets/Scripts/GameUI/Fort23.Mono.asmdef

@@ -10,7 +10,8 @@
         "GUID:e09883e1c1f18b041993504f371ffac6",
         "GUID:fa5baf2c58faab54689c976e76104564",
         "GUID:6055be8ebefd69e48b49212b09b47b2f",
-        "GUID:a53833a977d49cb4993f5eabd5a75200"
+        "GUID:a53833a977d49cb4993f5eabd5a75200",
+        "GUID:5efd170ecd8084500bed5692932fe14e"
     ],
     "includePlatforms": [],
     "excludePlatforms": [],

+ 2 - 0
Assets/Scripts/GameUI/GameApplction.cs

@@ -2,6 +2,7 @@ using Core.AssetLoadTool.Asset;
 using Core.Language;
 using Fort23.Core;
 using Fort23.Mono;
+using Fort23.Mono.UpdateAsset;
 using Fort23.UTool;
 using GameLogic.Combat;
 using GameLogic.Combat.CombatTool;
@@ -31,6 +32,7 @@ public class GameApplction : IGameStart
     public async void StartGame(LoadType LoadType, string h5Url, GameStartUIPanel gameStartUIPanel,
         System.Action LoadFinish)
     {
+        GameUpdateAsset.Instance.Init(h5Url);
         this.gameStartUIPanel = gameStartUIPanel;
         gameStartUIPanel.ShowMassge("开始加载资源");
         gameStartUIPanel.SetSlider(0);

+ 3 - 0
Assets/Scripts/GameUI/UI/UpdateAsset.meta

@@ -0,0 +1,3 @@
+fileFormatVersion: 2
+guid: deb0eb0aada34bbd8647f3310a33025e
+timeCreated: 1732865666

+ 41 - 0
Assets/Scripts/GameUI/UI/UpdateAsset/GameUpdateAsset.cs

@@ -0,0 +1,41 @@
+using UnityEngine;
+using Utility;
+using WeChatWASM;
+
+namespace Fort23.Mono.UpdateAsset
+{
+    public class GameUpdateAsset : Singleton<GameUpdateAsset>
+    {
+        private string urlRoot;
+
+        public void Init(string urlRoot)
+        {
+            this.urlRoot = urlRoot;
+            LoadMD5();
+        }
+
+        private void LoadMD5()
+        {
+            string md5 = urlRoot + "MD5.txt";
+            string loadMd5 = WX.PluginCachePath + "Bundle/MD5.txt";
+            string str = WXDownload.Instance.GetCachePath(loadMd5);
+            if (!string.IsNullOrEmpty(str))
+            {
+                Debug.Log("本地有缓存" + str);
+                //本地有缓存
+            }
+
+            WXDownload.Instance.DownLoad(md5, "Bundle/MD5.txt", (bool isSuccess) =>
+            {
+                if (isSuccess)
+                {
+                    Debug.Log("MD5下载成功");
+                }
+                else
+                {
+                    Debug.Log("MD5下载失败");
+                }
+            });
+        }
+    }
+}

+ 3 - 0
Assets/Scripts/GameUI/UI/UpdateAsset/GameUpdateAsset.cs.meta

@@ -0,0 +1,3 @@
+fileFormatVersion: 2
+guid: 190452a4c3dd476491e367eb15f7a448
+timeCreated: 1732865696

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 0 - 0
Assets/StreamingAssets/assetConfig.txt


Některé soubory nejsou zobrazeny, neboť je v těchto rozdílových datech změněno mnoho souborů