docs.unity3d.com
    Show / Hide Table of Contents

    Class KeyColumn

    Represents a column in a Google Sheets that can be used to map the row to a StringTableEntry.

    Inheritance
    Object
    SheetColumn
    KeyColumn
    Inherited Members
    SheetColumn.Column
    SheetColumn.ColumnIndex
    SheetColumn.PushEnd()
    SheetColumn.PullEnd()
    SheetColumn.IndexToColumnName(Int32)
    SheetColumn.ColumnNameToIndex(String)
    Namespace: UnityEditor.Localization.Plugins.Google.Columns
    Syntax
    [Serializable]
    public class KeyColumn : SheetColumn, IPullKeyColumn

    Fields

    ColumnHeader

    The default name to use for the column is "Key".

    Declaration
    public const string ColumnHeader = "Key"
    Field Value
    Type Description
    String

    Properties

    PushFields

    Controls which cell fields to synchronize.

    Declaration
    public override PushFields PushFields { get; }
    Property Value
    Type Description
    PushFields
    Overrides
    SheetColumn.PushFields

    Methods

    PullBegin(StringTableCollection)

    Called when starting a pull to allow a column to initialize itself.

    Declaration
    public override void PullBegin(StringTableCollection collection)
    Parameters
    Type Name Description
    StringTableCollection collection

    The collection to update from the Google Sheet.

    Overrides
    SheetColumn.PullBegin(StringTableCollection)

    PullCellData(SharedTableData.SharedTableEntry, String, String)

    Called to update the StringTableCollection using the provided cell data.

    Declaration
    public override void PullCellData(SharedTableData.SharedTableEntry keyEntry, string cellValue, string cellNote)
    Parameters
    Type Name Description
    SharedTableData.SharedTableEntry keyEntry

    The entry being updated for this cell.

    String cellValue

    The cell value or null if PushFields does not contain the flag Value.

    String cellNote

    The cell note or null if PushFields does not contain the flag Note.

    Overrides
    SheetColumn.PullCellData(SharedTableData.SharedTableEntry, String, String)

    PullKey(String, String)

    Provides the entry that the current row represents.

    Declaration
    public SharedTableData.SharedTableEntry PullKey(string cellValue, string cellNote)
    Parameters
    Type Name Description
    String cellValue

    The value in the cell for the column.

    String cellNote

    The value in the notes field for the column.

    Returns
    Type Description
    SharedTableData.SharedTableEntry

    The entry for the current row or null if one could not be found.

    Implements
    IPullKeyColumn.PullKey(String, String)

    PushBegin(StringTableCollection)

    Called when starting a push to allow a column to initialize itself.

    Declaration
    public override void PushBegin(StringTableCollection collection)
    Parameters
    Type Name Description
    StringTableCollection collection

    The collection to push to a Google Sheet.

    Overrides
    SheetColumn.PushBegin(StringTableCollection)

    PushCellData(SharedTableData.SharedTableEntry, IList<StringTableEntry>, out String, out String)

    Extracts the data that should populate the columns cell for the row associated with the Key.

    Declaration
    public override void PushCellData(SharedTableData.SharedTableEntry keyEntry, IList<StringTableEntry> tableEntries, out string value, out string note)
    Parameters
    Type Name Description
    SharedTableData.SharedTableEntry keyEntry

    The Key that represents the row in the spreadsheet.

    IList<StringTableEntry> tableEntries

    The StringTableEntry for the current SharedTableData.SharedTableEntry. The order of the tables will match the source StringTableCollection, If a table does not contain data for the current key then a null entry will be used.

    String value

    The value to be used for the cell. This can be null if PushFields is Note or the cell should be empty.

    String note

    The value to be used for the cell note. This can be null if PushFields is Value or if there should not be a note for this cell.

    Overrides
    SheetColumn.PushCellData(SharedTableData.SharedTableEntry, IList<StringTableEntry>, out String, out String)

    PushHeader(StringTableCollection, out String, out String)

    Sets the column title and optional note. These values are always set regardless of the value of PushFields.

    Declaration
    public override void PushHeader(StringTableCollection collection, out string header, out string headerNote)
    Parameters
    Type Name Description
    StringTableCollection collection
    String header

    The title to use for the column header.

    String headerNote

    Optional note that can be added to the header.

    Overrides
    SheetColumn.PushHeader(StringTableCollection, out String, out String)
    Back to top
    Terms of use
    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