Class PolySpatialStateValidator
This class is used to fetch and compare state between clientSim and hostPlatform layer GameObjects. A collection of tracked GameObjects are retrieved from the hostPlatform layer. The clientSim layer GameObjects is compared against the hostPlatform layer GameObjects, checking components and their properties, and generating diff String. There are 2 main components to this class:
- GameObject State Retrieval - when invoked, retrieves all supported GameObject and GameObject component properties to generate 2 GameObjectNode collections (for clientSim and hostPlatform layers).
- Diff String Generator - when invoked, compares collection of GameObjectNodes and generates a diff String for all non-matching values. Note that comparisons may not always be 1-1 as some conversion and rounding is expected in PolySpatial hostPlatform GameObjects. There are 3 facets of development to this class:
- Supporting additional GameObject components and properties - currently a subset of all PolySpatial supported components are tracked and validated. The current goal is to support all components tracked via PolySpatial tracker classes.
- Extend component property validation - Some supported components may not fully validate all component properties, or validations are high level only (checking only for the presence of the component, not comparing values).
- Supporting additional platforms - currently only UnityPolySpatialNativePlatform is supported
There are known issues with certain component properties that generate diffs which should be tracked by a JIRA (a JIRA link should be included above the relevant lines of code). If missing, please add a JIRA or reach out to the PolySpatial QA and/or PolySpatial Core team.
Inherited Members
Namespace: Global Namespace
Assembly: solution.dll
Syntax
public class PolySpatialStateValidator
Constructors
Name | Description |
---|---|
Poly |
Fields
Name | Description |
---|---|
s_Marked |
Methods
Name | Description |
---|---|
Client |
Compares 2 clientSim state collections to determine if a change is present between the states. Though similar to clientSim to hostPlatform state comparison, this alternative method is needed as there are no expected component conversions between clientSim-clientSim state comparisons, whereas clientSim-hostPlatform state comparison expects conversions among other known diffs. |
Destroy |
Destroys the cloned assets in the specified state map and clears it. |
Generate |
|
Get |
Returns the current state of ClientSim and HostPlatform GameObject data, mapping their QIDs to GameObject data encapsulated in GameObjectNode instances. Each collection of entries represents found GameObjects in their respective (clientSim or PolySpatial/HostPlatform) layer. Also fetches any unregistered assets found for each layer. |