c# - Unity3d: How to use dll from Javascript? -
i have written dll in c# perform several tasks game. can use dll when use c# script in unity. when use dll javascript, gives error:
namespace 'mylibrary' not found, maybe forgot add assembly reference?
i have placed mylibrary.dll under assets folder. how access c#:
using mylibrary; this how access javascript:
import mylibrary; so, can use c#, how can use javascript?
native plugin:
c#:
[dllimport ("pluginname")] private static extern float functionname (); javascript:
@dllimport (dllname) static private function functionname () : float {}; managed plugin:
c#:
using mylibrary; javascript:
go project directory, yourprojectname.csharp.csproj
find it, open , add <reference include="mylibrary"> save it. restart unity , visual studio.
put dll assets folder.
Comments
Post a Comment