docs.unity3d.com
    Show / Hide Table of Contents

    Class SynthesizedObject

    Class that automatically inserts and updates data in MARS' reality database Intrinsically linked to the Real World Object it is parented to

    Inheritance
    Object
    SynthesizedObject
    Namespace: Unity.MARS.Data.Synthetic
    Syntax
    public class SynthesizedObject : MonoBehaviour, IMatchAcquireHandler, IMatchUpdateHandler, IMatchLossHandler, IAction, ISimulatable, IUsesMARSData<SynthesizedObject>, IUsesFunctionalityInjection

    Methods

    OnDataBaseLost()

    Called if the database that the synthesized object feeds into shuts down. In that case, we just reset our data ID so we don't try to interact with the database anymore.

    Declaration
    public void OnDataBaseLost()

    OnMatchAcquire(QueryResult)

    Called when a query match has been found

    Declaration
    public void OnMatchAcquire(QueryResult queryResult)
    Parameters
    Type Name Description
    QueryResult queryResult

    Data associated with this event

    Implements
    IMatchAcquireHandler.OnMatchAcquire(QueryResult)

    OnMatchLoss(QueryResult)

    Called when a query match has been lost

    Declaration
    public void OnMatchLoss(QueryResult queryResult)
    Parameters
    Type Name Description
    QueryResult queryResult

    Data associated with this event

    Implements
    IMatchLossHandler.OnMatchLoss(QueryResult)

    OnMatchUpdate(QueryResult)

    Called when a query match's data has updated

    Declaration
    public void OnMatchUpdate(QueryResult queryResult)
    Parameters
    Type Name Description
    QueryResult queryResult

    Data associated with this event

    Implements
    IMatchUpdateHandler.OnMatchUpdate(QueryResult)

    SyncModifications()

    Flags the SynthesizedObject to do a full update on the next frame. Useful for traits that are normally static upon creation, but can be changed dynamically by user scripts.

    Declaration
    public void SyncModifications()

    Extension Methods

    IUsesMARSDataGenericMethods.AddData<T>(IUsesMARSData<T>, T)
    IUsesMARSDataGenericMethods.UpdateData<T>(IUsesMARSData<T>, Int32, T)
    IUsesMARSDataGenericMethods.RemoveData<T>(IUsesMARSData<T>, Int32)
    IUsesMARSDataGenericMethods.GetIdValue<T>(IUsesMARSData<T>, Int32)
    IUsesMARSDataGenericMethods.GetCollection<T>(IUsesMARSData<T>)
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023