当前位置: 首页 > news >正文

58同城网站模板软考哪个培训机构通过率高

58同城网站模板,软考哪个培训机构通过率高,紫搜科技建站,有专门做面包的网站么本文章会手把手教大家如何搭建HybridCLRAdressableSpringboot热更。 创作不易#xff0c;动动发财的小手点个赞。 安装华佗 首先我们按照官网的快速上手指南搭建一个简易的项目#xff1a; 快速上手 | HybridCLR 注意在热更的代码里添加程序集。把用到的工具放到程序集里…本文章会手把手教大家如何搭建HybridCLRAdressableSpringboot热更。 创作不易动动发财的小手点个赞。 安装华佗 首先我们按照官网的快速上手指南搭建一个简易的项目 快速上手 | HybridCLR 注意在热更的代码里添加程序集。把用到的工具放到程序集里。 local程序集这个程序集不热更跟游戏一起打包 注意不能把热更的代码放到local程序集里local程序集只能调用非热更代码。 安装Adressable 然后开始配置Adressable: 系统配置没什么需要强调的根据需求点。 注意我是用的是自己的config动态修改打包的位置配置文件在下面 自定义远端 使用host看后面 这个也是根据需求点就行。 如果你没有自己的服务器可以使用Addressable自带的host工具注意修改配置文件里的信息 Addressable和工具的config文件 public class FrameworkConfig {public static string DownLoadPath D:/Desktop/local/test;//打包后Adressable缓存地址外部{}引用public static string RemotePath http://47.xxx.43.98/files/;//Adressable的服务器地址外部{}引用public static string BaseUrl http://47.xxx.43.98/;public static string UploadPath http://47.xxx.43.98/upload;//打好的Addressable包的上传的地址public static string DeletePath http://47.xxx.43.98/files;//删除服务器远端仓库的请求地址public static string LoginPath http://47.xxx.43.98/login;//登录服务器远端仓库的请求地址public static string LogoutPath http://47.xxx.43.98/logout;//登出服务器远端仓库的请求地址public static string PackPathD:\GameClient\game-client\client\ServerData\StandaloneWindows64;//打好的本地Addressable包的地址// public static string RemoteBuildPath ServerData/[BuildTarget];Build地址需要在Addressable里改public static string DLLName HotUpdate.dll.bytes;//热更dll在group中的索引public static string StartSceneNameAssets/HotUpdate/Scenes/StartScene.unity;//更新后启动场景的group中的索引public static string DLLPath ../HybridCLRData/HotUpdateDlls/StandaloneWindows64/HotUpdate.dll;//热更dll打包后迁移前的位置public static string NewDLLPath HotUpdate/Dlls;//热更dll打包后迁移后的位置public static string LevelJsonPosition D:\\Desktop\\local\\pos.json; //地图编辑器生成的地图文件的地址} Q为什么ip后面还有A因为Springboot服务器的http请求需要把写入删除拉取区分。 热更打包注意把左上角的profile改成自己的我用的是remote默认是defaut给每个包打上标签更新使用 热更逻辑 我们的代码热更方式就是用Hybrid打出一个热更的dll然后把dll转存为比特文件放到Addressable包里热更到本地后加载新的dll。 启动逻辑build一个场景里面放CheckAssetsUpdate 脚本在所有包体下载完成后加载包中的StartScene场景。startScene场景里用代码启动游戏启动逻辑。 using HybridCLR; using System; using System.Collections; using System.Collections.Generic; using System.IO; using System.Reflection; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.AddressableAssets.ResourceLocators; using UnityEngine.ResourceManagement.AsyncOperations; using UnityEngine.ResourceManagement.ResourceProviders; using UnityEngine.SceneManagement; using static UnityEngine.Rendering.VirtualTexturing.Debugging;public class CheckAssetsUpdate : MonoBehaviour {private AsyncOperationHandlelong downloadHandle;AsyncOperationHandle remote;private StaticLoadingPage loadPage;void Start(){LoadDefDLL();StartCoroutine(CheckUpdate());loadPageGetComponentStaticLoadingPage();}private void LoadDefDLL(){//dllDebug.Log(Starting to check and download assets with label: all);Liststring aotDllList new Liststring{System.Core.dll,System.dll,Unity.Addressables.dll,Unity.ResourceManager.dll,UnityEngine.CoreModule.dll,mscorlib.dll,};foreach (var dllName in aotDllList){byte[] dllBytes File.ReadAllBytes(${Application.streamingAssetsPath}/{dllName});LoadImageErrorCode err RuntimeApi.LoadMetadataForAOTAssembly(dllBytes, HomologousImageMode.SuperSet);if (err ! LoadImageErrorCode.OK){Debug.LogError($Failed to load AOT DLL: {dllName}, Error: {err});// If any AOT DLL fails to load, stop the process}else{Debug.Log(${dllName} 加载成功);}}}private IEnumerator CheckUpdate(){downloadHandle Addressables.GetDownloadSizeAsync(all);//Debug.Log(加载 downloadHandle);yield return downloadHandle;Debug.Log(检查下载资源);if (downloadHandle.Status AsyncOperationStatus.Succeeded){if (downloadHandle.Result 0){Debug.Log(没有更新);EnterGame();}else{Debug.Log(更新游戏);StartCoroutine(Download());}}yield return null;}IEnumerator Download(){remote Addressables.DownloadDependenciesAsync(all, true);while (!remote.IsDone){var bytes remote.GetDownloadStatus().DownloadedBytes;var totalBytes remote.GetDownloadStatus().TotalBytes;var status remote.GetDownloadStatus();float progress status.Percent;Debug.Log($Download progress : {progress});loadPage.Loading(progress);yield return null;}EnterGame();}void EnterGame(){Debug.Log(加载了HotUpdate.dll remote);var loadDllAsync Addressables.LoadAssetAsyncTextAsset(FrameworkConfig.DLLName);loadDllAsync.Completed OnHotUpdateDllLoaded;}void OnHotUpdateDllLoaded(AsyncOperationHandleTextAsset handle){if (handle.Status AsyncOperationStatus.Succeeded){Debug.Log(DLL 加载完毕);Assembly hotUpdate null;try{hotUpdate Assembly.Load(handle.Result.bytes);Debug.Log(加载游戏);//GameRoot.Instance.Init();AsyncOperationHandleSceneInstance lastHandle Addressables.LoadSceneAsync(FrameworkConfig.StartSceneName, LoadSceneMode.Single);lastHandle.Completed (o) {loadPage.Loading(1);Destroy(loadPage.loadingCanvas.gameObject,2);};}catch (Exception ex){Debug.LogError(DLL加载错误: ex.Message);return;}}} }报错解决文档 专门记录一些坑遇到报错问题可以来这里解决 【有道云笔记】HybridCLRAddressables热更 https://note.youdao.com/s/2QhPpppU 或者去官网。 源码 larito/GameClient 客户端 larito/StaticServer 静态服务器
http://www.hkea.cn/news/14589641/

相关文章:

  • 软件下载网站源码网店怎么开要多少钱
  • 招聘网站开发计划书菜鸟是什么网站
  • 如何查看网站cms系统游戏发卡中心网站源码
  • 游戏分类网站怎么做在线教学网站开发
  • 怎么制作网站导航页泉州响应式网站建设
  • 怎么在微信公众号建设微网站婚纱摄影网站模板
  • 小公司做网站的好处网页制作工具有哪些
  • 网站维护的工作内容步骤wordpress4.0 伪静态
  • 深圳福田华丰大厦网站建设山东省菏泽市城乡建设局网站
  • 行业门户网站案例分析西安wordpress开发
  • 大前端网站过年做啥网站能致富
  • 成都专业网站设计好公司梧州网站设计推荐
  • 电子商务网站的开发流程包括周浦做网站公司
  • 顶呱呱网站做的怎么样重庆找做墩子网站
  • 网站开发组织架构图西宁的网站设计
  • 已注册的网站如何注销设计专业知名企业网站
  • 如何用百度云文件做网站建设银行人力资源系统网站
  • 推荐商城网站建设网站建设步骤 文档
  • 创意网站交互wordpress插件写在模板里
  • 让别人做网站应注意什么海南三亚注册公司需要什么条件
  • 织梦手机网站教程视频网站备案人授权书
  • 深圳网站平台建设现在有什么网络游戏好玩
  • 宁波网站建设外包如何做企业网站后台管理
  • 学校网站建设框架最好的网站设计公
  • 网站外部链接网站建设大致价格2017
  • 一下成都网站建设公司杭州房产信息网官网
  • 哪里有网站建设北京vi设计方案
  • 哪些网站可以做问卷调查陕西网站建设优化技术
  • 网页设计企业宣传网站竞价推广遇到恶意点击怎么办
  • 哈尔滨网站开发制作网页设计与网站建设 公开课