如何建设个人网站网站建设哪个最好

张小明 2026/1/1 12:36:24
如何建设个人网站,网站建设哪个最好,网站前端工资,wordpress 页面父子级1. 加载流程概述 Lyra的Experience系统采用异步加载模式#xff0c;确保游戏在加载过程中保持响应性。完整的加载流程包含以下状态转换#xff1a; Unloaded → Loading → LoadingGameFeatures → ExecutingActions → Loaded2. 详细流程实现 2.1 设置当前经验 void ULyraEx…1. 加载流程概述Lyra的Experience系统采用异步加载模式确保游戏在加载过程中保持响应性。完整的加载流程包含以下状态转换Unloaded → Loading → LoadingGameFeatures → ExecutingActions → Loaded2. 详细流程实现2.1 设置当前经验voidULyraExperienceManagerComponent::SetCurrentExperience(FPrimaryAssetId ExperienceId){ULyraAssetManagerAssetManagerULyraAssetManager::Get();FSoftObjectPath AssetPathAssetManager.GetPrimaryAssetPath(ExperienceId);TSubclassOfULyraExperienceDefinitionAssetClassCastUClass(AssetPath.TryLoad());check(AssetClass);constULyraExperienceDefinition*ExperienceGetDefaultULyraExperienceDefinition(AssetClass);check(Experience!nullptr);check(CurrentExperiencenullptr);CurrentExperienceExperience;StartExperienceLoad();}关键实现点通过ULyraAssetManager获取经验资源路径尝试加载资源类并转换为ULyraExperienceDefinition类型验证经验有效性并设置为当前经验调用StartExperienceLoad()开始加载流程2.2 开始经验加载voidULyraExperienceManagerComponent::StartExperienceLoad(){check(CurrentExperience!nullptr);check(LoadStateELyraExperienceLoadState::Unloaded);UE_LOG(LogLyraExperience,Log,TEXT(EXPERIENCE: StartExperienceLoad(CurrentExperience %s, %s)),*CurrentExperience-GetPrimaryAssetId().ToString(),*GetClientServerContextString(this));LoadStateELyraExperienceLoadState::Loading;ULyraAssetManagerAssetManagerULyraAssetManager::Get();TSetFPrimaryAssetIdBundleAssetList;TSetFSoftObjectPathRawAssetList;BundleAssetList.Add(CurrentExperience-GetPrimaryAssetId());for(constTObjectPtrULyraExperienceActionSetActionSet:CurrentExperience-ActionSets){if(ActionSet!nullptr){BundleAssetList.Add(ActionSet-GetPrimaryAssetId());}}TArrayFNameBundlesToLoad;BundlesToLoad.Add(FLyraBundles::Equipped);constENetMode OwnerNetModeGetOwner()-GetNetMode();constboolbLoadClientGIsEditor||(OwnerNetMode!NM_DedicatedServer);constboolbLoadServerGIsEditor||(OwnerNetMode!NM_Client);if(bLoadClient)BundlesToLoad.Add(UGameFeaturesSubsystemSettings::LoadStateClient);if(bLoadServer)BundlesToLoad.Add(UGameFeaturesSubsystemSettings::LoadStateServer);TSharedPtrFStreamableHandleBundleLoadHandlenullptr;if(BundleAssetList.Num()0){BundleLoadHandleAssetManager.ChangeBundleStateForPrimaryAssets(BundleAssetList.Array(),BundlesToLoad,{},false,FStreamableDelegate(),FStreamableManager::AsyncLoadHighPriority);}TSharedPtrFStreamableHandleRawLoadHandlenullptr;if(RawAssetList.Num()0){RawLoadHandleAssetManager.LoadAssetList(RawAssetList.Array(),FStreamableDelegate(),FStreamableManager::AsyncLoadHighPriority,TEXT(StartExperienceLoad()));}TSharedPtrFStreamableHandleHandlenullptr;if(BundleLoadHandle.IsValid()RawLoadHandle.IsValid()){HandleAssetManager.GetStreamableManager().CreateCombinedHandle({BundleLoadHandle,RawLoadHandle});}else{HandleBundleLoadHandle.IsValid()?BundleLoadHandle:RawLoadHandle;}FStreamableDelegate OnAssetsLoadedDelegateFStreamableDelegate::CreateUObject(this,ThisClass::OnExperienceLoadComplete);if(!Handle.IsValid()||Handle-HasLoadCompleted()){FStreamableHandle::ExecuteDelegate(OnAssetsLoadedDelegate);}else{Handle-BindCompleteDelegate(OnAssetsLoadedDelegate);Handle-BindCancelDelegate(FStreamableDelegate::CreateLambda([OnAssetsLoadedDelegate](){OnAssetsLoadedDelegate.ExecuteIfBound();}));}TSetFPrimaryAssetIdPreloadAssetList;if(PreloadAssetList.Num()0){AssetManager.ChangeBundleStateForPrimaryAssets(PreloadAssetList.Array(),BundlesToLoad,{});}}关键实现点验证当前经验有效性和加载状态记录加载日志包含经验ID和客户端/服务器上下文转换状态为ELyraExperienceLoadState::Loading构建要加载的资源列表包括经验定义和相关动作集根据网络模式客户端/服务器/编辑器确定要加载的资源包使用FStreamableHandle进行异步资源加载支持合并多个加载请求提高效率绑定资源加载完成回调支持预加载额外资源当前留空2.3 经验资源加载完成voidULyraExperienceManagerComponent::OnExperienceLoadComplete(){check(LoadStateELyraExperienceLoadState::Loading);check(CurrentExperience!nullptr);UE_LOG(LogLyraExperience,Log,TEXT(EXPERIENCE: OnExperienceLoadComplete(CurrentExperience %s, %s)),*CurrentExperience-GetPrimaryAssetId().ToString(),*GetClientServerContextString(this));GameFeaturePluginURLs.Reset();autoCollectGameFeaturePluginURLs[Thisthis](constUPrimaryDataAsset*Context,constTArrayFStringFeaturePluginList){for(constFStringPluginName:FeaturePluginList){FString PluginURL;if(UGameFeaturesSubsystem::Get().GetPluginURLByName(PluginName,/*out*/PluginURL)){This-GameFeaturePluginURLs.AddUnique(PluginURL);}else{ensureMsgf(false,TEXT(OnExperienceLoadComplete failed to find plugin URL from PluginName %s for experience %s - fix data, ignoring for this run),*PluginName,*Context-GetPrimaryAssetId().ToString());}}};CollectGameFeaturePluginURLs(CurrentExperience,CurrentExperience-GameFeaturesToEnable);for(constTObjectPtrULyraExperienceActionSetActionSet:CurrentExperience-ActionSets){if(ActionSet!nullptr){CollectGameFeaturePluginURLs(ActionSet,ActionSet-GameFeaturesToEnable);}}NumGameFeaturePluginsLoadingGameFeaturePluginURLs.Num();if(NumGameFeaturePluginsLoading0){LoadStateELyraExperienceLoadState::LoadingGameFeatures;for(constFStringPluginURL:GameFeaturePluginURLs){ULyraExperienceManager::NotifyOfPluginActivation(PluginURL);UGameFeaturesSubsystem::Get().LoadAndActivateGameFeaturePlugin(PluginURL,FGameFeaturePluginLoadComplete::CreateUObject(this,ThisClass::OnGameFeaturePluginLoadComplete));}}else{OnExperienceFullLoadCompleted();}}关键实现点验证加载状态和当前经验有效性记录资源加载完成日志收集游戏特性插件URL的Lambda函数从经验定义和动作集中收集需要加载的游戏特性插件转换状态为ELyraExperienceLoadState::LoadingGameFeatures异步加载并激活游戏特性插件支持无插件情况下直接完成加载2.4 游戏特性插件加载完成voidULyraExperienceManagerComponent::OnGameFeaturePluginLoadComplete(constUE::GameFeatures::FResultResult){NumGameFeaturePluginsLoading--;if(NumGameFeaturePluginsLoading0){OnExperienceFullLoadCompleted();}}关键实现点递减正在加载的插件计数当所有插件加载完成后调用最终完成函数2.5 经验完全加载完成voidULyraExperienceManagerComponent::OnExperienceFullLoadCompleted(){check(LoadState!ELyraExperienceLoadState::Loaded);if(LoadState!ELyraExperienceLoadState::LoadingChaosTestingDelay){constfloatDelaySecsLyraConsoleVariables::GetExperienceLoadDelayDuration();if(DelaySecs0.0f){FTimerHandle DummyHandle;LoadStateELyraExperienceLoadState::LoadingChaosTestingDelay;GetWorld()-GetTimerManager().SetTimer(DummyHandle,this,ThisClass::OnExperienceFullLoadCompleted,DelaySecs,/*bLooping*/false);return;}}LoadStateELyraExperienceLoadState::ExecutingActions;FGameFeatureActivatingContext Context;constFWorldContext*ExistingWorldContextGEngine-GetWorldContextFromWorld(GetWorld());if(ExistingWorldContext){Context.SetRequiredWorldContextHandle(ExistingWorldContext-ContextHandle);}autoActivateListOfActions[Context](constTArrayUGameFeatureAction*ActionList){for(UGameFeatureAction*Action:ActionList){if(Action!nullptr){Action-OnGameFeatureRegistering();Action-OnGameFeatureLoading();Action-OnGameFeatureActivating(Context);}}};ActivateListOfActions(CurrentExperience-Actions);for(constTObjectPtrULyraExperienceActionSetActionSet:CurrentExperience-ActionSets){if(ActionSet!nullptr){ActivateListOfActions(ActionSet-Actions);}}LoadStateELyraExperienceLoadState::Loaded;OnExperienceLoaded_HighPriority.Broadcast(CurrentExperience);OnExperienceLoaded_HighPriority.Clear();OnExperienceLoaded.Broadcast(CurrentExperience);OnExperienceLoaded.Clear();OnExperienceLoaded_LowPriority.Broadcast(CurrentExperience);OnExperienceLoaded_LowPriority.Clear();#if!UE_SERVERULyraSettingsLocal::Get()-OnExperienceLoaded();#endif}关键实现点验证非已加载状态支持混沌测试延迟用于模拟加载延迟转换状态为ELyraExperienceLoadState::ExecutingActions创建游戏特性激活上下文包含世界上下文信息激活动作列表的Lambda函数执行经验定义和动作集中的所有动作注册→加载→激活转换状态为ELyraExperienceLoadState::Loaded按优先级广播加载完成事件高优先级核心功能普通优先级低优先级在客户端调用本地设置的经验加载完成回调3. 网络同步机制Lyra的Experience系统支持网络同步确保客户端和服务器使用相同的经验配置voidULyraExperienceManagerComponent::OnRep_CurrentExperience(){StartExperienceLoad();}voidULyraExperienceManagerComponent::GetLifetimeReplicatedProps(TArrayFLifetimePropertyOutLifetimeProps)const{Super::GetLifetimeReplicatedProps(OutLifetimeProps);DOREPLIFETIME(ThisClass,CurrentExperience);}关键实现点当前经验通过DOREPLIFETIME宏自动复制到客户端客户端在收到复制的经验后自动调用StartExperienceLoad()开始加载加载流程在客户端和服务器上独立执行但最终结果一致4. 加载状态管理Experience系统使用ELyraExperienceLoadState枚举管理加载状态enumclassELyraExperienceLoadState{Unloaded,// 未加载状态Loading,// 加载经验资源LoadingGameFeatures,// 加载游戏特性插件LoadingChaosTestingDelay,// 混沌测试延迟ExecutingActions,// 执行经验动作Loaded,// 完全加载完成Deactivating// 停用经验};5. 加载流程的取消和清理系统支持加载过程中的取消处理Handle-BindCancelDelegate(FStreamableDelegate::CreateLambda([OnAssetsLoadedDelegate](){OnAssetsLoadedDelegate.ExecuteIfBound();}));在组件结束时会尝试停用已激活的游戏特性插件voidULyraExperienceManagerComponent::EndPlay(constEEndPlayReason::Type EndPlayReason){Super::EndPlay(EndPlayReason);for(constFStringPluginURL:GameFeaturePluginURLs){if(ULyraExperienceManager::RequestToDeactivatePlugin(PluginURL)){UGameFeaturesSubsystem::Get().DeactivateGameFeaturePlugin(PluginURL);}}// 停用和清理动作// ...}6. 加载状态查询boolULyraExperienceManagerComponent::IsExperienceLoaded()const{return(LoadStateELyraExperienceLoadState::Loaded)(CurrentExperience!nullptr);}constULyraExperienceDefinition*ULyraExperienceManagerComponent::GetCurrentExperienceChecked()const{check(LoadStateELyraExperienceLoadState::Loaded);check(CurrentExperience!nullptr);returnCurrentExperience;}7. 总结Lyra的Experience系统加载流程具有以下特点异步加载模式确保游戏在加载过程中保持响应性状态驱动通过明确的状态转换管理加载过程模块化设计将资源加载、插件激活和动作执行分离网络同步确保客户端和服务器使用相同的经验配置优先级事件系统支持不同优先级的加载完成回调可测试性包含混沌测试延迟功能可扩展性支持通过动作集扩展经验功能这种设计确保了Experience系统的灵活性和可维护性同时提供了良好的用户体验。
版权声明:本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若内容造成侵权/违法违规/事实不符,请联系邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!

phpwind怎么做网站简单的h5免费模板

MinerU配置文件缺失:3步快速修复方案 【免费下载链接】MinerU A high-quality tool for convert PDF to Markdown and JSON.一站式开源高质量数据提取工具,将PDF转换成Markdown和JSON格式。 项目地址: https://gitcode.com/OpenDataLab/MinerU 你…

张小明 2025/12/31 6:06:06 网站建设

网站 设计wordpress 中文标签插件

LLaMA-Factory微调实战:从环境到训练全指南 在当前大模型技术飞速发展的背景下,如何将通用语言模型精准适配到具体业务场景,已成为开发者面临的核心挑战。尽管像 Llama、Qwen、Baichuan 等开源模型提供了强大的基础能力,但若未经定…

张小明 2025/12/31 6:06:04 网站建设

潭州教育网站开发中小网站建设都有哪些方案

RT系统逻辑与对象模型详解 在RT系统中,理解其逻辑和对象模型对于系统的使用和管理至关重要。下面将详细介绍RT系统中的用户、组、权限等重要概念及其相关字段。 1. 用户相关信息 在RT系统里,用户是能够在系统内执行操作的个体。创建、修改、查看或删除对象时,都需要以用户…

张小明 2025/12/31 6:06:02 网站建设

网站搭建完手机访问html5手机网站源码下载

JVM 调优工具深度指南:从监控到诊断的全流程实战JVM 调优的核心是 “先监控定位问题,再调优验证效果”—— 单纯调整参数是盲目的,必须依赖工具获取底层数据。本文深入解析jstat、jmap、jstack、jcmd等核心工具的高级用法 结果解读&#xff…

张小明 2025/12/31 6:05:59 网站建设

h5移动网站开发网站商业授权含义

快速体验 打开 InsCode(快马)平台 https://www.inscode.net输入框内输入如下内容: 开发一个AI增强版htop工具,基于Kimi-K2模型实现以下功能:1.自动学习正常系统资源使用模式 2.实时检测异常进程行为并高亮显示 3.预测未来5分钟资源使用趋势 …

张小明 2025/12/31 6:05:57 网站建设

无锡住房和城乡建设厅网站土木在线

群晖照片AI识别功能受限?这个补丁让你彻底告别硬件限制 【免费下载链接】Synology_Photos_Face_Patch Synology Photos Facial Recognition Patch 项目地址: https://gitcode.com/gh_mirrors/sy/Synology_Photos_Face_Patch 你是否曾经在整理家庭照片时&…

张小明 2025/12/31 6:05:55 网站建设