Skip to content

Commit

Permalink
Merge pull request #5 from sericaer/ShowDefaultValue
Browse files Browse the repository at this point in the history
modify to show the init value, if the source is not set
  • Loading branch information
ls9512 authored Mar 29, 2023
2 parents 331a79d + ab70712 commit d16fb5c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Runtime/Script/Component/TypeBinder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public virtual void OnEnable()
foreach (var binder in _binderCaches)
{
binder.Bind();
binder.UpdateTarget();
//binder.UpdateTarget();
}
}

Expand Down
10 changes: 10 additions & 0 deletions Runtime/Script/Core/DataBinder(T2).cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,15 @@ public abstract class DataBinder<TTarget, TData> : DataBinder<TData>
public TTarget Target;

public virtual Type TargetType { get; internal set; } = typeof(TTarget);

public override void UpdateSource()
{
if(Target == null)
{
return;
}

base.UpdateSource();
}
}
}

0 comments on commit d16fb5c

Please sign in to comment.