diff --git a/encompass-cs/Engine.cs b/encompass-cs/Engine.cs index b0aa6e5..cefb2ed 100644 --- a/encompass-cs/Engine.cs +++ b/encompass-cs/Engine.cs @@ -575,10 +575,10 @@ namespace Encompass /// /// Thrown when the Engine does not declare that it Receives the specified Message Type. /// - protected TMessage ReadMessage() where TMessage : struct, IMessage + protected ref readonly TMessage ReadMessage() where TMessage : struct, IMessage { CheckMessageRead(); - return _messageManager.First(); + return ref _messageManager.First(); } ///