docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method SetReference

    SetReference(TableReference, TableEntryReference)

    Sets both the TableReference and TableEntryReference and triggers an update if there are any change subscribers.

    Declaration
    public void SetReference(TableReference table, TableEntryReference entry)
    Parameters
    Type Name Description
    TableReference table

    Reference to the TableCollectionName or TableCollectionNameGuid.

    TableEntryReference entry

    Reference to the Key or KeyId.

    Examples

    This example shows the different ways SetReference can be called.

    var localizedString = new LocalizedString();
    
    // Setting with names
    localizedString.SetReference("UI Text", "Options");
    
    // Setting with the table name and Key Id
    localizedString.SetReference("UI Text", 3432444324);
    
    // Setting with the Table Name Guid and Key name
    localizedString.SetReference(new System.Guid("6e79ded14bc9e0a4d9bf2b8aac246bfe"), "Options");
    
    // Setting with the Table Name Guid and the Key Id
    localizedString.SetReference(new System.Guid("6e79ded14bc9e0a4d9bf2b8aac246bfe"), 3432444324);
    In This Article
    Back to top
    Copyright © 2024 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)