reckfellENGINE

EditorResourceTooltipPlugin

A plugin that advanced tooltip for its handled resource type.

On this page
class EditorResourceTooltipPluginReckfellSharpEditorInherits RefCounted

A plugin that advanced tooltip for its handled resource type.

Resource tooltip plugins are used by ContentBrowser to generate customized tooltips for specific resources. E.g. tooltip for a Texture2D displays a bigger preview and the texture's dimensions. A plugin must be first registered with ContentBrowser.AddResourceTooltipPlugin. When the user hovers a resource in content browser which is handled by the plugin, EditorResourceTooltipPlugin._MakeTooltipForPath is called to create the tooltip. It works similarly to Control._MakeCustomTooltip.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Constructors1

EditorResourceTooltipPluginConstructor
# EditorResourceTooltipPlugin
C#
public EditorResourceTooltipPlugin();

Methods3

RequestThumbnailvoid
# RequestThumbnail
C#
public void RequestThumbnail(string path, TextureRect control);

Requests a thumbnail for the given TextureRect. The thumbnail is created asynchronously by EditorResourcePreview and automatically set when available.

Parameters
NameTypeDefault
pathstring—
controlTextureRect—
_Handlesbool
# _Handles
C#
public virtual bool _Handles(string type);

Return true if the plugin is going to handle the given Resource type.

Parameters
NameTypeDefault
typestring—
Returns bool
_MakeTooltipForPathControl
# _MakeTooltipForPath
C#
public virtual Control _MakeTooltipForPath(string path, Reckfell.Collections.Dictionary metadata, Control @base);

Create and return a tooltip that will be displayed when the user hovers a resource under the given path in content browser. The metadata dictionary is provided by preview generator (see EditorResourcePreviewGenerator._Generate). base is the base default tooltip, which is a VBoxContainer with a file name, type and size labels. If another plugin handled the same file type, base will be output from the previous plugin. For best result, make sure the base tooltip is part of the returned Control. Note: It's unadvised to use ResourceLoader.Load, especially with heavy resources like models or textures, because it will make the editor unresponsive when creating the tooltip. You can use EditorResourceTooltipPlugin.RequestThumbnail if you want to display a preview in your tooltip. Note: If you decide to discard the base, make sure to call Entity.QueueFree, because it's not freed automatically.

Parameters
NameTypeDefault
pathstring—
metadataReckfell.Collections.Dictionary—
baseControl—
Returns Control
Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.