ambiera logo

Ambiera Forum

Discussions, Help and Support.

folder icon Ambiera Forum > CopperCube > Help with CopperCube
forum topic indicator Need Help! image to Overlay (webgl)
person icon
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.

person icon
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

person icon
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!


Create reply:










 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


icon_holyicon_cryicon_devilicon_lookicon_grinicon_kissicon_monkeyicon_hmpf
icon_sadicon_happyicon_smileicon_uhicon_blink   






Copyright© Ambiera e.U. all rights reserved.
Contact | Imprint | Products | Privacy Policy | Terms and Conditions |