From 4a5cc4421c734968a08d3c3cfc03e697d6f5a557 Mon Sep 17 00:00:00 2001 From: TheFatBastid Date: Thu, 8 Feb 2024 13:17:45 -0500 Subject: [PATCH 1/5] DMX support Added scan (dmx over ethernet) support. Added an advanced settings tab. Added ability to turn off the stage kit. --- Assets/Prefabs/Menu/Common/InputField.prefab | 16 +- .../Visuals/DMXChannelsSetting.prefab | 1718 +++++++++++++++++ .../Visuals/DMXChannelsSetting.prefab.meta | 7 + Assets/Scenes/PersistentScene.unity | 17 +- Assets/Script/Integration/Sacn.meta | 8 + .../Integration/Sacn/Haukcode.sACN.meta | 8 + .../Haukcode.sACN/BigEndianBinaryWriter.cs | 111 ++ .../BigEndianBinaryWriter.cs.meta | 11 + .../Integration/Sacn/Haukcode.sACN/Model.meta | 8 + .../Sacn/Haukcode.sACN/Model/DMPLayer.cs | 42 + .../Sacn/Haukcode.sACN/Model/DMPLayer.cs.meta | 11 + .../Haukcode.sACN/Model/DataFramingLayer.cs | 58 + .../Model/DataFramingLayer.cs.meta | 11 + .../Sacn/Haukcode.sACN/Model/FramingLayer.cs | 27 + .../Haukcode.sACN/Model/FramingLayer.cs.meta | 11 + .../Haukcode.sACN/Model/FramingOptions.cs | 60 + .../Model/FramingOptions.cs.meta | 11 + .../Sacn/Haukcode.sACN/Model/RootLayer.cs | 59 + .../Haukcode.sACN/Model/RootLayer.cs.meta | 11 + .../Haukcode.sACN/Model/SACNDataPacket.cs | 25 + .../Model/SACNDataPacket.cs.meta | 11 + .../Sacn/Haukcode.sACN/Model/SACNPacket.cs | 32 + .../Haukcode.sACN/Model/SACNPacket.cs.meta | 11 + .../Haukcode.sACN/Model/SendStatistics.cs | 14 + .../Model/SendStatistics.cs.meta | 11 + .../Haukcode.sACN/Model/SyncFramingLayer.cs | 37 + .../Model/SyncFramingLayer.cs.meta | 11 + .../Sacn/Haukcode.sACN/SACNClient.cs | 516 +++++ .../Sacn/Haukcode.sACN/SACNClient.cs.meta | 11 + .../Sacn/Haukcode.sACN/SACNCommon.cs | 153 ++ .../Sacn/Haukcode.sACN/SACNCommon.cs.meta | 11 + .../Sacn/Haukcode.sACN/SendData.cs | 11 + .../Sacn/Haukcode.sACN/SendData.cs.meta | 11 + .../Script/Integration/Sacn/SacnController.cs | 130 ++ .../Integration/Sacn/SacnController.cs.meta | 11 + .../Integration/StageKit/StageKitGameplay.cs | 5 +- .../StageKit/StageKitLightingController.cs | 8 +- .../Visuals/DMXChannelsSettingVisual.cs | 60 + .../Visuals/DMXChannelsSettingVisual.cs.meta | 11 + .../Settings/SettingsManager.Settings.cs | 38 + Assets/Script/Settings/SettingsManager.cs | 14 +- .../Settings/Types/DMXChannelsSetting.cs | 26 + .../Settings/Types/DMXChannelsSetting.cs.meta | 11 + .../AssetGroups/Default Local Group.asset | 5 + .../Localization/Settings Shared Data.asset | 52 + .../Localization/Settings_en-US.asset | 55 + Assets/packages.config | 1 + 47 files changed, 3488 insertions(+), 9 deletions(-) create mode 100644 Assets/Prefabs/Menu/Settings/Visuals/DMXChannelsSetting.prefab create mode 100644 Assets/Prefabs/Menu/Settings/Visuals/DMXChannelsSetting.prefab.meta create mode 100644 Assets/Script/Integration/Sacn.meta create mode 100644 Assets/Script/Integration/Sacn/Haukcode.sACN.meta create mode 100644 Assets/Script/Integration/Sacn/Haukcode.sACN/BigEndianBinaryWriter.cs create mode 100644 Assets/Script/Integration/Sacn/Haukcode.sACN/BigEndianBinaryWriter.cs.meta create mode 100644 Assets/Script/Integration/Sacn/Haukcode.sACN/Model.meta create mode 100644 Assets/Script/Integration/Sacn/Haukcode.sACN/Model/DMPLayer.cs create mode 100644 Assets/Script/Integration/Sacn/Haukcode.sACN/Model/DMPLayer.cs.meta create mode 100644 Assets/Script/Integration/Sacn/Haukcode.sACN/Model/DataFramingLayer.cs create mode 100644 Assets/Script/Integration/Sacn/Haukcode.sACN/Model/DataFramingLayer.cs.meta create mode 100644 Assets/Script/Integration/Sacn/Haukcode.sACN/Model/FramingLayer.cs create mode 100644 Assets/Script/Integration/Sacn/Haukcode.sACN/Model/FramingLayer.cs.meta create mode 100644 Assets/Script/Integration/Sacn/Haukcode.sACN/Model/FramingOptions.cs create mode 100644 Assets/Script/Integration/Sacn/Haukcode.sACN/Model/FramingOptions.cs.meta create mode 100644 Assets/Script/Integration/Sacn/Haukcode.sACN/Model/RootLayer.cs create mode 100644 Assets/Script/Integration/Sacn/Haukcode.sACN/Model/RootLayer.cs.meta create mode 100644 Assets/Script/Integration/Sacn/Haukcode.sACN/Model/SACNDataPacket.cs create mode 100644 Assets/Script/Integration/Sacn/Haukcode.sACN/Model/SACNDataPacket.cs.meta create mode 100644 Assets/Script/Integration/Sacn/Haukcode.sACN/Model/SACNPacket.cs create mode 100644 Assets/Script/Integration/Sacn/Haukcode.sACN/Model/SACNPacket.cs.meta create mode 100644 Assets/Script/Integration/Sacn/Haukcode.sACN/Model/SendStatistics.cs create mode 100644 Assets/Script/Integration/Sacn/Haukcode.sACN/Model/SendStatistics.cs.meta create mode 100644 Assets/Script/Integration/Sacn/Haukcode.sACN/Model/SyncFramingLayer.cs create mode 100644 Assets/Script/Integration/Sacn/Haukcode.sACN/Model/SyncFramingLayer.cs.meta create mode 100644 Assets/Script/Integration/Sacn/Haukcode.sACN/SACNClient.cs create mode 100644 Assets/Script/Integration/Sacn/Haukcode.sACN/SACNClient.cs.meta create mode 100644 Assets/Script/Integration/Sacn/Haukcode.sACN/SACNCommon.cs create mode 100644 Assets/Script/Integration/Sacn/Haukcode.sACN/SACNCommon.cs.meta create mode 100644 Assets/Script/Integration/Sacn/Haukcode.sACN/SendData.cs create mode 100644 Assets/Script/Integration/Sacn/Haukcode.sACN/SendData.cs.meta create mode 100644 Assets/Script/Integration/Sacn/SacnController.cs create mode 100644 Assets/Script/Integration/Sacn/SacnController.cs.meta create mode 100644 Assets/Script/Menu/Settings/Visuals/DMXChannelsSettingVisual.cs create mode 100644 Assets/Script/Menu/Settings/Visuals/DMXChannelsSettingVisual.cs.meta create mode 100644 Assets/Script/Settings/Types/DMXChannelsSetting.cs create mode 100644 Assets/Script/Settings/Types/DMXChannelsSetting.cs.meta diff --git a/Assets/Prefabs/Menu/Common/InputField.prefab b/Assets/Prefabs/Menu/Common/InputField.prefab index 8820b7eb8..b4d564eb0 100644 --- a/Assets/Prefabs/Menu/Common/InputField.prefab +++ b/Assets/Prefabs/Menu/Common/InputField.prefab @@ -139,7 +139,21 @@ MonoBehaviour: m_CharacterLimit: 0 m_OnEndEdit: m_PersistentCalls: - m_Calls: [] + m_Calls: + - m_Target: {fileID: 8574164494457434853, guid: 8644ff72d188351429aeb73a1d49386e, + type: 3} + m_TargetAssemblyTypeName: YARG.Menu.Settings.Visuals.DMXChannelsSettingVisual, + Assembly-CSharp + m_MethodName: OnTextFieldChange + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 m_OnSubmit: m_PersistentCalls: m_Calls: [] diff --git a/Assets/Prefabs/Menu/Settings/Visuals/DMXChannelsSetting.prefab b/Assets/Prefabs/Menu/Settings/Visuals/DMXChannelsSetting.prefab new file mode 100644 index 000000000..9ea327d8b --- /dev/null +++ b/Assets/Prefabs/Menu/Settings/Visuals/DMXChannelsSetting.prefab @@ -0,0 +1,1718 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1001 &1482510037229709811 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 272972865484015839} + m_Modifications: + - target: {fileID: 1988200050303033511, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_Name + value: InputField (7) + objectReference: {fileID: 0} + - target: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_ContentType + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_KeyboardType + value: 4 + objectReference: {fileID: 0} + - target: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_CharacterValidation + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_OnEndEdit.m_PersistentCalls.m_Calls.Array.size + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_OnEndEdit.m_PersistentCalls.m_Calls.Array.data[0].m_Mode + value: 3 + objectReference: {fileID: 0} + - target: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_OnEndEdit.m_PersistentCalls.m_Calls.Array.data[0].m_Target + value: + objectReference: {fileID: 8574164494457434853} + - target: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_OnEndEdit.m_PersistentCalls.m_Calls.Array.data[0].m_CallState + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_OnEndEdit.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName + value: OnTextFieldChange + objectReference: {fileID: 0} + - target: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_OnEndEdit.m_PersistentCalls.m_Calls.Array.data[0].m_TargetAssemblyTypeName + value: YARG.Menu.Settings.Visuals.DMXChannelsSettingVisual, Assembly-CSharp + objectReference: {fileID: 0} + - target: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_OnEndEdit.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_IntArgument + value: 7 + objectReference: {fileID: 0} + - target: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_OnEndEdit.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgumentAssemblyTypeName + value: UnityEngine.Object, UnityEngine + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_Pivot.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_Pivot.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_RootOrder + value: 7 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_SizeDelta.y + value: 100 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8757912418558663112, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_text + value: Enter number... + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8f25b12de267d7544aa2ff7993247fcd, type: 3} +--- !u!114 &6132633722310584329 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + m_PrefabInstance: {fileID: 1482510037229709811} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 2da0c512f12947e489f739169773d7ca, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1001 &2027759864573523799 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 272972865484015839} + m_Modifications: + - target: {fileID: 1988200050303033511, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_Name + value: InputField (3) + objectReference: {fileID: 0} + - target: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_ContentType + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_KeyboardType + value: 4 + objectReference: {fileID: 0} + - target: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_CharacterValidation + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_OnEndEdit.m_PersistentCalls.m_Calls.Array.size + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_OnEndEdit.m_PersistentCalls.m_Calls.Array.data[0].m_Mode + value: 3 + objectReference: {fileID: 0} + - target: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_OnEndEdit.m_PersistentCalls.m_Calls.Array.data[0].m_Target + value: + objectReference: {fileID: 8574164494457434853} + - target: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_OnEndEdit.m_PersistentCalls.m_Calls.Array.data[0].m_CallState + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_OnEndEdit.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName + value: OnTextFieldChange + objectReference: {fileID: 0} + - target: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_OnEndEdit.m_PersistentCalls.m_Calls.Array.data[0].m_TargetAssemblyTypeName + value: YARG.Menu.Settings.Visuals.DMXChannelsSettingVisual, Assembly-CSharp + objectReference: {fileID: 0} + - target: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_OnEndEdit.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_IntArgument + value: 3 + objectReference: {fileID: 0} + - target: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_OnEndEdit.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgumentAssemblyTypeName + value: UnityEngine.Object, UnityEngine + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_Pivot.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_Pivot.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_RootOrder + value: 3 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_SizeDelta.y + value: 100 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8757912418558663112, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_text + value: Enter number... + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8f25b12de267d7544aa2ff7993247fcd, type: 3} +--- !u!114 &6750225399639357101 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + m_PrefabInstance: {fileID: 2027759864573523799} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 2da0c512f12947e489f739169773d7ca, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1001 &2451443413818975593 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 272972865484015839} + m_Modifications: + - target: {fileID: 1988200050303033511, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_Name + value: InputField (1) + objectReference: {fileID: 0} + - target: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_ContentType + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_KeyboardType + value: 4 + objectReference: {fileID: 0} + - target: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_CharacterValidation + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_OnEndEdit.m_PersistentCalls.m_Calls.Array.size + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_OnEndEdit.m_PersistentCalls.m_Calls.Array.data[0].m_Mode + value: 3 + objectReference: {fileID: 0} + - target: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_OnEndEdit.m_PersistentCalls.m_Calls.Array.data[0].m_Target + value: + objectReference: {fileID: 8574164494457434853} + - target: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_OnEndEdit.m_PersistentCalls.m_Calls.Array.data[0].m_CallState + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_OnEndEdit.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName + value: OnTextFieldChange + objectReference: {fileID: 0} + - target: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_OnEndEdit.m_PersistentCalls.m_Calls.Array.data[0].m_TargetAssemblyTypeName + value: YARG.Menu.Settings.Visuals.DMXChannelsSettingVisual, Assembly-CSharp + objectReference: {fileID: 0} + - target: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_OnEndEdit.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_IntArgument + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_OnEndEdit.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgumentAssemblyTypeName + value: UnityEngine.Object, UnityEngine + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_Pivot.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_Pivot.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_RootOrder + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_SizeDelta.y + value: 100 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8757912418558663112, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_text + value: Enter number... + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8f25b12de267d7544aa2ff7993247fcd, type: 3} +--- !u!114 &7173341596254397587 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + m_PrefabInstance: {fileID: 2451443413818975593} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 2da0c512f12947e489f739169773d7ca, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1001 &3636922171384039899 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 272972865484015839} + m_Modifications: + - target: {fileID: 1988200050303033511, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_Name + value: InputField (5) + objectReference: {fileID: 0} + - target: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_ContentType + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_KeyboardType + value: 4 + objectReference: {fileID: 0} + - target: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_CharacterValidation + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_OnEndEdit.m_PersistentCalls.m_Calls.Array.size + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_OnEndEdit.m_PersistentCalls.m_Calls.Array.data[0].m_Mode + value: 3 + objectReference: {fileID: 0} + - target: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_OnEndEdit.m_PersistentCalls.m_Calls.Array.data[0].m_Target + value: + objectReference: {fileID: 8574164494457434853} + - target: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_OnEndEdit.m_PersistentCalls.m_Calls.Array.data[0].m_CallState + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_OnEndEdit.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName + value: OnTextFieldChange + objectReference: {fileID: 0} + - target: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_OnEndEdit.m_PersistentCalls.m_Calls.Array.data[0].m_TargetAssemblyTypeName + value: YARG.Menu.Settings.Visuals.DMXChannelsSettingVisual, Assembly-CSharp + objectReference: {fileID: 0} + - target: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_OnEndEdit.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_IntArgument + value: 5 + objectReference: {fileID: 0} + - target: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_OnEndEdit.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgumentAssemblyTypeName + value: UnityEngine.Object, UnityEngine + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_Pivot.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_Pivot.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_RootOrder + value: 5 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_SizeDelta.y + value: 100 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8757912418558663112, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_text + value: Enter number... + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8f25b12de267d7544aa2ff7993247fcd, type: 3} +--- !u!114 &8354568275349653537 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + m_PrefabInstance: {fileID: 3636922171384039899} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 2da0c512f12947e489f739169773d7ca, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1001 &4089575833438552982 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 272972865484015839} + m_Modifications: + - target: {fileID: 1988200050303033511, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_Name + value: InputField (2) + objectReference: {fileID: 0} + - target: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_ContentType + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_KeyboardType + value: 4 + objectReference: {fileID: 0} + - target: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_CharacterValidation + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_OnEndEdit.m_PersistentCalls.m_Calls.Array.size + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_OnEndEdit.m_PersistentCalls.m_Calls.Array.data[0].m_Mode + value: 3 + objectReference: {fileID: 0} + - target: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_OnEndEdit.m_PersistentCalls.m_Calls.Array.data[0].m_Target + value: + objectReference: {fileID: 8574164494457434853} + - target: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_OnEndEdit.m_PersistentCalls.m_Calls.Array.data[0].m_CallState + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_OnEndEdit.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName + value: OnTextFieldChange + objectReference: {fileID: 0} + - target: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_OnEndEdit.m_PersistentCalls.m_Calls.Array.data[0].m_TargetAssemblyTypeName + value: YARG.Menu.Settings.Visuals.DMXChannelsSettingVisual, Assembly-CSharp + objectReference: {fileID: 0} + - target: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_OnEndEdit.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_IntArgument + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_OnEndEdit.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgumentAssemblyTypeName + value: UnityEngine.Object, UnityEngine + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_Pivot.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_Pivot.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_RootOrder + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_SizeDelta.y + value: 100 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8757912418558663112, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_text + value: Enter number... + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8f25b12de267d7544aa2ff7993247fcd, type: 3} +--- !u!114 &8739381773546340972 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + m_PrefabInstance: {fileID: 4089575833438552982} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 2da0c512f12947e489f739169773d7ca, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1001 &6133974396596119954 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 272972865484015839} + m_Modifications: + - target: {fileID: 1988200050303033511, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_Name + value: InputField (6) + objectReference: {fileID: 0} + - target: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_ContentType + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_KeyboardType + value: 4 + objectReference: {fileID: 0} + - target: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_CharacterValidation + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_OnEndEdit.m_PersistentCalls.m_Calls.Array.size + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_OnEndEdit.m_PersistentCalls.m_Calls.Array.data[0].m_Mode + value: 3 + objectReference: {fileID: 0} + - target: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_OnEndEdit.m_PersistentCalls.m_Calls.Array.data[0].m_Target + value: + objectReference: {fileID: 8574164494457434853} + - target: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_OnEndEdit.m_PersistentCalls.m_Calls.Array.data[0].m_CallState + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_OnEndEdit.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName + value: OnTextFieldChange + objectReference: {fileID: 0} + - target: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_OnEndEdit.m_PersistentCalls.m_Calls.Array.data[0].m_TargetAssemblyTypeName + value: YARG.Menu.Settings.Visuals.DMXChannelsSettingVisual, Assembly-CSharp + objectReference: {fileID: 0} + - target: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_OnEndEdit.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_IntArgument + value: 6 + objectReference: {fileID: 0} + - target: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_OnEndEdit.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgumentAssemblyTypeName + value: UnityEngine.Object, UnityEngine + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_Pivot.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_Pivot.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_RootOrder + value: 6 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_SizeDelta.y + value: 100 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8757912418558663112, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_text + value: Enter number... + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8f25b12de267d7544aa2ff7993247fcd, type: 3} +--- !u!114 &1488954042138994792 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + m_PrefabInstance: {fileID: 6133974396596119954} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 2da0c512f12947e489f739169773d7ca, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1001 &6609846725191865157 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 272972865484015839} + m_Modifications: + - target: {fileID: 1988200050303033511, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_Name + value: InputField + objectReference: {fileID: 0} + - target: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_ContentType + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_KeyboardType + value: 4 + objectReference: {fileID: 0} + - target: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_CharacterValidation + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_OnEndEdit.m_PersistentCalls.m_Calls.Array.data[0].m_Mode + value: 3 + objectReference: {fileID: 0} + - target: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_OnEndEdit.m_PersistentCalls.m_Calls.Array.data[0].m_Target + value: + objectReference: {fileID: 8574164494457434853} + - target: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_OnEndEdit.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName + value: OnTextFieldChange + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_Pivot.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_Pivot.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_RootOrder + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_SizeDelta.y + value: 100 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8757912418558663112, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_text + value: Enter number... + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8f25b12de267d7544aa2ff7993247fcd, type: 3} +--- !u!114 &1887982916101165759 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + m_PrefabInstance: {fileID: 6609846725191865157} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 2da0c512f12947e489f739169773d7ca, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1001 &7675649206205189898 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 272972865484015839} + m_Modifications: + - target: {fileID: 1988200050303033511, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_Name + value: InputField (4) + objectReference: {fileID: 0} + - target: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_ContentType + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_KeyboardType + value: 4 + objectReference: {fileID: 0} + - target: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_CharacterValidation + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_OnEndEdit.m_PersistentCalls.m_Calls.Array.size + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_OnEndEdit.m_PersistentCalls.m_Calls.Array.data[0].m_Mode + value: 3 + objectReference: {fileID: 0} + - target: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_OnEndEdit.m_PersistentCalls.m_Calls.Array.data[0].m_Target + value: + objectReference: {fileID: 8574164494457434853} + - target: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_OnEndEdit.m_PersistentCalls.m_Calls.Array.data[0].m_CallState + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_OnEndEdit.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName + value: OnTextFieldChange + objectReference: {fileID: 0} + - target: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_OnEndEdit.m_PersistentCalls.m_Calls.Array.data[0].m_TargetAssemblyTypeName + value: YARG.Menu.Settings.Visuals.DMXChannelsSettingVisual, Assembly-CSharp + objectReference: {fileID: 0} + - target: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_OnEndEdit.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_IntArgument + value: 4 + objectReference: {fileID: 0} + - target: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_OnEndEdit.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgumentAssemblyTypeName + value: UnityEngine.Object, UnityEngine + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_Pivot.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_Pivot.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_RootOrder + value: 4 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_SizeDelta.y + value: 100 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7665614177142481491, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8757912418558663112, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + propertyPath: m_text + value: Enter number... + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 8f25b12de267d7544aa2ff7993247fcd, type: 3} +--- !u!114 &3102118881229983472 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 4722467204755374586, guid: 8f25b12de267d7544aa2ff7993247fcd, + type: 3} + m_PrefabInstance: {fileID: 7675649206205189898} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 2da0c512f12947e489f739169773d7ca, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1001 &8095148824242519626 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 4420504316707193964, guid: 6f46741e648c07044852bd3391146600, + type: 3} + propertyPath: m_Name + value: DMXChannelsSetting + objectReference: {fileID: 0} + - target: {fileID: 4420504316707193967, guid: 6f46741e648c07044852bd3391146600, + type: 3} + propertyPath: m_Pivot.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 4420504316707193967, guid: 6f46741e648c07044852bd3391146600, + type: 3} + propertyPath: m_Pivot.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 4420504316707193967, guid: 6f46741e648c07044852bd3391146600, + type: 3} + propertyPath: m_RootOrder + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4420504316707193967, guid: 6f46741e648c07044852bd3391146600, + type: 3} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4420504316707193967, guid: 6f46741e648c07044852bd3391146600, + type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4420504316707193967, guid: 6f46741e648c07044852bd3391146600, + type: 3} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4420504316707193967, guid: 6f46741e648c07044852bd3391146600, + type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4420504316707193967, guid: 6f46741e648c07044852bd3391146600, + type: 3} + propertyPath: m_SizeDelta.x + value: 1500 + objectReference: {fileID: 0} + - target: {fileID: 4420504316707193967, guid: 6f46741e648c07044852bd3391146600, + type: 3} + propertyPath: m_SizeDelta.y + value: 100 + objectReference: {fileID: 0} + - target: {fileID: 4420504316707193967, guid: 6f46741e648c07044852bd3391146600, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4420504316707193967, guid: 6f46741e648c07044852bd3391146600, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4420504316707193967, guid: 6f46741e648c07044852bd3391146600, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4420504316707193967, guid: 6f46741e648c07044852bd3391146600, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4420504316707193967, guid: 6f46741e648c07044852bd3391146600, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4420504316707193967, guid: 6f46741e648c07044852bd3391146600, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4420504316707193967, guid: 6f46741e648c07044852bd3391146600, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4420504316707193967, guid: 6f46741e648c07044852bd3391146600, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4420504316707193967, guid: 6f46741e648c07044852bd3391146600, + type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4420504316707193967, guid: 6f46741e648c07044852bd3391146600, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4420504316707193967, guid: 6f46741e648c07044852bd3391146600, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4420504316707193967, guid: 6f46741e648c07044852bd3391146600, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 6f46741e648c07044852bd3391146600, type: 3} +--- !u!224 &272972865484015839 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 8331225728328382101, guid: 6f46741e648c07044852bd3391146600, + type: 3} + m_PrefabInstance: {fileID: 8095148824242519626} + m_PrefabAsset: {fileID: 0} +--- !u!114 &1727629268779748808 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 7471044473863680898, guid: 6f46741e648c07044852bd3391146600, + type: 3} + m_PrefabInstance: {fileID: 8095148824242519626} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 56eb0353ae6e5124bb35b17aff880f16, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &5552788490976803366 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 4420504316707193964, guid: 6f46741e648c07044852bd3391146600, + type: 3} + m_PrefabInstance: {fileID: 8095148824242519626} + m_PrefabAsset: {fileID: 0} +--- !u!114 &8574164494457434853 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5552788490976803366} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4d958fd2a06829d42aa641282a23c0bf, type: 3} + m_Name: + m_EditorClassIdentifier: + _settingLabel: {fileID: 1727629268779748808} + _inputField: + - {fileID: 1887982916101165759} + - {fileID: 7173341596254397587} + - {fileID: 8739381773546340972} + - {fileID: 6750225399639357101} + - {fileID: 3102118881229983472} + - {fileID: 8354568275349653537} + - {fileID: 1488954042138994792} + - {fileID: 6132633722310584329} +--- !u!1 &7199009927816744663 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 1423062251918749853, guid: 6f46741e648c07044852bd3391146600, + type: 3} + m_PrefabInstance: {fileID: 8095148824242519626} + m_PrefabAsset: {fileID: 0} +--- !u!114 &8359188880227905752 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7199009927816744663} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 30649d3a9faa99c48a7b1166b86bf2a0, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_ChildAlignment: 0 + m_Spacing: 0 + m_ChildForceExpandWidth: 1 + m_ChildForceExpandHeight: 1 + m_ChildControlWidth: 1 + m_ChildControlHeight: 0 + m_ChildScaleWidth: 0 + m_ChildScaleHeight: 0 + m_ReverseArrangement: 0 +--- !u!114 &480272274693829910 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7199009927816744663} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7792aa537b804208a803f971074a1a45, type: 3} + m_Name: + m_EditorClassIdentifier: + _defaultGroup: 0 + _canBeCurrent: 1 + _addAllChildrenOnAwake: 0 + _selectFirst: 0 diff --git a/Assets/Prefabs/Menu/Settings/Visuals/DMXChannelsSetting.prefab.meta b/Assets/Prefabs/Menu/Settings/Visuals/DMXChannelsSetting.prefab.meta new file mode 100644 index 000000000..7cc4d07ad --- /dev/null +++ b/Assets/Prefabs/Menu/Settings/Visuals/DMXChannelsSetting.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 8644ff72d188351429aeb73a1d49386e +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/PersistentScene.unity b/Assets/Scenes/PersistentScene.unity index 977150f56..4e0eb3032 100644 --- a/Assets/Scenes/PersistentScene.unity +++ b/Assets/Scenes/PersistentScene.unity @@ -38,7 +38,7 @@ RenderSettings: m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 0.12731749, g: 0.13414757, b: 0.1210787, a: 1} + m_IndirectSpecularColor: {r: 0.12731713, g: 0.13414738, b: 0.121078536, a: 1} m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: @@ -984,6 +984,7 @@ GameObject: - component: {fileID: 728815265} - component: {fileID: 728815266} - component: {fileID: 728815267} + - component: {fileID: 728815268} m_Layer: 0 m_Name: Integrations m_TagString: Untagged @@ -1063,6 +1064,18 @@ MonoBehaviour: DefaultState: Are you ready to develop? DefaultLargeImage: icon_dev DefaultLargeText: Yet Another Rhythm Game - Developer Build +--- !u!114 &728815268 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 728815263} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b959c0d0515779a48a3246dfaccadec0, type: 3} + m_Name: + m_EditorClassIdentifier: --- !u!1 &782876828 GameObject: m_ObjectHideFlags: 0 @@ -1207,7 +1220,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: -7.5, y: 0} + m_AnchoredPosition: {x: -7.499878, y: 0} m_SizeDelta: {x: -15, y: 50} m_Pivot: {x: 0.5, y: 0.99999994} --- !u!114 &787126834 diff --git a/Assets/Script/Integration/Sacn.meta b/Assets/Script/Integration/Sacn.meta new file mode 100644 index 000000000..770a603cc --- /dev/null +++ b/Assets/Script/Integration/Sacn.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c587fb1cd3a503847a4f67e4a013c1b6 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Script/Integration/Sacn/Haukcode.sACN.meta b/Assets/Script/Integration/Sacn/Haukcode.sACN.meta new file mode 100644 index 000000000..b9714fe64 --- /dev/null +++ b/Assets/Script/Integration/Sacn/Haukcode.sACN.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 645ae5c9169894440b13664ce76fc708 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Script/Integration/Sacn/Haukcode.sACN/BigEndianBinaryWriter.cs b/Assets/Script/Integration/Sacn/Haukcode.sACN/BigEndianBinaryWriter.cs new file mode 100644 index 000000000..8ad23fbe9 --- /dev/null +++ b/Assets/Script/Integration/Sacn/Haukcode.sACN/BigEndianBinaryWriter.cs @@ -0,0 +1,111 @@ +using System; +using System.Linq; +using System.Text; + +namespace Haukcode.sACN +{ + internal class BigEndianBinaryWriter + { + private int writePosition = 0; + private readonly Memory buffer; + + public BigEndianBinaryWriter(Memory buffer) + { + this.buffer = buffer; + } + + public int WrittenBytes => writePosition; + + public Memory Memory => buffer.Slice(writePosition); + + public void WriteByte(byte value) + { + var span = buffer.Span; + + span[writePosition++] = (byte)value; + } + + public void WriteShort(short value) + { + var span = buffer.Span; + + span[writePosition++] = (byte)(value >> 8); + span[writePosition++] = (byte)value; + } + + public void WriteUShort(ushort value) + { + var span = buffer.Span; + + span[writePosition++] = (byte)(value >> 8); + span[writePosition++] = (byte)value; + } + + public void WriteInt32(int value) + { + var span = buffer.Span; + + span[writePosition++] = (byte)(value >> 24); + span[writePosition++] = (byte)(value >> 16); + span[writePosition++] = (byte)(value >> 8); + span[writePosition++] = (byte)value; + } + + public void WriteBytes(byte[] bytes) + { + bytes.CopyTo(buffer[writePosition..].Span); + + writePosition += bytes.Length; + } + + public void WriteBytes(ReadOnlyMemory bytes) + { + bytes.Span.CopyTo(buffer[writePosition..].Span); + + writePosition += bytes.Length; + } + + public void WriteString(string value, int length) + { + //FIXME + WriteBytes(Encoding.UTF8.GetBytes(value)); + WriteBytes(Enumerable.Repeat((byte)0, length - value.Length).ToArray()); + } + + private byte[] GuidToByteArray(Guid input) + { + var bytes = input.ToByteArray(); + + return new byte[] { + bytes[3], + bytes[2], + bytes[1], + bytes[0], + + bytes[5], + bytes[4], + + bytes[7], + bytes[6], + + bytes[8], + bytes[9], + + bytes[10], + bytes[11], + bytes[12], + bytes[13], + bytes[14], + bytes[15] + }; + } + + public void WriteGuid(Guid value) + { + // Fixme + var bytes = GuidToByteArray(value); + + WriteBytes(bytes); + } + } +} diff --git a/Assets/Script/Integration/Sacn/Haukcode.sACN/BigEndianBinaryWriter.cs.meta b/Assets/Script/Integration/Sacn/Haukcode.sACN/BigEndianBinaryWriter.cs.meta new file mode 100644 index 000000000..46bc0f4e8 --- /dev/null +++ b/Assets/Script/Integration/Sacn/Haukcode.sACN/BigEndianBinaryWriter.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ca381c7006e070948b75d3d086b1e7f5 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Script/Integration/Sacn/Haukcode.sACN/Model.meta b/Assets/Script/Integration/Sacn/Haukcode.sACN/Model.meta new file mode 100644 index 000000000..fa4d22b2f --- /dev/null +++ b/Assets/Script/Integration/Sacn/Haukcode.sACN/Model.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5ffa0a0b095d11a4eb9cf12d0fbd22cb +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Script/Integration/Sacn/Haukcode.sACN/Model/DMPLayer.cs b/Assets/Script/Integration/Sacn/Haukcode.sACN/Model/DMPLayer.cs new file mode 100644 index 000000000..ac3025191 --- /dev/null +++ b/Assets/Script/Integration/Sacn/Haukcode.sACN/Model/DMPLayer.cs @@ -0,0 +1,42 @@ +using System; + +namespace Haukcode.sACN.Model +{ + public class DMPLayer + { + public const byte DMP_VECTOR = 2; + public const byte ADDRESS_TYPE_AND_DATA_TYPE = 0xA1; + public const short FIRST_PROPERTY_ADDRESS = 0x00; + public const short ADDRESS_INCREMENT = 1; + + public byte StartCode { get; set; } + + public short Length { get { return (short)(11 + Data.Length); } } + + public ReadOnlyMemory Data { get; set; } + + public DMPLayer(ReadOnlyMemory data, byte startCode = 0x00) + { + Data = data; + StartCode = startCode; + } + + public int WriteToBuffer(Memory buffer) + { + var writer = new BigEndianBinaryWriter(buffer); + + ushort flagsAndDMPLength = (ushort)(SACNDataPacket.FLAGS | (ushort)Length); + + writer.WriteUShort(flagsAndDMPLength); + writer.WriteByte(DMP_VECTOR); + writer.WriteByte(ADDRESS_TYPE_AND_DATA_TYPE); + writer.WriteShort(FIRST_PROPERTY_ADDRESS); + writer.WriteShort(ADDRESS_INCREMENT); + writer.WriteShort((short)(Data.Length + 1)); + writer.WriteByte(StartCode); + writer.WriteBytes(Data); + + return writer.WrittenBytes; + } + } +} diff --git a/Assets/Script/Integration/Sacn/Haukcode.sACN/Model/DMPLayer.cs.meta b/Assets/Script/Integration/Sacn/Haukcode.sACN/Model/DMPLayer.cs.meta new file mode 100644 index 000000000..3029a9dbb --- /dev/null +++ b/Assets/Script/Integration/Sacn/Haukcode.sACN/Model/DMPLayer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 16c89a06b6ed7d544b2825eba53ffc1d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Script/Integration/Sacn/Haukcode.sACN/Model/DataFramingLayer.cs b/Assets/Script/Integration/Sacn/Haukcode.sACN/Model/DataFramingLayer.cs new file mode 100644 index 000000000..049130864 --- /dev/null +++ b/Assets/Script/Integration/Sacn/Haukcode.sACN/Model/DataFramingLayer.cs @@ -0,0 +1,58 @@ +using System; + + +namespace Haukcode.sACN.Model +{ + public class DataFramingLayer : FramingLayer + { + public const int SourceNameLength = 64; + + public DMPLayer DMPLayer { get; set; } + + public override ushort Length { get { return (ushort)(13 + SourceNameLength + DMPLayer.Length); } } + + public string SourceName { get; set; } + + public ushort UniverseId { get; set; } + + public byte Priority { get; set; } + + public ushort SyncAddress { get; set; } + + public FramingOptions Options { get; set; } + + public override int RootVector => RootLayer.VECTOR_ROOT_E131_DATA; + + public DataFramingLayer(string sourceName, ushort universeId, byte sequenceId, ReadOnlyMemory data, byte priority, ushort syncAddress = 0, byte startCode = 0) + : base(sequenceId) + { + SourceName = sourceName; + UniverseId = universeId; + DMPLayer = new DMPLayer(data, startCode); + Priority = priority; + SyncAddress = syncAddress; + Options = new FramingOptions(); + } + + public DataFramingLayer() + { + } + + public override int WriteToBuffer(Memory buffer) + { + var writer = new BigEndianBinaryWriter(buffer); + + ushort flagsAndFramingLength = (ushort)(SACNPacket.FLAGS | Length); + writer.WriteUShort(flagsAndFramingLength); + writer.WriteInt32(VECTOR_E131_DATA_PACKET); + writer.WriteString(SourceName, 64); + writer.WriteByte(Priority); + writer.WriteUShort(SyncAddress); + writer.WriteByte(SequenceId); + writer.WriteByte(Options.ToByte()); + writer.WriteUShort(UniverseId); + + return writer.WrittenBytes + DMPLayer.WriteToBuffer(writer.Memory); + } + } +} diff --git a/Assets/Script/Integration/Sacn/Haukcode.sACN/Model/DataFramingLayer.cs.meta b/Assets/Script/Integration/Sacn/Haukcode.sACN/Model/DataFramingLayer.cs.meta new file mode 100644 index 000000000..e6205f1c1 --- /dev/null +++ b/Assets/Script/Integration/Sacn/Haukcode.sACN/Model/DataFramingLayer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 9b41620be6ab3a94cbbb25b7f0a211f8 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Script/Integration/Sacn/Haukcode.sACN/Model/FramingLayer.cs b/Assets/Script/Integration/Sacn/Haukcode.sACN/Model/FramingLayer.cs new file mode 100644 index 000000000..0367e02b5 --- /dev/null +++ b/Assets/Script/Integration/Sacn/Haukcode.sACN/Model/FramingLayer.cs @@ -0,0 +1,27 @@ +using System; + +namespace Haukcode.sACN.Model +{ + public abstract class FramingLayer + { + public const int VECTOR_E131_DATA_PACKET = 0x00000002; + public const int VECTOR_E131_EXTENDED_SYNCHRONIZATION = 0x00000001; + + public abstract ushort Length { get; } + + public byte SequenceId { get; set; } + + public abstract int RootVector { get; } + + public FramingLayer(byte sequenceId) + { + SequenceId = sequenceId; + } + + public FramingLayer() + { + } + + public abstract int WriteToBuffer(Memory buffer); + } +} diff --git a/Assets/Script/Integration/Sacn/Haukcode.sACN/Model/FramingLayer.cs.meta b/Assets/Script/Integration/Sacn/Haukcode.sACN/Model/FramingLayer.cs.meta new file mode 100644 index 000000000..4a816ed0e --- /dev/null +++ b/Assets/Script/Integration/Sacn/Haukcode.sACN/Model/FramingLayer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 484abccbdd248c4419edf3e96ec5e80c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Script/Integration/Sacn/Haukcode.sACN/Model/FramingOptions.cs b/Assets/Script/Integration/Sacn/Haukcode.sACN/Model/FramingOptions.cs new file mode 100644 index 000000000..45cdde4b2 --- /dev/null +++ b/Assets/Script/Integration/Sacn/Haukcode.sACN/Model/FramingOptions.cs @@ -0,0 +1,60 @@ + +namespace Haukcode.sACN.Model +{ + public class FramingOptions + { + public const byte FORCE_SYNCHRONIZATION = 0b0000_1000; + public const byte STREAM_TERMINATED = 0b0000_0100; + public const byte PREVIEW_DATA = 0b0000_0010; + + public bool PreviewData { get; set; } + + public bool StreamTerminated { get; set; } + + public bool ForceSynchronization { get; set; } + + public FramingOptions() + { + } + + public static FramingOptions Parse(byte optionsByte) + { + var options = new FramingOptions(); + + if ((optionsByte & FORCE_SYNCHRONIZATION) != 0) + { + options.ForceSynchronization = true; + } + if ((optionsByte & STREAM_TERMINATED) != 0) + { + options.StreamTerminated = true; + } + if ((optionsByte & PREVIEW_DATA) != 0) + { + options.PreviewData = true; + } + + return options; + } + + public byte ToByte() + { + byte returnVal = 0; + + if (PreviewData) + { + returnVal = (byte)(returnVal | PREVIEW_DATA); + } + if (StreamTerminated) + { + returnVal = (byte)(returnVal | STREAM_TERMINATED); + } + if (ForceSynchronization) + { + returnVal = (byte)(returnVal | FORCE_SYNCHRONIZATION); + } + + return returnVal; + } + } +} diff --git a/Assets/Script/Integration/Sacn/Haukcode.sACN/Model/FramingOptions.cs.meta b/Assets/Script/Integration/Sacn/Haukcode.sACN/Model/FramingOptions.cs.meta new file mode 100644 index 000000000..1c4891692 --- /dev/null +++ b/Assets/Script/Integration/Sacn/Haukcode.sACN/Model/FramingOptions.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3c2e1d139a490434b9767c6e34b42c2e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Script/Integration/Sacn/Haukcode.sACN/Model/RootLayer.cs b/Assets/Script/Integration/Sacn/Haukcode.sACN/Model/RootLayer.cs new file mode 100644 index 000000000..089179a47 --- /dev/null +++ b/Assets/Script/Integration/Sacn/Haukcode.sACN/Model/RootLayer.cs @@ -0,0 +1,59 @@ +using System; + +namespace Haukcode.sACN.Model +{ + public class RootLayer + { + public const short PREAMBLE_LENGTH = 0x0010; + public const short POSTAMBLE_LENGTH = 0x0000; + public static readonly byte[] PACKET_IDENTIFIER = new byte[] { + 0x41, 0x53, 0x43, 0x2d, 0x45, + 0x31, 0x2e, 0x31, 0x37, 0x00, + 0x00, 0x00}; + public const int VECTOR_ROOT_E131_DATA = 0x00000004; + public const int VECTOR_ROOT_E131_EXTENDED = 0x00000008; + + public FramingLayer FramingLayer { get; set; } + + public short Length { get { return (short)(38 + FramingLayer.Length); } } + + public Guid UUID { get; set; } + + public RootLayer() + { + } + + public static RootLayer CreateRootLayerData(Guid uuid, string sourceName, ushort universeID, byte sequenceID, ReadOnlyMemory data, byte priority, ushort syncAddress, byte startCode = 0) + { + return new RootLayer + { + UUID = uuid, + FramingLayer = new DataFramingLayer(sourceName, universeID, sequenceID, data, priority, syncAddress, startCode) + }; + } + + public static RootLayer CreateRootLayerSync(Guid uuid, byte sequenceID, ushort syncAddress) + { + return new RootLayer + { + UUID = uuid, + FramingLayer = new SyncFramingLayer(syncAddress, sequenceID) + }; + } + + public int WriteToBuffer(Memory buffer) + { + var writer = new BigEndianBinaryWriter(buffer); + + writer.WriteShort(PREAMBLE_LENGTH); + writer.WriteShort(POSTAMBLE_LENGTH); + writer.WriteBytes(PACKET_IDENTIFIER); + ushort flagsAndRootLength = (ushort)(SACNPacket.FLAGS | (ushort)(Length - 16)); + writer.WriteUShort(flagsAndRootLength); + writer.WriteInt32(FramingLayer.RootVector); + writer.WriteGuid(UUID); + + return writer.WrittenBytes + FramingLayer.WriteToBuffer(writer.Memory); + } + } +} diff --git a/Assets/Script/Integration/Sacn/Haukcode.sACN/Model/RootLayer.cs.meta b/Assets/Script/Integration/Sacn/Haukcode.sACN/Model/RootLayer.cs.meta new file mode 100644 index 000000000..d21086942 --- /dev/null +++ b/Assets/Script/Integration/Sacn/Haukcode.sACN/Model/RootLayer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 0c21268c613f28d4cb95a19e2fa53689 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Script/Integration/Sacn/Haukcode.sACN/Model/SACNDataPacket.cs b/Assets/Script/Integration/Sacn/Haukcode.sACN/Model/SACNDataPacket.cs new file mode 100644 index 000000000..0a5c3fd09 --- /dev/null +++ b/Assets/Script/Integration/Sacn/Haukcode.sACN/Model/SACNDataPacket.cs @@ -0,0 +1,25 @@ +using System; + +namespace Haukcode.sACN.Model +{ + public class SACNDataPacket : SACNPacket + { + public DataFramingLayer DataFramingLayer => (DataFramingLayer)RootLayer.FramingLayer; + + public string SourceName { get { return DataFramingLayer.SourceName; } set { DataFramingLayer.SourceName = value; } } + + public byte[] DMXData => DataFramingLayer.DMPLayer.Data.ToArray(); + + public ushort UniverseId { get { return DataFramingLayer.UniverseId; } set { DataFramingLayer.UniverseId = value; } } + + public SACNDataPacket(ushort universeId, string sourceName, Guid uuid, byte sequenceId, ReadOnlyMemory data, byte priority, ushort syncAddress = 0, byte startCode = 0) + : base(RootLayer.CreateRootLayerData(uuid, sourceName, universeId, sequenceId, data, priority, syncAddress, startCode)) + { + } + + public SACNDataPacket(RootLayer rootLayer) + : base(rootLayer) + { + } + } +} diff --git a/Assets/Script/Integration/Sacn/Haukcode.sACN/Model/SACNDataPacket.cs.meta b/Assets/Script/Integration/Sacn/Haukcode.sACN/Model/SACNDataPacket.cs.meta new file mode 100644 index 000000000..d322777bc --- /dev/null +++ b/Assets/Script/Integration/Sacn/Haukcode.sACN/Model/SACNDataPacket.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e0f322c444cc4134aaca7c97023ca14d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Script/Integration/Sacn/Haukcode.sACN/Model/SACNPacket.cs b/Assets/Script/Integration/Sacn/Haukcode.sACN/Model/SACNPacket.cs new file mode 100644 index 000000000..e8e8e5784 --- /dev/null +++ b/Assets/Script/Integration/Sacn/Haukcode.sACN/Model/SACNPacket.cs @@ -0,0 +1,32 @@ +using System; + +namespace Haukcode.sACN.Model +{ + public class SACNPacket + { + public const ushort FLAGS = (0x7 << 12); + public const ushort FIRST_FOUR_BITS_MASK = 0b1111_0000_0000_0000; + public const ushort LAST_TWELVE_BITS_MASK = 0b0000_1111_1111_1111; + public const int MAX_PACKET_SIZE = 638; + + public RootLayer RootLayer { get; set; } + + public FramingLayer FramingLayer => RootLayer.FramingLayer; + + public Guid UUID { get { return RootLayer.UUID; } set { RootLayer.UUID = value; } } + + public byte SequenceId { get { return FramingLayer.SequenceId; } set { FramingLayer.SequenceId = value; } } + + public int Length => RootLayer.Length; + + public SACNPacket(RootLayer rootLayer) + { + RootLayer = rootLayer; + } + + public int WriteToBuffer(Memory buffer) + { + return RootLayer.WriteToBuffer(buffer); + } + } +} diff --git a/Assets/Script/Integration/Sacn/Haukcode.sACN/Model/SACNPacket.cs.meta b/Assets/Script/Integration/Sacn/Haukcode.sACN/Model/SACNPacket.cs.meta new file mode 100644 index 000000000..48b0db15b --- /dev/null +++ b/Assets/Script/Integration/Sacn/Haukcode.sACN/Model/SACNPacket.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 73028e7619ba3c846847aadfb5d97602 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Script/Integration/Sacn/Haukcode.sACN/Model/SendStatistics.cs b/Assets/Script/Integration/Sacn/Haukcode.sACN/Model/SendStatistics.cs new file mode 100644 index 000000000..58414067f --- /dev/null +++ b/Assets/Script/Integration/Sacn/Haukcode.sACN/Model/SendStatistics.cs @@ -0,0 +1,14 @@ + +namespace Haukcode.sACN.Model +{ + public class SendStatistics + { + public int DroppedPackets { get; set; } + + public int QueueLength { get; set; } + + public int DestinationCount { get; set; } + + public int SlowSends { get; set; } + } +} diff --git a/Assets/Script/Integration/Sacn/Haukcode.sACN/Model/SendStatistics.cs.meta b/Assets/Script/Integration/Sacn/Haukcode.sACN/Model/SendStatistics.cs.meta new file mode 100644 index 000000000..b8ef5f4d6 --- /dev/null +++ b/Assets/Script/Integration/Sacn/Haukcode.sACN/Model/SendStatistics.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 2ee86228c649c904a883c08dfc8881e9 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Script/Integration/Sacn/Haukcode.sACN/Model/SyncFramingLayer.cs b/Assets/Script/Integration/Sacn/Haukcode.sACN/Model/SyncFramingLayer.cs new file mode 100644 index 000000000..9eddf8cca --- /dev/null +++ b/Assets/Script/Integration/Sacn/Haukcode.sACN/Model/SyncFramingLayer.cs @@ -0,0 +1,37 @@ +using System; + +namespace Haukcode.sACN.Model +{ + public class SyncFramingLayer : FramingLayer + { + public override ushort Length { get { return 11; } } + + public ushort SyncAddress { get; set; } + + public override int RootVector => RootLayer.VECTOR_ROOT_E131_EXTENDED; + + public SyncFramingLayer(ushort syncAddress, byte sequenceID) + : base(sequenceID) + { + SyncAddress = syncAddress; + } + + public SyncFramingLayer() + { + } + + public override int WriteToBuffer(Memory buffer) + { + var writer = new BigEndianBinaryWriter(buffer); + + ushort flagsAndFramingLength = (ushort)(SACNPacket.FLAGS | Length); + writer.WriteUShort(flagsAndFramingLength); + writer.WriteInt32(VECTOR_E131_EXTENDED_SYNCHRONIZATION); + writer.WriteByte(SequenceId); + writer.WriteUShort(SyncAddress); + writer.WriteUShort((ushort)0); + + return writer.WrittenBytes; + } + } +} diff --git a/Assets/Script/Integration/Sacn/Haukcode.sACN/Model/SyncFramingLayer.cs.meta b/Assets/Script/Integration/Sacn/Haukcode.sACN/Model/SyncFramingLayer.cs.meta new file mode 100644 index 000000000..6a25cdc29 --- /dev/null +++ b/Assets/Script/Integration/Sacn/Haukcode.sACN/Model/SyncFramingLayer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f28763268a971fa47ab133ef0c37492b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Script/Integration/Sacn/Haukcode.sACN/SACNClient.cs b/Assets/Script/Integration/Sacn/Haukcode.sACN/SACNClient.cs new file mode 100644 index 000000000..f9ca768e7 --- /dev/null +++ b/Assets/Script/Integration/Sacn/Haukcode.sACN/SACNClient.cs @@ -0,0 +1,516 @@ +using System; +using System.Buffers; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Net; +using System.Net.Sockets; +using System.Threading; +using System.Threading.Tasks; +using Haukcode.sACN.Model; +using UniRx; + +namespace Haukcode.sACN +{ + public class SACNClient : IDisposable + { + public class SendSocketData + { + public Socket Socket; + + public IPEndPoint Destination; + + public Memory SendBufferMem; + + } + + public class SendData + { + public ushort UniverseId; + + public IPEndPoint Destination; + + public IMemoryOwner Data; + + public int DataLength; + + public Stopwatch Enqueued; + + public double AgeMS => Enqueued.Elapsed.TotalMilliseconds; + + public SendData() + { + Enqueued = Stopwatch.StartNew(); + } + } + private const int ReceiveBufferSize = 20480; + private const int SendBufferSize = 1024; + private static readonly IPEndPoint _blankEndpoint = new(IPAddress.Any, 0); + + private readonly Socket listenSocket; + private readonly ISubject errorSubject; + private readonly Dictionary sequenceIds = new(); + private readonly Dictionary sequenceIdsSync = new(); + private readonly object lockObject = new(); + private readonly HashSet dmxUniverses = new(); + private readonly Memory receiveBufferMem; + private readonly Stopwatch clock = new(); + private readonly Task receiveTask; + private readonly Task sendTask; + private readonly CancellationTokenSource shutdownCTS = new(); + private readonly Dictionary endPointCache = new(); + private readonly ConcurrentDictionary universeSockets = new(); + private readonly IPEndPoint localEndPoint; + private readonly BlockingCollection sendQueue = new(); + private readonly MemoryPool memoryPool = MemoryPool.Shared; + private int droppedPackets; + private int slowSends; + private readonly HashSet<(IPAddress Destination, ushort UniverseId)> usedDestinations = new(); + + public SACNClient(Guid senderId, string senderName, IPAddress localAddress, int port = 5568) + { + if (senderId == Guid.Empty) + { + throw new ArgumentException("Invalid sender Id", nameof(senderId)); + } + + SenderId = senderId; + + SenderName = senderName; + + if (port <= 0) + { + throw new ArgumentException("Invalid port", nameof(port)); + } + + Port = port; + localEndPoint = new IPEndPoint(localAddress, port); + var receiveBuffer = new byte[ReceiveBufferSize]; + receiveBufferMem = receiveBuffer.AsMemory(); + errorSubject = new Subject(); + listenSocket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp); + + // Set the SIO_UDP_CONNRESET ioctl to true for this UDP socket. If this UDP socket + // ever sends a UDP packet to a remote destination that exists but there is + // no socket to receive the packet, an ICMP port unreachable message is returned + // to the sender. By default, when this is received the next operation on the + // UDP socket that send the packet will receive a SocketException. The native + // (Winsock) error that is received is WSAECONNRESET (10054). Since we don't want + // to wrap each UDP socket operation in a try/except, we'll disable this error + // for the socket with this ioctl call. + try + { + uint IOC_IN = 0x80000000; + uint IOC_VENDOR = 0x18000000; + uint SIO_UDP_CONNRESET = IOC_IN | IOC_VENDOR | 12; + + byte[] optionInValue = { Convert.ToByte(false) }; + byte[] optionOutValue = new byte[4]; + listenSocket.IOControl((int)SIO_UDP_CONNRESET, optionInValue, optionOutValue); + } + catch + { + Debug.WriteLine("Unable to set SIO_UDP_CONNRESET, maybe not supported."); + } + + listenSocket.ExclusiveAddressUse = false; + listenSocket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, true); + listenSocket.Bind(new IPEndPoint(IPAddress.Any, port)); + // Only join local LAN group + listenSocket.SetSocketOption(SocketOptionLevel.IP, SocketOptionName.MulticastTimeToLive, 1); + + sendTask = Task.Run(Sender); + } + + public bool IsOperational => !this.shutdownCTS.IsCancellationRequested; + + private void ConfigureSendSocket(Socket socket) + { + socket.SendBufferSize = 1400; + + // Set the SIO_UDP_CONNRESET ioctl to true for this UDP socket. If this UDP socket + // ever sends a UDP packet to a remote destination that exists but there is + // no socket to receive the packet, an ICMP port unreachable message is returned + // to the sender. By default, when this is received the next operation on the + // UDP socket that send the packet will receive a SocketException. The native + // (Winsock) error that is received is WSAECONNRESET (10054). Since we don't want + // to wrap each UDP socket operation in a try/except, we'll disable this error + // for the socket with this ioctl call. + try + { + uint IOC_IN = 0x80000000; + uint IOC_VENDOR = 0x18000000; + uint SIO_UDP_CONNRESET = IOC_IN | IOC_VENDOR | 12; + + byte[] optionInValue = { Convert.ToByte(false) }; + byte[] optionOutValue = new byte[4]; + socket.IOControl((int)SIO_UDP_CONNRESET, optionInValue, optionOutValue); + } + catch + { + Debug.WriteLine("Unable to set SIO_UDP_CONNRESET, maybe not supported."); + } + + socket.ExclusiveAddressUse = false; + socket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, true); + + socket.Bind(this.localEndPoint); + + // Multicast socket settings + socket.DontFragment = true; + socket.MulticastLoopback = false; + + // Only join local LAN group + socket.SetSocketOption(SocketOptionLevel.IP, SocketOptionName.MulticastTimeToLive, 1); + } + + public int Port { get; } + + public Guid SenderId { get; } + + public string SenderName { get; } + + public UniRx.IObservable OnError => this.errorSubject.AsObservable(); + + public SendStatistics SendStatistics + { + get + { + var sendStatistics = new SendStatistics + { + DroppedPackets = this.droppedPackets, + QueueLength = this.sendQueue.Count, + SlowSends = this.slowSends, + DestinationCount = this.usedDestinations.Count + }; + + // Reset + this.droppedPackets = 0; + this.slowSends = 0; + this.usedDestinations.Clear(); + + return sendStatistics; + } + } + + /// + /// Gets a list of dmx universes this socket has joined to + /// + public IReadOnlyCollection DMXUniverses => dmxUniverses.ToList(); + private async Task Sender() + { + while (!shutdownCTS.IsCancellationRequested) + { + var sendData = sendQueue.Take(shutdownCTS.Token); + + try + { + if (sendData.AgeMS > 100) + { + // Old, discard + droppedPackets++; + //Console.WriteLine($"Age {sendData.Enqueued.Elapsed.TotalMilliseconds:N2} queue length = {this.sendQueue.Count} Dropped = {this.droppedPackets}"); + continue; + } + + var socketData = GetSendSocket(sendData.UniverseId); + + var watch = Stopwatch.StartNew(); + byte[] dataBytes = sendData.Data.Memory[..sendData.DataLength].ToArray(); + await socketData.Socket.SendToAsync(dataBytes, SocketFlags.None, sendData.Destination ?? socketData.Destination); + watch.Stop(); + + if (watch.ElapsedMilliseconds > 20) + { + slowSends++; + } + } + catch (Exception ex) + { + if (ex is OperationCanceledException) + continue; + + errorSubject.OnNext(ex); + + if (ex is System.Net.Sockets.SocketException) + { + // Network unreachable + shutdownCTS.Cancel(); + break; + } + } + finally + { + // Return to pool + sendData.Data.Dispose(); + } + } + } + + private SendSocketData GetSendSocket(ushort universeId) + { + if (!universeSockets.TryGetValue(universeId, out var socketData)) + { + var socket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp); + ConfigureSendSocket(socket); + + var sendBuffer = new byte[SendBufferSize]; + + socketData = new SendSocketData + { + Socket = socket, + Destination = new IPEndPoint(SACNCommon.GetMulticastAddress(universeId), Port), + SendBufferMem = sendBuffer.AsMemory() + }; + universeSockets.TryAdd(universeId, socketData); + } + + return socketData; + } + + public void JoinDMXUniverse(ushort universeId) + { + if (dmxUniverses.Contains(universeId)) + throw new InvalidOperationException($"You have already joined the DMX Universe {universeId}"); + + // Join group + var option = new MulticastOption(SACNCommon.GetMulticastAddress(universeId), localEndPoint.Address); + listenSocket.SetSocketOption(SocketOptionLevel.IP, SocketOptionName.AddMembership, option); + + // Add to the list of universes we have joined + dmxUniverses.Add(universeId); + } + + public void DropDMXUniverse(ushort universeId) + { + if (!dmxUniverses.Contains(universeId)) + throw new InvalidOperationException($"You are trying to drop the DMX Universe {universeId} but you are not a member"); + + // Drop group + var option = new MulticastOption(SACNCommon.GetMulticastAddress(universeId), this.localEndPoint.Address); + listenSocket.SetSocketOption(SocketOptionLevel.IP, SocketOptionName.DropMembership, option); + + // Remove from the list of universes we have joined + dmxUniverses.Remove(universeId); + } + + /// + /// Multicast send data + /// + /// The universe Id to multicast to + /// Up to 512 bytes of DMX data + /// Priority (default 100) + /// Sync universe id + /// Start code (default 0) + public void SendMulticast(ushort universeId, ReadOnlyMemory data, byte priority = 100, ushort syncAddress = 0, byte startCode = 0) + { + byte sequenceId = GetNewSequenceId(universeId); + + var packet = new SACNDataPacket(universeId, SenderName, SenderId, sequenceId, data, priority, syncAddress, startCode); + + SendPacket(universeId, packet); + } + + /// + /// Unicast send data + /// + /// The address to unicast to + /// The Universe ID + /// Up to 512 bytes of DMX data + /// Sync universe id + /// Start code (default 0) + public void SendUnicast(IPAddress address, ushort universeId, ReadOnlyMemory data, byte priority = 100, ushort syncAddress = 0, byte startCode = 0) + { + byte sequenceId = GetNewSequenceId(universeId); + + var packet = new SACNDataPacket(universeId, SenderName, SenderId, sequenceId, data, priority, syncAddress, startCode); + + SendPacket(universeId, address, packet); + } + + /// + /// Multicast send sync + /// + /// Sync universe id + public void SendMulticastSync(ushort syncAddress) + { + byte sequenceId = GetNewSequenceIdSync(syncAddress); + + var packet = new SACNPacket(new RootLayer + { + UUID = SenderId, + FramingLayer = new SyncFramingLayer + { + SequenceId = sequenceId, + SyncAddress = syncAddress + } + }); + + SendPacket(syncAddress, packet); + } + + /// + /// Unicast send sync + /// + /// Sync universe id + public void SendUnicastSync(IPAddress address, ushort syncAddress) + { + byte sequenceId = GetNewSequenceIdSync(syncAddress); + + var packet = new SACNPacket(new RootLayer + { + UUID = SenderId, + FramingLayer = new SyncFramingLayer + { + SequenceId = sequenceId, + SyncAddress = syncAddress + } + }); + SendPacket(syncAddress, address, packet); + } + + /// + /// Send packet + /// + /// Universe Id + /// Destination + /// Packet + public void SendPacket(ushort universeId, IPAddress destination, SACNPacket packet) + { + if (!endPointCache.TryGetValue(destination, out var ipEndPoint)) + { + ipEndPoint = new IPEndPoint(destination, Port); + endPointCache.Add(destination, ipEndPoint); + } + + var memory = memoryPool.Rent(packet.Length); + + int packetLength = packet.WriteToBuffer(memory.Memory); + + var newSendData = new SendData + { + Data = memory, + UniverseId = universeId, + DataLength = packetLength, + Destination = ipEndPoint + }; + + usedDestinations.Add((destination, universeId)); + + if (IsOperational) + sendQueue.Add(newSendData); + } + + /// + /// Send packet + /// + /// Universe Id + /// Packet + public void SendPacket(ushort universeId, SACNPacket packet) + { + var memory = memoryPool.Rent(packet.Length); + + int packetLength = packet.WriteToBuffer(memory.Memory); + + var newSendData = new SendData + { + Data = memory, + UniverseId = universeId, + DataLength = packetLength + }; + + usedDestinations.Add((null, universeId)); + if (IsOperational) + { + sendQueue.Add(newSendData); + } + else + { + // Clear queue + while (sendQueue.TryTake(out _)); + } + } + + public void WarmUpSockets(IEnumerable universeIds) + { + foreach (ushort universeId in universeIds) + { + GetSendSocket(universeId); + } + } + + private byte GetNewSequenceId(ushort universeId) + { + lock (lockObject) + { + sequenceIds.TryGetValue(universeId, out byte sequenceId); + + sequenceId++; + + sequenceIds[universeId] = sequenceId; + + return sequenceId; + } + } + + private byte GetNewSequenceIdSync(ushort syncAddress) + { + lock (lockObject) + { + sequenceIdsSync.TryGetValue(syncAddress, out byte sequenceId); + + sequenceId++; + + sequenceIdsSync[syncAddress] = sequenceId; + + return sequenceId; + } + } + + public void Dispose() + { + shutdownCTS.Cancel(); + + foreach (var kvp in universeSockets) + { + try + { + kvp.Value.Socket.Shutdown(SocketShutdown.Both); + kvp.Value.Socket.Close(); + kvp.Value.Socket.Dispose(); + } + catch + { + // Ignore errors + } + } + + try + { + listenSocket.Shutdown(SocketShutdown.Both); + } + catch + { + // Ignore errors + } + + if (receiveTask?.IsCanceled == false) + { + receiveTask?.Wait(); + } + + receiveTask?.Dispose(); + + if (sendTask?.IsCanceled == false) + { + sendTask?.Wait(); + } + + sendTask?.Dispose(); + + listenSocket.Close(); + listenSocket.Dispose(); + } + } +} diff --git a/Assets/Script/Integration/Sacn/Haukcode.sACN/SACNClient.cs.meta b/Assets/Script/Integration/Sacn/Haukcode.sACN/SACNClient.cs.meta new file mode 100644 index 000000000..33e195ec2 --- /dev/null +++ b/Assets/Script/Integration/Sacn/Haukcode.sACN/SACNClient.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ab6d495e013c7c64e8b0fa996a172f88 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Script/Integration/Sacn/Haukcode.sACN/SACNCommon.cs b/Assets/Script/Integration/Sacn/Haukcode.sACN/SACNCommon.cs new file mode 100644 index 000000000..4c668c729 --- /dev/null +++ b/Assets/Script/Integration/Sacn/Haukcode.sACN/SACNCommon.cs @@ -0,0 +1,153 @@ +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Net.NetworkInformation; + +namespace Haukcode.sACN +{ + public static class SACNCommon + { + static byte MULTICAST_BYTE_1 = (byte)239; + static byte MULTICAST_BYTE_2 = (byte)255; + public static int SACN_PORT = 5568; + + public class Adapter + { + private readonly NetworkInterface networkInterface; + + public NetworkInterfaceType Type => networkInterface.NetworkInterfaceType; + + public string Id => networkInterface.Id; + + public string Name => networkInterface.Name; + + public string Description => networkInterface.Description; + + public byte[] PhysicalAddress { get; private set; } + + public string DisplayName + { + get + { + if (Name == Description) + { + return Name; + } + else + { + return $"{Name} ({Description})"; + } + } + } + + public bool IsHyperV => PhysicalAddress?.Length == 6 && PhysicalAddress[0] == 0x00 && PhysicalAddress[1] == 0x15 && PhysicalAddress[2] == 0x5D; + + public IList<(IPAddress IP, IPAddress NetMask)> AllIpv4Addresses => networkInterface.GetIPProperties().UnicastAddresses + .Where(x => x.Address.AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork) + .Select(x => (x.Address, x.IPv4Mask)) + .ToList(); + + public Adapter(NetworkInterface input) + { + networkInterface = input; + + PhysicalAddress = input.GetPhysicalAddress().GetAddressBytes(); + } + } + + /// + /// Get Multicast address from universe id + /// + /// Universe Id + /// + public static IPAddress GetMulticastAddress(ushort universeId) + { + byte highUniverseId = (byte)(universeId >> 8); + byte lowUniverseId = (byte)(universeId & 0xFF); + var multicastAddress = new IPAddress(new byte[] { MULTICAST_BYTE_1, MULTICAST_BYTE_2, highUniverseId, lowUniverseId }); + + return multicastAddress; + } + + public static IEnumerable GetAddressesFromInterfaceType(NetworkInterfaceType[] interfaceTypes, bool excludeHyperV = true) + { + foreach (NetworkInterface adapter in NetworkInterface.GetAllNetworkInterfaces()) + { + if (adapter.SupportsMulticast && interfaceTypes.Contains(adapter.NetworkInterfaceType) && + (adapter.OperationalStatus == OperationalStatus.Up || adapter.OperationalStatus == OperationalStatus.Unknown)) + { +#if DEBUG + if (adapter.Name.Contains("Docker")) + // Skip Docker virtual adapters + continue; +#endif + var result = new Adapter(adapter); + if (excludeHyperV && result.IsHyperV) + continue; + + // Only include adapters with IPv4 address(es) + if (!result.AllIpv4Addresses.Any()) + continue; + + yield return result; + } + } + } + + /// + /// Return list of ethernet and WiFi network adapters + /// + /// List of name and IPAddress + public static IList<(string AdapterName, string Description, IPAddress IPAddress, IPAddress NetMask)> GetCommonInterfaces(bool excludeHyperV = true) + { + var list = new List<(string AdapterName, string Description, IPAddress IPAddress, IPAddress NetMask)>(); + + foreach (var adapter in GetCommonAdapters(excludeHyperV)) + { + list.AddRange(adapter.AllIpv4Addresses.Select(x => (adapter.Name, adapter.Description, x.IP, x.NetMask))); + } + + return list; + } + + /// + /// Return list of ethernet and WiFi network adapters + /// + /// List of name and IPAddress + public static IList GetCommonAdapters(bool excludeHyperV = true) + { + var adapters = GetAddressesFromInterfaceType(new NetworkInterfaceType[] { NetworkInterfaceType.Ethernet, NetworkInterfaceType.Wireless80211 }, excludeHyperV); + + return adapters.ToList(); + } + + /// + /// Find first matching local IPAddress, first ethernet, then WiFi + /// + /// Local IPAddress, netmask, mac + public static (IPAddress IPAddress, IPAddress NetMask, byte[] MacAddress) GetFirstBindAddress() + { + var adapters = GetCommonAdapters(); + + // Try Ethernet first + var firstEthernetAdapter = adapters.FirstOrDefault(x => x.Type == NetworkInterfaceType.Ethernet); + if (firstEthernetAdapter != null) + { + var firstIpv4 = firstEthernetAdapter.AllIpv4Addresses.First(); + + return (firstIpv4.IP, firstIpv4.NetMask, firstEthernetAdapter.PhysicalAddress); + } + + // Then Wifi + var firstWifiAdapter = adapters.FirstOrDefault(x => x.Type == NetworkInterfaceType.Wireless80211); + if (firstWifiAdapter != null) + { + var firstIpv4 = firstWifiAdapter.AllIpv4Addresses.First(); + + return (firstIpv4.IP, firstIpv4.NetMask, firstWifiAdapter.PhysicalAddress); + } + + return (null, null, null); + } + } +} diff --git a/Assets/Script/Integration/Sacn/Haukcode.sACN/SACNCommon.cs.meta b/Assets/Script/Integration/Sacn/Haukcode.sACN/SACNCommon.cs.meta new file mode 100644 index 000000000..6d2541683 --- /dev/null +++ b/Assets/Script/Integration/Sacn/Haukcode.sACN/SACNCommon.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 9aab4d911ed1c174a85539142ae550cd +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Script/Integration/Sacn/Haukcode.sACN/SendData.cs b/Assets/Script/Integration/Sacn/Haukcode.sACN/SendData.cs new file mode 100644 index 000000000..26672ffc4 --- /dev/null +++ b/Assets/Script/Integration/Sacn/Haukcode.sACN/SendData.cs @@ -0,0 +1,11 @@ +using System.Net; + +namespace Haukcode.sACN +{ + public class SendData + { + public IPEndPoint EndPoint { get; set; } + + public byte[] Data { get; set; } + } +} diff --git a/Assets/Script/Integration/Sacn/Haukcode.sACN/SendData.cs.meta b/Assets/Script/Integration/Sacn/Haukcode.sACN/SendData.cs.meta new file mode 100644 index 000000000..9c5254672 --- /dev/null +++ b/Assets/Script/Integration/Sacn/Haukcode.sACN/SendData.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ef2ec763f316a3b4a87c57e49d9d13cf +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Script/Integration/Sacn/SacnController.cs b/Assets/Script/Integration/Sacn/SacnController.cs new file mode 100644 index 000000000..1cc86f2de --- /dev/null +++ b/Assets/Script/Integration/Sacn/SacnController.cs @@ -0,0 +1,130 @@ +using Haukcode.sACN; +using System; +using PlasticBand.Haptics; +using UnityEngine; +using YARG.Integration.StageKit; +using YARG.Settings; + +public class SacnController : MonoBehaviour +{ + //A 128-bit (16 byte) UUID that translates to "KEEP PLAYING YARG!" + private static readonly Guid acnSourceId = new Guid("{4B454550-504C-4159-494E-475941524721}"); + private static readonly string acnSourceName = "YARG"; + private static readonly int universeSize = 512; + private static SACNClient sendClient; + private const float TargetFPS = 44f; //DMX spec says 44 updates per second is the max + private float timeBetweenCalls = 1f / TargetFPS; + private byte[] _dataPacket = new byte[universeSize]; + //DMX channels - 8 per color to match the stageKit layout. Default channels, the user must change them in settings. + private static int[] dimmerChannels; + private static int[] redChannels; + private static int[] greenChannels; + private static int[] blueChannels; + private static int[] yellowChannels; + + void Start() + { + Debug.Log("Starting SacnController..."); + + SettingsManager.SettingContainer.OnDMXChannelsChanged += HandleValueChanged; + + HandleValueChanged(null); + + StageKitLightingController.Instance.OnLedSet += HandleEvent; + + sendClient = new SACNClient(senderId: acnSourceId, senderName: acnSourceName, + localAddress: SACNCommon.GetFirstBindAddress().IPAddress); + + InvokeRepeating(nameof(Sender), 0, timeBetweenCalls); + + //Many dmx fixtures have a 'Master dimmer' channel that controls the overall brightness of the fixture. + //Got to turn those on. + for (int i = 0; i < dimmerChannels.Length; i++) + { + _dataPacket[dimmerChannels[i]] = 255; + } + } + + private void HandleValueChanged(int[] value) + { + dimmerChannels = SettingsManager.Settings.DimmerChannels.Value; + redChannels = SettingsManager.Settings.RedChannels.Value; + greenChannels = SettingsManager.Settings.GreenChannels.Value; + blueChannels = SettingsManager.Settings.BlueChannels.Value; + yellowChannels = SettingsManager.Settings.YellowChannels.Value; + } + + private void OnDestroy() + { + // A good controller will also turn everything off after not receiving a packet after 2.5 seconds. + // But this doesn't hurt to do. + for (int i = 0; i < _dataPacket.Length; i++) + { + _dataPacket[i] = 0; //turn everything off + } + + //send final packet. + Sender(); + } + + private void HandleEvent(StageKitLedColor color, StageKitLed value) + { + bool[] ledIsSet = new bool[8]; + + // Set the values of ledIsSet based on the StageKitLed enum + for (int i = 0; i < 8; i++) + { + ledIsSet[i] = (value & (StageKitLed) (1 << i)) != 0; + } + + // Handle the event based on color + switch (color) + { + case StageKitLedColor.Red: + SetChannelValues(redChannels, ledIsSet); + break; + + case StageKitLedColor.Blue: + SetChannelValues(blueChannels, ledIsSet); + break; + + case StageKitLedColor.Green: + SetChannelValues(greenChannels, ledIsSet); + break; + + case StageKitLedColor.Yellow: + SetChannelValues(yellowChannels, ledIsSet); + break; + + case StageKitLedColor.None: + // I'm not sure this is ever used, anywhere? + break; + + case StageKitLedColor.All: + SetChannelValues(yellowChannels, ledIsSet); + SetChannelValues(greenChannels, ledIsSet); + SetChannelValues(blueChannels, ledIsSet); + SetChannelValues(redChannels, ledIsSet); + break; + + default: + Debug.Log("(Sacn) Unknown color: " + color); + break; + } + } + + private void SetChannelValues(int[] channels, bool[] ledIsSet) + { + for (int i = 0; i < 8; i++) + { + _dataPacket[channels[i]] = ledIsSet[i] ? (byte) 255 : (byte) 0; + } + } + + private void Sender() + { + //Hardcoded to universe 1, as this is for non-professional use, I doubt anyone is running multiple universes. + //Didn't want to confuse the user with settings for something they don't need. However, it's a simple change if needed. + sendClient.SendMulticast(1, _dataPacket); + } +} \ No newline at end of file diff --git a/Assets/Script/Integration/Sacn/SacnController.cs.meta b/Assets/Script/Integration/Sacn/SacnController.cs.meta new file mode 100644 index 000000000..63f38272e --- /dev/null +++ b/Assets/Script/Integration/Sacn/SacnController.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 2e6d233a733a6014891836deea6c0bc2 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Script/Integration/StageKit/StageKitGameplay.cs b/Assets/Script/Integration/StageKit/StageKitGameplay.cs index 755e9a931..de88a5fe9 100644 --- a/Assets/Script/Integration/StageKit/StageKitGameplay.cs +++ b/Assets/Script/Integration/StageKit/StageKitGameplay.cs @@ -4,6 +4,7 @@ using YARG.Core.Chart; using YARG.Gameplay; using PlasticBand.Haptics; +using YARG.Settings; using Random = UnityEngine.Random; namespace YARG.Integration.StageKit @@ -44,9 +45,9 @@ protected override void OnChartLoaded(SongChart chart) private void Update() { - if (StageKitLightingController.Instance.StageKits.Count == 0) + if ( (StageKitLightingController.Instance.StageKits.Count == 0 || SettingsManager.Settings.StageKitEnabled.Value == false) && SettingsManager.Settings.DMXEnabled.Value == false) { - return; + return; } //On Pause, turn off the fog and strobe so people don't die, but leave the leds on, looks nice. diff --git a/Assets/Script/Integration/StageKit/StageKitLightingController.cs b/Assets/Script/Integration/StageKit/StageKitLightingController.cs index 20e1cc81a..ee94e7fab 100644 --- a/Assets/Script/Integration/StageKit/StageKitLightingController.cs +++ b/Assets/Script/Integration/StageKit/StageKitLightingController.cs @@ -208,8 +208,6 @@ public enum LedColor public StageKitStrobeSpeed CurrentStrobeState = StageKitStrobeSpeed.Off; public StageKitStrobeSpeed PreviousStrobeState = StageKitStrobeSpeed.Off; - //public StrobeSpeed CurrentStrobeState = StrobeSpeed.Off; - //public StrobeSpeed PreviousStrobeState = StrobeSpeed.Off; public List StageKits = new(); @@ -221,6 +219,9 @@ public enum LedColor //Gets set by StageKitGameplay but this is just a fail-safe. public bool LargeVenue = false; + //This is used to send events to any other light controllers that might be in the scene (aka dmx lights) + public Action OnLedSet; + // Stuff for the actual command sending to the unit private bool _isSendingCommands; private readonly Queue<(int command, byte data)> _commandQueue = new(); @@ -309,6 +310,7 @@ private async UniTask SendCommands() }; //This is where the magic happens StageKits.ForEach(kit => kit.SetLeds(iToStageKitLedColor, (StageKitLed) curCommand.data)); + OnLedSet?.Invoke(iToStageKitLedColor, (StageKitLed) curCommand.data); _previousLedState[curCommand.command] = _currentLedState[curCommand.command]; break; @@ -369,7 +371,7 @@ public void SetStrobeSpeed(StageKitStrobeSpeed strobeSpeed) CurrentStrobeState = strobeSpeed; } - //just a helper function + //Just a helper function public void AllLedsOff() { Instance.SetLed((int) LedColor.Red, NONE); diff --git a/Assets/Script/Menu/Settings/Visuals/DMXChannelsSettingVisual.cs b/Assets/Script/Menu/Settings/Visuals/DMXChannelsSettingVisual.cs new file mode 100644 index 000000000..36f0e3648 --- /dev/null +++ b/Assets/Script/Menu/Settings/Visuals/DMXChannelsSettingVisual.cs @@ -0,0 +1,60 @@ +using System.Globalization; +using TMPro; +using UnityEngine; +using YARG.Core.Input; +using YARG.Menu.Navigation; +using YARG.Settings.Types; + +namespace YARG.Menu.Settings.Visuals +{ + public class DMXChannelsSettingVisual : BaseSettingVisual + { + [SerializeField] + private TMP_InputField[] _inputField; + + protected override void RefreshVisual() + { + for (int i = 0; i < Setting.Value.Length; i++) + { + _inputField[i].text = Setting.Value[i].ToString(CultureInfo.InvariantCulture); + } + } + + public override NavigationScheme GetNavigationScheme() + { + return new NavigationScheme(new() + { + NavigateFinish, + new NavigationScheme.Entry(MenuAction.Up, "Increase", () => + { + // need to change this to the correct index + Setting.Value[0]++; + RefreshVisual(); + }), + new NavigationScheme.Entry(MenuAction.Down, "Decrease", () => + { + // need to change this to the correct index + Setting.Value[0]--; + RefreshVisual(); + }) + }, true); + } + + public void OnTextFieldChange(int index) + { + + try + { + int value = int.Parse(_inputField[index].text, CultureInfo.InvariantCulture); + value = Mathf.Clamp(value, Setting.Min, Setting.Max); + Setting.Value[index] = value; + } + catch + { + // Ignore error + } + + RefreshVisual(); + } + } +} \ No newline at end of file diff --git a/Assets/Script/Menu/Settings/Visuals/DMXChannelsSettingVisual.cs.meta b/Assets/Script/Menu/Settings/Visuals/DMXChannelsSettingVisual.cs.meta new file mode 100644 index 000000000..104cc9c1d --- /dev/null +++ b/Assets/Script/Menu/Settings/Visuals/DMXChannelsSettingVisual.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 4d958fd2a06829d42aa641282a23c0bf +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Script/Settings/SettingsManager.Settings.cs b/Assets/Script/Settings/SettingsManager.Settings.cs index 4157ec30a..e278c774f 100644 --- a/Assets/Script/Settings/SettingsManager.Settings.cs +++ b/Assets/Script/Settings/SettingsManager.Settings.cs @@ -18,6 +18,8 @@ public static partial class SettingsManager { public class SettingContainer { + public static event System.Action OnDMXChannelsChanged; + /// /// Whether or not the settings are currently in the process of being loaded. /// @@ -161,8 +163,44 @@ public void OpenCalibrator() #endregion + #region Lighting + public ToggleSetting StageKitEnabled { get; } = new(true); + public ToggleSetting DMXEnabled { get; } = new(false); + + public DMXChannelsSetting DimmerChannels { get; } = new( + new int[]{ 0, 8, 16, 24, 32, 40, 48, 56 }, + DmxCallback + ); + public DMXChannelsSetting BlueChannels { get; } = new( + new int[]{ 3, 11, 19, 27, 35, 43, 51, 59 }, + DmxCallback + ); + public DMXChannelsSetting RedChannels { get; } = new( + new int[]{ 1, 9, 17, 25, 33, 41, 49, 57 }, + DmxCallback + ); + public DMXChannelsSetting GreenChannels { get; } = new( + new int[]{ 2, 10, 18, 26, 34, 42, 50, 58 }, + DmxCallback + ); + public DMXChannelsSetting YellowChannels { get; } = new( + new int[]{ 4, 12, 20, 28, 36, 44, 52, 60 }, + DmxCallback + ); + + #endregion + #region Callbacks + + private static void DmxCallback(int[] value) + { + //Because SacnController doesn't exist before this, I'm using an action here. + OnDMXChannelsChanged?.Invoke(value); + } + + + private static void VSyncCallback(bool value) { QualitySettings.vSyncCount = value ? 1 : 0; diff --git a/Assets/Script/Settings/SettingsManager.cs b/Assets/Script/Settings/SettingsManager.cs index 2470cf159..f5d43fd17 100644 --- a/Assets/Script/Settings/SettingsManager.cs +++ b/Assets/Script/Settings/SettingsManager.cs @@ -97,7 +97,19 @@ public static partial class SettingsManager nameof(Settings.GraphicalProgressOnScoreBox), nameof(Settings.KeepSongInfoVisible) }, - new PresetsTab("Presets", icon: "Customization") + new PresetsTab("Presets", icon: "Customization"), + new MetadataTab("Advanced", icon: "Customization") + { + new HeaderMetadata("Lighting General"), + nameof(Settings.StageKitEnabled), + nameof(Settings.DMXEnabled), + new HeaderMetadata("DMX Channels"), + nameof(Settings.DimmerChannels), + nameof(Settings.BlueChannels), + nameof(Settings.RedChannels), + nameof(Settings.GreenChannels), + nameof(Settings.YellowChannels), + } }; private static string SettingsFile => Path.Combine(PathHelper.PersistentDataPath, "settings.json"); diff --git a/Assets/Script/Settings/Types/DMXChannelsSetting.cs b/Assets/Script/Settings/Types/DMXChannelsSetting.cs new file mode 100644 index 000000000..0a670a04e --- /dev/null +++ b/Assets/Script/Settings/Types/DMXChannelsSetting.cs @@ -0,0 +1,26 @@ +using System; +using UnityEngine; + +namespace YARG.Settings.Types +{ + public class DMXChannelsSetting : AbstractSetting + { + public override string AddressableName => "Setting/DMXChannels"; + + public int Min { get; } + public int Max { get; } + + public DMXChannelsSetting(int[] value, Action onChange = null) : base(onChange) + { + //DMX channels are 8-bit, so the range is 0-255 + Min = 0; + Max = 255; + + _value = value; + } + public override bool ValueEquals(int[] value) + { + return value == Value; + } + } +} \ No newline at end of file diff --git a/Assets/Script/Settings/Types/DMXChannelsSetting.cs.meta b/Assets/Script/Settings/Types/DMXChannelsSetting.cs.meta new file mode 100644 index 000000000..eae6c8e27 --- /dev/null +++ b/Assets/Script/Settings/Types/DMXChannelsSetting.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 98220c19c12fb3f4b958bf0c46f05e7e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Settings/AddressableAssetsData/AssetGroups/Default Local Group.asset b/Assets/Settings/AddressableAssetsData/AssetGroups/Default Local Group.asset index e9b6d88fd..df1187603 100644 --- a/Assets/Settings/AddressableAssetsData/AssetGroups/Default Local Group.asset +++ b/Assets/Settings/AddressableAssetsData/AssetGroups/Default Local Group.asset @@ -147,6 +147,11 @@ MonoBehaviour: m_ReadOnly: 0 m_SerializedLabels: [] FlaggedDuringContentUpdateRestriction: 0 + - m_GUID: 8644ff72d188351429aeb73a1d49386e + m_Address: Setting/DMXChannels + m_ReadOnly: 0 + m_SerializedLabels: [] + FlaggedDuringContentUpdateRestriction: 0 m_ReadOnly: 0 m_Settings: {fileID: 11400000, guid: e05274e5aee7ff54bb550557e8a635f2, type: 2} m_SchemaSet: diff --git a/Assets/Settings/Localization/Settings Shared Data.asset b/Assets/Settings/Localization/Settings Shared Data.asset index 8e00c3e11..2944c4b65 100644 --- a/Assets/Settings/Localization/Settings Shared Data.asset +++ b/Assets/Settings/Localization/Settings Shared Data.asset @@ -907,6 +907,58 @@ MonoBehaviour: m_Key: Tab.Sound m_Metadata: m_Items: [] + - m_Id: 113150520376582144 + m_Key: Tab.Advanced + m_Metadata: + m_Items: [] + - m_Id: 113150787738296320 + m_Key: Header.Lighting General + m_Metadata: + m_Items: [] + - m_Id: 113152493171662848 + m_Key: Header.DMX Channels + m_Metadata: + m_Items: [] + - m_Id: 113154353806860288 + m_Key: Setting.Advanced.StageKitEnabled + m_Metadata: + m_Items: [] + - m_Id: 113154578835464192 + m_Key: Setting.Advanced.DMXEnabled + m_Metadata: + m_Items: [] + - m_Id: 113155100158091264 + m_Key: Setting.Advanced.DMXEnabled.Description + m_Metadata: + m_Items: [] + - m_Id: 113156291030048768 + m_Key: Setting.Advanced.StageKitEnabled.Description + m_Metadata: + m_Items: [] + - m_Id: 113159204838203392 + m_Key: Setting.Advanced.DimmerChannels + m_Metadata: + m_Items: [] + - m_Id: 113193663453093888 + m_Key: Setting.Advanced.BlueChannels + m_Metadata: + m_Items: [] + - m_Id: 113193764619706368 + m_Key: Setting.Advanced.RedChannels + m_Metadata: + m_Items: [] + - m_Id: 113193808479543296 + m_Key: Setting.Advanced.GreenChannels + m_Metadata: + m_Items: [] + - m_Id: 113193859524222976 + m_Key: Setting.Advanced.YellowChannels + m_Metadata: + m_Items: [] + - m_Id: 113193936720388096 + m_Key: Setting.Advanced.DimmerChannels.Description + m_Metadata: + m_Items: [] m_Metadata: m_Items: [] m_KeyGenerator: diff --git a/Assets/Settings/Localization/Settings_en-US.asset b/Assets/Settings/Localization/Settings_en-US.asset index ba2bf11c7..5a6fcc48f 100644 --- a/Assets/Settings/Localization/Settings_en-US.asset +++ b/Assets/Settings/Localization/Settings_en-US.asset @@ -956,6 +956,61 @@ MonoBehaviour: m_Localized: Enables claps to the beat while Star Power is active. m_Metadata: m_Items: [] + - m_Id: 113150520376582144 + m_Localized: Advanced + m_Metadata: + m_Items: [] + - m_Id: 113150787738296320 + m_Localized: Lighting General + m_Metadata: + m_Items: [] + - m_Id: 113152493171662848 + m_Localized: DMX Channels + m_Metadata: + m_Items: [] + - m_Id: 113154353806860288 + m_Localized: Enable Stage Kit + m_Metadata: + m_Items: [] + - m_Id: 113154578835464192 + m_Localized: Enable DMX Output + m_Metadata: + m_Items: [] + - m_Id: 113155100158091264 + m_Localized: Enable sending Sacn (DMX-over-ethernet) packets over the network + to universe 1. Adds 250k bps to network traffic. + m_Metadata: + m_Items: [] + - m_Id: 113156291030048768 + m_Localized: Enables sending Stage Kit lighting data to all connected devices + capable of reading it. + m_Metadata: + m_Items: [] + - m_Id: 113159204838203392 + m_Localized: Master Dimmer + m_Metadata: + m_Items: [] + - m_Id: 113193663453093888 + m_Localized: Blue + m_Metadata: + m_Items: [] + - m_Id: 113193764619706368 + m_Localized: Red + m_Metadata: + m_Items: [] + - m_Id: 113193808479543296 + m_Localized: Green + m_Metadata: + m_Items: [] + - m_Id: 113193859524222976 + m_Localized: Yellow + m_Metadata: + m_Items: [] + - m_Id: 113193936720388096 + m_Localized: Any channel set here will be set to max (255) on game start. Useful + for fixtures that have a master dimmer channel. + m_Metadata: + m_Items: [] references: version: 2 RefIds: [] diff --git a/Assets/packages.config b/Assets/packages.config index 81dd92b45..ec460c8ff 100644 --- a/Assets/packages.config +++ b/Assets/packages.config @@ -9,4 +9,5 @@ + \ No newline at end of file From 4d313f867e8dcd05a8ace63665d949c2b7dad33a Mon Sep 17 00:00:00 2001 From: TheFatBastid Date: Thu, 8 Feb 2024 13:38:51 -0500 Subject: [PATCH 2/5] fixed var names --- .../Sacn/Haukcode.sACN/SACNCommon.cs | 2 + .../Script/Integration/Sacn/SacnController.cs | 207 +++++++++--------- 2 files changed, 110 insertions(+), 99 deletions(-) diff --git a/Assets/Script/Integration/Sacn/Haukcode.sACN/SACNCommon.cs b/Assets/Script/Integration/Sacn/Haukcode.sACN/SACNCommon.cs index 4c668c729..00f30cdbd 100644 --- a/Assets/Script/Integration/Sacn/Haukcode.sACN/SACNCommon.cs +++ b/Assets/Script/Integration/Sacn/Haukcode.sACN/SACNCommon.cs @@ -7,6 +7,8 @@ namespace Haukcode.sACN { public static class SACNCommon { + // multicast address for sACN + // 239.255.x.x where .x.x is the universe static byte MULTICAST_BYTE_1 = (byte)239; static byte MULTICAST_BYTE_2 = (byte)255; public static int SACN_PORT = 5568; diff --git a/Assets/Script/Integration/Sacn/SacnController.cs b/Assets/Script/Integration/Sacn/SacnController.cs index 1cc86f2de..1da35051a 100644 --- a/Assets/Script/Integration/Sacn/SacnController.cs +++ b/Assets/Script/Integration/Sacn/SacnController.cs @@ -1,130 +1,139 @@ -using Haukcode.sACN; using System; +using Haukcode.sACN; using PlasticBand.Haptics; using UnityEngine; using YARG.Integration.StageKit; using YARG.Settings; -public class SacnController : MonoBehaviour +namespace YARG.Integration.Sacn { - //A 128-bit (16 byte) UUID that translates to "KEEP PLAYING YARG!" - private static readonly Guid acnSourceId = new Guid("{4B454550-504C-4159-494E-475941524721}"); - private static readonly string acnSourceName = "YARG"; - private static readonly int universeSize = 512; - private static SACNClient sendClient; - private const float TargetFPS = 44f; //DMX spec says 44 updates per second is the max - private float timeBetweenCalls = 1f / TargetFPS; - private byte[] _dataPacket = new byte[universeSize]; - //DMX channels - 8 per color to match the stageKit layout. Default channels, the user must change them in settings. - private static int[] dimmerChannels; - private static int[] redChannels; - private static int[] greenChannels; - private static int[] blueChannels; - private static int[] yellowChannels; - - void Start() + public class SacnController : MonoBehaviour { - Debug.Log("Starting SacnController..."); + //A 128-bit (16 byte) UUID that translates to "KEEP PLAYING YARG!" + private const float TARGET_FPS = 44f; //DMX spec says 44 updates per second is the max + private const string ACN_SOURCE_NAME = "YARG"; + private const int UNIVERSE_SIZE = 512; //Each universe supports up to 512 channels + private const float TIME_BETWEEN_CALLS = 1f / TARGET_FPS; + + private byte[] _dataPacket = new byte[UNIVERSE_SIZE]; + + private static readonly Guid AcnSourceId = new Guid("{4B454550-504C-4159-494E-475941524721}"); + private static SACNClient _sendClient; + //DMX channels - 8 per color to match the stageKit layout. Default channels, the user must change them in settings. + private static int[] _dimmerChannels; + private static int[] _redChannels; + private static int[] _greenChannels; + private static int[] _blueChannels; + private static int[] _yellowChannels; + + private void Start() + { + Debug.Log("Starting SacnController..."); - SettingsManager.SettingContainer.OnDMXChannelsChanged += HandleValueChanged; + SettingsManager.SettingContainer.OnDMXChannelsChanged += HandleValueChanged; - HandleValueChanged(null); + HandleValueChanged(null); - StageKitLightingController.Instance.OnLedSet += HandleEvent; + StageKitLightingController.Instance.OnLedSet += HandleEvent; - sendClient = new SACNClient(senderId: acnSourceId, senderName: acnSourceName, - localAddress: SACNCommon.GetFirstBindAddress().IPAddress); + _sendClient = new SACNClient(senderId: AcnSourceId, senderName: ACN_SOURCE_NAME, + localAddress: SACNCommon.GetFirstBindAddress().IPAddress); - InvokeRepeating(nameof(Sender), 0, timeBetweenCalls); + InvokeRepeating(nameof(Sender), 0, TIME_BETWEEN_CALLS); - //Many dmx fixtures have a 'Master dimmer' channel that controls the overall brightness of the fixture. - //Got to turn those on. - for (int i = 0; i < dimmerChannels.Length; i++) - { - _dataPacket[dimmerChannels[i]] = 255; + //Many DMX fixtures have a 'Master dimmer' channel that controls the overall brightness of the fixture. + //Got to turn those on. + for (int i = 0; i < _dimmerChannels.Length; i++) + { + _dataPacket[_dimmerChannels[i]] = 255; + } } - } - private void HandleValueChanged(int[] value) - { - dimmerChannels = SettingsManager.Settings.DimmerChannels.Value; - redChannels = SettingsManager.Settings.RedChannels.Value; - greenChannels = SettingsManager.Settings.GreenChannels.Value; - blueChannels = SettingsManager.Settings.BlueChannels.Value; - yellowChannels = SettingsManager.Settings.YellowChannels.Value; - } - - private void OnDestroy() - { - // A good controller will also turn everything off after not receiving a packet after 2.5 seconds. - // But this doesn't hurt to do. - for (int i = 0; i < _dataPacket.Length; i++) + private void HandleValueChanged(int[] value) { - _dataPacket[i] = 0; //turn everything off + _dimmerChannels = SettingsManager.Settings.DimmerChannels.Value; + _redChannels = SettingsManager.Settings.RedChannels.Value; + _greenChannels = SettingsManager.Settings.GreenChannels.Value; + _blueChannels = SettingsManager.Settings.BlueChannels.Value; + _yellowChannels = SettingsManager.Settings.YellowChannels.Value; } - //send final packet. - Sender(); - } + private void OnDestroy() + { + // A good controller will also turn everything off after not receiving a packet after 2.5 seconds. + // But this doesn't hurt to do. + for (int i = 0; i < _dataPacket.Length; i++) + { + _dataPacket[i] = 0; //turn everything off + } - private void HandleEvent(StageKitLedColor color, StageKitLed value) - { - bool[] ledIsSet = new bool[8]; + //send final packet. + Sender(); - // Set the values of ledIsSet based on the StageKitLed enum - for (int i = 0; i < 8; i++) - { - ledIsSet[i] = (value & (StageKitLed) (1 << i)) != 0; + SettingsManager.SettingContainer.OnDMXChannelsChanged -= HandleValueChanged; } - // Handle the event based on color - switch (color) + private void HandleEvent(StageKitLedColor color, StageKitLed value) { - case StageKitLedColor.Red: - SetChannelValues(redChannels, ledIsSet); - break; - - case StageKitLedColor.Blue: - SetChannelValues(blueChannels, ledIsSet); - break; - - case StageKitLedColor.Green: - SetChannelValues(greenChannels, ledIsSet); - break; - - case StageKitLedColor.Yellow: - SetChannelValues(yellowChannels, ledIsSet); - break; - - case StageKitLedColor.None: - // I'm not sure this is ever used, anywhere? - break; - - case StageKitLedColor.All: - SetChannelValues(yellowChannels, ledIsSet); - SetChannelValues(greenChannels, ledIsSet); - SetChannelValues(blueChannels, ledIsSet); - SetChannelValues(redChannels, ledIsSet); - break; - - default: - Debug.Log("(Sacn) Unknown color: " + color); - break; + bool[] ledIsSet = new bool[8]; + + // Set the values of ledIsSet based on the StageKitLed enum + for (int i = 0; i < 8; i++) + { + ledIsSet[i] = (value & (StageKitLed) (1 << i)) != 0; + } + + // Handle the event based on color + switch (color) + { + case StageKitLedColor.Red: + SetChannelValues(_redChannels, ledIsSet); + break; + + case StageKitLedColor.Blue: + SetChannelValues(_blueChannels, ledIsSet); + break; + + case StageKitLedColor.Green: + SetChannelValues(_greenChannels, ledIsSet); + break; + + case StageKitLedColor.Yellow: + SetChannelValues(_yellowChannels, ledIsSet); + break; + + case StageKitLedColor.None: + // I'm not sure this is ever used, anywhere? + break; + + case StageKitLedColor.All: + SetChannelValues(_yellowChannels, ledIsSet); + SetChannelValues(_greenChannels, ledIsSet); + SetChannelValues(_blueChannels, ledIsSet); + SetChannelValues(_redChannels, ledIsSet); + break; + + default: + Debug.Log("(Sacn) Unknown color: " + color); + break; + } } - } - private void SetChannelValues(int[] channels, bool[] ledIsSet) - { - for (int i = 0; i < 8; i++) + private void SetChannelValues(int[] channels, bool[] ledIsSet) { - _dataPacket[channels[i]] = ledIsSet[i] ? (byte) 255 : (byte) 0; + for (int i = 0; i < 8; i++) + { + _dataPacket[channels[i]] = ledIsSet[i] ? (byte) 255 : (byte) 0; + } } - } - private void Sender() - { - //Hardcoded to universe 1, as this is for non-professional use, I doubt anyone is running multiple universes. - //Didn't want to confuse the user with settings for something they don't need. However, it's a simple change if needed. - sendClient.SendMulticast(1, _dataPacket); + private void Sender() + { + //Hardcoded to universe 1, as this is for non-professional use, I doubt anyone is running multiple universes. + //Didn't want to confuse the user with settings for something they don't need. However, it's a simple change if needed. + //Same goes for sending multicast vs singlecast. Sacn spec says multicast is the correct default way to go but + //singlecast can be used if needed. + _sendClient.SendMulticast(1, _dataPacket); + } } } \ No newline at end of file From 3131064ecfe9ebbb29217a99750f3dc667eab0b1 Mon Sep 17 00:00:00 2001 From: TheFatBastid Date: Thu, 8 Feb 2024 13:44:35 -0500 Subject: [PATCH 3/5] Moved things to correct spots --- Assets/{Script/Integration/Sacn => Plugins}/Haukcode.sACN.meta | 0 .../Sacn => Plugins}/Haukcode.sACN/BigEndianBinaryWriter.cs | 0 .../Sacn => Plugins}/Haukcode.sACN/BigEndianBinaryWriter.cs.meta | 0 .../{Script/Integration/Sacn => Plugins}/Haukcode.sACN/Model.meta | 0 .../Integration/Sacn => Plugins}/Haukcode.sACN/Model/DMPLayer.cs | 0 .../Sacn => Plugins}/Haukcode.sACN/Model/DMPLayer.cs.meta | 0 .../Sacn => Plugins}/Haukcode.sACN/Model/DataFramingLayer.cs | 0 .../Sacn => Plugins}/Haukcode.sACN/Model/DataFramingLayer.cs.meta | 0 .../Sacn => Plugins}/Haukcode.sACN/Model/FramingLayer.cs | 0 .../Sacn => Plugins}/Haukcode.sACN/Model/FramingLayer.cs.meta | 0 .../Sacn => Plugins}/Haukcode.sACN/Model/FramingOptions.cs | 0 .../Sacn => Plugins}/Haukcode.sACN/Model/FramingOptions.cs.meta | 0 .../Integration/Sacn => Plugins}/Haukcode.sACN/Model/RootLayer.cs | 0 .../Sacn => Plugins}/Haukcode.sACN/Model/RootLayer.cs.meta | 0 .../Sacn => Plugins}/Haukcode.sACN/Model/SACNDataPacket.cs | 0 .../Sacn => Plugins}/Haukcode.sACN/Model/SACNDataPacket.cs.meta | 0 .../Sacn => Plugins}/Haukcode.sACN/Model/SACNPacket.cs | 0 .../Sacn => Plugins}/Haukcode.sACN/Model/SACNPacket.cs.meta | 0 .../Sacn => Plugins}/Haukcode.sACN/Model/SendStatistics.cs | 0 .../Sacn => Plugins}/Haukcode.sACN/Model/SendStatistics.cs.meta | 0 .../Sacn => Plugins}/Haukcode.sACN/Model/SyncFramingLayer.cs | 0 .../Sacn => Plugins}/Haukcode.sACN/Model/SyncFramingLayer.cs.meta | 0 .../Integration/Sacn => Plugins}/Haukcode.sACN/SACNClient.cs | 0 .../Integration/Sacn => Plugins}/Haukcode.sACN/SACNClient.cs.meta | 0 .../Integration/Sacn => Plugins}/Haukcode.sACN/SACNCommon.cs | 0 .../Integration/Sacn => Plugins}/Haukcode.sACN/SACNCommon.cs.meta | 0 .../Integration/Sacn => Plugins}/Haukcode.sACN/SendData.cs | 0 .../Integration/Sacn => Plugins}/Haukcode.sACN/SendData.cs.meta | 0 28 files changed, 0 insertions(+), 0 deletions(-) rename Assets/{Script/Integration/Sacn => Plugins}/Haukcode.sACN.meta (100%) rename Assets/{Script/Integration/Sacn => Plugins}/Haukcode.sACN/BigEndianBinaryWriter.cs (100%) rename Assets/{Script/Integration/Sacn => Plugins}/Haukcode.sACN/BigEndianBinaryWriter.cs.meta (100%) rename Assets/{Script/Integration/Sacn => Plugins}/Haukcode.sACN/Model.meta (100%) rename Assets/{Script/Integration/Sacn => Plugins}/Haukcode.sACN/Model/DMPLayer.cs (100%) rename Assets/{Script/Integration/Sacn => Plugins}/Haukcode.sACN/Model/DMPLayer.cs.meta (100%) rename Assets/{Script/Integration/Sacn => Plugins}/Haukcode.sACN/Model/DataFramingLayer.cs (100%) rename Assets/{Script/Integration/Sacn => Plugins}/Haukcode.sACN/Model/DataFramingLayer.cs.meta (100%) rename Assets/{Script/Integration/Sacn => Plugins}/Haukcode.sACN/Model/FramingLayer.cs (100%) rename Assets/{Script/Integration/Sacn => Plugins}/Haukcode.sACN/Model/FramingLayer.cs.meta (100%) rename Assets/{Script/Integration/Sacn => Plugins}/Haukcode.sACN/Model/FramingOptions.cs (100%) rename Assets/{Script/Integration/Sacn => Plugins}/Haukcode.sACN/Model/FramingOptions.cs.meta (100%) rename Assets/{Script/Integration/Sacn => Plugins}/Haukcode.sACN/Model/RootLayer.cs (100%) rename Assets/{Script/Integration/Sacn => Plugins}/Haukcode.sACN/Model/RootLayer.cs.meta (100%) rename Assets/{Script/Integration/Sacn => Plugins}/Haukcode.sACN/Model/SACNDataPacket.cs (100%) rename Assets/{Script/Integration/Sacn => Plugins}/Haukcode.sACN/Model/SACNDataPacket.cs.meta (100%) rename Assets/{Script/Integration/Sacn => Plugins}/Haukcode.sACN/Model/SACNPacket.cs (100%) rename Assets/{Script/Integration/Sacn => Plugins}/Haukcode.sACN/Model/SACNPacket.cs.meta (100%) rename Assets/{Script/Integration/Sacn => Plugins}/Haukcode.sACN/Model/SendStatistics.cs (100%) rename Assets/{Script/Integration/Sacn => Plugins}/Haukcode.sACN/Model/SendStatistics.cs.meta (100%) rename Assets/{Script/Integration/Sacn => Plugins}/Haukcode.sACN/Model/SyncFramingLayer.cs (100%) rename Assets/{Script/Integration/Sacn => Plugins}/Haukcode.sACN/Model/SyncFramingLayer.cs.meta (100%) rename Assets/{Script/Integration/Sacn => Plugins}/Haukcode.sACN/SACNClient.cs (100%) rename Assets/{Script/Integration/Sacn => Plugins}/Haukcode.sACN/SACNClient.cs.meta (100%) rename Assets/{Script/Integration/Sacn => Plugins}/Haukcode.sACN/SACNCommon.cs (100%) rename Assets/{Script/Integration/Sacn => Plugins}/Haukcode.sACN/SACNCommon.cs.meta (100%) rename Assets/{Script/Integration/Sacn => Plugins}/Haukcode.sACN/SendData.cs (100%) rename Assets/{Script/Integration/Sacn => Plugins}/Haukcode.sACN/SendData.cs.meta (100%) diff --git a/Assets/Script/Integration/Sacn/Haukcode.sACN.meta b/Assets/Plugins/Haukcode.sACN.meta similarity index 100% rename from Assets/Script/Integration/Sacn/Haukcode.sACN.meta rename to Assets/Plugins/Haukcode.sACN.meta diff --git a/Assets/Script/Integration/Sacn/Haukcode.sACN/BigEndianBinaryWriter.cs b/Assets/Plugins/Haukcode.sACN/BigEndianBinaryWriter.cs similarity index 100% rename from Assets/Script/Integration/Sacn/Haukcode.sACN/BigEndianBinaryWriter.cs rename to Assets/Plugins/Haukcode.sACN/BigEndianBinaryWriter.cs diff --git a/Assets/Script/Integration/Sacn/Haukcode.sACN/BigEndianBinaryWriter.cs.meta b/Assets/Plugins/Haukcode.sACN/BigEndianBinaryWriter.cs.meta similarity index 100% rename from Assets/Script/Integration/Sacn/Haukcode.sACN/BigEndianBinaryWriter.cs.meta rename to Assets/Plugins/Haukcode.sACN/BigEndianBinaryWriter.cs.meta diff --git a/Assets/Script/Integration/Sacn/Haukcode.sACN/Model.meta b/Assets/Plugins/Haukcode.sACN/Model.meta similarity index 100% rename from Assets/Script/Integration/Sacn/Haukcode.sACN/Model.meta rename to Assets/Plugins/Haukcode.sACN/Model.meta diff --git a/Assets/Script/Integration/Sacn/Haukcode.sACN/Model/DMPLayer.cs b/Assets/Plugins/Haukcode.sACN/Model/DMPLayer.cs similarity index 100% rename from Assets/Script/Integration/Sacn/Haukcode.sACN/Model/DMPLayer.cs rename to Assets/Plugins/Haukcode.sACN/Model/DMPLayer.cs diff --git a/Assets/Script/Integration/Sacn/Haukcode.sACN/Model/DMPLayer.cs.meta b/Assets/Plugins/Haukcode.sACN/Model/DMPLayer.cs.meta similarity index 100% rename from Assets/Script/Integration/Sacn/Haukcode.sACN/Model/DMPLayer.cs.meta rename to Assets/Plugins/Haukcode.sACN/Model/DMPLayer.cs.meta diff --git a/Assets/Script/Integration/Sacn/Haukcode.sACN/Model/DataFramingLayer.cs b/Assets/Plugins/Haukcode.sACN/Model/DataFramingLayer.cs similarity index 100% rename from Assets/Script/Integration/Sacn/Haukcode.sACN/Model/DataFramingLayer.cs rename to Assets/Plugins/Haukcode.sACN/Model/DataFramingLayer.cs diff --git a/Assets/Script/Integration/Sacn/Haukcode.sACN/Model/DataFramingLayer.cs.meta b/Assets/Plugins/Haukcode.sACN/Model/DataFramingLayer.cs.meta similarity index 100% rename from Assets/Script/Integration/Sacn/Haukcode.sACN/Model/DataFramingLayer.cs.meta rename to Assets/Plugins/Haukcode.sACN/Model/DataFramingLayer.cs.meta diff --git a/Assets/Script/Integration/Sacn/Haukcode.sACN/Model/FramingLayer.cs b/Assets/Plugins/Haukcode.sACN/Model/FramingLayer.cs similarity index 100% rename from Assets/Script/Integration/Sacn/Haukcode.sACN/Model/FramingLayer.cs rename to Assets/Plugins/Haukcode.sACN/Model/FramingLayer.cs diff --git a/Assets/Script/Integration/Sacn/Haukcode.sACN/Model/FramingLayer.cs.meta b/Assets/Plugins/Haukcode.sACN/Model/FramingLayer.cs.meta similarity index 100% rename from Assets/Script/Integration/Sacn/Haukcode.sACN/Model/FramingLayer.cs.meta rename to Assets/Plugins/Haukcode.sACN/Model/FramingLayer.cs.meta diff --git a/Assets/Script/Integration/Sacn/Haukcode.sACN/Model/FramingOptions.cs b/Assets/Plugins/Haukcode.sACN/Model/FramingOptions.cs similarity index 100% rename from Assets/Script/Integration/Sacn/Haukcode.sACN/Model/FramingOptions.cs rename to Assets/Plugins/Haukcode.sACN/Model/FramingOptions.cs diff --git a/Assets/Script/Integration/Sacn/Haukcode.sACN/Model/FramingOptions.cs.meta b/Assets/Plugins/Haukcode.sACN/Model/FramingOptions.cs.meta similarity index 100% rename from Assets/Script/Integration/Sacn/Haukcode.sACN/Model/FramingOptions.cs.meta rename to Assets/Plugins/Haukcode.sACN/Model/FramingOptions.cs.meta diff --git a/Assets/Script/Integration/Sacn/Haukcode.sACN/Model/RootLayer.cs b/Assets/Plugins/Haukcode.sACN/Model/RootLayer.cs similarity index 100% rename from Assets/Script/Integration/Sacn/Haukcode.sACN/Model/RootLayer.cs rename to Assets/Plugins/Haukcode.sACN/Model/RootLayer.cs diff --git a/Assets/Script/Integration/Sacn/Haukcode.sACN/Model/RootLayer.cs.meta b/Assets/Plugins/Haukcode.sACN/Model/RootLayer.cs.meta similarity index 100% rename from Assets/Script/Integration/Sacn/Haukcode.sACN/Model/RootLayer.cs.meta rename to Assets/Plugins/Haukcode.sACN/Model/RootLayer.cs.meta diff --git a/Assets/Script/Integration/Sacn/Haukcode.sACN/Model/SACNDataPacket.cs b/Assets/Plugins/Haukcode.sACN/Model/SACNDataPacket.cs similarity index 100% rename from Assets/Script/Integration/Sacn/Haukcode.sACN/Model/SACNDataPacket.cs rename to Assets/Plugins/Haukcode.sACN/Model/SACNDataPacket.cs diff --git a/Assets/Script/Integration/Sacn/Haukcode.sACN/Model/SACNDataPacket.cs.meta b/Assets/Plugins/Haukcode.sACN/Model/SACNDataPacket.cs.meta similarity index 100% rename from Assets/Script/Integration/Sacn/Haukcode.sACN/Model/SACNDataPacket.cs.meta rename to Assets/Plugins/Haukcode.sACN/Model/SACNDataPacket.cs.meta diff --git a/Assets/Script/Integration/Sacn/Haukcode.sACN/Model/SACNPacket.cs b/Assets/Plugins/Haukcode.sACN/Model/SACNPacket.cs similarity index 100% rename from Assets/Script/Integration/Sacn/Haukcode.sACN/Model/SACNPacket.cs rename to Assets/Plugins/Haukcode.sACN/Model/SACNPacket.cs diff --git a/Assets/Script/Integration/Sacn/Haukcode.sACN/Model/SACNPacket.cs.meta b/Assets/Plugins/Haukcode.sACN/Model/SACNPacket.cs.meta similarity index 100% rename from Assets/Script/Integration/Sacn/Haukcode.sACN/Model/SACNPacket.cs.meta rename to Assets/Plugins/Haukcode.sACN/Model/SACNPacket.cs.meta diff --git a/Assets/Script/Integration/Sacn/Haukcode.sACN/Model/SendStatistics.cs b/Assets/Plugins/Haukcode.sACN/Model/SendStatistics.cs similarity index 100% rename from Assets/Script/Integration/Sacn/Haukcode.sACN/Model/SendStatistics.cs rename to Assets/Plugins/Haukcode.sACN/Model/SendStatistics.cs diff --git a/Assets/Script/Integration/Sacn/Haukcode.sACN/Model/SendStatistics.cs.meta b/Assets/Plugins/Haukcode.sACN/Model/SendStatistics.cs.meta similarity index 100% rename from Assets/Script/Integration/Sacn/Haukcode.sACN/Model/SendStatistics.cs.meta rename to Assets/Plugins/Haukcode.sACN/Model/SendStatistics.cs.meta diff --git a/Assets/Script/Integration/Sacn/Haukcode.sACN/Model/SyncFramingLayer.cs b/Assets/Plugins/Haukcode.sACN/Model/SyncFramingLayer.cs similarity index 100% rename from Assets/Script/Integration/Sacn/Haukcode.sACN/Model/SyncFramingLayer.cs rename to Assets/Plugins/Haukcode.sACN/Model/SyncFramingLayer.cs diff --git a/Assets/Script/Integration/Sacn/Haukcode.sACN/Model/SyncFramingLayer.cs.meta b/Assets/Plugins/Haukcode.sACN/Model/SyncFramingLayer.cs.meta similarity index 100% rename from Assets/Script/Integration/Sacn/Haukcode.sACN/Model/SyncFramingLayer.cs.meta rename to Assets/Plugins/Haukcode.sACN/Model/SyncFramingLayer.cs.meta diff --git a/Assets/Script/Integration/Sacn/Haukcode.sACN/SACNClient.cs b/Assets/Plugins/Haukcode.sACN/SACNClient.cs similarity index 100% rename from Assets/Script/Integration/Sacn/Haukcode.sACN/SACNClient.cs rename to Assets/Plugins/Haukcode.sACN/SACNClient.cs diff --git a/Assets/Script/Integration/Sacn/Haukcode.sACN/SACNClient.cs.meta b/Assets/Plugins/Haukcode.sACN/SACNClient.cs.meta similarity index 100% rename from Assets/Script/Integration/Sacn/Haukcode.sACN/SACNClient.cs.meta rename to Assets/Plugins/Haukcode.sACN/SACNClient.cs.meta diff --git a/Assets/Script/Integration/Sacn/Haukcode.sACN/SACNCommon.cs b/Assets/Plugins/Haukcode.sACN/SACNCommon.cs similarity index 100% rename from Assets/Script/Integration/Sacn/Haukcode.sACN/SACNCommon.cs rename to Assets/Plugins/Haukcode.sACN/SACNCommon.cs diff --git a/Assets/Script/Integration/Sacn/Haukcode.sACN/SACNCommon.cs.meta b/Assets/Plugins/Haukcode.sACN/SACNCommon.cs.meta similarity index 100% rename from Assets/Script/Integration/Sacn/Haukcode.sACN/SACNCommon.cs.meta rename to Assets/Plugins/Haukcode.sACN/SACNCommon.cs.meta diff --git a/Assets/Script/Integration/Sacn/Haukcode.sACN/SendData.cs b/Assets/Plugins/Haukcode.sACN/SendData.cs similarity index 100% rename from Assets/Script/Integration/Sacn/Haukcode.sACN/SendData.cs rename to Assets/Plugins/Haukcode.sACN/SendData.cs diff --git a/Assets/Script/Integration/Sacn/Haukcode.sACN/SendData.cs.meta b/Assets/Plugins/Haukcode.sACN/SendData.cs.meta similarity index 100% rename from Assets/Script/Integration/Sacn/Haukcode.sACN/SendData.cs.meta rename to Assets/Plugins/Haukcode.sACN/SendData.cs.meta From 2a9035573dbd21cfe1a113823076a8f9767a0799 Mon Sep 17 00:00:00 2001 From: TheFatBastid Date: Thu, 8 Feb 2024 20:40:46 -0500 Subject: [PATCH 4/5] Refactored into a MonoSingleton --- .../Script/Integration/Sacn/SacnController.cs | 89 +++++++++++-------- .../Integration/StageKit/StageKitGameplay.cs | 2 +- .../StageKit/StageKitLightingController.cs | 2 +- .../Settings/SettingsManager.Settings.cs | 51 ++++++----- Assets/Script/Settings/SettingsManager.cs | 4 +- .../Settings/Types/DMXChannelsSetting.cs | 8 +- 6 files changed, 89 insertions(+), 67 deletions(-) diff --git a/Assets/Script/Integration/Sacn/SacnController.cs b/Assets/Script/Integration/Sacn/SacnController.cs index 1da35051a..1639e1bb8 100644 --- a/Assets/Script/Integration/Sacn/SacnController.cs +++ b/Assets/Script/Integration/Sacn/SacnController.cs @@ -7,59 +7,74 @@ namespace YARG.Integration.Sacn { - public class SacnController : MonoBehaviour + + public class SacnController : MonoSingleton { - //A 128-bit (16 byte) UUID that translates to "KEEP PLAYING YARG!" - private const float TARGET_FPS = 44f; //DMX spec says 44 updates per second is the max - private const string ACN_SOURCE_NAME = "YARG"; - private const int UNIVERSE_SIZE = 512; //Each universe supports up to 512 channels + //DMX spec says 44 updates per second is the max + private const float TARGET_FPS = 44f; private const float TIME_BETWEEN_CALLS = 1f / TARGET_FPS; + //Each universe supports up to 512 channels + private const int UNIVERSE_SIZE = 512; + + private const string ACN_SOURCE_NAME = "YARG"; + private byte[] _dataPacket = new byte[UNIVERSE_SIZE]; + //A 128-bit (16 byte) UUID that translates to "KEEP PLAYING YARG!" + private readonly Guid AcnSourceId = new Guid("{4B454550-504C-4159-494E-475941524721}"); + + private SACNClient _sendClient; - private static readonly Guid AcnSourceId = new Guid("{4B454550-504C-4159-494E-475941524721}"); - private static SACNClient _sendClient; //DMX channels - 8 per color to match the stageKit layout. Default channels, the user must change them in settings. - private static int[] _dimmerChannels; - private static int[] _redChannels; - private static int[] _greenChannels; - private static int[] _blueChannels; - private static int[] _yellowChannels; + private int[] _dimmerChannels; + private int[] _redChannels; + private int[] _greenChannels; + private int[] _blueChannels; + private int[] _yellowChannels; - private void Start() + public void HandleEnabledChanged(bool enabled) { - Debug.Log("Starting SacnController..."); - - SettingsManager.SettingContainer.OnDMXChannelsChanged += HandleValueChanged; + if (enabled) + { + Debug.Log("Starting SacnController..."); - HandleValueChanged(null); + StageKitLightingController.Instance.OnLedSet += HandleEvent; - StageKitLightingController.Instance.OnLedSet += HandleEvent; + UpdateDMXChannels(); - _sendClient = new SACNClient(senderId: AcnSourceId, senderName: ACN_SOURCE_NAME, - localAddress: SACNCommon.GetFirstBindAddress().IPAddress); + _sendClient = new SACNClient(senderId: AcnSourceId, senderName: ACN_SOURCE_NAME, + localAddress: SACNCommon.GetFirstBindAddress().IPAddress); - InvokeRepeating(nameof(Sender), 0, TIME_BETWEEN_CALLS); + InvokeRepeating(nameof(Sender), 0, TIME_BETWEEN_CALLS); - //Many DMX fixtures have a 'Master dimmer' channel that controls the overall brightness of the fixture. - //Got to turn those on. - for (int i = 0; i < _dimmerChannels.Length; i++) + //Many DMX fixtures have a 'Master dimmer' channel that controls the overall brightness of the fixture. + //Got to turn those on. + for (int i = 0; i < _dimmerChannels?.Length; i++) + { + _dataPacket[_dimmerChannels[i] - 1] = 255; + } + } + else { - _dataPacket[_dimmerChannels[i]] = 255; + OnDestroy(); } } - private void HandleValueChanged(int[] value) + public void UpdateDMXChannels() { - _dimmerChannels = SettingsManager.Settings.DimmerChannels.Value; - _redChannels = SettingsManager.Settings.RedChannels.Value; - _greenChannels = SettingsManager.Settings.GreenChannels.Value; - _blueChannels = SettingsManager.Settings.BlueChannels.Value; - _yellowChannels = SettingsManager.Settings.YellowChannels.Value; + _dimmerChannels = SettingsManager.Settings?.DimmerChannels.Value; + _redChannels = SettingsManager.Settings?.RedChannels.Value; + _greenChannels = SettingsManager.Settings?.GreenChannels.Value; + _blueChannels = SettingsManager.Settings?.BlueChannels.Value; + _yellowChannels = SettingsManager.Settings?.YellowChannels.Value; } private void OnDestroy() { + if (_sendClient == null) return; + + Debug.Log("Killing SacnController..."); + // A good controller will also turn everything off after not receiving a packet after 2.5 seconds. // But this doesn't hurt to do. for (int i = 0; i < _dataPacket.Length; i++) @@ -67,10 +82,14 @@ private void OnDestroy() _dataPacket[i] = 0; //turn everything off } - //send final packet. + //force send final packet. Sender(); - SettingsManager.SettingContainer.OnDMXChannelsChanged -= HandleValueChanged; + _sendClient.Dispose(); + + CancelInvoke(nameof(Sender)); + + StageKitLightingController.Instance.OnLedSet -= HandleEvent; } private void HandleEvent(StageKitLedColor color, StageKitLed value) @@ -114,7 +133,7 @@ private void HandleEvent(StageKitLedColor color, StageKitLed value) break; default: - Debug.Log("(Sacn) Unknown color: " + color); + Debug.LogWarning("(Sacn) Unknown color: " + color); break; } } @@ -123,7 +142,7 @@ private void SetChannelValues(int[] channels, bool[] ledIsSet) { for (int i = 0; i < 8; i++) { - _dataPacket[channels[i]] = ledIsSet[i] ? (byte) 255 : (byte) 0; + _dataPacket[channels[i] - 1] = ledIsSet[i] ? (byte) 255 : (byte) 0; } } diff --git a/Assets/Script/Integration/StageKit/StageKitGameplay.cs b/Assets/Script/Integration/StageKit/StageKitGameplay.cs index de88a5fe9..b8ce5b7df 100644 --- a/Assets/Script/Integration/StageKit/StageKitGameplay.cs +++ b/Assets/Script/Integration/StageKit/StageKitGameplay.cs @@ -45,7 +45,7 @@ protected override void OnChartLoaded(SongChart chart) private void Update() { - if ( (StageKitLightingController.Instance.StageKits.Count == 0 || SettingsManager.Settings.StageKitEnabled.Value == false) && SettingsManager.Settings.DMXEnabled.Value == false) + if ( (StageKitLightingController.Instance.StageKits.Count == 0 || !SettingsManager.Settings.StageKitEnabled.Value) && !SettingsManager.Settings.DMXEnabled.Value) { return; } diff --git a/Assets/Script/Integration/StageKit/StageKitLightingController.cs b/Assets/Script/Integration/StageKit/StageKitLightingController.cs index ee94e7fab..aac8bdf77 100644 --- a/Assets/Script/Integration/StageKit/StageKitLightingController.cs +++ b/Assets/Script/Integration/StageKit/StageKitLightingController.cs @@ -220,7 +220,7 @@ public enum LedColor public bool LargeVenue = false; //This is used to send events to any other light controllers that might be in the scene (aka dmx lights) - public Action OnLedSet; + public event Action OnLedSet; // Stuff for the actual command sending to the unit private bool _isSendingCommands; diff --git a/Assets/Script/Settings/SettingsManager.Settings.cs b/Assets/Script/Settings/SettingsManager.Settings.cs index c64250a33..556561f86 100644 --- a/Assets/Script/Settings/SettingsManager.Settings.cs +++ b/Assets/Script/Settings/SettingsManager.Settings.cs @@ -5,6 +5,7 @@ using YARG.Gameplay.HUD; using YARG.Helpers; using YARG.Integration; +using YARG.Integration.Sacn; using YARG.Menu.Persistent; using YARG.Menu.Settings; using YARG.Player; @@ -18,7 +19,7 @@ public static partial class SettingsManager { public class SettingContainer { - public static event System.Action OnDMXChannelsChanged; + //public static event System.Action OnDMXChannelsChanged; /// /// Whether or not the settings are currently in the process of being loaded. @@ -165,42 +166,44 @@ public void OpenCalibrator() #endregion #region Lighting - public ToggleSetting StageKitEnabled { get; } = new(true); - public ToggleSetting DMXEnabled { get; } = new(false); + + public ToggleSetting StageKitEnabled { get; } = new(true); + + public ToggleSetting DMXEnabled { get; } = new(false, DMXEnabledCallback); public DMXChannelsSetting DimmerChannels { get; } = new( - new int[]{ 0, 8, 16, 24, 32, 40, 48, 56 }, - DmxCallback - ); - public DMXChannelsSetting BlueChannels { get; } = new( - new int[]{ 3, 11, 19, 27, 35, 43, 51, 59 }, - DmxCallback - ); - public DMXChannelsSetting RedChannels { get; } = new( new int[]{ 1, 9, 17, 25, 33, 41, 49, 57 }, - DmxCallback - ); - public DMXChannelsSetting GreenChannels { get; } = new( + DMXCallback); + + public DMXChannelsSetting BlueChannels { get; } = new( + new int[]{ 4, 12, 20, 28, 36, 44, 52, 60 }, + DMXCallback); + + public DMXChannelsSetting RedChannels { get; } = new( new int[]{ 2, 10, 18, 26, 34, 42, 50, 58 }, - DmxCallback - ); + DMXCallback); + + public DMXChannelsSetting GreenChannels { get; } = new( + new int[]{ 3, 11, 19, 27, 35, 43, 51, 59 }, + DMXCallback); + public DMXChannelsSetting YellowChannels { get; } = new( - new int[]{ 4, 12, 20, 28, 36, 44, 52, 60 }, - DmxCallback - ); + new int[]{ 5, 13, 21, 29, 37, 45, 53, 61 }, + DMXCallback); #endregion #region Callbacks - - private static void DmxCallback(int[] value) + private static void DMXEnabledCallback(bool value) { - //Because SacnController doesn't exist before this, I'm using an action here. - OnDMXChannelsChanged?.Invoke(value); + SacnController.Instance.HandleEnabledChanged(value); } - + private static void DMXCallback(int[] value) + { + SacnController.Instance.UpdateDMXChannels(); + } private static void VSyncCallback(bool value) { diff --git a/Assets/Script/Settings/SettingsManager.cs b/Assets/Script/Settings/SettingsManager.cs index 98caed53a..d7ffe31f8 100644 --- a/Assets/Script/Settings/SettingsManager.cs +++ b/Assets/Script/Settings/SettingsManager.cs @@ -101,10 +101,10 @@ public static partial class SettingsManager new PresetsTab("Presets", icon: "Customization"), new MetadataTab("Advanced", icon: "Customization") { - new HeaderMetadata("Lighting General"), + new HeaderMetadata("LightingGeneral"), nameof(Settings.StageKitEnabled), nameof(Settings.DMXEnabled), - new HeaderMetadata("DMX Channels"), + new HeaderMetadata("DMXChannels"), nameof(Settings.DimmerChannels), nameof(Settings.BlueChannels), nameof(Settings.RedChannels), diff --git a/Assets/Script/Settings/Types/DMXChannelsSetting.cs b/Assets/Script/Settings/Types/DMXChannelsSetting.cs index 0a670a04e..0509d26cf 100644 --- a/Assets/Script/Settings/Types/DMXChannelsSetting.cs +++ b/Assets/Script/Settings/Types/DMXChannelsSetting.cs @@ -1,5 +1,4 @@ using System; -using UnityEngine; namespace YARG.Settings.Types { @@ -12,12 +11,13 @@ public class DMXChannelsSetting : AbstractSetting public DMXChannelsSetting(int[] value, Action onChange = null) : base(onChange) { - //DMX channels are 8-bit, so the range is 0-255 - Min = 0; - Max = 255; + //DMX channels range from 1 to 512. (0 is the start code channel) + Min = 1; + Max = 512; _value = value; } + public override bool ValueEquals(int[] value) { return value == Value; From 14d945825df26c7a045a1e336ec300c2eb92813b Mon Sep 17 00:00:00 2001 From: TheFatBastid Date: Fri, 9 Feb 2024 17:54:15 -0500 Subject: [PATCH 5/5] Added README to note changes --- Assets/Plugins/Haukcode.sACN/README.txt | 11 ++++++++++ Assets/Plugins/Haukcode.sACN/README.txt.meta | 7 +++++++ Assets/Scenes/PersistentScene.unity | 20 ++----------------- .../Localization/Settings Shared Data.asset | 4 ++-- 4 files changed, 22 insertions(+), 20 deletions(-) create mode 100644 Assets/Plugins/Haukcode.sACN/README.txt create mode 100644 Assets/Plugins/Haukcode.sACN/README.txt.meta diff --git a/Assets/Plugins/Haukcode.sACN/README.txt b/Assets/Plugins/Haukcode.sACN/README.txt new file mode 100644 index 000000000..944ed9ebe --- /dev/null +++ b/Assets/Plugins/Haukcode.sACN/README.txt @@ -0,0 +1,11 @@ +This library is a modified version of Haukcode.sACN. +The orginial can be found here: https://github.com/HakanL/Haukcode.sACN + +Modifications made are: +1) Removal of all code related to reading packets, not needed. +2) Removal of GC.AllocateArray, unity doesn't support it. +3) Small adjustment to SendToAsync call, to make unity happy. + +"If you're robbing a bank and your pants fall down, I think it's okay to laugh and to let the hostages laugh too, because, come on, life is funny." + +- Jack Handey. \ No newline at end of file diff --git a/Assets/Plugins/Haukcode.sACN/README.txt.meta b/Assets/Plugins/Haukcode.sACN/README.txt.meta new file mode 100644 index 000000000..44ec45f66 --- /dev/null +++ b/Assets/Plugins/Haukcode.sACN/README.txt.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: e1b264f54d002be4ca6466300bd511fc +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/PersistentScene.unity b/Assets/Scenes/PersistentScene.unity index 4e0eb3032..ccad03f44 100644 --- a/Assets/Scenes/PersistentScene.unity +++ b/Assets/Scenes/PersistentScene.unity @@ -1048,22 +1048,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: cb438f304d0d4064fb1de229c53becde, type: 3} m_Name: m_EditorClassIdentifier: - _applicationID: 1091177744416637028 - _stableDetails: - DefaultDetails: Hello there ladies and gentlemen! - DefaultState: Are you ready to rock? - DefaultLargeImage: icon_stable - DefaultLargeText: Yet Another Rhythm Game - _nightlyDetails: - DefaultDetails: Hello there ladies and gentlemen! - DefaultState: Are you ready to test? - DefaultLargeImage: icon_nightly - DefaultLargeText: Yet Another Rhythm Game - Nightly Build - _devDetails: - DefaultDetails: Hello there ladies and gentlemen! - DefaultState: Are you ready to develop? - DefaultLargeImage: icon_dev - DefaultLargeText: Yet Another Rhythm Game - Developer Build --- !u!114 &728815268 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1073,7 +1057,7 @@ MonoBehaviour: m_GameObject: {fileID: 728815263} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: b959c0d0515779a48a3246dfaccadec0, type: 3} + m_Script: {fileID: 11500000, guid: 2e6d233a733a6014891836deea6c0bc2, type: 3} m_Name: m_EditorClassIdentifier: --- !u!1 &782876828 @@ -1220,7 +1204,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: -7.499878, y: 0} + m_AnchoredPosition: {x: -7.500122, y: 0} m_SizeDelta: {x: -15, y: 50} m_Pivot: {x: 0.5, y: 0.99999994} --- !u!114 &787126834 diff --git a/Assets/Settings/Localization/Settings Shared Data.asset b/Assets/Settings/Localization/Settings Shared Data.asset index 03930a082..b08f14d99 100644 --- a/Assets/Settings/Localization/Settings Shared Data.asset +++ b/Assets/Settings/Localization/Settings Shared Data.asset @@ -920,11 +920,11 @@ MonoBehaviour: m_Metadata: m_Items: [] - m_Id: 113150787738296320 - m_Key: Header.Lighting General + m_Key: Header.LightingGeneral m_Metadata: m_Items: [] - m_Id: 113152493171662848 - m_Key: Header.DMX Channels + m_Key: Header.DMXChannels m_Metadata: m_Items: [] - m_Id: 113154353806860288