void CopyPasteNodes() { object result = VFXCopy.Copy(m_SourceControllers, m_Rect); VFXPaste.Paste(m_TargetController, m_Rect.center, result, null, null, m_TargetControllers); List <VFXParameterController> targetParameters = new List <VFXParameterController>(); }
public static void UnserializeAndPasteElements(VFXViewController viewController, Vector2 center, string data, VFXView view = null, VFXGroupNodeController groupNode = null) { var serializableGraph = JsonUtility.FromJson <SerializableGraph>(data); if (s_Instance == null) { s_Instance = new VFXPaste(); } s_Instance.Paste(viewController, center, serializableGraph, view, groupNode); }
void CopyPasteOperators(Dictionary <VFXNodeController, VFXNodeController> targetNodes) { m_SourceOperatorAndParameters = m_SourceControllers.OfType <VFXNodeController>().Where(t => !(t is VFXBlockController)).ToList(); object result = VFXCopy.Copy(m_SourceOperatorAndParameters, m_Rect); m_TargetOperatorAndParameters = new List <VFXNodeController>(); VFXPaste.Paste(m_TargetController, m_Rect.center, result, null, null, m_TargetOperatorAndParameters); foreach (var st in m_SourceOperatorAndParameters.Zip(m_TargetOperatorAndParameters, (s, t) => new { source = s, target = t })) { targetNodes[st.source] = st.target; } }