How can I export without needing to add the Assets separately?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By anonymous

Using Godot 3.0.2
I have added click masks using code.
Because there was a problem adding it through the editor.

func _ready():
	var Tree_image = Image.new()
	Tree_image.load("res://Assets/Tree.png")
	var Tree_mask = BitMap.new()
	Tree_mask.create_from_image_alpha(Tree_image)
	texture_click_mask = Tree_mask

After exporting the project, I need to add the Assets folder with containing .png files.
Otherwise I get these errors:

:bust_in_silhouette: Reply From: Calinou

You need to add a filter for non-resource exports, so that all PNG images will be exported into the PCK file even if they are not considered as resources by the engine. This is because the engine isn’t “aware” you’re loading those PNG files at runtime.

You can do so in the Export dialog as shown below:

Export dialog

Thank you.
I hopp this helps others too.

anonymous | 2018-06-19 10:52