In this PR, we add the support that, users can now load local image from an absolute path as suggested in #314
In this solution (we might still need to seek for another better solution?), we add an extra parameter isAbsolutePath to bothImage.file and the ctor of FileImage: If the parameter is true, we won't process the path as we do before (when we assume that all local image file paths are prefixed by the streamingAssets path) and try to load the image from the original path directly.
Note that in this solution, once the user pass in the absolute path of the image, he/she is also responsible to deal with the platform-dependent issues.
We also change the ImageTest sample a bit to show a basic use case.
In this PR, we add the support that, users can now load local image from an absolute path as suggested in #314
In this solution (we might still need to seek for another better solution?), we add an extra parameter
isAbsolutePath
to bothImage.file
and thector
ofFileImage
: If the parameter is true, we won't process the path as we do before (when we assume that all local image file paths are prefixed by the streamingAssets path) and try to load the image from the original path directly.Note that in this solution, once the user pass in the absolute path of the image, he/she is also responsible to deal with the platform-dependent issues.
We also change the
ImageTest
sample a bit to show a basic use case.