-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with the nuget package for Preview2 #1
Comments
Issue resolved. Has to do with the order in which the StereoKit is initialized in a UWP vs Windows (console) app. The call to SK.Initialize(settings) has to come very early. In my UWP app I am doing a lot of stuff to initialize from cloud resources before making the first call to StereoKit which in turn uses the StereoKitC.dll. In UWP I am showing an extended startup screen to let user know. Doesn't happen in a console app. This code is what threw me off: I thought this caused the StereoKitC.dll to be "loaded", it does not. My new startup sequence is sort of like this:
The unfortunate thing is the user has to wait while it loads. I am thinking about creating a "loading scene" and then go do the sequence to fetch windows and cloud resources and then kick-off my main app step. Hope this help others |
One more thing on the load sequence. You must add the HolographicRemoting BEFORE calling SK.Initialize() or StereoKit defaults to Windows Screen display.
then... You can check the SKready status in your downstream code. |
Might also be good to note, Holographic Remoting should work fine with console style apps! I'd definitely recommend getting the application active and initializing things async in the background! This might be a good occasion for a scene system, with a separate loading scene. You can find a relatively simple scene system over in this project, ( https://github.com/StereoKit/StereoKitReleaseNotes/tree/main/v0.3.1 ) might be a nice source of inspiration!
Skipping this would have surfaced an error in the log! UWP doesn't seem to surface the log very well though, which is kinda unfortunate. It seems to hide the log if you don't have native debugging on, which is the default :( This sounds like a good place for me to throw exceptions instead. |
It is a little strange that the pre-load does not seem to actually pre-load. I can think of several things happening that could cause this, now that you explained the execution path. The first may simply be disk load latency even with SSD drives Windows can be awfully busy doing other stuff. Another could be the runtime being lazy if you don't actually call anything that "needs" the library. Naturally it could be both. My expectation would be though, given the error reported "not found" a pointer is being lost between the time the pre-load is called and the call to Initialize. |
General questions. Why does the bounding box respond to pinch several inches from the bounding box? I'm using the DemoMath example.
` |
Everything is fine in the StereoKitRemoting app until you start adding other namespaces and assemblies. It seems that the debugger can't find the StereoKitC.dll in the runtime folder.
The text was updated successfully, but these errors were encountered: