Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loaded resource as image file, this will not work on export #6

Open
JanGross opened this issue Aug 4, 2023 · 2 comments
Open

Loaded resource as image file, this will not work on export #6

JanGross opened this issue Aug 4, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@JanGross
Copy link
Owner

JanGross commented Aug 4, 2023

The fallback image does not load when running the exported binary.
Instead of calling load as a member of image we have to use the static load method provided for imported assets.

if error != OK:
print("Error fetching image ", str(error))
image.load("res://assets/fallback_card.png")

@JanGross JanGross added the bug Something isn't working label Aug 4, 2023
@JanGross
Copy link
Owner Author

JanGross commented Aug 5, 2023

Fixed in 879e494

@JanGross JanGross closed this as completed Aug 5, 2023
@JanGross
Copy link
Owner Author

JanGross commented Aug 7, 2023

Still not fixed in production builds

Error fetching image 43
ERROR: Invalid image: null
   at: (scene/resources/texture.cpp:171)
SCRIPT ERROR: Attempt to call function 'set_size_override' in base 'null instance' on a null instance.
          at: RenderImage (res://scripts/Renderer.gd:86)

@JanGross JanGross reopened this Aug 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant