void LoadSubGraph() { if (m_SubGraph == null) { if (string.IsNullOrEmpty(m_SerializedSubGraph)) { return; } var graphGuid = subGraphGuid; var assetPath = AssetDatabase.GUIDToAssetPath(graphGuid); if (string.IsNullOrEmpty(assetPath)) { // this happens if the editor has never seen the GUID // error will be printed by validation code in this case return; } m_SubGraph = AssetDatabase.LoadAssetAtPath <SubGraphAsset>(assetPath); if (m_SubGraph == null) { // this happens if the editor has seen the GUID, but the file has been deleted since then // error will be printed by validation code in this case return; } m_SubGraph.LoadGraphData(); name = m_SubGraph.name; concretePrecision = m_SubGraph.outputPrecision; } }
void LoadSubGraph() { if (m_SubGraph == null) { if (string.IsNullOrEmpty(m_SerializedSubGraph)) { return; } var graphGuid = subGraphGuid; var assetPath = AssetDatabase.GUIDToAssetPath(graphGuid); m_SubGraph = AssetDatabase.LoadAssetAtPath <SubGraphAsset>(assetPath); m_SubGraph.LoadGraphData(); if (m_SubGraph == null) { return; } name = m_SubGraph.name; concretePrecision = m_SubGraph.outputPrecision; } }