I have created a simple Unity application that uses MySQL. The app works perfectly in the Unity Editor, however when I build it for PC Standalone or Android, it does not work.
After checking the log files, the following exception has been thrown
PlatformNotSupportedException: Operation is not supported on this platform. at MySql.Data.MySqlClient.MySqlConfiguration..cctor () [0x00000] in <5bca8ad0d7cb4bf194403b342b8f0938>:0 Rethrow as TypeInitializationException: The type initializer for 'MySql.Data.MySqlClient.MySqlConfiguration' threw an exception. at MySql.Data.MySqlClient.Replication.ReplicationManager..cctor () [0x0001e] in <5bca8ad0d7cb4bf194403b342b8f0938>:0 Rethrow as TypeInitializationException: The type initializer for 'MySql.Data.MySqlClient.Replication.ReplicationManager' threw an exception. at MySql.Data.MySqlClient.MySqlConnection.Open () [0x002be] in <5bca8ad0d7cb4bf194403b342b8f0938>:0 at Main.Start () [0x0008b] in <7257cb8e307a4c4d92671557aa30bf0e>:0 at Main.Update () [0x0000d] in <7257cb8e307a4c4d92671557aa30bf0e>:0
How can MySQL not be supported on either of my platforms (both Android and PC Standalone) yet it works in Unity editor? Furthermore, I have recently created another game that also uses MySQL and works fine on all platforms. What could be the issue?
Feel free to ask me for code files, Unity files or whatever you think you need to help me solve the issue. Thank you!
Edit: Solved