Is there a plugin developer guide?

i never looked at PluginBuilder.sln tbh

you can just create the projects directly in vam, like a Custom/Scripts/Case/YourProject1 and then add the references .dlls so that you'll get error checking, autocomplete & references

it will make a YourProject1.cs file, you can delete it and do your own folder structure if you want like
Helpers/
Script/
YourProject.cslist

then after you make a change you just hit reload script in vam and done. i don't think there's any moving necessary.

Okay ... little confused, sorry if my question is stoopid:

You're talking about a "strategy/workflow" at "project level", right? What about the solution that contains the project? Do I need to create a solution ("Solution_VaM_whatever") and add the "VaM-projects a la SPQR" to it? (Not talking about MeshedVR's PluginBuilder.sln)

Thanks a lot for your advice so far, and for the patient explanations! Greatly appreciated - I've "coded" a bit during my time @ University, but that was mostly "texteditor & KDE-console tinkering". With those modern IDE's, I feel like a time-traveller from 1992 ...

If you want to do dll compilation too let me know, there are some extra quirks for that

Fair warning: You may regret having made that offer ... :oops:

I think I'm a ways away from the "custom .dll's for VaM" level - but I'm wondering: What are the advantages of compilation into .dll compared to an ordinary "plugin.cs" that's compiled at runtime by VaM?

Better runtime performance?

Asking bcs my "dream-project" would be a kind of spline-library with lots of helper-classes (different spline-definitions, different (global) smoothing options, maybe (global) smoothing with additional boundary constraints, distance of arbitrary point to nearest point on curve, computation of tangent/normal/binormal over whole curve etc). Afaik, the 2017 Unity version doesn't offer much in that regard.

Would smth like that benefit from compilation into a .dll?

And is there a way to tell the system to run code on the GPU rather than the CPU?
(A lot of "spline-related maths" can be formulated as "linear mappings", ie matrix-vector multiplication. That's where GPUs excell over CPUs - also why a lot of physics departments went crazy over CUDA ten years ago)
 
Last edited:
it's very easy, you're probably overthinking it, when i want to make a plugin i just do this:
- New > Project > Class Library (.Net), then
1675102832502.png

then add the references as mentioned before (vams dlls)
1675102891453.png

and then you can rename the .cs it created if you want to, and you can replace the code for example with what's in custom/scripts/meshedvr/template.cs (a quick example plugin)

And that's it. Then you can load that script in vam since it's already in custom/scripts/*. If you make a change in the editor, you just hit reload in vam. There's no extra steps like building the solution or stuff like that. It's as if you're editing it in Notepad++ or some other editor, but you also have references, auto-complete and errors in real-time

but I'm wondering: What are the advantages of compilation into .dll compared to an ordinary "plugin.cs" that's compiled at runtime by VaM?
The reason why I did dlls was to be able to access some stuff that didn't work with normal .cs, like the steam library to trigger vibration for the haptics plugins. Some people do it to obfuscate & protect their code. I don't know of other advantages.

The biggest disadvantage for me was that I had to restart vam after each dll build. Since i'm a noob and make a lot of mistakes, it happened a lot to notice bugs after building it and had to do it all over again. There might be some workaround to not have to fully restart vam but I couldn't find it

Would smth like that benefit from compilation into a .dll?
I wouldn't think there's a difference in terms of performance but i'm not familiar with the subject

And is there a way to tell the system to run code on the GPU rather than the CPU?
i don't know unity so can't really help with that (and it looks complicated too) but I looked it up and this is likely the way to go:
https://docs.unity3d.com/ScriptReference/ComputeShader.html, https://gist.github.com/forkercat/9bbd9911935c481ac1817b2fdca0a33a

if you have ILSpy, you can just load there the dlls from vam and you can search the code easier, like:
1675104982009.png
 
Ok, last question: What's the Roman word for "Sensei"? :cool:

DUDE! Thanks a lot for your help! :love:
 
dang i was contemplating trying to write a plugin to integrate lucidvr's gloves into the game but seems like too much hassle tbh
 
Back
Top Bottom