I am trying to use F# with Unity.
But when I compile an F# program to a DLL and import the DLL in my assets folder in Unity, Unity gives me the following error:
"GLib: Cannot convert message: Conversion from character set 'UTF-8' to 'CP1252' is not supported"
What can I do to use F# DLL's in Unity?
Can you give any more details about what the F# code is doing and what libraries it uses? There are some things that are available to general .NET code that are not supported by Unity.
Answer by Johan 2
Jan 04, 2011 at 08:13 PM
I was able to get an F# dll to work without much additional configuration. -Make sure you also drag in FSharp.Core.dll in the asset folder. -Make sure your F# dll is compile to target .NET 2.0 and not 4.0 since Mono does not support the latter yet.
In addition, when using types inheriting MonoBehaviour you must use a Namespace instead of an F# Module. Otherwise Unity3d will complain that your class name does not match your filename when you try to attach the MonoBehaviour to a GameObject
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
The best place to ask and answer questions about development with Unity.
To help users navigate the site we have posted a site navigation guide.
If you are a new user to Unity Answers, check out our FAQ for more information.
Make sure to check out our Knowledge Base for commonly asked Unity questions.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
Answers and Comments
1 Person is following this question.