iBicha / UnityYoutubePlayer

Play YouTube videos in Unity
The Unlicense
336 stars 63 forks source link

Video not play on android IL2CPP. JsonSerializationException #53

Closed anavenger closed 3 years ago

anavenger commented 3 years ago

Work good in Editor and in android with Mono build.

on android IL2CPP in adb:

Unity : JsonSerializationException: Unable to find a constructor to use for type YoutubePlayer.YoutubeVideoMetaData. A class should either have a default constructor, one constructor with arguments or a constructor marked with the JsonConstructor attribute. Path 'id', line 1, position 6.

Unity : at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateNewObject (Newtonsoft.Json.JsonReader reader, Newtonsoft.Json.Serialization.JsonObjectContract objectContract, Newtonsoft.Json.Serialization.JsonProperty containerMember, Newtonsoft.Json.Serialization.JsonProperty containerProperty, System.String id, System.Boolean& createdFromNonDefaultCreator) [0x00000] in <00000000000000000000000000000000>:0

Unity : at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject (Newtonsoft.Json.JsonReader reader, System.Type objectType, Newtonsoft.Json.Serialization.JsonContract contract, Newtonsoft.Json.Serialization.JsonProperty member, Newtonsoft.Json.Serialization.JsonContainerContract containerContract, Newtonsoft.J

iBicha commented 3 years ago

56

iBicha commented 3 years ago

Please confirm the PR fixes your issue, and I will merge it and publish an new version. Thanks