浏览代码

Fix null refs in search window provider

/main
Peter Bay Bastian 7 年前
当前提交
ac20b304
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 3
      com.unity.shadergraph/Editor/Drawing/SearchWindowProvider.cs

3
com.unity.shadergraph/Editor/Drawing/SearchWindowProvider.cs


foreach (var guid in AssetDatabase.FindAssets(string.Format("t:{0}", typeof(MaterialSubGraphAsset))))
{
var asset = AssetDatabase.LoadAssetAtPath<MaterialSubGraphAsset>(AssetDatabase.GUIDToAssetPath(guid));
var title = asset.subGraph.path.Split('/').ToList();
var path = asset.subGraph.path ?? "";
var title = path.Split('/').ToList();
title.Add(asset.name);
var node = new SubGraphNode { subGraphAsset = asset };
AddEntries(node, title.ToArray(), nodeEntries);

正在加载...
取消
保存