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

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

java - Digest auth with Spring Security using javaconfig -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -