ScriptHookVDotNet2 and NativeUI
-
Now that ScriptHookVDotNet is named ScriptHookVDotNet2. Im assuming that you can use both at the same time. But thats for running older mods that still were compiled with ScriptHookVDotNet as a reference. Along with newer mods that were compiled with ScriptHookVDotNet2.
Now if i try using ScriptHookVDotNet2 instead of ScriptHookVDotNet. I get compile errors because NativeUI needs you to reference ScriptHookVDotNet.
And referencing both gives errors as well because both have the same definitions.So i ether have to keep using the old ScriptHookVDotNet.(not practical)
Wait for NativeUI to be updated.
Make my own menu.(not going to happen)
Compile NativeUI and target ScriptHookVDotNet2. But then have to include this with my mod. Possibly rename?Anyone else in this situation? Suggestions?
-
@aimless said in ScriptHookVDotNet2 and NativeUI:
Now that ScriptHookVDotNet is named ScriptHookVDotNet2. Im assuming that you can use both at the same time. But thats for running older mods that still were compiled with ScriptHookVDotNet as a reference. Along with newer mods that were compiled with ScriptHookVDotNet2.
You assumed wrong. You should only have ScriptHookVDotNet2.dll. Just delete ScriptHookVDotNet.dll and the ScriptHookVDotNet.log file.
NativeUI runs just fine with ScriptHookVDotNet2 (both in my own scripts, and that of others). Would be nice if NativeUI got compiled against ScriptHookVDotNet2.dll, one day, but it's absolutely not necesarry, for now.
-
@meimeiriver Thanks for the reply. I removed ScriptHookVDotNet and it does run scripts compiled with ScriptHookVDotNet and ScriptHookVDotNet2.
But you cant compile a new script using ScriptHookVDotNet2 and NativeUI. I could use ScriptHookVDotNet to compile and run with ScriptHookVDotNet2. But then cant use the updated enums and stuff that was updated.
-
@aimless My VAutodrive mod runs with shvdn2 and NativeUI without problems. Make sure you have both ScriptHookVDotNet2.dll and ScriptHookVDotNet.asi in the game folder. With V2.10 the loader and the library have been separated (the .asi is just the loader now). This was a necessary step in preparation for the upcoming shvdn3. This way we can have both, shvdn2 and shvdn3 simultaneously. it would be impossible otherwise because of conflicting namespaces but we cannot abandon shvdn2 because it would make all older mods cease to function which are not maintained anymore.
-
@Cyron43 Yes my mods run to. But can you update it with the newest shvdn2? No.
For now i will just use shvdn as a reference. And run with shvdn2. Im not realty using much from the updates anyway.
-
@aimless said in ScriptHookVDotNet2 and NativeUI:
@Cyron43 Yes my mods run to. But can you update it with the newest shvdn2? No.
Yes! I recompiled VAutodrive with a reference to shvdn2 and NativeUI 1.7. Download that mod and see for yourself if you don't believe me.
-
@Cyron43 I believe you. I must be doing something wrong. I have a screenshot of the error. And one showing NativeUI properties.
https://ibb.co/gSgtam
https://ibb.co/h3Qao6
-
@aimless I will go have a look into the issue once I get the time. Not sure when it will be today but I took a note.
-
@aimless Okay at first I thought maybe it's because I don't use the UIRectangle class but it still works here. My current assumption is the solution configuration. Have you changed all platforms to x64 and removed the x86 configurations? Don't mind the Guide project. That's not being built anyway. Also remove all Debug configurations (except for Unit Test projects of course).
-
@meimeiriver @Cyron43 Thanks for the help. I did not notice that they changed the requirements for shvdn2. And did not have Microsoft Visual C++ 2015 Redistributable installed.
-
@aimless Thanks for the reply. I am glad your issue is solved now.