The problem on Unity3D 3.0 beta3 (about DLL Plugin)

Hello, unity officer:

I’m the customer of unity3d 3.0 pro.
And I will try to learn development the plugin for unity3d. I download the sample project from unity3d.com, the url is:
http://unity3d.com/support/resources/example-projects/texture-plugins

when I open the project on unity3d 3.0 beta3. the error message was appear in status bar.

the error was:

Assets/Plugins/TexturePlayback.cs(44,6): error CS1729: The type `System.Runtime.InteropServices.DllImportAttribute' does not contain a constructor that takes `1' arguments
Assets/Plugins/TexturePlayback.cs(45,32): error CS0626: `TexturePlayback.UpdateTexture(System.IntPtr, int, int, float)' is marked as an external but has no DllImport attribute. Consider adding a DllImport attribute to specify the external implementation

the error code was:

[DllImport ("UnityTexture")]
private static extern void UpdateTexture (IntPtr colors, int width, int height, float time);

I think the plugin function was very important in unity3d technology. I hope in unity3d 3.0, it can work better.

Thanks.

sincerely yours
Shawn Zhang
:sweat_smile:

Did you file a bug report? If not you should do so.

as for the examples on docs / page: they are for unity 2.x, none of them is for U3 specifically at the time

And I hope unity3d can give us the full source code for the mac os x DLL, win DLL as sample project.

:smile:

Thanks, Bug report was done.

I’m seeing this too. Was a bug report filed?

Hi,
We have the same error with our __existin__g code, that worked in 2.5, 2.6 versions.
I only upgraded Unity from 2.6x to 3.0.0b3 and the compilation gave me this error.
We didn’t modify our source since the migration.

The code invoked is the well known Wii stuff :

	[DllImport ("UniWii")]
	private static extern void wiimote_start();

Thanks for your help, Unity QA team !

I Agree where is the source code for the dll? thats what we need to make a dll in the firstplace :slight_smile: connecting it to Unity3d is the least of our problems :slight_smile:

So Unity3D people can we have the Texture Plugin Source aswell please? :slight_smile: