Open sofussts opened 3 years ago
The UL# distribution includes a build of UL 1.2.0-beta - the API for stable may be different.
I'm unsure what the problem here is yet, but I'll address it for the UL# 1.2 stable release.
Tested with UL v1.2.0-beta.2. Same behaviour and error as with the stable version.
Please note that when I try to test with the binaries distributed with the UltralightSharp SDK in the folder UltralightSharp-master\UltralightSharp.Core.WinX64\runtimes\win-x64\native, it seems that these are built for the AMD processor (or something else) so I get an error message when I try to use them:
System.BadImageFormatException: ' is not a valid Win32 application. (Exception from HRESULT: 0x800700C1)'
Afaik it finally was fixed in 1.3
I am trying to implement my own FileSystem code, but I am not able to get the assets/index.html file to be displayed properly. The UltralightSharp.SafeDemo runs well when the default AppCore.EnablePlatformFileSystem is used. Next I try to use my own by setting the FileSystem:
When my own implementation of the FileSystem is set (basically, just my own implementation of the callback methods) , then nothing is shown in the UI for the URL "file:///index.html" and the view.SetFailLoadingCallback method reports:
See the attached file for details on how the MyFileSystem class is currently implemented. MyFileSystem.zip
Breakpoints in my code show that the FileSystemReadFromFileCallback is called as it is supposed to. I am able to load the data as UTF8 byte array and return the data (the test code that is commented out below shows that the data is loaded from the file into the string s) :
After this method is done the FileSystemGetFileMimeTypeCallback method is called, where I set the returned result to the hardcoded mime type: "text/html" and return true.
After that the next thing that is logged is the reported error message. Is there some sample code that demonstrates how to build a custom FileSystem instance in c#? What is the problem causing the reported error message?
I am currently using ultralight-sdk-1.2.0-win-x64-min with the latest version of UltralightSharp from the master branch.