Skip to content

Commit

Permalink
MultiSolver now supports unmanaged types, but asset binding now uses …
Browse files Browse the repository at this point in the history
…double cast in order to bind
  • Loading branch information
bustedbunny committed Feb 20, 2023
1 parent 2a8ce12 commit d68d5a2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Runtime/Binding/Utility/Generics/MultiSolver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public interface IMultiSolver
public Action Solve(MethodInfo get, object source, MethodInfo set, object target);
}

public abstract class MultiSolver<TGet, TSet> : IMultiSolver where TGet : Object
public abstract class MultiSolver<TGet, TSet> : IMultiSolver
{
public Type GetterType => typeof(TGet);
public Type SetterType => typeof(TSet);
Expand All @@ -24,7 +24,7 @@ public abstract class MultiSolver<TGet, TSet> : IMultiSolver where TGet : Object
public Action<Object> ResolveAssetSetter(PropertyInfo setProp, object target)
{
var set = HelpersGenerics.Set<TSet>(setProp.GetSetMethod(true), target);
return value => set(Convert(Unsafe.As<TGet>(value)));
return value => set(Convert((TGet)(object)value));
}

public Action Solve(MethodInfo get, object source, MethodInfo set, object target)
Expand Down

0 comments on commit d68d5a2

Please sign in to comment.