 archangel Registered User |
Quote
|
2025-04-13 06:32:12 |
|
As mentioned above, need help with using code to load a image into a 2D Overlay. Ive been able to use code to set the text of a overlay but everything i try for loading an image wont work. If someone can provide a working method, it would be appreciated thanks! This is for Webgl platform.
|
 hadoken Registered User |
Quote
|
2025-04-13 12:22:59 |
|
@archangel, annoying that this does not work reliably and predictably like when publishing to Windows .exe, but here is an example I got working by fetching the image from a helper node (know you can always change overlay images also without code by using the built-in "Change a texture" action also with 2d overlays):
https://www.dropbox.com/scl/fi/o...
also consider trying different image path spellings as these may affect the loading procedure depending on platform (Windows/Linux/WebGL)
overall - file loading has issues in webgl, better preload all needed images as textures on one or multiple helper nodes or multiple material slots, which can be accessed & assigned more flawlessly in webgl at runtime using javascript
|
 archangel Registered User |
Quote
|
2025-04-13 17:14:51 |
|
Thank you @hadoken. I am creating a custom Inventory system this was all i needed to make it work!
|