How to track loaded resources

De TriLib
Revisão de 21h57min de 7 de junho de 2021 por Trilib (discussão | contribs) (Criou página com 'On your "MaterialsLoadedCallback", you can use the following snippet to track the loaded resources, in case you need to copy/move them elsewhere: <source lang="csharp"> foreac...')
(dif) ← Edição anterior | Revisão atual (dif) | Versão posterior → (dif)
Ir para navegação Ir para pesquisar

On your "MaterialsLoadedCallback", you can use the following snippet to track the loaded resources, in case you need to copy/move them elsewhere: <source lang="csharp"> foreach (KeyValuePair<ITexture, TextureLoadingContext> kvp in assetLoaderContext.LoadedTextures) { string finalPath = kvp.Key.ResolvedFilename; if (!string.IsNullOrEmpty(finalPath)) { //Finalpath contains the loaded texture filename } } foreach (KeyValuePair<string, string> kvp in assetLoaderContext.LoadedExternalData) { string finalPath = kvp.Value; if (!string.IsNullOrEmpty(finalPath)) { //Finalpath contains the loaded resource filename } } </source>