x


Can I access a dll plugin from Javascript or only from c#?

After reading http://unity3d.com/support/documentation/Manual/Plugins.html, which shows how to access a dll from c#, I am wondering is there a similar process for accessing plugins from Javascript? Or can plugins only be accessed if I write a c# script?

more ▼

asked Apr 23 '10 at 08:19 PM

awoods gravatar image

awoods
298 4 4 11

(comments are locked)
10|3000 characters needed characters left

2 answers: sort voted first

They can only be accessed from C#.

more ▼

answered Apr 23 '10 at 08:45 PM

Eric5h5 gravatar image

Eric5h5
80.3k 42 132 521

(comments are locked)
10|3000 characters needed characters left

While it says: "Plugins allow your game code (!)(written in Javascript, C# or Boo)(!) to call into native code libraries.",- plugin in the example project given is a C#-based wrapper, that is used by javascript as a method to use native code. So C# dll-access is recommended: "so it is recommended to wrap all native code methods with an additional C# code layer".

It's hard to say for certain, since they say it's only (!)recommended to use c#-wrapper, which might mean there are solutions without it... but I have found no other way so far, so I have to say that c# is obligatory.

P.S. also since one of those solutions would probably be using c# anyways, just without creating a wrapper.

more ▼

answered May 04 '11 at 08:34 AM

Bwohaha gravatar image

Bwohaha
1

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x3460
x395
x233

asked: Apr 23 '10 at 08:19 PM

Seen: 2619 times

Last Updated: Apr 23 '10 at 08:19 PM