private static ANNOutputNode LoadOutputNode(DATA_STRUCTS.NodeDataStruct data)
 {
     ANNOutputNode parent = null;
     foreach (string asset in AssetDatabase.FindAssets("t:ANNOutputNode"))
     {
         if (data.referenceuid == asset)
         {
             parent = AssetDatabase.LoadAssetAtPath<ANNOutputNode>(AssetDatabase.GUIDToAssetPath(asset));
             break;
         }
     }
     return parent.InstanciateAsOutput();
 }
Beispiel #2
0
    // Output
    private ANNOutputNode AddOutputNode(ANNOutputNode n, bool instanciate = true, bool reset = true, bool resetGen = false)
    {
        ANNOutputNode auxN = n.InstanciateAsOutput();

        auxN.network = this;
        this.outputNodes.Add(auxN);
        if (reset)
        {
            ResetNet();
            //ResetGeneration();
        }
        if (resetGen)
        {
            ResetGeneration();
        }
        return(auxN);
    }