bug:ArgumentException: Object of type 'UnityEngine.Object' cannot be converted to type 'UnityEngine.Sprite'
clone the component in script,and set CompositeToggle value difference,exception reported:
ArgumentException: Object of type 'UnityEngine.Object' cannot be converted to type 'UnityEngine.Sprite'. System.RuntimeType.CheckValue (System.Object value, System.Reflection.Binder binder, System.Globalization.CultureInfo culture, System.Reflection.BindingFlags invokeAttr) (at <9577ac7a62ef43179789031239ba8798>:0) System.Reflection.MonoMethod.ConvertValues (System.Reflection.Binder binder, System.Object[] args, System.Reflection.ParameterInfo[] pinfo, System.Globalization.CultureInfo culture, System.Reflection.BindingFlags invokeAttr) (at <9577ac7a62ef43179789031239ba8798>:0) System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <9577ac7a62ef43179789031239ba8798>:0) System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <9577ac7a62ef43179789031239ba8798>:0) Mobcast.Coffee.Toggles.Property.Invoke (UnityEngine.Object methodTarget, System.Int32 index) (at Assets/Scripts_Normal/CompositeToggle/StyleSystem/Property.cs:208) UnityEngine.Debug:LogException(Exception) Mobcast.Coffee.Toggles.Property:Invoke(Object, Int32) (at Assets/Scripts_Normal/CompositeToggle/StyleSystem/Property.cs:219) Mobcast.Coffee.Toggles.CompositeToggle:InvokeToggleTarget(Int32) (at Assets/Scripts_Normal/CompositeToggle/CompositeToggle.cs:387) Mobcast.Coffee.Toggles.CompositeToggle:OnObjectUpdate() (at Assets/Scripts_Normal/CompositeToggle/CompositeToggle.cs:345) Mobcast.Coffee.Toggles.CompositeToggle:set_maskValue(Int32) (at Assets/Scripts_Normal/CompositeToggle/CompositeToggle.cs:213) Mobcast.Coffee.Toggles.CompositeToggle:set_indexValue(Int32) (at Assets/Scripts_Normal/CompositeToggle/CompositeToggle.cs:164) UI.View.PowerRankItemController:SetData(Data) (at Assets/Scripts/UI/View/UIRankingPanel/Component/PowerRankItemController.cs:60) UI.View.<>c__DisplayClass25_0:<SetupPageView>g__RenderPowerRankItem|1(Int32, Transform) (at Assets/Scripts/UI/View/UIRankingPanel/UIRankingPanel.cs:264) UnityEngine.UI.VirtualScrollView:LateUpdate() (at Assets/Scripts_Normal/UGUIExtern/VirtualScrollView/VirtualScrollView.cs:673)
It seems about JsonUtility deserialize obj .