Everyone knows that plugins are only supported in Unity Pro. It’s also a common knowledge here (on Forums and Answers) that if you have a native dll, you have to put it in Plugins folder and own the Pro license to be able to use it. Actually this knowledge is wrong, at least on Windows. The documentation states that plugins are native libraries, but it doesn’t state that every native library is a plugin. So, you can call functions from native libraries without the Pro license.
as the given example contains cpp files it is native code. the inlcuded c# file only calls the plugin. i have no unity free installed (and no c++ environment) to test and verifiy this but the given explanation sounds reasonable and could be a bug which can be exploited.
First I tried it with my own native dll and it worked, then I checked the standard plugins example, it worked too. So, I have no doubts. I don’t think it’s a bug for several reasons.
It’s been there for ages. Just rechecked with Unity 3.0 and it works.
Platform invoke is a standard net/mono functionality and I expect it to work unless the opposite is stated explicitly. Just like accessing managed libraries you’ve mentioned.
Mono is not a UT’s product. I believe it would be a kind of dirty trick to cut off a part of someone else’s free product and then sell this part back for money. Either you support the feature or you don’t, with no money conditions attached.
Platform invoke is the only way to call WinAPI. For example, if you want to show a MessageBox you have to call a function from “user32.dll” which is definitely not a plugin for Unity. If any calls to native libraries other than libraries in Plugins folder were prohibited, you would have to create a native wrapper library around the native Windows library to be able to access the MessageBox function from your managed code. It sounds like a stupid waste of time and effort to me. Why not just call it directly?
I don’t understand why Plugins for desktop platforms are not free. I mean there are just to many ways to get around it anyway.
You could even recompile Mono to force features on. Just seems like a waste of time to try and lock people out of this.
It seems like both parties would benefit from making it free anyway. As I could make Desktop plugins for Free users, which add up to more sales on the Asset store and more money for everyone…
I believe the plugins are just not that thing most people think they are, not just native dlls, but kind of special dlls that use native plugin interface. All the other native dlls are not plugins and therefore should work fine in Unity Free. Unfortunately, the docs are kind of foggy.
they should cut it. when software behaves not as expected it is a bug. and beeing able to do something in unity free which should be limited to pro is not “working as expected” albeit some people may benefit from it.
some potential downsides:
UT loses some money because people don’t upgrade to pro when they can use it’s features freely
people who payed for these features are annoyed
exploiting this bug could get you in legal issues
i have no clue about eula and laws but i think it’s important for UT to know what can be done. thats why i filed the bugreport. now they can handle it to their liking, which includes to simply ignore it.
Sure, I was half joking. I think it’s a good thing to be able to use P/Invoke to make plugins for the Free version. However I wouldn’t mind paying for this feature as well. It’s just that if you make plugins, you usually want people to be able to use them. I don’t know the split between Free/Pro between Unity users but having a plugin support both makes it more visible.
EDIT: for example I can use UnityVS in the Free version, and that’s awesome for both Unity Technologies and developers
– The thing is time is money, and the fact is its not possible to stop people from using pInvoke in Mono, as Mono libraries must be open as there under GPL and so I can recompile them if I wanted to and force Unity to enable pInvoke no matter what they turn off.
Its a waste of time and money to even disable plugins for desktops because of this simple fact. It also looses money in asset store sales for people that can’t buy a plugin because its pro only. And makes it hard for me as a plugin developer to target that crowd.
In fact, Unity loses money because of limiting native plugins to Unity Pro too, because many assets sold in store will be only available for people owning a Pro license.