From f91613a745b97534cfad9777f489bb0a49366f25 Mon Sep 17 00:00:00 2001 From: Cassandra de la Cruz-Munoz Date: Thu, 17 Aug 2023 10:33:10 -0400 Subject: [PATCH] add ToMessage() to VmcExtVrm --- VmcMessages/VmcExtVrm.cs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/VmcMessages/VmcExtVrm.cs b/VmcMessages/VmcExtVrm.cs index 12cb992..855d89a 100644 --- a/VmcMessages/VmcExtVrm.cs +++ b/VmcMessages/VmcExtVrm.cs @@ -18,6 +18,7 @@ using Godot; using godotOscSharp; +using System.Collections.Generic; namespace godotVmcSharp { @@ -83,5 +84,21 @@ namespace godotVmcSharp title = _title; hash = _hash; } + + public godotOscSharp.OscMessage ToMessage() + { + if (hash == null) + { + return new godotOscSharp.OscMessage(addr, new List{ + new godotOscSharp.OscArgument(path, 's'), + new godotOscSharp.OscArgument(title, 's') + }); + } + return new godotOscSharp.OscMessage(addr, new List{ + new godotOscSharp.OscArgument(path, 's'), + new godotOscSharp.OscArgument(title, 's'), + new godotOscSharp.OscArgument(hash, 's') + }); + } } } \ No newline at end of file