Method GetTableEntryAsync
GetTableEntryAsync(TableReference, TableEntryReference, Locale, FallbackBehavior)
Returns the entry from the requested table. A table entry will contain the localized item and metadata. This method is asynchronous and may not have an immediate result. Check IsDone to see if the data is available, if it is false then you can use the Completed event to get a callback when it is finished, yield on the operation or call WaitForCompletion to force the operation to complete. Once the Completed event has been called, during the next update, the internal operation will be returned to a pool so that it can be reused. If you do plan to keep hold of the handle after completion then you should call Acquire to prevent the operation being reused and UnityEngine.AddressableAssets.Addressables.Release(UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle) to finally return the operation back to the pool.
Declaration
public virtual AsyncOperationHandle<LocalizedDatabase<TTable, TEntry>.TableEntryResult> GetTableEntryAsync(TableReference tableReference, TableEntryReference tableEntryReference, Locale locale = null, FallbackBehavior fallbackBehavior = FallbackBehavior.UseProjectSettings)
Parameters
Type | Name | Description |
---|---|---|
TableReference | tableReference | The table identifier. Can be either the name of the table or the table collection name Guid. |
TableEntryReference | tableEntryReference | A reference to the entry in the table. |
Locale | locale | The Locale to load the table from. Null will use SelectedLocale. |
FallbackBehavior | fallbackBehavior | A Enum which determines if a Fallback should be used when no value could be found for the Locale. |
Returns
Type | Description |
---|---|
AsyncOperationHandle<LocalizedDatabase<TTable, TEntry>.TableEntryResult> |
Remarks
Internally the following is performed when an Entry is requested. First the table will be requested using GetTableAsync(TableReference, Locale). Once the table is loaded the entry will be extracted like so: