1
0
mirror of https://github.com/Siccity/xNode.git synced 2026-03-26 22:49:02 +08:00

!B Group 空问题

This commit is contained in:
Icarus 2019-09-25 16:58:59 +08:00
parent 2017fc8430
commit 25514fce96

View File

@ -48,7 +48,11 @@ namespace XNodeEditor {
for (int i = 0; i < guids.Length; i++) { for (int i = 0; i < guids.Length; i++) {
string assetpath = AssetDatabase.GUIDToAssetPath (guids[i]); string assetpath = AssetDatabase.GUIDToAssetPath (guids[i]);
XNode.NodeGraph graph = AssetDatabase.LoadAssetAtPath (assetpath, typeof (XNode.NodeGraph)) as XNode.NodeGraph; XNode.NodeGraph graph = AssetDatabase.LoadAssetAtPath (assetpath, typeof (XNode.NodeGraph)) as XNode.NodeGraph;
graph.nodes.RemoveAll(x => x == null); //Remove null items if (!graph)
{
return;
}
graph.nodes.RemoveAll(x => !x); //Remove null items
Object[] objs = AssetDatabase.LoadAllAssetRepresentationsAtPath (assetpath); Object[] objs = AssetDatabase.LoadAllAssetRepresentationsAtPath (assetpath);
// Ensure that all sub node assets are present in the graph node list // Ensure that all sub node assets are present in the graph node list
for (int u = 0; u < objs.Length; u++) { for (int u = 0; u < objs.Length; u++) {