浏览代码

Merge pull request #366 from Unity-Technologies/fix-null-refs-in-search-provider

Fix null refs in search window provider
/main
GitHub 7 年前
当前提交
cd8caf84
共有 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);

正在加载...
取消
保存