public sealed override void UpdateNodeAfterDeserialization() { if (m_matrix != TransformationMatrixType.None) { m_MatrixType = m_MatrixUpgrade[m_matrix]; m_matrix = TransformationMatrixType.None; } AddSlot(new Matrix4MaterialSlot(kOutputSlotId, kOutputSlotName, kOutputSlotName, SlotType.Output)); RemoveSlotsNameNotMatching(new[] { kOutputSlotId }); }
// Secondary constructor for certain nodes like TransformationMatrix. internal NeededTransform(UnityMatrixType matrix) { if (s_TransformMap.TryGetValue(matrix, out var transform)) { from = transform.from; to = transform.to; } else { from = NeededCoordinateSpace.None; to = NeededCoordinateSpace.None; } }