Click or drag to resize

EditorResourcePreviewGeneratorGenerate Method

Generate a preview from a given resource with the specified size. This must always be implemented.

Returning an empty texture is an OK way to fail and let another generator take care.

Care must be taken because this function is always called from a thread (not the main thread).

Namespace:  Godot
Assembly:  GodotSharpEditor (in GodotSharpEditor.dll) Version: 1.0.0
Syntax
C#
public virtual Texture Generate(
	Resource from,
	Vector2 size
)

Parameters

from
Type: GodotResource

[Missing <param name="from"/> documentation for "M:Godot.EditorResourcePreviewGenerator.Generate(Godot.Resource,Godot.Vector2)"]

size
Type: GodotVector2

[Missing <param name="size"/> documentation for "M:Godot.EditorResourcePreviewGenerator.Generate(Godot.Resource,Godot.Vector2)"]

Return Value

Type: Texture

[Missing <returns> documentation for "M:Godot.EditorResourcePreviewGenerator.Generate(Godot.Resource,Godot.Vector2)"]

See Also