浏览代码

Fixed Filters for Callable Tree Window

/main
Thomas ICHÉ 5 年前
当前提交
59e5f4a2
共有 1 个文件被更改,包括 7 次插入9 次删除
  1. 16
      Editor/CallTree/CallTreeWindow.cs

16
Editor/CallTree/CallTreeWindow.cs


public bool Filter(GameObject go, string filter)
{
if (go == null && string.IsNullOrEmpty(filter))
return true;
else
{
if (this.Target.gameObject == go && (string.IsNullOrEmpty(filter)? true: this.Name.Contains(filter)))
return true;
bool keep = (go == null || this.Target.gameObject == go)
&& (string.IsNullOrEmpty(filter) ? true : this.Name.Contains(filter));
bool value = false;
if(!keep)
{
value = value || node.Filter(go, filter);
return value;
keep = keep || node.Filter(go, filter);
return keep;
}
}

正在加载...
取消
保存