How to use Android's Image as Kanzi's Texture?
AnsweredIn reference to this tutorial:
https://docs.kanzi.com/3.9.6/en/working-with/textures/loading-texture-images-from-the-file-system.html?highlight=png
How to do the same for Android.
Example Code:
copyFile("/data/user/0/com.rightware.kanzi.driverecorderhmi/Image1.png","/data/user/0/com.rightware.kanzi.KanziProject/Image4.png");
Node root = ((KanziSurfaceView)view).getRoot();
Node node = root.lookupNode("#Box");
ResourceID hhh = new ResourceID("BoxTexture");
runtimeRef.get().setResourceDirectory("/data/user/0/com.rightware.kanzi.KanziProject");
node.addResource(hhh, file://. /Image1.png); node.addResource(hhh, file://.
0
-
This issue is related to the following bug fixed in 3.9.9 release:
So you will need to use "file:///Image1.png" instead of "file://./Image1.png" and the issue should be resolved.0
Please sign in to leave a comment.
Comments
1 comment