Click or drag to resize

EditorResourcePreviewGeneratorGenerateFromPath Method

Generate a preview directly from a path with the specified size. Implementing this is optional, as default code will load and call Generate(Resource, Vector2).

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 GenerateFromPath(
	string path,
	Vector2 size
)

Parameters

path
Type: SystemString

[Missing <param name="path"/> documentation for "M:Godot.EditorResourcePreviewGenerator.GenerateFromPath(System.String,Godot.Vector2)"]

size
Type: GodotVector2

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

Return Value

Type: Texture

[Missing <returns> documentation for "M:Godot.EditorResourcePreviewGenerator.GenerateFromPath(System.String,Godot.Vector2)"]

See Also