Skip to content

Asset Manager

Theo Ruefli edited this page Jul 24, 2026 · 16 revisions

System Summary

The asset manager is a menu that allows the user to import and use their own assets.


Connected Systems

Connecting Systems:

Subsystems:


Related Controls

Asset Manager Button:

  • Opens the Asset Manager and pauses background functionality

Close Button:

  • Closes the Asset Manager and resumes background functionality

Asset List Item:

  • Selects an asset item and shows its preview

Load Button:

  • Opens the file dialog and allows the user to select a file to replace the currently selected asset

Reset Button:

  • Resets the selected asset to its default image

Bugs

  • None.

Feature List / Breakdown of Features

Asset tabs:

  • Asset Manager contains tabs for replacing images, animations, and audio.

Asset list:

  • Each tab has a list of every asset in its category. Clicking a list item allows the user to preview the asset (including animation frames).

Load functionality:

  • The user can load a single image file to replace the selected asset image.
  • If the player is missing even a default texture, it will be replaced by a missing texture.

Error Messages:

  • Pop up error messages show for unsuccessful processes.

Image Swapping

  • Another script used specifically for swapping the images within the asset manager
  • Added in order to make the asset manager script smaller and more concise

Animation Swapping

  • Another script used specifically for swapping the animations within the asset manager
  • Added in order to make the asset manager script smaller and more concise

Important Variables

  • filePath: String = A file path containing where assets will be stored and retrieved.

  • mainTileMap: TileMapLayer = A reference to the main tile map.

  • imageSwapping : Control = A reference to the image swapping script.

  • animationSwapping : Control = A reference to the animation swapping script.

Important Functions

  • func generate_buttons(folder: String, container: VBoxContainer, type: AssetItem.AssetType) -> void: Generates a button per asset type that is specified.

  • func find_image(imageName: String, currentDirectory: String) -> Image: Finds an imageName from the currentDirectory.

  • func find_image_in_folder(folderPath: String) -> Image: Returns the first image found in folderPath.

  • func validate_image(image: Image) -> bool: Determines if image is valid based on multiple criteria.

  • func clear_image() -> DirAccess: Clears all stored image assets.


Future Work / Risks

Future Work:

  1. Adding functionality for audio files to be replaced

Risks:

  • None.

Miscellaneous Notes

  • None.

Clone this wiki locally