Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
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. |
||||
|
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. |
||||
|
@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. |
||||
|
Perfect! Thank you both. Good solution. |
|