ambiera logo

Ambiera Forum

Discussions, Help and Support.

folder icon Ambiera Forum > CopperCube > Programming and Scripting
forum topic indicator Embeded Files - coding vs non-coding
person icon
veganpete
Registered User
Quote
2023-06-22 23:07:15

When I use the Change a Texture action (non-coding), CopperCube embeds all the required textures in the game.exe.

However....

When I use ccbSetSceneNodeProperty('Image); (coding), the game.exe then just load the texture file from my local machines directory and doesn;t embed the images with the game.exe.

(Presumably) this means that the image files will not work when the game is shared and run on a different host device?

Is there a workaround for this please - other than bundling all the image files separately with the game.exe?

Thanky.

person icon
Guest
Guest
Quote
2023-06-22 23:33:57

What I've been doing is add the texture to an empty node in your scene and then I write code to get the material from that node and apply it. The functions for getting and setting the material is under the Scene Node Handling section of the JS reference.

person icon
just_in_case
Moderator
Quote
2023-06-23 12:45:49

@guest is right, if you have the materials applied to empty node, then you can use them directly without loading them externally. This is something similar that happens in the 2D animation maker plugin of mine.

person icon
VP
Guest
Quote
2023-06-23 23:44:19

Perfect! Thank you both. Good solution.


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 |