Adding an object to a list in C# is replacing all previous elements

Viewed 37

Here’s my function:

public void AddKeyFrame()
{
    KeyFrame keyframe = new();
    keyframe = objectList;
    currentRecording.keyFrames.Add(keyframe);

}

So I’m trying add an object to a list, but adding a new object replaces all previous values to what I’m adding to the list. Am I doing this wrong?

0 Answers
Related