melanchall / drywetmidi

.NET library to read, write, process MIDI files and to work with MIDI devices
https://melanchall.github.io/drywetmidi
MIT License
523 stars 73 forks source link

over 1k errors in unity 2018.4.32f1 #114

Closed DanUdal closed 3 years ago

DanUdal commented 3 years ago

i want to use this library in my final year project for university. i'm working in unity 2018 to make a rhythm game and when i copy the file for this library into my unity project i receive over 1k errors all saying the same thing along the lines of "such and such variable/function/thing isn't recognised by c# 4.0". my supervisor has suggested it might be an issue with windows rather than unity as the library uses .net so i was wondering if you could help me solve the problem

melanchall commented 3 years ago

Hi,

Some key notes about using the library in Unity:

  1. DryWetMIDI written in C# 6 targeting .NET Framework 4.5 / .NET Standard 2.0
  2. You don't need Tests, Tests.Common and Benchmarks projects

So you can't use the library code with C# 4. Since you're using Unity 2018, you can switch to new scripting engine to be able to use DWM. Here few links:

So you need to use .NET 4.x equivalent. Please let me know if it works.

melanchall commented 3 years ago

@DanUdal Any news?

DanUdal commented 3 years ago

all errors are now gone. i had unity targeting the wrong .net framework and after removing some files that were causing errors, which were the files you mentioned above and the files names export website stats, all errors are now gone. i have yet to try to code anything but i expect everything should work properly now. thanks for the help