Unity3d Steamworks is not initialized - unity3d

I am doing a unity project for Steam. So I downloaded and added SteamWorks.net to the project created an empty object and attached the steam manager code to that. And for the achievements, in the script, import steam using
'using Steamworks;'
And set achievements using
SteamUserStats.SetAchievement();
SteamUserStats.StoreStats();
Now when I run the code I am getting an error
'Steamworks is not initialized".
how to fix this

When testing make sure the steam_appid.txt is in the folder. SteamManager monobehaviour will initialize API on awake.

Also this worked for me and I felt kind of dumb but it's important. Double check to make sure your steam app is currently logged in. If your turned on your computer and it logged you out or if there was an update or something that requires you to log in than it wont work and it'll throw that error. Otherwise you should be good if you listened to the other answer as well.

Related

Unity Steamworks Uninitialized error after returning to the offline scene with Mirror

To preface this, my problem is almost exactly the same as this. I have a game which utilizes Unity Mirror for multiplayer and FizzySteamworks as the transport. When I launch the game I can go through the game as expected, until I wish to leave the lobby. When I try to press my leave lobby button, it calls Manager.StopHost() which then takes me to my offline scene. However when I try and start a new lobby/game, I get the error: InvalidOperationException: Steamworks is not initialized.
Now as I understand, because my NetworkManager is in my offline scene, when I switch back to the offline scene, something (SteamManager maybe or NetworkManager or something else, I havent found what) destroys my old NetworkManager as to prevent having duplicates, which makes sense. The problem is that the new one/one from the offline scene is not the one I should be using/isn't being initialized causing the error.
The fix described in the similar post does not work for me as Persist Network Manager To Offline Scene is no longer an option in the Mirror NetworkManager. I have tried finding where the old one is destroyed (No luck), as well as trying to reset/re-initialize steam in some way, also to no avail.
Are there any recommendations on how I can either fix either destroying the old NetworkManager or fix the steam initializiation failure? Thanks in advance.

Unity AltspaceVR Uploader Fails - EditorCoroutine.cs "Object reference not set to an instance of an object"

I'm trying to upload a Unity project via the AltspaceVR Uploader and I've followed all the steps for migrating to the correct Unity version (2020.3.18f1) and converted all materials to Universal Render Pipeline, but when I attempt to upload I receive these error messages and I don't know how to go about fixing them. Any help would be appreciated.
I've tried creating a fresh blank project and that uploads correctly. I've also tried removing everything from my scene but that still fails, so it seems to be failing because of whatever the issue is with this EditorCoroutine.cs script.
I found this bit that seems promising.
http://plbm.com/?p=221
Following those instructions, the bit of code that is causing the exception is:
if(advance)
{
data = default(ProcessorData);
return enumerator.MoveNext();
}
return true;

Oculus VRC with Unity

I'm developping a game with Unity.
I'm trying to check all of the VRC (Virtual Reality Check) tests, especially TestResponseToRecenterRequest and TestAppShouldQuit ( link ).
My problem is, I have absolutly no idea how to listen these requests.
Most of forums said to use ovr_GetSessionStatus. However, it's a C++ method, not a C# one. Can you point me to a valid solution to listen ovr status or, at least, handle recenter and quit requests ?
Cordially
Probably you already fixed this, but i found that the ovr_GetSessionStatus is exposed as static variables on the OVRPlugin class, so you can check on an Update().
if (OVRPlugin.shouldRecenter)
{
OVRManager.display.RecenterPose();
}

Can both image target and object target be added one single database in unity vuforia?

I am developing an android app where I have to train my app to recognize two images and four objects.I created one single database where I added all the images and objects target in vuforia developer site and created the unity package. Now neither image nor object is getting recognized.
Probably the problem is the same for objects and images.
I think you should share some more info about what your doing as well as some meaningful code implementing it.
W/O that, I would suggest:
verify that the database and trackables are loaded and active # runtime
if so, see in console that the trackables are tracked by Vuforia
if so, verify the code enabling your augmentations
Please confirm whether have run trough these steps already and what results you got. I can share some code and further tips once the issue is a little but more specific.
Regards

Problems getting OSVR to initialise the HMD Display with Oculus DK2

I am using a Oculus DK2 (v0.8) and OSVR SDK. I'm having a problem getting the HMD to run/display anything.
The Oculus samples and the OSVR samples do work however, so the osvr_server seems to run fine.
My application itself renders a test scene just fine when not using a HMD.
I tried two approaches:
First, just creating a osvr context and creating a DisplayConfig object. This seems to work, but DisplayConfig::checkStartup() fails (I do this in a loop, calling update on the context when the checkStartup call is failing). I used the OpenGLSample.cpp as a guide for this
Second, I tried using a RenderManager, but the call to createRenderManager results in a crash within the RenderManager.dll. I get the same crash wether I create the graphics lib object myself or if I let the library create it.
I am quite stuck now, since the demos and examples do work, I have no idea where to look for the error on my side. Creating the context works, querying interfaces as well, but the crash with createRenderManager is beyond me.
Does anyone have any hints or ideas what the problem could possibly be?
Regards and thanks in advance
pettersson
RenderManager should not crash during open. There have been a couple of bug fixes recently to avoid that happening, and the latest RenderManager binaries, libraries and header files are available with the SDK download from http://osvr.github.io/using/ along with updated copies of the example programs.
When something goes wrong in RenderManager, it usually reports that to standard error. We're moving that to a logging interface, but for now it should show up on the console. Posting an output of that as an issue at https://github.com/sensics/OSVR-RenderManager/issues is a good way to let the developers know that there is a problem. Of course, providing the same sort of information you provided here will be helpful as well.