Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
DaJuJu's avatar
DaJuJu
Explorer
2 years ago

DllNotFoundException: InteractionSdk assembly ERROR (help)

Hi

I wonder does anyone has the same problem as I do with this error below.

Essentially this error doesn't influence the interaction, but you cannot see the hand mesh. If during the play mode, manually turn on this script under OVRHand\HandDataLeft and Right. The mesh coming back again.

I have tried many ways to solve this issue it doesn't work.

Including installing different versions of Unity editors, (2022.3.5f1 LTS, 2022.3.4f1 LTS, 2022.3.2f1 LTS )

And tried different Oculus Integration SDKs (V51, V53.1, V54.1, V55)

The weirdest thing about this is when I start a brand new 3D Unity project, installed the XR plugin manager, installed Oculus XR Plugin, and then installed Oculus Integration (with all the accept, clean up, and upgrade) The first time run, it works (link mode with Quest Pro), and without any error.

If I save the project and close the Unity editor, after re-open the project it will never work again. The above error will keep coming, no way to get back working.

I don't know if any of you have had a similar issue like this, and do you have a fix for that? Thank you so much.

 

11 Replies

Replies have been turned off for this discussion
  • Yes, have the same problem. Still don't know a solution.

     

  • As I understand the problem with Windows 11. For now I cannot downgrade to check this solution.

     

  • The easist way is to move DLL to other Plugins folder. It works once every enter to Unity.

     

     

  • Okay. I wrote a stupid workaround for this.

    using System.IO;
    using UnityEditor;
    using UnityEngine;

    public class MoveDllScript : MonoBehaviour
    {
    static readonly string originPath = Application.dataPath + "/Oculus/Interaction/Runtime/Plugins/Win64/InteractionSdk.dll";
    static readonly string destinationPath = Application.dataPath + "/Oculus/Interaction/Runtime/Plugins/InteractionSdk.dll";

    [MenuItem("Custom/Move DLL")]
    public static void MoveDLL()
    {
    // We'll use the presence of the DLL at the root as a flag to indicate the file has been moved
    if (File.Exists(destinationPath))
    {
    // If DLL is at the root, move it back to the Win64 folder
    MoveFile(destinationPath, originPath);
    Debug.Log("Moved DLL from root to Win64 folder.");
    }
    else
    {
    // Otherwise, move it to the root
    MoveFile(originPath, destinationPath);
    Debug.Log("Moved DLL from Win64 folder to root.");
    }
    }

    static void MoveFile(string from, string to)
    {
    // Ensure the destination directory exists
    string destinationDirectory = Path.GetDirectoryName(to);
    if (!Directory.Exists(destinationDirectory))
    {
    Directory.CreateDirectory(destinationDirectory);
    }

    // Move the file
    if (File.Exists(from))
    {
    File.Move(from, to);
    // Delete the .meta file at the source location, if it exists
    if (File.Exists(from + ".meta"))
    {
    File.Delete(from + ".meta");
    }

    // Import the moved asset
    string relativeTo = to.Replace(Application.dataPath, "Assets");
    AssetDatabase.ImportAsset(relativeTo);
    }
    else
    {
    Debug.LogError($"File does not exist: {from}");
    }
    }
    }
    • DaJuJu's avatar
      DaJuJu
      Explorer

      Hi Timskap

      Thanks for the solution, I'll give it a try later. Actually, my PC is on Win 10 and my laptop is on WIN 11 both have the same problem. Where do you attach this script and how did you get this work around to work? Thank you so much!

      Cheers,

       

      • timskap's avatar
        timskap
        Explorer

        After few times running it script for some reason it stop works for me, lol.

         

  • Hello,
     
    I am having the same problem,
    Creating many projects, I have noticed that sometimes it works and sometimes it does not. 
    The last project I was using, it was working perfectly, unity crashed and I started to get that error. 
    I don't know why, I thought it was the path to the dll which is very long, but it's not. 
    I did the work arround that was mentioned and it worked x)
    Does anyone have an idea of what the error is due to? 
  • Hello again guys,

    I think I found a solution, it was driving me crazy. 
    Please follow the steps below: 
     
    1. Close Unity and Oculus app and also disconnect VR headset.
    2. Reopen the project Unity project
    3. Click play (without having connected the VR headset or open the Oculus app), you should not see any error in the console, if you see it, repeat 1, 2, 3.
    4. Exit play mode
    5. Open Oculus app, connect the headset and in the VR headset relaunch Oculus Link, wait until Oculus Link is fully charged.
    6. Click play in Unity, normally you shouldn't have any errors and everything should work.
     
     
    I have no idea why it works or how it works, but it works, I guess somehow unity loads the .dll the first time correctly.
    If anyone knows why it works, I'd love to know. 
    • Admin.Jitsik's avatar
      Admin.Jitsik
      Honored Guest

      Thanks medina.549969, your steps worked great at least once, but problem persisted through sessions.

      My definite solution was to uninstall SteamVR and VIVE software completely as seen in related posts. I'm not aware why this happens or what exactly prevents Unity from finding Oculus DLLs though.

    • bikramBoundless's avatar
      bikramBoundless
      Honored Guest

      Yes, I tried the above steps and the error is eliminated for time being. I wonder whats casuing this weird issue that Unity is not able to load or find the DLL!!

  • I'm also having this issue. Deleting my Library folder fixes it sometimes, but right now the Avatar SDK for me is completely unusable as I'm randomly losing half an hour at a time having to rebuild my Library and even that is luck of the draw.

    I have plenty of other DLLs that load absolutely fine, this is purely a Meta SDK issue. I'm using the latest (at the time of writing) Integrations, Platform and Avatar SDKs downloaded directly from the developer site. Using Unity 2021.3.28f1

     

    I'm at my wit's end to be honest. There's something very odd going on here. Sometimes it'll work, sometimes it won't.