public override void Destroy() { base.Destroy(); if (m_outputPreview != null) { UnityEngine.ScriptableObject.DestroyImmediate(m_outputPreview); } m_outputPreview = null; if (m_outputMaskMaterial != null) { UnityEngine.ScriptableObject.DestroyImmediate(m_outputMaskMaterial); } m_outputMaskMaterial = null; OnNewPreviewRTCreatedEvent = null; }
public OutputPort(ParentNode owner, int nodeId, int portId, WirePortDataType dataType, string name) : base(nodeId, portId, dataType, name) { LabelSize = Vector2.zero; OnNewPreviewRTCreatedEvent += owner.SetPreviewDirtyFromOutputs; }