try { assetManager.registerLocator(locatorPath, ContentTextureLocator.class); tex = assetManager.loadTexture(new ContentTextureKey(filename, content)); } catch(Exception e) {} finally { assetManager.unregisterLocator(locatorPath, ContentTextureLocator.class); Texture tex = null; try { tex = assetManager.loadTexture(new ContentTextureKey(scene.currentAssetInfo.getKey().getFolder() + filename, content)); } catch(Exception e) {} if(tex != null)
@SuppressWarnings("rawtypes") @Override public AssetInfo locate(AssetManager manager, AssetKey key) { if(key instanceof ContentTextureKey) { String name = key.getName(); byte[] content = ((ContentTextureKey) key).getContent(); if(content != null) { return new ContentAssetInfo(manager, key, content); } else { logger.log(Level.WARNING, "No content for " + name); return null; } } else { logger.log(Level.SEVERE, "AssetKey should be TextureContentKey instance"); return null; } }
@SuppressWarnings("rawtypes") @Override public AssetInfo locate(AssetManager manager, AssetKey key) { if(key instanceof ContentTextureKey) { String name = key.getName(); byte[] content = ((ContentTextureKey) key).getContent(); if(content != null) { return new ContentAssetInfo(manager, key, content); } else { logger.log(Level.WARNING, "No content for " + name); return null; } } else { logger.log(Level.SEVERE, "AssetKey should be TextureContentKey instance"); return null; } }
try { assetManager.registerLocator(locatorPath, com.jme3.scene.plugins.fbx.ContentTextureLocator.class); tex = assetManager.loadTexture(new ContentTextureKey(filename, data.content)); } catch(Exception e) { } finally {
@SuppressWarnings("rawtypes") @Override public AssetInfo locate(AssetManager manager, AssetKey key) { if(key instanceof ContentTextureKey) { String name = key.getName(); byte[] content = ((ContentTextureKey) key).getContent(); if(content != null) { return new ContentAssetInfo(manager, key, content); } else { logger.log(Level.WARNING, "No content for " + name); return null; } } else { logger.log(Level.SEVERE, "AssetKey should be TextureContentKey instance"); return null; } }
try { assetManager.registerLocator(locatorPath, ContentTextureLocator.class); tex = assetManager.loadTexture(new ContentTextureKey(filename, content)); } catch(Exception e) {} finally { assetManager.unregisterLocator(locatorPath, ContentTextureLocator.class); Texture tex = null; try { tex = assetManager.loadTexture(new ContentTextureKey(scene.currentAssetInfo.getKey().getFolder() + filename, content)); } catch(Exception e) {} if(tex != null)