Restarting Unity does not work - Printable Version +- Obi Official Forum (https://obi.virtualmethodstudio.com/forum) +-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html) +--- Forum: Obi Fluid (https://obi.virtualmethodstudio.com/forum/forum-3.html) +--- Thread: Restarting Unity does not work (/thread-2252.html) |
Restarting Unity does not work - pastblasters - 19-05-2020 I purchased this asset a month or so ago, and have imported it into a few different projects with no success. I continue getting the DllNotFoundException for libOni, despite restarting Unity multiple times. Is there something special I need to do to install this besides importing the asset into my project? I am using Unity version 2019.3.0f1 on Manjaro Linux with Obi Fluid version 5.3. RE: Restarting Unity does not work - josemendez - 19-05-2020 (19-05-2020, 03:06 PM)pastblasters Wrote: I purchased this asset a month or so ago, and have imported it into a few different projects with no success. I continue getting the DllNotFoundException for libOni, despite restarting Unity multiple times. Is there something special I need to do to install this besides importing the asset into my project? Hi there, The editor under certain Linux distros has issues recognizing the native library, and has been reported by other users. Haven't determined why yet. Ubuntu and Mint seem to work fine, can't talk about others. Standalone builds using the exact same library run fine in all distros though, so it is a editor-only issue and probably a bug in Unity. Is it possible for you to develop in another distro/OS, or is this your only development machine? RE: Restarting Unity does not work - pastblasters - 21-05-2020 (19-05-2020, 05:15 PM)josemendez Wrote: Hi there, After doing some research, I was actually able to fix this by editing Obi.cs (still having some issues with the particle shader, but thats almost certainly because I'm using URP, though I was able to update all of the relevant materials fairly easily). I added to the preprocessor directives to test for UNITY_EDITOR_LINUX before all of the DllImport declarations so that it also uses LIBNAME "Oni" as well instead of "libOni": #if (UNITY_IOS && !UNITY_EDITOR) const string LIBNAME = "__Internal"; #elif ((UNITY_ANDROID || UNITY_STANDALONE_LINUX || UNITY_EDITOR_LINUX) && !UNITY_EDITOR) const string LIBNAME = "Oni"; #else const string LIBNAME = "libOni"; #endif RE: Restarting Unity does not work - josemendez - 21-05-2020 (21-05-2020, 04:01 PM)pastblasters Wrote: After doing some research, I was actually able to fix this by editing Obi.cs (still having some issues with the particle shader, but thats almost certainly because I'm using URP, though I was able to update all of the relevant materials fairly easily). I added to the preprocessor directives to test for UNITY_EDITOR_LINUX before all of the DllImport declarations so that it also uses LIBNAME "Oni" as well instead of "libOni": Hi, Thanks for finding and sharing this! using your fix though, it actually triggers the DllNotFound exception in my test machine. Could be that in some cases the lib- prefix is needed, while in others it isn't. Will investigate further. RE: Restarting Unity does not work - pastblasters - 21-05-2020 (21-05-2020, 04:17 PM)josemendez Wrote: Hi, Maybe better to give it its own test: #elif (UNITY_EDITOR_LINUX) const string LIBNAME = "Oni"; Might be inconsistencies in how the preprocessor checks for Linux depending on the distro. |