internal void MigrateFunctionModel()
        {
#pragma warning disable 618
            if (!m_FunctionAsset && m_FunctionModel != null)
            {
                m_FunctionAsset = m_FunctionModel.NodeAssetReference;
                m_FunctionModel = null;
                EditorUtility.SetDirty(this);
            }
#pragma warning restore 618
        }
示例#2
0
 public VariableCreator(FunctionModel loopStackModel)
 {
     m_LoopStackModel = loopStackModel;
     Log($"Var creator for {loopStackModel.Title} in graph {loopStackModel.GraphModel.Name}");
 }
 public static FunctionRefCallNodeModel CreateFunctionRefCallNode(this IStackModel stackModel,
                                                                  FunctionModel methodInfo, int index = -1, SpawnFlags spawnFlags = SpawnFlags.Default, GUID?guid = null)
 {
     return(stackModel.CreateStackedNode <FunctionRefCallNodeModel>(methodInfo.Title, index, spawnFlags, n => n.Function = methodInfo, guid));
 }
 public static FunctionRefCallNodeModel CreateFunctionRefCallNode(this IGraphNodeCreationData data, FunctionModel methodInfo)
 {
     return(data.CreateNode <FunctionRefCallNodeModel>(methodInfo.Title, n => n.Function = methodInfo));
 }
 public static FunctionRefCallNodeModel CreateFunctionRefCallNode(this IStackedNodeCreationData data, FunctionModel methodInfo)
 {
     return(data.StackModel.CreateFunctionRefCallNode(methodInfo, data.Index, data.SpawnFlags, data.Guid));
 }
 public static FunctionRefCallNodeModel CreateFunctionRefCallNode(this VSGraphModel graphModel,
                                                                  FunctionModel methodInfo, Vector2 position, SpawnFlags spawnFlags = SpawnFlags.Default)
 {
     return(graphModel.CreateModel <FunctionRefCallNodeModel>(methodInfo.Title, position, spawnFlags, n => n.Function = methodInfo));
 }