We’ve recently released a new API to improve game experience with StreamingEnabled, and we are rolling out changes to how we handle the streaming in and out of parts in some situations.
The API, RequestStreamAroundAsync allows games to request that the engine stream around a specified location for a player, in addition to the normal replication focus. This is useful when the game logic thinks that the player may soon be teleported (CFramed) to a new location in the place and the game wants streaming regions to be sent around the new location in preparation for the player being there. This can improve player experience by avoiding streaming pauses and having content ready for the player when they are moved.
Examples of how to use the API are here:
Note that is API does not guarantee what will be streamed around the requested location, or that pauses cannot occur with the API. Other conditions in the engine, such as limited client memory, may prevent the request from being fully satisfied.
Local Part Handling
In response to developer feedback we are changing how parts created in local scripts are treated by streaming. Previously local parts were treated the same as server created parts and streamed out as needed based on memory pressure and distance from the replication focus. This caused headaches for developers since local parts clearly can’t be sent by the server when stream in occurs again. The change we recently enabled causes local parts to never be streamed out, unless they have ancestors that are remote parts. If the local part has remote ancestors then it will follow normal streaming rules. This allows us to give developers more predictable behavior while not overly constraining what can be done in response to memory pressure.
Part Under Part Handling
We are in the process of rolling out improvements to how streaming handles parts that have other parts as ancestors. Since parts can have ancestors that are also parts, and these parts can be arbitrarily far away from the descendant part, players could experience unexpectedly missing parts due to ancestors not being present on the client. The fixes cause ancestor parts to be sent if they are needed for stream in of descendant parts, as well as preventing stream out of ancestors if it would cause needed descendants to be lost.
We still discourage having parts as ancestors of other parts, preferring using models to group parts together.