Answered
1
0

Hi, I am usign fmod unity plugin and it works great for Android and iOS but it has some incompatibilities with windows phone.

FMOD is using some obsolete methods like System.IO.File.ReadLines and Encoding.UTF8.GetString.

In Fmod.Listener.Initialize() i replaced :

//var bankList = System.IO.File.ReadAllLines(bankListPath);

by:

String line;
ArrayList lines = new ArrayList();

using(StreamReader sr = new StreamReader(bankListPath, Encoding.UTF8))
while((line = sr.ReadLine()) != null)
lines.Add(line);
var bankList = (String[]) lines.ToArray(typeof(String));


In SOUND_INFO.getname i replaced:

//return Encoding.UTF8.GetString(name_or_data);

by:

return Convert.ToBase64String(name_or_data);


In FmodStudio -> MarshallingHelper.stringFromNativeUtf8 i replace again:

//return Encoding.UTF8.GetString(buffer);

by:

return Convert.ToBase64String(buffer);

and there are other places that GetString needs to be replaced..

But after this I could not build the apk for Windows phone because it failed to load some FMOD dlls.

After checking this page http://52.88.2.202/download/ I realized that Unity Integration is for Windows/Mac/Linux/iOS/Android and doesn’t support Windows Phone.

I updated to the last version of the unity plugin (Version 1.05.00) and now it throws this exception:

Error building Player: Exception: Error: type System.Runtime.InteropServices.ICustomMarshaler doesn’t exist in target framework. It is referenced from Assembly-CSharp-firstpass.dll at FMOD.UTF8Marshaler.
Error: type System.Runtime.InteropServices.ICustomMarshaler doesn’t exist in target framework. It is referenced from Assembly-CSharp-firstpass.dll at System.Runtime.InteropServices.ICustomMarshaler FMOD.UTF8Marshaler::GetInstance(System.String).

.. but I can’t get arround this issue..

Do you have a workarround for this, or are you going to release an update soon that combines Unity with Windos Phone?

Thanks,

João Catarino

  • You must to post comments
Best Answer
1
0

We have added Windows Phone support in the latest release: 1.05.02.

  • You must to post comments
0
0

Thanks

  • You must to post comments
0
0

I still keep getting this error, running fmod unity integration 1.05.11.

Error building Player: Exception: Error: method `System.String[] System.IO.File::ReadAllLines(System.String)` doesn't exist in target framework. It is referenced from Assembly-CSharp-firstpass.dll at System.Void FMOD_Listener::Initialize().
Error: method `System.String System.Text.Encoding::GetString(System.Byte[])` doesn't exist in target framework. It is referenced from Assembly-CSharp-firstpass.dll at System.String FMOD.Studio.SOUND_INFO::get_name().
Error: method `System.String System.Text.Encoding::GetString(System.Byte[])` doesn't exist in target framework. It is referenced from Assembly-CSharp-firstpass.dll at System.String FMOD.Studio.MarshallingHelper::stringFromNativeUtf8(System.IntPtr).
  • Niko Koski
    My bad, didn't know I was meant to choose Windows Store -> Phone 8.1 build
  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.