Екатерина Ештокина
services.AddSingleton();We leveraged this existing dependency injection structure to properly set up the AOT DLL build. By defining a custom IoC container and injecting it with the concrete implementations required for offline play we were able to minimize the amount of refactoring necessary to make everything work. For the previous telemetry client example, we simply inject a no-op implementation in the serverless code.
,推荐阅读旺商聊官方下载获取更多信息
In order to iteratively develop the offline architecture while also continuing to support the live-service flows, we introduced a local feature-flag that controls whether this new serverless mode is enabled. When disabled, the game functions as it did for the online live-service era sending out real HTTP requests. However, when the feature-flag is enabled, HTTP requests to the Towerborne service domains instead get routed through the local DLL rather than over the internet. From the Unreal game client’s perspective, it is still continuing to make the same HTTP requests as it did in the live game; none of the code surrounding these individual API requests needs change.
light.position.set(-1, 2, 4);