c# - Using .Net Library in Unity5 -
i have huge project written in c# using .net 3.5 need use unity3d project. tried import unity project found out not possible. so, want import code have written in c# unity. created library using code have, import unity , use it. when try import receive following error:
unhandled exception: system.typeloadexception: not load type 'speechtools.clsspeechsynthesis' assembly 'myspeechsynthesizer, version=1.0.0.0, culture=neutral, publickeytoken=null'. not load file or assembly 'system.speech, version=3.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35' or 1 of dependencies.
i using system.speech in library. not supported in unity (mono). guess problem caused dependency.
can me? there way write wrapper around system.speech.speechsynthesizer , use in unity?
i searched online , found lot of tutorials on writing wrappers c++ codes nothing c# , .net libraries.
system.speech
not supported unity's version of mono, you're out of luck. can't drop in windows version of system.speech
dll since won't work unity's version of mono.
you can't write c# wrapper dll uses system.speech
either because same dropping dll straight in. unity's mono try load , fail.
you'll have find either native library implements feature want , write wrapper around that, or write implementation entirely in c#.
you potentially write native wrapper (i.e. in c++) around c# dll. wrapper initialise clr , load c# dll. native wrapper referenced in unity. have expose entire system.speech
api through native wrapper. think work, pretty cumbersome , work on windows or platforms .net available (i.e. no web player, mobile, linux, os x).
Comments
Post a Comment