{!See https://docs.google.com/document/d/1takg_GmIBBKKTj-GHZCwzxohpQz7Bhekivkk72kYMtE/edit for reference implementation of OneTrust, dataLayer and GTM} {!OneTrust Cookies Consent} {!OneTrust Cookies Consent end} {!dataLayer initialization push} {!dataLayer initialization push end} {!Google Tag Manager} {!Google Tag Manager end} Class PolySpatialStateValidator | Unity PolySpatial | 0.0.4
docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    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:

    1. GameObject State Retrieval - when invoked, retrieves all supported GameObject and GameObject component properties to generate 2 GameObjectNode collections (for clientSim and hostPlatform layers).
    2. 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:
    3. 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.
    4. 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).
    5. 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.

    Inheritance
    object
    PolySpatialStateValidator
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Global Namespace
    Assembly: solution.dll
    Syntax
    public class PolySpatialStateValidator

    Constructors

    Name Description
    PolySpatialStateValidator(bool)

    Fields

    Name Description
    s_MarkedForDestroy

    Methods

    Name Description
    ClientSimChangeDetected(Dictionary<PolySpatialInstanceID, GameObjectNode>, Dictionary<PolySpatialInstanceID, GameObjectNode>)

    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.

    DestroyState(Dictionary<PolySpatialInstanceID, GameObjectNode>)

    Destroys the cloned assets in the specified state map and clears it.

    GenerateStateDiff(Dictionary<PolySpatialInstanceID, GameObjectNode>, Dictionary<PolySpatialInstanceID, GameObjectNode>)
    GetState(out Dictionary<PolySpatialInstanceID, GameObjectNode>, out Dictionary<PolySpatialInstanceID, GameObjectNode>, out List<Object>, out List<Object>)

    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.

    In This Article
    Back to top
    Copyright © 2023 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)