GPUGraph.SubGraphNode.CheckOutGraphs C# (CSharp) Method

CheckOutGraphs() private method

Refreshes the list of graphs and makes sure this node is still valid. Returns whether anything changed.
private CheckOutGraphs ( bool warnIfNotFound ) : bool
warnIfNotFound bool
return bool
        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;
        }