private bool CheckOutGraphs(bool warnIfNotFound)
{
UpdateGraphPaths();
//See if the current sub-graph being used still exists.
selected = guids.IndexOf(GraphGUID);
if (selected >= 0)
{
Graph g = TryLoadGraph();
if (g == null)
{
selected = -1;
ChangeGraph();
return true;
}
else
{
//See if the number of inputs changed.
GraphParamCollection gParams = new GraphParamCollection(g);
if (convertParamsToInputs && Inputs.Count != gParams.FloatParams.Count)
{
SetInputsFrom(gParams.FloatParams);
return true;
}
}
}
else
{
//Couldn't find the sub-graph anymore!
if (warnIfNotFound)
{
Debug.LogWarning("Couldn't find sub-graph at " +
AssetDatabase.GUIDToAssetPath(GraphGUID));
}
selected = -1;
ChangeGraph();
return true;
}
return false;
}