public static void RecordInstructions(InstructionList listToRecordTo, double timeToExecute, List <string> membersToIgnore, Text textToRecord) { foreach (string member in EditorData.CurrentTextMembersWatching) { if (membersToIgnore.Contains(member) == false) { Type memberType = InstructionManager.GetTypeForMember(mTextType, member); Type genericType = typeof(Instruction <,>).MakeGenericType( mTextType, memberType); object value = FlatRedBall.Instructions.Reflection.LateBinder <Text> .Instance[textToRecord, member]; Instruction instruction = Activator.CreateInstance(genericType, textToRecord, member, value, timeToExecute) as Instruction; listToRecordTo.Add(instruction); } } }