Version: Unity 6.7 Alpha (6000.7)
LanguageEnglish
  • C#

LocalizedTable.GetTable

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Declaration

public ResourceTable GetTable();

Returns

ResourceTable The resolved table, or null when it is not available synchronously.

Description

Returns the table synchronously if it is already loaded.

Does not trigger a load. The result is null when the table is not loaded yet, the reference is empty, or no resource database is configured. Use LocalizedTable.GetTableAsync to load the table on demand instead.

<para>Read an already-loaded table.</para>

using Unity.Localization;
using UnityEngine;

namespace Unity.Localization.Samples { public class LocalizedTableGetTableExample { public void Read() { var localizedTable = new LocalizedTable(); localizedTable.TableReference = "My Strings"; ResourceTable table = localizedTable.GetTable(); if (table != null) Debug.Log(table.name); } } }