少年修仙传客户端基础资源
lwb
2021-02-02 8399927878bf1b1bec48600be395f9c5a123fd83
9527 ilruntiem
3个文件已修改
131 ■■■■■ 已修改文件
Assets/Editor/AssetBundleBrowser/AssetBundleBuildTab.cs 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Editor/Tool/ClientPackage.cs 96 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Assets/IFix/Editor/Configure.cs 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Editor/AssetBundleBrowser/AssetBundleBuildTab.cs
@@ -377,6 +377,11 @@
                EditorApplication.delayCall += ExcuteBuildPatch;
            }
            if (GUILayout.Button("logic"))
            {
                EditorApplication.delayCall += ExcuteBuildLogic;
            }
            EditorGUILayout.EndHorizontal();
            EditorGUILayout.Space();
@@ -582,6 +587,7 @@
            ExcuteBuildBuiltIn();
            ExcuteBuildLua();
            ExcuteBuildPatch();
            ExcuteBuildLogic();
            AssetDatabase.Refresh(ImportAssetOptions.ForceUpdate);
@@ -693,6 +699,23 @@
            DirectoryCopy(sourcePath, outputPath, ".meta");
        }
        private void ExcuteBuildLogic()
        {
            var outputPath = Application.dataPath.Replace("Assets", m_UserData.m_OutputPath);
            outputPath = StringUtility.Contact(outputPath, "/logic");
            if (Directory.Exists(outputPath))
                Directory.Delete(outputPath, true);
            var dllFile = ResourcesPath.ResourcesOutAssetPath + "logic/Logic.dll.bytes";
            var outFile = StringUtility.Contact(outputPath, "/Logic.dll.bytes");
            if (!File.Exists(dllFile))
            {
                DebugEx.LogErrorFormat("打包错误:{0} 不存在", dllFile);
                return;
            }
            FileExtersion.MakeSureDirectory(outFile);
            File.Copy(dllFile, outFile);
        }
        private void ExcuteBuildLevels()
        {
            UpdateLevelSetting.SetAllLevelAssetBundleName();
Assets/Editor/Tool/ClientPackage.cs
@@ -263,7 +263,7 @@
                    }
                }
            }
            //剔除表资源
            if (!includeConfig)
            {
@@ -548,60 +548,52 @@
    private static void PreBuild(string _publisher, int _buildIndex)
    {
        try
        var newVersionConfigPath = StringUtility.Contact("Assets/Resources/VersionConfig", ".asset");
        var versionName = string.Empty;
        var fromVersionConfig = GetVersionConfig(_publisher, out versionName);
        var newVersionConfig = ScriptableObject.CreateInstance<VersionConfig>();
        if (File.Exists(newVersionConfigPath))
        {
            var newVersionConfigPath = StringUtility.Contact("Assets/Resources/VersionConfig", ".asset");
            var versionName = string.Empty;
            var fromVersionConfig = GetVersionConfig(_publisher, out versionName);
            var newVersionConfig = ScriptableObject.CreateInstance<VersionConfig>();
            if (File.Exists(newVersionConfigPath))
            {
                AssetDatabase.DeleteAsset(newVersionConfigPath);
            }
            VersionConfig.Copy(fromVersionConfig, newVersionConfig);
            newVersionConfig.buildTime = DateTime.Now.ToString("yy/MM/dd--HH:mm");
            newVersionConfig.buildIndex = _buildIndex;
            if (File.Exists(Application.dataPath + "/Resources/Game.txt"))
            {
                File.Delete(Application.dataPath + "/Resources/Game.txt");
            }
            File.WriteAllText(Application.dataPath + "/Resources/Game.txt", GetGameId(_publisher));
            AssetDatabase.CreateAsset(newVersionConfig, newVersionConfigPath);
            EditorUtility.SetDirty(newVersionConfig);
            SetIconAndSplashImage(versionName);
            //SetCreateRoleAnimation();
            PlayerSettings.companyName = "TheSecondWorld";
            PlayerSettings.productName = newVersionConfig.productName;
            PlayerSettings.applicationIdentifier = newVersionConfig.bundleIdentifier;
            PlayerSettings.defaultInterfaceOrientation = UIOrientation.AutoRotation;
            PlayerSettings.allowedAutorotateToLandscapeLeft = true;
            PlayerSettings.allowedAutorotateToLandscapeRight = true;
            PlayerSettings.allowedAutorotateToPortrait = false;
            PlayerSettings.allowedAutorotateToPortraitUpsideDown = false;
            PlayerSettings.bundleVersion = VersionConfig.GetVersionNumber(newVersionConfig.version).ToString();
            if (GetBuildTarget() == BuildTargetGroup.Android)
            {
                CSObjectWrapEditor.Generator.ClearAll();
                CSObjectWrapEditor.Generator.GenAll();
            }
        }
        catch (Exception ex)
        {
            Debug.Log(ex);
        }
        finally
        {
            AssetDatabase.SaveAssets();
            AssetDatabase.Refresh();
            AssetDatabase.DeleteAsset(newVersionConfigPath);
        }
        VersionConfig.Copy(fromVersionConfig, newVersionConfig);
        newVersionConfig.buildTime = DateTime.Now.ToString("yy/MM/dd--HH:mm");
        newVersionConfig.buildIndex = _buildIndex;
        if (File.Exists(Application.dataPath + "/Resources/Game.txt"))
        {
            File.Delete(Application.dataPath + "/Resources/Game.txt");
        }
        File.WriteAllText(Application.dataPath + "/Resources/Game.txt", GetGameId(_publisher));
        AssetDatabase.CreateAsset(newVersionConfig, newVersionConfigPath);
        EditorUtility.SetDirty(newVersionConfig);
        SetIconAndSplashImage(versionName);
        //SetCreateRoleAnimation();
        PlayerSettings.companyName = "TheSecondWorld";
        PlayerSettings.productName = newVersionConfig.productName;
        PlayerSettings.applicationIdentifier = newVersionConfig.bundleIdentifier;
        PlayerSettings.defaultInterfaceOrientation = UIOrientation.AutoRotation;
        PlayerSettings.allowedAutorotateToLandscapeLeft = true;
        PlayerSettings.allowedAutorotateToLandscapeRight = true;
        PlayerSettings.allowedAutorotateToPortrait = false;
        PlayerSettings.allowedAutorotateToPortraitUpsideDown = false;
        PlayerSettings.bundleVersion = VersionConfig.GetVersionNumber(newVersionConfig.version).ToString();
        if (GetBuildTarget() == BuildTargetGroup.Android)
        {
            CSObjectWrapEditor.Generator.ClearAll();
            CSObjectWrapEditor.Generator.GenAll();
        }
        //生成ILruntiemd CLR 绑定代码
        ILRuntimeCLRBinding.GenerateCLRBindingByAnalysis();
        AssetDatabase.SaveAssets();
        AssetDatabase.Refresh();
    }
    static VersionConfig GetVersionConfig(string _publisher, out string _versionName)
Assets/IFix/Editor/Configure.cs
@@ -30,10 +30,20 @@
            get
            {
                return (from type in Assembly.Load("Assembly-CSharp").GetTypes()
                        where type.Namespace == null || (!type.Namespace.StartsWith("XLua") && !type.Namespace.StartsWith("IFix"))
                        where type.Namespace == null ||
                         (!type.Namespace.StartsWith("XLua") &&
                         !type.Namespace.StartsWith("IFix") &&
                         type.Namespace != "ILRuntime.Runtime.Generated")
                        select type);
            }
        }
        [Filter]
        static bool Filter(System.Reflection.MethodInfo methodInfo)
        {
            return methodInfo.DeclaringType.FullName == "Test"
                && (methodInfo.Name == "Div" || methodInfo.Name == "Mult");
        }
    }
    //放置配置的