VFW icon indicating copy to clipboard operation
VFW copied to clipboard

Including VFW dll inside another project

Open bartlomiejwolk opened this issue 9 years ago • 4 comments

So far I've used Rotorz Reorderable List for drawing lists in the inspector. I could easily build a dll from this project within my own namespace like MyExtension.ReorderableList instead of the default Rotorz.ReorderableList. How do I build a dll from VFW?

bartlomiejwolk avatar May 30 '15 07:05 bartlomiejwolk

It's more complex in this case cause there's code in both the runtime and editor portions. I think you'll need 2 Dlls, one for each portion. I haven't tried it before but it should be possible, Try to create two separate projects in VS, one for each portion, add the appropriate references (make sure the editor project references the runtime one), select class library as output and build like normal. One thing to keep in mind though, even if you compile to Dlls I'd still recommend that you keep them in a Plugins folder, cause I rely on the compilation order to implement some features, like user custom drawers mapping. Let me know how it goes.

vexe avatar May 30 '15 07:05 vexe

I managed to build the runtime project. I referenced it in the editor project but at build there is lots of errors, mainly ambiguous reference to Tuples but that I could fix. There're also others that I can't make work: screenshot_115

bartlomiejwolk avatar May 30 '15 08:05 bartlomiejwolk

I might have to isolate out anything in runtime wrapped with #if UNITY_EDITOR and move to Editor folder - I'll give it a try as soon as I have some free time.

vexe avatar May 30 '15 08:05 vexe

thanks

bartlomiejwolk avatar May 30 '15 08:05 bartlomiejwolk