whilst working on a project which enables the user to request only partial sets of data from a speckle commit at runtime, I’ve tried upgrading the branch and selection UI I initially created to something more akin to the speckle online viewer.
To give the user a faster overview, I intend to make use of the preview images available online - however, adapting the existing code from the SpeckleReceiver component has not worked out quite as well as I hoped. Whilst I do get a response from the server, it is only the placeholder image for commits, not the actual preview image itself. Attached are a couple images and code snippets:
When called, this function (akin to the GetPreviewImage function) should request the preview image and update the image within the UI elements via the callback. Whilst this happens, it only updates it with the default placeholder.
Have I missed some configuration within my Stream, or set up the request incorrectly?
I don’t see any obvious mistakes with your function.
Normally, you get the blue cube when:
The streamId / commitId aren’t real streams / commits.
They’ve only just been pushed and a preview image hasn’t been created yet.
The account you’re using doesn’t have the correct scopes.
I see you’ve added a Debug.Log(url) if you copy the url into your browser, what do you get?
If you get a preview image, then the URL is correct, maybe theres a problem with the account token?
If you get a blue cube still, I would check if that stream or commit exist.
If you’re curious, we have a VR-Sample project that has a pretty similar UI to yours, you can see here where we are fetching the image.
Let me know how you get on, I’d be happy to help investigate further.
thanks for the tips - troubleshooting via the links showed me that i falsely added the “referencedObject” field instead of the actual commit “id” into the link - no wonder i didn’t get any returns Switching that over resolved the issue, so thanks for that heads up.
Besides, it’s great to see you already having implemented a sample VR app in unity, if only I found that one earlier on my own… but hey, now I can compare, adjust and improve my app accordingly, given the use-case is similar, but not the same
If you have any further questions, don’t hesitate to reach out!
or even if you just have some progress to share, I’m always interested in seeing the amazing projects people are working on!