question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Getting LanguageExt.Core to work with Unity

See original GitHub issue

I found this while looking for functional libraries to use with Unity, and stumbled upon this, which seems to answer all my prayers. Unfortunately Unity only supports .NET 4.6 which according to Unity is equivalent to C# 6, which means there are a bunch of features used that won’t compile. Is there any way to get the code to work with C# 6? Or can I somehow use a prebuilt DLL instead? Currently I just imported all of LanguageExt.Core into my project, and it complains about tons of files. When looking at the errors using (csharp-omnisharp-codecheck) in emacs I’m informed that local functions aren’t available in C# 6.

Are there any reasonable ways to solve this?

EDIT:

This is the way to do it

This library seems compatible on the latest (at the time of writing) Unity 2018.2 with incremental compiler (which enables C# 7). So this library should work well once Unity has official support for C# 7 on upcoming 2018.3. In the meanwhile, you can install incremental compiler instead.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:18 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
quabugcommented, Jul 24, 2018

This library seems compatible on the latest unity 2018.2 with incremental compiler (which enable c# 7). So I guess this library will work well once unity has officially support c# 7 on upcoming 2018.3. In the meanwhile, you can install incremental compiler instead. But I just use limited function of this library without any test on il2cpp or mobile, so at your own risk.

1reaction
louthycommented, Jul 24, 2018

@quabug Thanks for the update, that’s very useful. I have added a slightly reworded version of your comment to the home page.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to use external library (LanguageExt) in Unity?
I have added the DLL to assets and set player to use .NET 4.x. Unfortunately I am getting this error: error CS0009: Metadata...
Read more >
language-ext
Getting started. To use this library, simply include LanguageExt.Core.dll in your project or grab it from NuGet, and add this to the top...
Read more >
LanguageExt - who uses in production? What do you think?
LanguageExt is a base class library that makes functional programming in C# more comfortable. It delivers base classes for records, Option, ...
Read more >
LanguageExt.Core 4.4.3
Version Downloads Last updated 4.4.3 280,802 4 months ago 4.4.2 360,271 6 months ago 4.4.1 5,092 7 months ago
Read more >
language-ext - com.louthy.languageext
This package is just a wrapper for the LanguageExt.Core.dll provided by the language-ext project. The wrapper exposes the dll as a package for...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found