Basics
Guides
API Reference
Basics
Guides
API Reference
[33:7] extends: AssetLoaderService
Wraps FXGL's FXGLAssetLoaderService (com.almasb.fxgl.app.services.FXGLAssetLoaderService), the concrete in-engine implementation of AssetLoaderService used by every running FXGL game. Each load method has a documented assets-folder convention: loadImage - /assets/textures/ loadTexture - /assets/textures/ loadSound - /assets/sounds/ loadMusic - /assets/music/ loadText - /assets/text/ loadCSS - /assets/ui/css/ loadFont - /assets/ui/fonts/ loadUI - /assets/ui/ loadModel3D - /assets/models/ loadVideo - /assets/videos/ loadResourceBundle / loadPropertyMap - /assets/properties/ loadDialogueGraph - /assets/dialogues/ Reached at runtime via fxgl.getAssetLoader; obtain a wrapper via adopt.
FXGLAssetLoaderService ()
Empty default constructor; populated by adopt.
adopt (object Ajo)
Wraps an existing FXGLAssetLoaderService AussomJavaObject.
Ajo is an AussomJavaObject around a FXGLAssetLoaderService.A new wrapper.loadTexture (string Name)
Loads an image from /assets/textures/ and wraps it in a Texture.
Name is the image file name.A Texture wrapper.loadTextureSized (string Name, double Width, double Height)
Loads an image from /assets/textures/ at the requested size and wraps it in a Texture.
Name is the image file name.Width is the desired width in pixels.Height is the desired height in pixels.A Texture wrapper.loadTextureFromUrl (string UrlString)
Loads a Texture from a URL string.
UrlString is the source URL.A Texture wrapper.loadImage (string Name)
Loads an Image from /assets/textures/.
Name is the image file name.An AussomJavaObject around a javafx.scene.image.Image.loadImageFromUrl (string UrlString)
Loads an Image from a URL string.
UrlString is the source URL.An AussomJavaObject around a javafx.scene.image.Image.loadSound (string Name)
Loads a Sound from /assets/sounds/. Sound files are AudioClip-backed and best for short effects.
Name is the sound file name (e.g. "explosion.wav").An AussomJavaObject around a Sound.loadSoundFromUrl (string UrlString)
Loads a Sound from a URL string.
UrlString is the source URL.An AussomJavaObject around a Sound.loadMusic (string Name)
Loads a Music track from /assets/music/. Music files are MediaPlayer-backed and best for long background tracks.
Name is the music file name (e.g. "bgm.mp3").An AussomJavaObject around a Music.loadMusicFromUrl (string UrlString)
Loads a Music track from a URL string.
UrlString is the source URL.An AussomJavaObject around a Music.loadResourceBundle (string Name)
Loads a resource bundle from /assets/properties/. For better mobile support use loadPropertyMap instead.
Name is the resource bundle file name.An AussomJavaObject around a ResourceBundle.loadResourceBundleFromUrl (string UrlString)
Loads a resource bundle from a URL string.
UrlString is the source URL.An AussomJavaObject around a ResourceBundle.loadDialogueGraph (string Name)
Loads a DialogueGraph from /assets/dialogues/.
Name is the dialogue file name (e.g. "npc_intro.json").An AussomJavaObject around a DialogueGraph.loadDialogueGraphFromUrl (string UrlString)
Loads a DialogueGraph from a URL string.
UrlString is the source URL.An AussomJavaObject around a DialogueGraph.loadCutscene (string Name)
Loads a Cutscene from /assets/text/.
Name is the cutscene script file name.An AussomJavaObject around a Cutscene.loadCutsceneFromUrl (string UrlString)
Loads a Cutscene from a URL string.
UrlString is the source URL.An AussomJavaObject around a Cutscene.loadText (string Name)
Loads a text file from /assets/text/, returning each line as a separate list entry.
Name is the text file name (e.g. "level_0.txt").An AussomJavaObject around a ListloadTextFromUrl (string UrlString)
Loads a text file from a URL string as a list of lines.
UrlString is the source URL.An AussomJavaObject around a ListloadJSON (string Name, string ClassName)
Loads and parses a JSON file from /assets/. Pass the Java class name for the target Jackson-deserialized type.
Name is the JSON file name relative to /assets/.ClassName is the fully qualified Java class name of the deserialization target.An AussomJavaObject around an OptionalloadJSONFromUrl (string UrlString, string ClassName)
Loads and parses a JSON file from a URL string.
UrlString is the source URL.ClassName is the fully qualified Java class name of the deserialization target.An AussomJavaObject around an OptionalloadPropertyMap (string Name)
Loads a property map from /assets/.
Name is the property map file name (e.g. "languages/english.pmap").An AussomJavaObject around a PropertyMap.loadPropertyMapFromUrl (string UrlString)
Loads a property map from a URL string.
UrlString is the source URL.An AussomJavaObject around a PropertyMap.loadFont (string Name)
Loads a font from /assets/ui/fonts/ and wraps it in a FontFactory.
Name is the font file name (e.g. "quest.ttf").An AussomJavaObject around a FontFactory.loadFontFromUrl (string UrlString)
Loads a font from a URL string.
UrlString is the source URL.An AussomJavaObject around a FontFactory.loadCSS (string Name)
Loads a CSS file from /assets/ui/css/.
Name is the CSS file name.An AussomJavaObject around an FXGL CSS object.loadCSSFromUrl (string UrlString)
Loads a CSS file from a URL string.
UrlString is the source URL.An AussomJavaObject around an FXGL CSS object.loadLevel (string Name, object LoaderObj)
Loads a level file from /assets/levels/ using the supplied LevelLoader instance.
Name is the level file name.LoaderObj is an AussomJavaObject around a LevelLoader.An AussomJavaObject around a Level.loadUI (string Name, object ControllerObj)
Loads an FXML UI file from /assets/ui/ with the given UIController.
Name is the FXML file name.ControllerObj is an AussomJavaObject around a UIController.An AussomJavaObject around a UI object.loadUIFromUrl (string UrlString, object ControllerObj)
Loads an FXML UI file from a URL string with the given UIController.
UrlString is the source URL.ControllerObj is an AussomJavaObject around a UIController.An AussomJavaObject around a UI object.loadModel3D (string Name)
Loads a 3D model from /assets/models/.
Name is the model file name (e.g. "ship.obj").An AussomJavaObject around a Model3D.loadModel3DFromUrl (string UrlString)
Loads a 3D model from a URL string.
UrlString is the source URL.An AussomJavaObject around a Model3D.loadVideo (string Name)
Loads a video from /assets/videos/.
Name is the video file name.An AussomJavaObject around a MediaView.loadVideoFromUrl (string UrlString)
Loads a video from a URL string.
UrlString is the source URL.An AussomJavaObject around a MediaView.getStream (string Name)
Opens an InputStream to a named resource. The caller is responsible for closing the stream. Useful for assets not covered by the typed load methods.
Name is the resource path starting with "/".An AussomJavaObject around a java.io.InputStream.clearCache ()
Clears every cached asset, freeing memory.
this object
Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.