Skip to content

rllyy97/custom-resource-previews

Repository files navigation

Custom Resource Previews

A Godot plugin that enables custom preview images for your resources in the editor.

Custom Resource Previews Screenshot

Features

  • Define custom preview textures for your resource instances
  • Improve resource browsing and searching in the Godot editor
  • Give each resource instance a distinct visual identity

Installation

  1. Download the plugin to your project's addons/ directory
  2. Enable the plugin in Project Settings → Plugins
  3. Restart the editor if previews do not appear immediately

Usage

  1. Add the @tool annotation to your custom resource script
  2. Implement the _get_custom_preview_texture() method in your custom resource script:
@tool
extends Resource
class_name MyCustomResource

@export var icon: Texture2D = null

func _get_custom_preview_texture() -> Texture2D:
	return icon

The returned texture will be displayed as the preview icon in:

  • FileSystem dock
  • Resource picker dialogs

License

MIT License

Contact

https://github.com/rllyy97/

About

A Godot plugin that enables custom preview images for your resources in the editor

Resources

License

Stars

16 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors