vexe / VFW

MIT License
492 stars 67 forks source link

Including VFW dll inside another project #22

Open bartlomiejwolk opened 9 years ago

bartlomiejwolk commented 9 years ago

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?

vexe commented 9 years ago

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.

bartlomiejwolk commented 9 years ago

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

vexe commented 9 years ago

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.

bartlomiejwolk commented 9 years ago

thanks