Ejemplo n.º 1
0
        void LoadTableResource(AsyncOperationHandle <IList <IResourceLocation> > operationHandle)
        {
            // TODO: Fallback if table is not found
            if (operationHandle.Status != AsyncOperationStatus.Succeeded || operationHandle.Result.Count == 0)
            {
                Complete(null, true, $"Could not find a {m_SelectedLocale} table with the name '{m_CollectionName}`");
                return;
            }

            var loadTableOperation = AddressablesInterface.LoadAssetFromLocation <TTable>(operationHandle.Result[0]);

            if (loadTableOperation.IsDone)
            {
                TableLoaded(loadTableOperation);
            }
            else
            {
                loadTableOperation.Completed += TableLoaded;
            }
        }