Skip to content

Release 1.2.21

Compare
Choose a tag to compare
@MichaelZp0 MichaelZp0 released this 01 Mar 11:52
· 11 commits to master since this release

Important Service Updates

  • SDK updated to version 1.2.21

API Changes

New scene graph traversal helpers

The following new client-side runtime API functions have been added to accelerate some special purpose scene graph traversal use cases:

  • Entity.GetRootPath : Builds a path string that consists of entity names with separators up to the root level, for example "root\path\to\this\entity".
  • Entity.FindByPath / TryFindByPath : Finds one or more entities with a given path under an entity.
  • Entity.FindComponentsOfTypeInHierarchy / TryFindComponentsOfTypeInHierarchy : Finds all occurrences of a specific component in the graph under an entity.
  • Entity.FindEntitiesByNameInHierarchy / TryFindEntitiesByNameInHierarchy : Finds all entities with a matching name in the graph under an entity.

The same functionality could have been accomplished through manual traversal / the visitor function, however these functions have been implemented purely on the native side, so they are orders of magnitudes faster than their counterparts implemented in C#.

⚠️Caution: The new API introduces a new enum RemoteRendering.StringComparison. This might collide with the System.StringComparison type. To fix issues with this, you'll have to fully qualify the name of these enums in your code.

Utility class to find the best rendering region based on ping times

A useful utility function has been added to the Unity binding code. It allows for pinging endpoints for a selectable set of rendering regions and then returns the list of regions ordered by best ping times. This utility function can either be used as-is in production, or it can serve as sample code for similar implementations.

Here is some sample code:

List<RegionPingResult> sortedResults = await RegionPingUtility.PingArrRegionsAsync(null);
string bestRegion = sortedResults[0].Region