VContainer-scoping/project-root-lifetimescope | 作用域——项目根作用域 LifetimeScope

可设置全局根作用域作为所有 LifetimeScope 的父级。

    1. 创建根作用域 LifetimeScope 预制体
    1. 创建 VContainerSettings
    • 选择 Assets -> Create -> VContainer -> VContainer Settings
    1. 在 VContainerSettings 的 Inspector 中,将预制体设置到 Root Lifetime Scope 栏位。

:::info
通过该菜单创建的 VContainerSettings 配置文件会自动加入预加载资源(preload assets)。

若遇到 VContainerSettings 配置未加载的情况,请检查Project Settings -> Player中的预加载资源是否包含VContainerSettings。
:::

posted @   凌雪寒  阅读(4)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· .NET10 - 预览版1新功能体验(一)
点击右上角即可分享
微信分享提示