How to track loaded resources: mudanças entre as edições
Ir para navegação
Ir para pesquisar
(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...') |
Sem resumo de edição |
||
Linha 1: | Linha 1: | ||
On your "MaterialsLoadedCallback", you can use the following snippet to track the loaded resources, in case you need to copy/move them elsewhere: | 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"> | <source lang="csharp"> | ||
foreach ( | foreach (var kvp in assetLoaderContext.LoadedTextures) | ||
{ | { | ||
string finalPath = kvp.Key.ResolvedFilename; | string finalPath = kvp.Key.ResolvedFilename; | ||
Linha 9: | Linha 9: | ||
} | } | ||
} | } | ||
foreach ( | foreach (var kvp in assetLoaderContext.LoadedExternalData) | ||
{ | { | ||
string finalPath = kvp.Value; | string finalPath = kvp.Value; |
Edição das 21h58min de 7 de junho de 2021
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 (var kvp in assetLoaderContext.LoadedTextures) { string finalPath = kvp.Key.ResolvedFilename; if (!string.IsNullOrEmpty(finalPath)) { //Finalpath contains the loaded texture filename } } foreach (var kvp in assetLoaderContext.LoadedExternalData) { string finalPath = kvp.Value; if (!string.IsNullOrEmpty(finalPath)) { //Finalpath contains the loaded resource filename } } </source>