[SharpReality for Hololens] Loading a scene from an xml file ...anyone done it?

I'm unable to load any xml file, even if simple scene with a single node, and even if I save the file in realtime then load it back.

Always results in:

INFO: Loading scene from Data/Scenes/PBRExample.xml
Exception thrown: 'System.AccessViolationException' in Urho.dll
An unhandled exception of type 'System.AccessViolationException' occurred in Urho.dll
Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

I also edited the PBRExample.xml file to remove the script and skybox components, and then removed nearly everything. But similar results.

Posts

  • utekaiutekai USMember ✭✭✭

    Next, edited the file to remove the scene and used

    node.LoadXml(file) rather than scene.LoadXml(file)

    Which gives success.

    With this success in hand, removed scene from the pbr scene xml file, but left in all else including script and skybox components.

    Then wrapped the nodes in a main container node, rather than a scene. This led to success. While sizing was off and the scene wasn't the most stable, it generally was working. Some very nice effects.

    Took out skybox and scriptinstance components. More success.

    Generally looked good, but still it taxes the hololens quite a bit, so stability is weak.

    Also it takes about 20 seconds to load.

    So the moral of this story is SharpReality's StereoApplication implementation with hard-coded Scene takes away flexibility.

    But generally all is working, just not as stable as one might hope.

  • utekaiutekai USMember ✭✭✭

    Also wanted to add, the 20 second load time goes to almost nothing if the materials are cached.

    So if the node.LoadXml(file) is called a second time, the scene appears immediately.

Sign In or Register to comment.