From e060eeee49ef88565ce119ddefb00387c00d2a00 Mon Sep 17 00:00:00 2001 From: Takashi KANNAN Date: Wed, 24 Aug 2022 11:02:59 +0900 Subject: [PATCH 01/21] add stats ui --- .../Samples~/Example/Stats.meta | 8 + .../Samples~/Example/Stats/ShowStatsUI.cs | 197 +++ .../Example/Stats/ShowStatsUI.cs.meta | 3 + .../Samples~/Example/Stats/StatsUI.prefab | 1204 +++++++++++++++++ .../Example/Stats/StatsUI.prefab.meta | 7 + .../Unity.RenderStreaming.Sample.Stats.asmdef | 24 + ...y.RenderStreaming.Sample.Stats.asmdef.meta | 7 + 7 files changed, 1450 insertions(+) create mode 100644 com.unity.renderstreaming/Samples~/Example/Stats.meta create mode 100644 com.unity.renderstreaming/Samples~/Example/Stats/ShowStatsUI.cs create mode 100644 com.unity.renderstreaming/Samples~/Example/Stats/ShowStatsUI.cs.meta create mode 100644 com.unity.renderstreaming/Samples~/Example/Stats/StatsUI.prefab create mode 100644 com.unity.renderstreaming/Samples~/Example/Stats/StatsUI.prefab.meta create mode 100644 com.unity.renderstreaming/Samples~/Example/Stats/Unity.RenderStreaming.Sample.Stats.asmdef create mode 100644 com.unity.renderstreaming/Samples~/Example/Stats/Unity.RenderStreaming.Sample.Stats.asmdef.meta diff --git a/com.unity.renderstreaming/Samples~/Example/Stats.meta b/com.unity.renderstreaming/Samples~/Example/Stats.meta new file mode 100644 index 000000000..fbbc92638 --- /dev/null +++ b/com.unity.renderstreaming/Samples~/Example/Stats.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c0693466a2e76d440817d11d8a4b5f70 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/com.unity.renderstreaming/Samples~/Example/Stats/ShowStatsUI.cs b/com.unity.renderstreaming/Samples~/Example/Stats/ShowStatsUI.cs new file mode 100644 index 000000000..213346569 --- /dev/null +++ b/com.unity.renderstreaming/Samples~/Example/Stats/ShowStatsUI.cs @@ -0,0 +1,197 @@ +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Unity.WebRTC; +using UnityEngine; +using UnityEngine.UI; + +namespace Unity.RenderStreaming.Samples +{ + public class ShowStatsUI : MonoBehaviour + { + [SerializeField] private Toggle toggle; + [SerializeField] private GameObject scrollView; + [SerializeField] private RectTransform displayParent; + [SerializeField] private Text baseText; + + [SerializeField] private List senderBaseList; + [SerializeField] private List receiverBaseList; + + private void Awake() + { + toggle.onValueChanged.AddListener(SwitchToggle); + } + + private void SwitchToggle(bool isOn) + { + scrollView.SetActive(isOn); + } + + private void Start() + { + StartCoroutine(CollectStats()); + } + + private void OnDestroy() + { + lastSenderStats.Clear(); + lastReceiverStats.Clear(); + } + + private Dictionary lastSenderStats = new Dictionary(); + private Dictionary lastReceiverStats = new Dictionary(); + + class StatsDisplay + { + public Text display; + public RTCStatsReport lastReport; + } + + private IEnumerator CollectStats() + { + var waitSec = new WaitForSeconds(1); + + while (true) + { + yield return waitSec; + + foreach (var transceiver in senderBaseList.SelectMany(x => x.Transceivers.Values)) + { + var op = transceiver.Sender.GetStats(); + yield return op; + if (op.IsError) + { + continue; + } + + var report = op.Value; + if (lastSenderStats.TryGetValue(transceiver.Sender, out var statsDisplay)) + { + var displayString = CreateDisplayString(report, statsDisplay.lastReport); + statsDisplay.display.text = displayString; + statsDisplay.lastReport = report; + } + else + { + var text = Instantiate(baseText, displayParent); + text.text = ""; + text.gameObject.SetActive(true); + lastSenderStats[transceiver.Sender] = new StatsDisplay {display = text, lastReport = report}; + } + } + + foreach (var transceiver in receiverBaseList.Select(x => x.Transceiver)) + { + var op = transceiver.Receiver.GetStats(); + yield return op; + + var report = op.Value; + if (lastReceiverStats.TryGetValue(transceiver.Receiver, out var statsDisplay)) + { + var displayString = CreateDisplayString(report, statsDisplay.lastReport); + statsDisplay.display.text = displayString; + statsDisplay.lastReport = report; + } + else + { + var text = Instantiate(baseText, displayParent); + text.text = ""; + text.gameObject.SetActive(true); + lastReceiverStats[transceiver.Receiver] = new StatsDisplay {display = text, lastReport = report}; + } + } + + + if (lastSenderStats.Any() || lastReceiverStats.Any()) + { + baseText.gameObject.SetActive(false); + // Correct scroll view contents height + var size = displayParent.sizeDelta; + size.y = baseText.GetComponent().sizeDelta.y * (displayParent.childCount - 1) + 100; + displayParent.sizeDelta = size; + } + } + } + + private static string CreateDisplayString(RTCStatsReport report, RTCStatsReport lastReport) + { + var builder = new StringBuilder(); + + foreach (var stats in report.Stats.Values) + { + if (stats is RTCInboundRTPStreamStats inboundStats) + { + builder.AppendLine($"{nameof(RTCInboundRTPStreamStats)}"); + if (inboundStats.codecId != null && + report.TryGetValue(inboundStats.codecId, out var stats2) && + stats2 is RTCCodecStats codecStats) + { + builder.AppendLine( + $"Codec: {codecStats.mimeType} {codecStats.sdpFmtpLine}, payloadType={codecStats.payloadType}."); + } + + if (inboundStats.kind == "video") + { + builder.AppendLine($"Decoder: {inboundStats.decoderImplementation}."); + builder.AppendLine($"Resolution: {inboundStats.frameWidth}x{inboundStats.frameHeight}"); + builder.AppendLine($"Framerate: {inboundStats.framesPerSecond}"); + } + + if (lastReport.Get(inboundStats.Id) is RTCInboundRTPStreamStats lastInboundStats) + { + var duration = (double)(inboundStats.Timestamp - lastInboundStats.Timestamp) / 1000000; + var bitrate = (ulong)(8 * (inboundStats.bytesReceived - lastInboundStats.bytesReceived) / duration); + builder.AppendLine($"Bitrate: {bitrate}"); + } + } + else if (stats is RTCOutboundRTPStreamStats outboundStats) + { + builder.AppendLine($"{nameof(RTCOutboundRTPStreamStats)}"); + if (outboundStats.codecId != null && + report.TryGetValue(outboundStats.codecId, out var stats4) && + stats4 is RTCCodecStats codecStats) + { + builder.AppendLine( + $"Codec: {codecStats.mimeType} {codecStats.sdpFmtpLine}, payloadType={codecStats.payloadType}."); + } + + if (outboundStats.kind == "video") + { + builder.AppendLine($"Encoder: {outboundStats.encoderImplementation}."); + builder.AppendLine($"Resolution: {outboundStats.frameWidth}x{outboundStats.frameHeight}"); + builder.AppendLine($"Framerate: {outboundStats.framesPerSecond}"); + } + + if (lastReport.Get(outboundStats.Id) is RTCOutboundRTPStreamStats lastOutBoundStats) + { + var duration = (double)(outboundStats.Timestamp - lastOutBoundStats.Timestamp) / 1000000; + var bitrate = (ulong)(8 * (outboundStats.bytesSent - lastOutBoundStats.bytesSent) / duration); + builder.AppendLine($"Bitrate: {bitrate}"); + } + } + } + return builder.ToString(); + } + + public void AddSenderBase(StreamSenderBase sender) + { + if (senderBaseList.Contains(sender)) + { + return; + } + + senderBaseList.Add(sender); + } + + public void AddReceiverBase(StreamReceiverBase receiver) + { + if (receiverBaseList.Contains(receiver)) + { + return; + } + + receiverBaseList.Add(receiver); + } + } +} diff --git a/com.unity.renderstreaming/Samples~/Example/Stats/ShowStatsUI.cs.meta b/com.unity.renderstreaming/Samples~/Example/Stats/ShowStatsUI.cs.meta new file mode 100644 index 000000000..31b8be89d --- /dev/null +++ b/com.unity.renderstreaming/Samples~/Example/Stats/ShowStatsUI.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 511209fecc3947f7acbafd29efca3ac6 +timeCreated: 1661214585 \ No newline at end of file diff --git a/com.unity.renderstreaming/Samples~/Example/Stats/StatsUI.prefab b/com.unity.renderstreaming/Samples~/Example/Stats/StatsUI.prefab new file mode 100644 index 000000000..ee53f7a06 --- /dev/null +++ b/com.unity.renderstreaming/Samples~/Example/Stats/StatsUI.prefab @@ -0,0 +1,1204 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &84690453141449616 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8853322739930514912} + - component: {fileID: 7292634889300788118} + - component: {fileID: 2718163478282295130} + m_Layer: 5 + m_Name: Label + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &8853322739930514912 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 84690453141449616} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 6985079903909829280} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 17.5, y: -0.5} + m_SizeDelta: {x: -45, y: -3} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &7292634889300788118 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 84690453141449616} + m_CullTransparentMesh: 1 +--- !u!114 &2718163478282295130 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 84690453141449616} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 1 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 3 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: ShowStats +--- !u!1 &1275545719089395135 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6985079903909829280} + - component: {fileID: 922234672837089703} + m_Layer: 5 + m_Name: Toggle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &6985079903909829280 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1275545719089395135} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1499291070238798743} + - {fileID: 8853322739930514912} + m_Father: {fileID: 508261314311064870} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 10, y: 0} + m_SizeDelta: {x: 200, y: 50} + m_Pivot: {x: 0, y: 1} +--- !u!114 &922234672837089703 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1275545719089395135} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9085046f02f69544eb97fd06b6048fe2, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 6082638569524903324} + toggleTransition: 1 + graphic: {fileID: 4922755142398535253} + m_Group: {fileID: 0} + onValueChanged: + m_PersistentCalls: + m_Calls: [] + m_IsOn: 0 +--- !u!1 &1508457991030496397 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1482305760229870820} + - component: {fileID: 6013201563383794849} + - component: {fileID: 7597132502382177639} + - component: {fileID: 4530332660610064243} + m_Layer: 5 + m_Name: Scroll View + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!224 &1482305760229870820 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1508457991030496397} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 8277204699089381438} + - {fileID: 5861133140963408233} + - {fileID: 8197558794462998189} + m_Father: {fileID: 508261314311064870} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 10, y: -50} + m_SizeDelta: {x: 400, y: 500} + m_Pivot: {x: 0, y: 1} +--- !u!222 &6013201563383794849 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1508457991030496397} + m_CullTransparentMesh: 1 +--- !u!114 &7597132502382177639 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1508457991030496397} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 0.392} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!114 &4530332660610064243 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1508457991030496397} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1aa08ab6e0800fa44ae55d278d1423e3, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Content: {fileID: 4441963706037454135} + m_Horizontal: 1 + m_Vertical: 1 + m_MovementType: 1 + m_Elasticity: 0.1 + m_Inertia: 1 + m_DecelerationRate: 0.135 + m_ScrollSensitivity: 1 + m_Viewport: {fileID: 8277204699089381438} + m_HorizontalScrollbar: {fileID: 7669948355919416449} + m_VerticalScrollbar: {fileID: 9192883389562569805} + m_HorizontalScrollbarVisibility: 2 + m_VerticalScrollbarVisibility: 2 + m_HorizontalScrollbarSpacing: -3 + m_VerticalScrollbarSpacing: -3 + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] +--- !u!1 &1903777596917375403 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6418838806734040705} + - component: {fileID: 2877676547360236797} + - component: {fileID: 4922755142398535253} + m_Layer: 5 + m_Name: Checkmark + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &6418838806734040705 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1903777596917375403} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1499291070238798743} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 20, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &2877676547360236797 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1903777596917375403} + m_CullTransparentMesh: 1 +--- !u!114 &4922755142398535253 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1903777596917375403} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10901, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &4417714638525154769 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5861133140963408233} + - component: {fileID: 783767052802410555} + - component: {fileID: 445252771548468564} + - component: {fileID: 7669948355919416449} + m_Layer: 5 + m_Name: Scrollbar Horizontal + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &5861133140963408233 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4417714638525154769} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 6070274951224140778} + m_Father: {fileID: 1482305760229870820} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: -17, y: 20} + m_Pivot: {x: 0, y: 0} +--- !u!222 &783767052802410555 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4417714638525154769} + m_CullTransparentMesh: 1 +--- !u!114 &445252771548468564 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4417714638525154769} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!114 &7669948355919416449 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4417714638525154769} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 2a4db7a114972834c8e4117be1d82ba3, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 8974384548893904656} + m_HandleRect: {fileID: 9208257010345579798} + m_Direction: 0 + m_Value: 0 + m_Size: 1 + m_NumberOfSteps: 0 + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] +--- !u!1 &4584148620787798253 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 508261314311064870} + - component: {fileID: 4184539458356606944} + m_Layer: 5 + m_Name: StatsUI + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &508261314311064870 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4584148620787798253} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 6985079903909829280} + - {fileID: 1482305760229870820} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 100, y: 100} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &4184539458356606944 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4584148620787798253} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 511209fecc3947f7acbafd29efca3ac6, type: 3} + m_Name: + m_EditorClassIdentifier: + toggle: {fileID: 922234672837089703} + scrollView: {fileID: 1508457991030496397} + displayParent: {fileID: 4441963706037454135} + baseText: {fileID: 42992011562252957} + senderBaseList: [] + receiverBaseList: [] +--- !u!1 &5478974256622935485 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8277204699089381438} + - component: {fileID: 4302675659165902473} + - component: {fileID: 3376347668129989869} + - component: {fileID: 5747186231775499762} + m_Layer: 5 + m_Name: Viewport + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &8277204699089381438 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5478974256622935485} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 4441963706037454135} + m_Father: {fileID: 1482305760229870820} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: -17, y: -17} + m_Pivot: {x: 0, y: 1} +--- !u!222 &4302675659165902473 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5478974256622935485} + m_CullTransparentMesh: 1 +--- !u!114 &3376347668129989869 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5478974256622935485} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10917, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!114 &5747186231775499762 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5478974256622935485} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 31a19414c41e5ae4aae2af33fee712f6, type: 3} + m_Name: + m_EditorClassIdentifier: + m_ShowMaskGraphic: 0 +--- !u!1 &5669046432573929670 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 685544287360755057} + - component: {fileID: 5372810038320070} + - component: {fileID: 4937906417891939957} + m_Layer: 5 + m_Name: Handle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &685544287360755057 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5669046432573929670} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 5274144616684119762} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0.51699996} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 20, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &5372810038320070 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5669046432573929670} + m_CullTransparentMesh: 1 +--- !u!114 &4937906417891939957 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5669046432573929670} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &6311740914789993511 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 9208257010345579798} + - component: {fileID: 5741939646939209737} + - component: {fileID: 8974384548893904656} + m_Layer: 5 + m_Name: Handle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &9208257010345579798 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6311740914789993511} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 6070274951224140778} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 20, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &5741939646939209737 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6311740914789993511} + m_CullTransparentMesh: 1 +--- !u!114 &8974384548893904656 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6311740914789993511} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &6788419849005999941 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8197558794462998189} + - component: {fileID: 8495666017350526541} + - component: {fileID: 8864633359069639961} + - component: {fileID: 9192883389562569805} + m_Layer: 5 + m_Name: Scrollbar Vertical + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &8197558794462998189 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6788419849005999941} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 5274144616684119762} + m_Father: {fileID: 1482305760229870820} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 1, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0.00012207031, y: 0} + m_SizeDelta: {x: 20, y: -17} + m_Pivot: {x: 1, y: 1} +--- !u!222 &8495666017350526541 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6788419849005999941} + m_CullTransparentMesh: 1 +--- !u!114 &8864633359069639961 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6788419849005999941} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!114 &9192883389562569805 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6788419849005999941} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 2a4db7a114972834c8e4117be1d82ba3, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 4937906417891939957} + m_HandleRect: {fileID: 685544287360755057} + m_Direction: 2 + m_Value: 1 + m_Size: 0.483 + m_NumberOfSteps: 0 + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] +--- !u!1 &7321020524749991337 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1499291070238798743} + - component: {fileID: 5054060802465439885} + - component: {fileID: 6082638569524903324} + m_Layer: 5 + m_Name: Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1499291070238798743 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7321020524749991337} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 6418838806734040705} + m_Father: {fileID: 6985079903909829280} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0.5} + m_AnchorMax: {x: 0, y: 0.5} + m_AnchoredPosition: {x: 5, y: 0} + m_SizeDelta: {x: 30, y: 30} + m_Pivot: {x: 0, y: 0.5} +--- !u!222 &5054060802465439885 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7321020524749991337} + m_CullTransparentMesh: 1 +--- !u!114 &6082638569524903324 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7321020524749991337} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &7509323698888019833 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6070274951224140778} + m_Layer: 5 + m_Name: Sliding Area + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &6070274951224140778 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7509323698888019833} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 9208257010345579798} + m_Father: {fileID: 5861133140963408233} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0.00012207031, y: 0} + m_SizeDelta: {x: -20, y: -20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!1 &8618915730201327177 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5889328126953563681} + - component: {fileID: 8004698135042394718} + - component: {fileID: 42992011562252957} + m_Layer: 5 + m_Name: SampleText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &5889328126953563681 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8618915730201327177} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 4441963706037454135} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 191.5, y: -85} + m_SizeDelta: {x: 363, y: 150} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &8004698135042394718 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8618915730201327177} + m_CullTransparentMesh: 1 +--- !u!114 &42992011562252957 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8618915730201327177} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 1 + m_MinSize: 10 + m_MaxSize: 30 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: "Sender/Receiver is not set or\r Send/Receive stream has not started." +--- !u!1 &8623632702126766865 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5274144616684119762} + m_Layer: 5 + m_Name: Sliding Area + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &5274144616684119762 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8623632702126766865} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 685544287360755057} + m_Father: {fileID: 8197558794462998189} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0.00012207031} + m_SizeDelta: {x: -20, y: -20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!1 &9025353632180297766 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4441963706037454135} + - component: {fileID: 8313023332785058290} + m_Layer: 5 + m_Name: Content + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &4441963706037454135 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9025353632180297766} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 5889328126953563681} + m_Father: {fileID: 8277204699089381438} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 500} + m_Pivot: {x: 0, y: 1} +--- !u!114 &8313023332785058290 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9025353632180297766} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 10 + m_Right: 10 + m_Top: 10 + m_Bottom: 10 + m_ChildAlignment: 0 + m_Spacing: 0 + m_ChildForceExpandWidth: 1 + m_ChildForceExpandHeight: 0 + m_ChildControlWidth: 1 + m_ChildControlHeight: 0 + m_ChildScaleWidth: 0 + m_ChildScaleHeight: 0 + m_ReverseArrangement: 0 diff --git a/com.unity.renderstreaming/Samples~/Example/Stats/StatsUI.prefab.meta b/com.unity.renderstreaming/Samples~/Example/Stats/StatsUI.prefab.meta new file mode 100644 index 000000000..b4651388b --- /dev/null +++ b/com.unity.renderstreaming/Samples~/Example/Stats/StatsUI.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 562feaa3a43a01841a00c6ac89b133fb +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/com.unity.renderstreaming/Samples~/Example/Stats/Unity.RenderStreaming.Sample.Stats.asmdef b/com.unity.renderstreaming/Samples~/Example/Stats/Unity.RenderStreaming.Sample.Stats.asmdef new file mode 100644 index 000000000..8137752c8 --- /dev/null +++ b/com.unity.renderstreaming/Samples~/Example/Stats/Unity.RenderStreaming.Sample.Stats.asmdef @@ -0,0 +1,24 @@ +{ + "name": "Unity.RenderStreaming.Sample.Stats", + "rootNamespace": "", + "references": [ + "GUID:40a5acf76f04c4c8ebb69605e4b0d5c7", + "GUID:f12aafacab75a87499e7e45c873ffab8" + ], + "includePlatforms": [ + "Android", + "Editor", + "iOS", + "LinuxStandalone64", + "macOSStandalone", + "WindowsStandalone64" + ], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": true, + "defineConstraints": [], + "versionDefines": [], + "noEngineReferences": false +} diff --git a/com.unity.renderstreaming/Samples~/Example/Stats/Unity.RenderStreaming.Sample.Stats.asmdef.meta b/com.unity.renderstreaming/Samples~/Example/Stats/Unity.RenderStreaming.Sample.Stats.asmdef.meta new file mode 100644 index 000000000..88d05fede --- /dev/null +++ b/com.unity.renderstreaming/Samples~/Example/Stats/Unity.RenderStreaming.Sample.Stats.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: c279ff0fc8f6ce24dbabfebeaa7272bd +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: From 1ce0f6c6f57007aef497adac7a26a3775d241552 Mon Sep 17 00:00:00 2001 From: Takashi KANNAN Date: Wed, 24 Aug 2022 11:03:15 +0900 Subject: [PATCH 02/21] add stats ui to broadcast sample --- .../Example/Broadcast/Broadcast.unity | 153 +++++++++++++++++- 1 file changed, 147 insertions(+), 6 deletions(-) diff --git a/com.unity.renderstreaming/Samples~/Example/Broadcast/Broadcast.unity b/com.unity.renderstreaming/Samples~/Example/Broadcast/Broadcast.unity index 660383079..8516cf277 100644 --- a/com.unity.renderstreaming/Samples~/Example/Broadcast/Broadcast.unity +++ b/com.unity.renderstreaming/Samples~/Example/Broadcast/Broadcast.unity @@ -648,7 +648,7 @@ RectTransform: - {fileID: 651274779} - {fileID: 675120845} m_Father: {fileID: 1215389823} - m_RootOrder: 3 + m_RootOrder: 4 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} @@ -2439,6 +2439,146 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 736464805} m_CullTransparentMesh: 1 +--- !u!1001 &757982963 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1215389823} + m_Modifications: + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_Pivot.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_Pivot.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_RootOrder + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_SizeDelta.x + value: 100 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_SizeDelta.y + value: 100 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4184539458356606944, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: senderBaseList.Array.size + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 4184539458356606944, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: senderBaseList.Array.data[0] + value: + objectReference: {fileID: 725451156} + - target: {fileID: 4184539458356606944, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: senderBaseList.Array.data[1] + value: + objectReference: {fileID: 725451155} + - target: {fileID: 4584148620787798253, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_Name + value: StatsUI + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 562feaa3a43a01841a00c6ac89b133fb, type: 3} +--- !u!224 &757982964 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + m_PrefabInstance: {fileID: 757982963} + m_PrefabAsset: {fileID: 0} --- !u!850595691 &774178818 LightingSettings: m_ObjectHideFlags: 0 @@ -2533,7 +2673,7 @@ RectTransform: m_Children: - {fileID: 244876989} m_Father: {fileID: 1215389823} - m_RootOrder: 5 + m_RootOrder: 6 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 1, y: 0} m_AnchorMax: {x: 1, y: 0} @@ -2906,7 +3046,7 @@ RectTransform: m_Children: - {fileID: 1127658836} m_Father: {fileID: 1215389823} - m_RootOrder: 1 + m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 1, y: 0} @@ -2999,7 +3139,7 @@ RectTransform: - {fileID: 647684928} - {fileID: 92522335} m_Father: {fileID: 1215389823} - m_RootOrder: 4 + m_RootOrder: 5 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} @@ -3132,7 +3272,7 @@ PrefabInstance: - target: {fileID: 4037113455314838168, guid: 7aa5bec5b1e406445af144843fe4d62c, type: 3} propertyPath: m_RootOrder - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 4037113455314838168, guid: 7aa5bec5b1e406445af144843fe4d62c, type: 3} @@ -4147,6 +4287,7 @@ RectTransform: m_LocalScale: {x: 0, y: 0, z: 0} m_ConstrainProportionsScale: 0 m_Children: + - {fileID: 757982964} - {fileID: 1023262581} - {fileID: 920982462} - {fileID: 1287993067} @@ -4308,7 +4449,7 @@ RectTransform: m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1215389823} - m_RootOrder: 2 + m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} From ac225851e3ca7ef62bb91c4d654b590d9bdcb03a Mon Sep 17 00:00:00 2001 From: Takashi KANNAN Date: Thu, 25 Aug 2022 08:05:02 +0900 Subject: [PATCH 03/21] fix --- .../Samples~/Example/Stats/ShowStatsUI.cs | 14 +++++--------- .../Samples~/Example/Stats/StatsUI.prefab | 2 +- .../Unity.RenderStreaming.Sample.Stats.asmdef | 14 +++++++------- 3 files changed, 13 insertions(+), 17 deletions(-) diff --git a/com.unity.renderstreaming/Samples~/Example/Stats/ShowStatsUI.cs b/com.unity.renderstreaming/Samples~/Example/Stats/ShowStatsUI.cs index 213346569..ff24b8215 100644 --- a/com.unity.renderstreaming/Samples~/Example/Stats/ShowStatsUI.cs +++ b/com.unity.renderstreaming/Samples~/Example/Stats/ShowStatsUI.cs @@ -102,7 +102,6 @@ private IEnumerator CollectStats() } } - if (lastSenderStats.Any() || lastReceiverStats.Any()) { baseText.gameObject.SetActive(false); @@ -122,10 +121,8 @@ private static string CreateDisplayString(RTCStatsReport report, RTCStatsReport { if (stats is RTCInboundRTPStreamStats inboundStats) { - builder.AppendLine($"{nameof(RTCInboundRTPStreamStats)}"); - if (inboundStats.codecId != null && - report.TryGetValue(inboundStats.codecId, out var stats2) && - stats2 is RTCCodecStats codecStats) + builder.AppendLine(inboundStats.Id); + if (inboundStats.codecId != null && report.Get(inboundStats.codecId) is RTCCodecStats codecStats) { builder.AppendLine( $"Codec: {codecStats.mimeType} {codecStats.sdpFmtpLine}, payloadType={codecStats.payloadType}."); @@ -147,10 +144,8 @@ private static string CreateDisplayString(RTCStatsReport report, RTCStatsReport } else if (stats is RTCOutboundRTPStreamStats outboundStats) { - builder.AppendLine($"{nameof(RTCOutboundRTPStreamStats)}"); - if (outboundStats.codecId != null && - report.TryGetValue(outboundStats.codecId, out var stats4) && - stats4 is RTCCodecStats codecStats) + builder.AppendLine(outboundStats.Id); + if (outboundStats.codecId != null && report.Get(outboundStats.codecId) is RTCCodecStats codecStats) { builder.AppendLine( $"Codec: {codecStats.mimeType} {codecStats.sdpFmtpLine}, payloadType={codecStats.payloadType}."); @@ -171,6 +166,7 @@ private static string CreateDisplayString(RTCStatsReport report, RTCStatsReport } } } + return builder.ToString(); } diff --git a/com.unity.renderstreaming/Samples~/Example/Stats/StatsUI.prefab b/com.unity.renderstreaming/Samples~/Example/Stats/StatsUI.prefab index ee53f7a06..11cb46b6f 100644 --- a/com.unity.renderstreaming/Samples~/Example/Stats/StatsUI.prefab +++ b/com.unity.renderstreaming/Samples~/Example/Stats/StatsUI.prefab @@ -72,7 +72,7 @@ MonoBehaviour: m_FontStyle: 0 m_BestFit: 1 m_MinSize: 10 - m_MaxSize: 40 + m_MaxSize: 30 m_Alignment: 3 m_AlignByGeometry: 0 m_RichText: 1 diff --git a/com.unity.renderstreaming/Samples~/Example/Stats/Unity.RenderStreaming.Sample.Stats.asmdef b/com.unity.renderstreaming/Samples~/Example/Stats/Unity.RenderStreaming.Sample.Stats.asmdef index 8137752c8..b5acecb87 100644 --- a/com.unity.renderstreaming/Samples~/Example/Stats/Unity.RenderStreaming.Sample.Stats.asmdef +++ b/com.unity.renderstreaming/Samples~/Example/Stats/Unity.RenderStreaming.Sample.Stats.asmdef @@ -6,12 +6,12 @@ "GUID:f12aafacab75a87499e7e45c873ffab8" ], "includePlatforms": [ - "Android", - "Editor", - "iOS", - "LinuxStandalone64", - "macOSStandalone", - "WindowsStandalone64" + "Android", + "Editor", + "iOS", + "LinuxStandalone64", + "macOSStandalone", + "WindowsStandalone64" ], "excludePlatforms": [], "allowUnsafeCode": false, @@ -21,4 +21,4 @@ "defineConstraints": [], "versionDefines": [], "noEngineReferences": false -} +} \ No newline at end of file From 434839634f96a98487f9e499d395c216a1966b2b Mon Sep 17 00:00:00 2001 From: Takashi KANNAN Date: Thu, 25 Aug 2022 09:46:53 +0900 Subject: [PATCH 04/21] fix --- .../Samples~/Example/Stats/ShowStatsUI.cs | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/com.unity.renderstreaming/Samples~/Example/Stats/ShowStatsUI.cs b/com.unity.renderstreaming/Samples~/Example/Stats/ShowStatsUI.cs index ff24b8215..7c3f274c9 100644 --- a/com.unity.renderstreaming/Samples~/Example/Stats/ShowStatsUI.cs +++ b/com.unity.renderstreaming/Samples~/Example/Stats/ShowStatsUI.cs @@ -56,7 +56,8 @@ private IEnumerator CollectStats() { yield return waitSec; - foreach (var transceiver in senderBaseList.SelectMany(x => x.Transceivers.Values)) + foreach (var transceiver in senderBaseList.SelectMany(x => x.Transceivers.Values) + .Where(x => x != null && x.Sender != null)) { var op = transceiver.Sender.GetStats(); yield return op; @@ -81,11 +82,17 @@ private IEnumerator CollectStats() } } - foreach (var transceiver in receiverBaseList.Select(x => x.Transceiver)) + foreach (var transceiver in receiverBaseList.Select(x => x.Transceiver) + .Where(x => x != null && x.Receiver != null)) { var op = transceiver.Receiver.GetStats(); yield return op; + if (op.IsError) + { + continue; + } + var report = op.Value; if (lastReceiverStats.TryGetValue(transceiver.Receiver, out var statsDisplay)) { @@ -135,7 +142,7 @@ private static string CreateDisplayString(RTCStatsReport report, RTCStatsReport builder.AppendLine($"Framerate: {inboundStats.framesPerSecond}"); } - if (lastReport.Get(inboundStats.Id) is RTCInboundRTPStreamStats lastInboundStats) + if (lastReport.TryGetValue(inboundStats.Id, out var lastStats) && lastStats is RTCInboundRTPStreamStats lastInboundStats) { var duration = (double)(inboundStats.Timestamp - lastInboundStats.Timestamp) / 1000000; var bitrate = (ulong)(8 * (inboundStats.bytesReceived - lastInboundStats.bytesReceived) / duration); @@ -158,10 +165,10 @@ private static string CreateDisplayString(RTCStatsReport report, RTCStatsReport builder.AppendLine($"Framerate: {outboundStats.framesPerSecond}"); } - if (lastReport.Get(outboundStats.Id) is RTCOutboundRTPStreamStats lastOutBoundStats) + if (lastReport.TryGetValue(outboundStats.Id, out var lastStats) && lastStats is RTCOutboundRTPStreamStats lastOutboundStats) { - var duration = (double)(outboundStats.Timestamp - lastOutBoundStats.Timestamp) / 1000000; - var bitrate = (ulong)(8 * (outboundStats.bytesSent - lastOutBoundStats.bytesSent) / duration); + var duration = (double)(outboundStats.Timestamp - lastOutboundStats.Timestamp) / 1000000; + var bitrate = (ulong)(8 * (outboundStats.bytesSent - lastOutboundStats.bytesSent) / duration); builder.AppendLine($"Bitrate: {bitrate}"); } } From 0f1dd3f13f9b6d1f75450edbf8530b2a67fae6c9 Mon Sep 17 00:00:00 2001 From: Takashi KANNAN Date: Thu, 25 Aug 2022 09:47:15 +0900 Subject: [PATCH 05/21] add stats ui to sample --- .../Example/ARFoundation/ARFoundation.unity | 277 ++++++++++- .../Example/Bidirectional/Bidirectional.unity | 430 ++++++++++++++++-- .../Samples~/Example/Gyro/Gyro.unity | 260 ++++++++++- .../Samples~/Example/Multiplay/Multiplay.cs | 11 + .../Example/Multiplay/Multiplay.unity | 319 ++++++++++++- .../Example/Multiplay/MultiplaySample.cs | 3 + .../Samples~/Example/Receiver/Receiver.unity | 266 ++++++++++- .../Example/RenderPipeline/HDRP.unity | 152 ++++++- .../Samples~/Example/RenderPipeline/URP.unity | 149 +++++- .../Unity.RenderStreaming.Samples.asmdef | 3 +- 10 files changed, 1808 insertions(+), 62 deletions(-) diff --git a/com.unity.renderstreaming/Samples~/Example/ARFoundation/ARFoundation.unity b/com.unity.renderstreaming/Samples~/Example/ARFoundation/ARFoundation.unity index 9f30ee41e..6b4f2cdc0 100644 --- a/com.unity.renderstreaming/Samples~/Example/ARFoundation/ARFoundation.unity +++ b/com.unity.renderstreaming/Samples~/Example/ARFoundation/ARFoundation.unity @@ -152,6 +152,7 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 948060001} - {fileID: 1275633381} @@ -257,6 +258,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1275633381} m_RootOrder: 0 @@ -334,6 +336,7 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 908346561} m_Father: {fileID: 1489100468} @@ -372,6 +375,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 737849729} m_RootOrder: 1 @@ -449,6 +453,7 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 1551390900} - {fileID: 545070958} @@ -488,6 +493,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 948060001} m_RootOrder: 0 @@ -567,6 +573,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1584351904} m_RootOrder: 0 @@ -647,6 +654,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 514647105} m_Father: {fileID: 743595808} @@ -767,6 +775,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 395898785} m_RootOrder: 0 @@ -846,6 +855,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1796556987} m_RootOrder: 1 @@ -987,9 +997,11 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 0, y: 0, z: 0} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 1363584100} - {fileID: 743595808} + - {fileID: 567569366} - {fileID: 617931366} m_Father: {fileID: 0} m_RootOrder: 1 @@ -1028,6 +1040,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 328030559} m_RootOrder: 1 @@ -1138,6 +1151,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1853327866} m_RootOrder: 1 @@ -1189,6 +1203,241 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 556513335} m_CullTransparentMesh: 0 +--- !u!1001 &567569365 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 528948626} + m_Modifications: + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_Pivot.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_Pivot.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_RootOrder + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_SizeDelta.x + value: 100 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_SizeDelta.y + value: 100 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 685544287360755057, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 685544287360755057, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 685544287360755057, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1482305760229870820, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_SizeDelta.x + value: 600 + objectReference: {fileID: 0} + - target: {fileID: 1482305760229870820, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_SizeDelta.y + value: 600 + objectReference: {fileID: 0} + - target: {fileID: 1508457991030496397, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4584148620787798253, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_Name + value: StatsUI + objectReference: {fileID: 0} + - target: {fileID: 5861133140963408233, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5861133140963408233, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5889328126953563681, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5889328126953563681, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5889328126953563681, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_SizeDelta.x + value: 563 + objectReference: {fileID: 0} + - target: {fileID: 5889328126953563681, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 291.5 + objectReference: {fileID: 0} + - target: {fileID: 5889328126953563681, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8197558794462998189, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8197558794462998189, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8277204699089381438, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8277204699089381438, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8277204699089381438, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8277204699089381438, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9208257010345579798, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9208257010345579798, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9208257010345579798, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 562feaa3a43a01841a00c6ac89b133fb, type: 3} +--- !u!224 &567569366 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + m_PrefabInstance: {fileID: 567569365} + m_PrefabAsset: {fileID: 0} --- !u!1 &576362883 GameObject: m_ObjectHideFlags: 0 @@ -1217,6 +1466,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 662432478} m_RootOrder: 0 @@ -1293,7 +1543,7 @@ PrefabInstance: - target: {fileID: 4037113455314838168, guid: 7aa5bec5b1e406445af144843fe4d62c, type: 3} propertyPath: m_RootOrder - value: 2 + value: 3 objectReference: {fileID: 0} - target: {fileID: 4037113455314838168, guid: 7aa5bec5b1e406445af144843fe4d62c, type: 3} @@ -1427,6 +1677,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 576362884} m_Father: {fileID: 743595808} @@ -1547,6 +1798,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 737849729} m_RootOrder: 0 @@ -1624,6 +1876,7 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 710769079} - {fileID: 289531840} @@ -1661,6 +1914,7 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 662432478} - {fileID: 395898785} @@ -1700,6 +1954,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 1489100468} m_Father: {fileID: 743595808} @@ -1738,6 +1993,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 284772626} m_RootOrder: 0 @@ -1815,6 +2071,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 95690758} m_Father: {fileID: 743595808} @@ -1851,6 +2108,7 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 346410477} m_Father: {fileID: 95690758} @@ -1977,6 +2235,7 @@ Transform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1420951684} m_RootOrder: 0 @@ -2007,6 +2266,7 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 131599903} - {fileID: 1594806527} @@ -2075,6 +2335,7 @@ MonoBehaviour: type: 3} m_DeselectOnBackgroundClick: 1 m_PointerBehavior: 0 + m_CursorLockBehavior: 0 --- !u!114 &1334313019 MonoBehaviour: m_ObjectHideFlags: 0 @@ -2100,6 +2361,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} m_RootOrder: 2 @@ -2132,6 +2394,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1796556987} m_RootOrder: 0 @@ -2212,6 +2475,7 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 528948626} m_RootOrder: 0 @@ -2310,6 +2574,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 1161244843} m_Father: {fileID: 0} @@ -2344,6 +2609,7 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 284772626} - {fileID: 328030559} @@ -2449,6 +2715,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 328030559} m_RootOrder: 0 @@ -2526,6 +2793,7 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 355025565} - {fileID: 1589093482} @@ -2565,6 +2833,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1584351904} m_RootOrder: 1 @@ -2645,6 +2914,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1275633381} m_RootOrder: 1 @@ -2782,6 +3052,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} m_RootOrder: 3 @@ -2812,6 +3083,7 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 1356000875} - {fileID: 523210253} @@ -2851,6 +3123,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1853327866} m_RootOrder: 0 @@ -2928,6 +3201,7 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 1837722695} - {fileID: 556513336} @@ -3007,6 +3281,7 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} m_RootOrder: 0 diff --git a/com.unity.renderstreaming/Samples~/Example/Bidirectional/Bidirectional.unity b/com.unity.renderstreaming/Samples~/Example/Bidirectional/Bidirectional.unity index 5567e70c5..13c160edc 100644 --- a/com.unity.renderstreaming/Samples~/Example/Bidirectional/Bidirectional.unity +++ b/com.unity.renderstreaming/Samples~/Example/Bidirectional/Bidirectional.unity @@ -150,6 +150,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 1180904220} - {fileID: 1423621364} @@ -215,6 +216,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1013695939} m_RootOrder: 0 @@ -295,6 +297,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 1046847830} m_Father: {fileID: 447881815} @@ -420,6 +423,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 2128695119} m_RootOrder: 0 @@ -500,16 +504,17 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 2143861285} - {fileID: 678698532} m_Father: {fileID: 932364532} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 50} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 188.24998, y: -25} + m_SizeDelta: {x: 376.49997, y: 50} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &185332756 MonoBehaviour: @@ -562,7 +567,10 @@ MonoBehaviour: m_HideMobileInput: 0 m_CharacterValidation: 0 m_CharacterLimit: 0 - m_OnEndEdit: + m_OnSubmit: + m_PersistentCalls: + m_Calls: [] + m_OnDidEndEdit: m_PersistentCalls: m_Calls: [] m_OnValueChanged: @@ -640,6 +648,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 2063941925} m_Father: {fileID: 2101892767} @@ -650,6 +659,271 @@ RectTransform: m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: -20, y: -20} m_Pivot: {x: 0.5, y: 0.5} +--- !u!1001 &310412159 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 528948626} + m_Modifications: + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_Pivot.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_Pivot.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_RootOrder + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_SizeDelta.x + value: 100 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_SizeDelta.y + value: 100 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchoredPosition.y + value: -10 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 685544287360755057, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 685544287360755057, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 685544287360755057, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMin.y + value: 0.23399997 + objectReference: {fileID: 0} + - target: {fileID: 1482305760229870820, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_SizeDelta.x + value: 360 + objectReference: {fileID: 0} + - target: {fileID: 1482305760229870820, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_SizeDelta.y + value: 400 + objectReference: {fileID: 0} + - target: {fileID: 1508457991030496397, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4184539458356606944, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: senderBaseList.Array.size + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 4184539458356606944, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: receiverBaseList.Array.size + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 4184539458356606944, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: senderBaseList.Array.data[0] + value: + objectReference: {fileID: 1915034404} + - target: {fileID: 4184539458356606944, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: senderBaseList.Array.data[1] + value: + objectReference: {fileID: 1363584104} + - target: {fileID: 4184539458356606944, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: receiverBaseList.Array.data[0] + value: + objectReference: {fileID: 1915034405} + - target: {fileID: 4184539458356606944, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: receiverBaseList.Array.data[1] + value: + objectReference: {fileID: 1915034408} + - target: {fileID: 4584148620787798253, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_Name + value: StatsUI + objectReference: {fileID: 0} + - target: {fileID: 5861133140963408233, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5861133140963408233, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5889328126953563681, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5889328126953563681, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5889328126953563681, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_SizeDelta.x + value: 323 + objectReference: {fileID: 0} + - target: {fileID: 5889328126953563681, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 171.5 + objectReference: {fileID: 0} + - target: {fileID: 5889328126953563681, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8197558794462998189, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8197558794462998189, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8277204699089381438, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8277204699089381438, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8277204699089381438, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8277204699089381438, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9208257010345579798, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9208257010345579798, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9208257010345579798, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 562feaa3a43a01841a00c6ac89b133fb, type: 3} +--- !u!224 &310412160 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + m_PrefabInstance: {fileID: 310412159} + m_PrefabAsset: {fileID: 0} --- !u!1 &313258691 GameObject: m_ObjectHideFlags: 0 @@ -678,6 +952,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 474040021} m_RootOrder: 2 @@ -758,6 +1033,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 1261207007} m_Father: {fileID: 1268027397} @@ -884,15 +1160,16 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 1676245737} m_Father: {fileID: 932364532} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 50} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 376.49997, y: -60} + m_SizeDelta: {x: 376.49997, y: 50} m_Pivot: {x: 1, y: 1} --- !u!114 &346362251 MonoBehaviour: @@ -1004,6 +1281,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1046847830} m_RootOrder: 0 @@ -1080,6 +1358,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 1485084886} m_Father: {fileID: 1664650282} @@ -1170,6 +1449,7 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 1031505000} - {fileID: 2101892767} @@ -1277,6 +1557,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 1136971054} - {fileID: 966029635} @@ -1357,7 +1638,7 @@ PrefabInstance: - target: {fileID: 4037113455314838168, guid: 7aa5bec5b1e406445af144843fe4d62c, type: 3} propertyPath: m_RootOrder - value: 1 + value: 2 objectReference: {fileID: 0} - target: {fileID: 4037113455314838168, guid: 7aa5bec5b1e406445af144843fe4d62c, type: 3} @@ -1552,8 +1833,10 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 0, y: 0, z: 0} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 447881815} + - {fileID: 310412160} - {fileID: 509297428} m_Father: {fileID: 0} m_RootOrder: 2 @@ -1591,6 +1874,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 185332755} m_RootOrder: 1 @@ -1670,6 +1954,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1446828911} m_RootOrder: 2 @@ -1800,6 +2085,7 @@ Transform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 1, z: -10} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} m_RootOrder: 0 @@ -1831,6 +2117,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 185332755} - {fileID: 346362250} @@ -1838,10 +2125,10 @@ RectTransform: m_Father: {fileID: 1423621364} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 396.49997, y: -180} + m_SizeDelta: {x: 376.49997, y: 170} m_Pivot: {x: 0, y: 0} --- !u!114 &932364533 MonoBehaviour: @@ -1897,6 +2184,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 474040021} m_RootOrder: 1 @@ -1973,15 +2261,16 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 172843649} m_Father: {fileID: 2134522315} m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 50} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 376.49997, y: -120} + m_SizeDelta: {x: 376.49997, y: 50} m_Pivot: {x: 1, y: 1} --- !u!114 &1013695940 MonoBehaviour: @@ -2094,6 +2383,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 131784669} m_Father: {fileID: 447881815} @@ -2181,6 +2471,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 375413528} m_Father: {fileID: 174861474} @@ -2220,6 +2511,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 1258234880} m_Father: {fileID: 1664650282} @@ -2345,6 +2637,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1446828911} m_RootOrder: 0 @@ -2420,6 +2713,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 474040021} m_RootOrder: 0 @@ -2495,6 +2789,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 2125586391} m_RootOrder: 0 @@ -2573,16 +2868,17 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 1363584100} - {fileID: 1221238572} m_Father: {fileID: 131784669} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 250} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 0, y: -250} + m_SizeDelta: {x: 782.99994, y: 250} m_Pivot: {x: 0, y: 0} --- !u!114 &1180904221 MonoBehaviour: @@ -2639,14 +2935,15 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1180904220} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 587.24994, y: -130} + m_SizeDelta: {x: 371.49997, y: 220} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1221238573 MonoBehaviour: @@ -2805,6 +3102,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 1563904669} m_Father: {fileID: 1054277507} @@ -2841,6 +3139,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 1708597410} m_Father: {fileID: 314272781} @@ -2880,6 +3179,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 1846535030} - {fileID: 314272781} @@ -3016,6 +3316,7 @@ MonoBehaviour: type: 3} m_DeselectOnBackgroundClick: 1 m_PointerBehavior: 0 + m_CursorLockBehavior: 0 --- !u!114 &1334313019 MonoBehaviour: m_ObjectHideFlags: 0 @@ -3041,6 +3342,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} m_RootOrder: 3 @@ -3073,6 +3375,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 2125586391} m_RootOrder: 1 @@ -3150,14 +3453,15 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1180904220} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 195.74998, y: -130} + m_SizeDelta: {x: 371.49997, y: 220} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1363584101 MonoBehaviour: @@ -3302,6 +3606,8 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: fd052cb8051a41309639216a466bf35a, type: 3} m_Name: m_EditorClassIdentifier: + m_minBitrate: 1000 + m_maxBitrate: 1000 deviceIndex: 0 mute: 1 --- !u!1 &1423621363 @@ -3331,16 +3637,17 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 2134522315} - {fileID: 932364532} m_Father: {fileID: 131784669} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 200} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 391.49997, y: -350} + m_SizeDelta: {x: 782.99994, y: 200} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1423621365 MonoBehaviour: @@ -3395,6 +3702,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 1094835990} - {fileID: 1811427819} @@ -3481,6 +3789,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 474040021} m_Father: {fileID: 1846535030} @@ -3517,6 +3826,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 1446828911} m_Father: {fileID: 441688740} @@ -3555,6 +3865,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1258234880} m_RootOrder: 0 @@ -3631,6 +3942,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 441688740} - {fileID: 1054277507} @@ -3738,6 +4050,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 346362250} m_RootOrder: 0 @@ -3817,6 +4130,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1261207007} m_RootOrder: 0 @@ -3892,6 +4206,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1859585769} m_RootOrder: 0 @@ -3971,6 +4286,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1859585769} m_RootOrder: 1 @@ -4046,6 +4362,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1446828911} m_RootOrder: 1 @@ -4122,6 +4439,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 1464711774} m_Father: {fileID: 1268027397} @@ -4212,6 +4530,7 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 1720753588} - {fileID: 1772713976} @@ -4219,10 +4538,10 @@ RectTransform: m_Father: {fileID: 2134522315} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 50} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 188.24998, y: -25} + m_SizeDelta: {x: 376.49997, y: 50} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1859585770 MonoBehaviour: @@ -4404,6 +4723,7 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} m_RootOrder: 1 @@ -4426,6 +4746,10 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: streamingSize: {x: 1280, y: 720} + m_frameRate: 30 + m_minBitrate: 1000 + m_maxBitrate: 1000 + m_scaleFactor: 1 deviceIndex: 0 framerate: 30 --- !u!114 &1915034405 @@ -4498,6 +4822,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 220075808} m_RootOrder: 0 @@ -4574,6 +4899,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 220075808} m_Father: {fileID: 447881815} @@ -4700,6 +5026,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 1161220085} - {fileID: 1360947117} @@ -4707,10 +5034,10 @@ RectTransform: m_Father: {fileID: 2134522315} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 50} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 188.24998, y: -85} + m_SizeDelta: {x: 376.49997, y: 50} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &2125586392 MonoBehaviour: @@ -4838,15 +5165,16 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 174875021} m_Father: {fileID: 932364532} m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 50} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 376.49997, y: -120} + m_SizeDelta: {x: 376.49997, y: 50} m_Pivot: {x: 1, y: 1} --- !u!114 &2128695120 MonoBehaviour: @@ -4957,6 +5285,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 1859585769} - {fileID: 2125586391} @@ -4964,10 +5293,10 @@ RectTransform: m_Father: {fileID: 1423621364} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 10, y: -180} + m_SizeDelta: {x: 376.49997, y: 170} m_Pivot: {x: 0, y: 0} --- !u!114 &2134522316 MonoBehaviour: @@ -5023,6 +5352,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 185332755} m_RootOrder: 0 diff --git a/com.unity.renderstreaming/Samples~/Example/Gyro/Gyro.unity b/com.unity.renderstreaming/Samples~/Example/Gyro/Gyro.unity index a7b2a9d76..4d822a21c 100644 --- a/com.unity.renderstreaming/Samples~/Example/Gyro/Gyro.unity +++ b/com.unity.renderstreaming/Samples~/Example/Gyro/Gyro.unity @@ -149,6 +149,7 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 908346561} m_Father: {fileID: 1489100468} @@ -187,6 +188,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 737849729} m_RootOrder: 1 @@ -264,6 +266,7 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 1551390900} - {fileID: 545070958} @@ -295,7 +298,7 @@ PrefabInstance: - target: {fileID: 4037113455314838168, guid: 7aa5bec5b1e406445af144843fe4d62c, type: 3} propertyPath: m_RootOrder - value: 2 + value: 3 objectReference: {fileID: 0} - target: {fileID: 4037113455314838168, guid: 7aa5bec5b1e406445af144843fe4d62c, type: 3} @@ -428,6 +431,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1796556987} m_RootOrder: 1 @@ -569,9 +573,11 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 0, y: 0, z: 0} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 1363584100} - {fileID: 743595808} + - {fileID: 1664970583} - {fileID: 517264791} m_Father: {fileID: 0} m_RootOrder: 2 @@ -610,6 +616,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 328030559} m_RootOrder: 1 @@ -720,6 +727,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 662432478} m_RootOrder: 0 @@ -800,6 +808,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 576362884} m_Father: {fileID: 743595808} @@ -971,6 +980,7 @@ Transform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 1, z: -10} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} m_RootOrder: 0 @@ -1003,6 +1013,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 737849729} m_RootOrder: 0 @@ -1080,6 +1091,7 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 710769079} - {fileID: 289531840} @@ -1117,6 +1129,7 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 662432478} - {fileID: 844007571} @@ -1154,6 +1167,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 1489100468} m_Father: {fileID: 743595808} @@ -1192,6 +1206,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 284772626} m_RootOrder: 0 @@ -1300,6 +1315,7 @@ MonoBehaviour: type: 3} m_DeselectOnBackgroundClick: 1 m_PointerBehavior: 0 + m_CursorLockBehavior: 0 --- !u!114 &1334313019 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1325,6 +1341,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} m_RootOrder: 3 @@ -1357,6 +1374,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1796556987} m_RootOrder: 0 @@ -1437,6 +1455,7 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 528948626} m_RootOrder: 0 @@ -1524,6 +1543,7 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 284772626} - {fileID: 328030559} @@ -1629,6 +1649,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 328030559} m_RootOrder: 0 @@ -1680,6 +1701,241 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1551390899} m_CullTransparentMesh: 0 +--- !u!1001 &1664970582 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 528948626} + m_Modifications: + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_Pivot.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_Pivot.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_RootOrder + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_SizeDelta.x + value: 100 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_SizeDelta.y + value: 100 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 685544287360755057, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 685544287360755057, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 685544287360755057, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMin.y + value: 0.23399997 + objectReference: {fileID: 0} + - target: {fileID: 1482305760229870820, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_SizeDelta.x + value: 300 + objectReference: {fileID: 0} + - target: {fileID: 1482305760229870820, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_SizeDelta.y + value: 400 + objectReference: {fileID: 0} + - target: {fileID: 1508457991030496397, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4584148620787798253, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_Name + value: StatsUI + objectReference: {fileID: 0} + - target: {fileID: 5861133140963408233, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5861133140963408233, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5889328126953563681, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5889328126953563681, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5889328126953563681, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_SizeDelta.x + value: 263 + objectReference: {fileID: 0} + - target: {fileID: 5889328126953563681, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 141.5 + objectReference: {fileID: 0} + - target: {fileID: 5889328126953563681, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8197558794462998189, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8197558794462998189, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8277204699089381438, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8277204699089381438, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8277204699089381438, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8277204699089381438, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9208257010345579798, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9208257010345579798, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9208257010345579798, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 562feaa3a43a01841a00c6ac89b133fb, type: 3} +--- !u!224 &1664970583 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + m_PrefabInstance: {fileID: 1664970582} + m_PrefabAsset: {fileID: 0} --- !u!1 &1796556986 GameObject: m_ObjectHideFlags: 0 @@ -1706,6 +1962,7 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 1356000875} - {fileID: 523210253} @@ -1785,6 +2042,7 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} m_RootOrder: 1 diff --git a/com.unity.renderstreaming/Samples~/Example/Multiplay/Multiplay.cs b/com.unity.renderstreaming/Samples~/Example/Multiplay/Multiplay.cs index d23b3c244..7682d85b2 100644 --- a/com.unity.renderstreaming/Samples~/Example/Multiplay/Multiplay.cs +++ b/com.unity.renderstreaming/Samples~/Example/Multiplay/Multiplay.cs @@ -12,6 +12,12 @@ class Multiplay : SignalingHandlerBase, private List connectionIds = new List(); private List streams = new List(); private Dictionary dictObj = new Dictionary(); + private ShowStatsUI statsUI; + + public void SetStatsUI(ShowStatsUI statsUI) + { + this.statsUI = statsUI; + } public void OnDeletedConnection(SignalingEventData eventData) { @@ -69,6 +75,11 @@ public void OnOffer(SignalingEventData data) videoStreamSender.SetCodec(RenderStreamingSettings.SenderVideoCodec); } + if (sender is StreamSenderBase senderBase) + { + statsUI.AddSenderBase(senderBase); + } + var inputChannel = newObj.GetComponentInChildren(); var multiplayChannel = newObj.GetComponentInChildren(); var playerController = newObj.GetComponentInChildren(); diff --git a/com.unity.renderstreaming/Samples~/Example/Multiplay/Multiplay.unity b/com.unity.renderstreaming/Samples~/Example/Multiplay/Multiplay.unity index c5f0cb9fa..47755ad2d 100644 --- a/com.unity.renderstreaming/Samples~/Example/Multiplay/Multiplay.unity +++ b/com.unity.renderstreaming/Samples~/Example/Multiplay/Multiplay.unity @@ -151,6 +151,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1605499775} m_RootOrder: 0 @@ -227,6 +228,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 744551068} - {fileID: 1727587920} @@ -289,7 +291,10 @@ MonoBehaviour: m_HideMobileInput: 0 m_CharacterValidation: 0 m_CharacterLimit: 0 - m_OnEndEdit: + m_OnSubmit: + m_PersistentCalls: + m_Calls: [] + m_OnDidEndEdit: m_PersistentCalls: m_Calls: [] m_OnValueChanged: @@ -369,6 +374,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 2106922824} m_Father: {fileID: 1395191184} @@ -446,6 +452,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 2000026309} m_Father: {fileID: 538622257} @@ -558,7 +565,7 @@ PrefabInstance: - target: {fileID: 4037113455314838168, guid: 7aa5bec5b1e406445af144843fe4d62c, type: 3} propertyPath: m_RootOrder - value: 2 + value: 3 objectReference: {fileID: 0} - target: {fileID: 4037113455314838168, guid: 7aa5bec5b1e406445af144843fe4d62c, type: 3} @@ -692,6 +699,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0.95, y: 1, z: -10.01} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1399813752} m_RootOrder: 7 @@ -721,6 +729,7 @@ MeshRenderer: m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 @@ -788,6 +797,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 6.6, y: 1, z: 14.8} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1399813752} m_RootOrder: 9 @@ -817,6 +827,7 @@ MeshRenderer: m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 @@ -884,6 +895,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 654478919} m_RootOrder: 0 @@ -969,6 +981,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 1605499775} m_Father: {fileID: 1692449912} @@ -1056,6 +1069,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: -4.8, y: 1, z: 22.6} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1399813752} m_RootOrder: 8 @@ -1085,6 +1099,7 @@ MeshRenderer: m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 @@ -1151,6 +1166,7 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 1754655966} - {fileID: 1026607559} @@ -1291,9 +1307,11 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 0, y: 0, z: 0} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 448649994} - {fileID: 538622257} + - {fileID: 2040023228} - {fileID: 315685724} - {fileID: 1860463871} m_Father: {fileID: 0} @@ -1333,6 +1351,7 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 920939471} m_RootOrder: 1 @@ -1422,6 +1441,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 63591093} m_RootOrder: 0 @@ -1501,6 +1521,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1026607559} m_RootOrder: 0 @@ -1581,6 +1602,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 9.9, y: 1, z: -3.96} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1399813752} m_RootOrder: 4 @@ -1610,6 +1632,7 @@ MeshRenderer: m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 @@ -1677,6 +1700,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 1, z: 6} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1399813752} m_RootOrder: 2 @@ -1706,6 +1730,7 @@ MeshRenderer: m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 @@ -1834,6 +1859,7 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 0, y: 0, z: 0} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 1119794481} - {fileID: 733714573} @@ -1889,6 +1915,7 @@ MeshRenderer: m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 @@ -1937,6 +1964,7 @@ Transform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 5, y: 5, z: 5} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1399813752} m_RootOrder: 0 @@ -1969,6 +1997,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 2000635122} m_RootOrder: 0 @@ -2047,6 +2076,7 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 781960242} - {fileID: 63591093} @@ -2112,6 +2142,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 2000635122} - {fileID: 1692449912} @@ -2191,6 +2222,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: -10.35, y: 1, z: 2.93} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1399813752} m_RootOrder: 6 @@ -2220,6 +2252,7 @@ MeshRenderer: m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 @@ -2287,6 +2320,7 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 920939471} m_RootOrder: 0 @@ -2377,6 +2411,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: -15.07, y: 1, z: 14.82} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1399813752} m_RootOrder: 3 @@ -2406,6 +2441,7 @@ MeshRenderer: m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 @@ -2471,6 +2507,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 100730362} m_Father: {fileID: 2000635122} @@ -2555,6 +2592,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 946122373} - {fileID: 1746794881} @@ -2660,6 +2698,7 @@ Transform: m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} m_LocalPosition: {x: 0, y: 3, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} m_RootOrder: 1 @@ -2692,6 +2731,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1754655966} m_RootOrder: 0 @@ -2771,6 +2811,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 37101122} m_Father: {fileID: 476440527} @@ -2847,6 +2888,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1692449912} m_RootOrder: 0 @@ -2927,6 +2969,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 18.5, y: 1, z: -8} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1399813752} m_RootOrder: 10 @@ -2956,6 +2999,7 @@ MeshRenderer: m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 @@ -3021,6 +3065,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 1613635578} - {fileID: 476440527} @@ -3086,6 +3131,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 63591093} m_RootOrder: 1 @@ -3166,6 +3212,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 5.8, y: 1, z: 7.94} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1399813752} m_RootOrder: 1 @@ -3195,6 +3242,7 @@ MeshRenderer: m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 @@ -3260,6 +3308,7 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 1555715717} - {fileID: 1042564462} @@ -3324,9 +3373,10 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 654478919} - m_RootOrder: 3 + m_RootOrder: 4 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} @@ -3405,6 +3455,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: -12.93, y: 1, z: -8.69} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1399813752} m_RootOrder: 11 @@ -3434,6 +3485,7 @@ MeshRenderer: m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 @@ -3529,6 +3581,7 @@ MonoBehaviour: type: 3} m_DeselectOnBackgroundClick: 1 m_PointerBehavior: 0 + m_CursorLockBehavior: 0 --- !u!114 &1953768082 MonoBehaviour: m_ObjectHideFlags: 0 @@ -3554,6 +3607,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} m_RootOrder: 3 @@ -3586,6 +3640,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 210182346} m_RootOrder: 0 @@ -3664,6 +3719,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 954491812} - {fileID: 1395191184} @@ -3745,6 +3801,7 @@ MonoBehaviour: menuCamera: {fileID: 1860463870} panel: {fileID: 538622256} videoImage: {fileID: 448649996} + statsUI: {fileID: 2040023229} --- !u!114 &2000677260 MonoBehaviour: m_ObjectHideFlags: 0 @@ -3778,6 +3835,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} m_RootOrder: 0 @@ -3819,6 +3877,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: -6.2, y: 1, z: -12.7} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1399813752} m_RootOrder: 5 @@ -3848,6 +3907,7 @@ MeshRenderer: m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 @@ -3886,6 +3946,258 @@ MeshFilter: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2020699379} m_Mesh: {fileID: 10206, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1001 &2040023227 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 654478919} + m_Modifications: + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_Pivot.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_Pivot.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_RootOrder + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_SizeDelta.x + value: 100 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_SizeDelta.y + value: 100 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 685544287360755057, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 685544287360755057, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 685544287360755057, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1482305760229870820, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_SizeDelta.x + value: 600 + objectReference: {fileID: 0} + - target: {fileID: 1482305760229870820, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_SizeDelta.y + value: 700 + objectReference: {fileID: 0} + - target: {fileID: 1508457991030496397, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4584148620787798253, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_Name + value: StatsUI + objectReference: {fileID: 0} + - target: {fileID: 4584148620787798253, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 5861133140963408233, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5861133140963408233, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5889328126953563681, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5889328126953563681, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5889328126953563681, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_SizeDelta.x + value: 563 + objectReference: {fileID: 0} + - target: {fileID: 5889328126953563681, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 291.5 + objectReference: {fileID: 0} + - target: {fileID: 5889328126953563681, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8197558794462998189, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8197558794462998189, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8277204699089381438, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8277204699089381438, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8277204699089381438, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8277204699089381438, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9208257010345579798, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9208257010345579798, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9208257010345579798, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 562feaa3a43a01841a00c6ac89b133fb, type: 3} +--- !u!224 &2040023228 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + m_PrefabInstance: {fileID: 2040023227} + m_PrefabAsset: {fileID: 0} +--- !u!114 &2040023229 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 4184539458356606944, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + m_PrefabInstance: {fileID: 2040023227} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 511209fecc3947f7acbafd29efca3ac6, type: 3} + m_Name: + m_EditorClassIdentifier: --- !u!1 &2106922823 GameObject: m_ObjectHideFlags: 0 @@ -3914,6 +4226,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 100730362} m_RootOrder: 0 diff --git a/com.unity.renderstreaming/Samples~/Example/Multiplay/MultiplaySample.cs b/com.unity.renderstreaming/Samples~/Example/Multiplay/MultiplaySample.cs index 7c154e9c2..d9c5d839e 100644 --- a/com.unity.renderstreaming/Samples~/Example/Multiplay/MultiplaySample.cs +++ b/com.unity.renderstreaming/Samples~/Example/Multiplay/MultiplaySample.cs @@ -18,6 +18,7 @@ class MultiplaySample : MonoBehaviour [SerializeField] GameObject menuCamera; [SerializeField] GameObject panel; [SerializeField] RawImage videoImage; + [SerializeField] ShowStatsUI statsUI; enum Role { @@ -68,6 +69,7 @@ void SetUpHost(string username) var instance = GameObject.Instantiate(prefabHost); var handler = instance.GetComponent(); + handler.SetStatsUI(statsUI); // host player var hostPlayer = GameObject.Instantiate(prefabPlayer); @@ -99,6 +101,7 @@ IEnumerator SetUpGuest(string username, string connectionId) channel.OnStartedChannel += _ => { StartCoroutine(ChangeLabel(channel, username)); }; receiveVideoViewer.SetCodec(RenderStreamingSettings.ReceiverVideoCodec); + statsUI.AddReceiverBase(receiveVideoViewer); // todo(kazuki): yield return new WaitForSeconds(1f); diff --git a/com.unity.renderstreaming/Samples~/Example/Receiver/Receiver.unity b/com.unity.renderstreaming/Samples~/Example/Receiver/Receiver.unity index 74a24b9ea..bfc7a9d79 100644 --- a/com.unity.renderstreaming/Samples~/Example/Receiver/Receiver.unity +++ b/com.unity.renderstreaming/Samples~/Example/Receiver/Receiver.unity @@ -143,7 +143,7 @@ PrefabInstance: - target: {fileID: 4037113455314838168, guid: 7aa5bec5b1e406445af144843fe4d62c, type: 3} propertyPath: m_RootOrder - value: 2 + value: 3 objectReference: {fileID: 0} - target: {fileID: 4037113455314838168, guid: 7aa5bec5b1e406445af144843fe4d62c, type: 3} @@ -277,6 +277,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 1497684901} m_Father: {fileID: 1537721409} @@ -459,9 +460,11 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 0, y: 0, z: 0} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 1221357425} - {fileID: 1537721409} + - {fileID: 1510994870} - {fileID: 50660491} m_Father: {fileID: 0} m_RootOrder: 2 @@ -499,6 +502,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 662432478} m_RootOrder: 0 @@ -579,6 +583,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 576362884} m_Father: {fileID: 1537721409} @@ -750,6 +755,7 @@ Transform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 1, z: -10} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} m_RootOrder: 0 @@ -783,6 +789,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 1121022088} - {fileID: 1809130295} @@ -845,7 +852,10 @@ MonoBehaviour: m_HideMobileInput: 0 m_CharacterValidation: 0 m_CharacterLimit: 0 - m_OnEndEdit: + m_OnSubmit: + m_PersistentCalls: + m_Calls: [] + m_OnDidEndEdit: m_PersistentCalls: m_Calls: [] m_OnValueChanged: @@ -925,6 +935,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 935674849} m_RootOrder: 0 @@ -1002,6 +1013,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 1363584100} - {fileID: 1829034365312341185} @@ -1070,6 +1082,7 @@ MonoBehaviour: type: 3} m_DeselectOnBackgroundClick: 1 m_PointerBehavior: 0 + m_CursorLockBehavior: 0 --- !u!114 &1334313019 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1095,6 +1108,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} m_RootOrder: 3 @@ -1128,6 +1142,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1221357425} m_RootOrder: 0 @@ -1214,6 +1229,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 159113883} m_RootOrder: 0 @@ -1265,6 +1281,246 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1497684900} m_CullTransparentMesh: 0 +--- !u!1001 &1510994869 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 528948626} + m_Modifications: + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_Pivot.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_Pivot.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_RootOrder + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_SizeDelta.x + value: 100 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_SizeDelta.y + value: 100 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchoredPosition.y + value: -50 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 685544287360755057, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 685544287360755057, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 685544287360755057, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMin.y + value: 0.314 + objectReference: {fileID: 0} + - target: {fileID: 1482305760229870820, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_SizeDelta.y + value: 360 + objectReference: {fileID: 0} + - target: {fileID: 1508457991030496397, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4184539458356606944, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: receiverBaseList.Array.size + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 4184539458356606944, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: receiverBaseList.Array.data[0] + value: + objectReference: {fileID: 1915034401} + - target: {fileID: 4184539458356606944, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: receiverBaseList.Array.data[1] + value: + objectReference: {fileID: 1915034407} + - target: {fileID: 4584148620787798253, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_Name + value: StatsUI + objectReference: {fileID: 0} + - target: {fileID: 5861133140963408233, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5861133140963408233, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5889328126953563681, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5889328126953563681, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5889328126953563681, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5889328126953563681, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5889328126953563681, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8197558794462998189, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8197558794462998189, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8277204699089381438, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8277204699089381438, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8277204699089381438, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8277204699089381438, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9208257010345579798, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9208257010345579798, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 562feaa3a43a01841a00c6ac89b133fb, type: 3} +--- !u!224 &1510994870 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + m_PrefabInstance: {fileID: 1510994869} + m_PrefabAsset: {fileID: 0} --- !u!1 &1537721408 GameObject: m_ObjectHideFlags: 0 @@ -1292,6 +1548,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 935674849} - {fileID: 662432478} @@ -1358,6 +1615,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 935674849} m_RootOrder: 1 @@ -1478,6 +1736,7 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} m_RootOrder: 1 @@ -1560,6 +1819,7 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 5036778817534049989} m_Father: {fileID: 1221357425} @@ -1634,6 +1894,7 @@ LineRenderer: m_CastShadows: 0 m_ReceiveShadows: 0 m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 m_MotionVectors: 0 m_LightProbeUsage: 0 m_ReflectionProbeUsage: 0 @@ -1739,6 +2000,7 @@ RectTransform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1829034365312341185} m_RootOrder: 0 diff --git a/com.unity.renderstreaming/Samples~/Example/RenderPipeline/HDRP.unity b/com.unity.renderstreaming/Samples~/Example/RenderPipeline/HDRP.unity index cecc0cb97..25f4edfe8 100644 --- a/com.unity.renderstreaming/Samples~/Example/RenderPipeline/HDRP.unity +++ b/com.unity.renderstreaming/Samples~/Example/RenderPipeline/HDRP.unity @@ -153,6 +153,7 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 486043064} m_RootOrder: 0 @@ -236,6 +237,7 @@ MonoBehaviour: m_EditorClassIdentifier: m_MoveRepeatDelay: 0.5 m_MoveRepeatRate: 0.1 + m_XRTrackingOrigin: {fileID: 0} m_ActionsAsset: {fileID: -944628639613478452, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3} m_PointAction: {fileID: 1054132383583890850, guid: ca9f5fa95ffab41fb9a615ab714db018, @@ -260,6 +262,7 @@ MonoBehaviour: type: 3} m_DeselectOnBackgroundClick: 1 m_PointerBehavior: 0 + m_CursorLockBehavior: 0 --- !u!114 &279570609 MonoBehaviour: m_ObjectHideFlags: 0 @@ -285,6 +288,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} m_RootOrder: 6 @@ -309,7 +313,7 @@ PrefabInstance: - target: {fileID: 4037113455314838168, guid: 7aa5bec5b1e406445af144843fe4d62c, type: 3} propertyPath: m_RootOrder - value: 2 + value: 3 objectReference: {fileID: 0} - target: {fileID: 4037113455314838168, guid: 7aa5bec5b1e406445af144843fe4d62c, type: 3} @@ -443,6 +447,7 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 195256504} m_Father: {fileID: 970442468} @@ -547,6 +552,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 1, z: 2} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} m_RootOrder: 4 @@ -595,6 +601,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 1, z: 2} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} m_RootOrder: 3 @@ -690,9 +697,11 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 0, y: 0, z: 0} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 486043064} - {fileID: 2080445450} + - {fileID: 1817378668} - {fileID: 365901950} m_Father: {fileID: 0} m_RootOrder: 9 @@ -782,7 +791,6 @@ MonoBehaviour: - stun:stun.l.google.com:19302 username: interval: 5 - hardwareEncoderSupport: 0 handlers: - {fileID: 1131364784} runOnAwake: 0 @@ -796,6 +804,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: -10.119711, y: -5.336665, z: -13.136775} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} m_RootOrder: 0 @@ -873,6 +882,7 @@ MeshRenderer: m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 @@ -921,6 +931,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0.8, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} m_RootOrder: 7 @@ -1075,6 +1086,10 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: streamingSize: {x: 1280, y: 720} + m_frameRate: 30 + m_minBitrate: 1000 + m_maxBitrate: 1000 + m_scaleFactor: 1 depth: 16 antiAliasing: 1 --- !u!81 &1299133683 @@ -1138,6 +1153,7 @@ Transform: m_LocalRotation: {x: -0.022962164, y: 0.97605896, z: -0.17339188, w: -0.12929425} m_LocalPosition: {x: 2.454, y: 1.436, z: 2.861} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} m_RootOrder: 1 @@ -1154,6 +1170,8 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 28e4557ba7cb056499034647b21b6361, type: 3} m_Name: m_EditorClassIdentifier: + m_minBitrate: 1000 + m_maxBitrate: 1000 --- !u!114 &1299133687 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1290,6 +1308,131 @@ MonoBehaviour: m_ActionId: e773b1f9-ce5b-4fa2-9c1f-d194202c43b7 m_ActionName: Menu Controls/TogglePause[/Keyboard/p] m_DefaultActionMap: Player Controls +--- !u!1001 &1817378667 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 970442468} + m_Modifications: + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_Pivot.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_Pivot.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_RootOrder + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_SizeDelta.x + value: 100 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_SizeDelta.y + value: 100 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4584148620787798253, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_Name + value: StatsUI + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 562feaa3a43a01841a00c6ac89b133fb, type: 3} +--- !u!224 &1817378668 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + m_PrefabInstance: {fileID: 1817378667} + m_PrefabAsset: {fileID: 0} --- !u!1 &2011204166 GameObject: m_ObjectHideFlags: 0 @@ -1334,6 +1477,7 @@ Transform: m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} m_RootOrder: 5 @@ -1428,6 +1572,7 @@ Transform: m_LocalRotation: {x: 0.7064338, y: 0.47771442, z: 0.030843567, w: 0.5213338} m_LocalPosition: {x: -3.18, y: 3, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} m_RootOrder: 2 @@ -1598,6 +1743,7 @@ MeshRenderer: m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 @@ -1646,6 +1792,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} m_RootOrder: 8 @@ -1678,6 +1825,7 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 970442468} m_RootOrder: 1 diff --git a/com.unity.renderstreaming/Samples~/Example/RenderPipeline/URP.unity b/com.unity.renderstreaming/Samples~/Example/RenderPipeline/URP.unity index dc72b137e..ce4ed44a5 100644 --- a/com.unity.renderstreaming/Samples~/Example/RenderPipeline/URP.unity +++ b/com.unity.renderstreaming/Samples~/Example/RenderPipeline/URP.unity @@ -214,6 +214,7 @@ Transform: m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} m_LocalPosition: {x: 0, y: 3, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} m_RootOrder: 2 @@ -264,6 +265,7 @@ Transform: m_LocalRotation: {x: -0.02296006, y: 0.9760592, z: -0.17338917, w: -0.12929617} m_LocalPosition: {x: 2.454, y: 1.436, z: 2.861} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} m_RootOrder: 1 @@ -407,6 +409,8 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 28e4557ba7cb056499034647b21b6361, type: 3} m_Name: m_EditorClassIdentifier: + m_minBitrate: 1000 + m_maxBitrate: 1000 --- !u!114 &725451157 MonoBehaviour: m_ObjectHideFlags: 0 @@ -513,6 +517,10 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: streamingSize: {x: 1280, y: 720} + m_frameRate: 30 + m_minBitrate: 1000 + m_maxBitrate: 1000 + m_scaleFactor: 1 depth: 16 antiAliasing: 1 --- !u!1001 &760607467 @@ -535,7 +543,7 @@ PrefabInstance: - target: {fileID: 4037113455314838168, guid: 7aa5bec5b1e406445af144843fe4d62c, type: 3} propertyPath: m_RootOrder - value: 2 + value: 3 objectReference: {fileID: 0} - target: {fileID: 4037113455314838168, guid: 7aa5bec5b1e406445af144843fe4d62c, type: 3} @@ -672,6 +680,7 @@ MonoBehaviour: m_EditorClassIdentifier: m_MoveRepeatDelay: 0.5 m_MoveRepeatRate: 0.1 + m_XRTrackingOrigin: {fileID: 0} m_ActionsAsset: {fileID: -944628639613478452, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3} m_PointAction: {fileID: 1054132383583890850, guid: ca9f5fa95ffab41fb9a615ab714db018, @@ -696,6 +705,7 @@ MonoBehaviour: type: 3} m_DeselectOnBackgroundClick: 1 m_PointerBehavior: 0 + m_CursorLockBehavior: 0 --- !u!114 &783215603 MonoBehaviour: m_ObjectHideFlags: 0 @@ -721,6 +731,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} m_RootOrder: 5 @@ -754,6 +765,7 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 925721385} m_Father: {fileID: 1215389823} @@ -842,6 +854,7 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 920982462} m_RootOrder: 0 @@ -936,6 +949,7 @@ MeshRenderer: m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 @@ -984,6 +998,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0.8, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} m_RootOrder: 4 @@ -1079,9 +1094,11 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 0, y: 0, z: 0} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 920982462} - {fileID: 1287993067} + - {fileID: 1997344391} - {fileID: 760607468} m_Father: {fileID: 0} m_RootOrder: 6 @@ -1159,6 +1176,7 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1215389823} m_RootOrder: 1 @@ -1246,7 +1264,6 @@ MonoBehaviour: - stun:stun.l.google.com:19302 username: interval: 5 - hardwareEncoderSupport: 0 handlers: - {fileID: 1623734776} runOnAwake: 0 @@ -1260,6 +1277,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} m_RootOrder: 0 @@ -1294,6 +1312,131 @@ MonoBehaviour: m_EditorClassIdentifier: renderStreaming: {fileID: 1623734774} videoStreamSender: {fileID: 725451158} +--- !u!1001 &1997344390 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1215389823} + m_Modifications: + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_Pivot.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_Pivot.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_RootOrder + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_SizeDelta.x + value: 100 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_SizeDelta.y + value: 100 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4584148620787798253, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_Name + value: StatsUI + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 562feaa3a43a01841a00c6ac89b133fb, type: 3} +--- !u!224 &1997344391 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + m_PrefabInstance: {fileID: 1997344390} + m_PrefabAsset: {fileID: 0} --- !u!1 &2130134330 GameObject: m_ObjectHideFlags: 0 @@ -1338,6 +1481,7 @@ MeshRenderer: m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 @@ -1386,6 +1530,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} m_RootOrder: 3 diff --git a/com.unity.renderstreaming/Samples~/Example/Unity.RenderStreaming.Samples.asmdef b/com.unity.renderstreaming/Samples~/Example/Unity.RenderStreaming.Samples.asmdef index 281e3ba86..c3fde343d 100644 --- a/com.unity.renderstreaming/Samples~/Example/Unity.RenderStreaming.Samples.asmdef +++ b/com.unity.renderstreaming/Samples~/Example/Unity.RenderStreaming.Samples.asmdef @@ -5,7 +5,8 @@ "Unity.InputSystem", "Unity.XR.ARFoundation", "Unity.XR.ARSubsystems", - "Unity.RenderStreaming.Runtime" + "Unity.RenderStreaming.Runtime", + "Unity.RenderStreaming.Sample.Stats" ], "includePlatforms": [], "excludePlatforms": [], From cb193382886dd846b380feb5c83c68c375b834f9 Mon Sep 17 00:00:00 2001 From: Takashi KANNAN Date: Thu, 25 Aug 2022 09:51:09 +0900 Subject: [PATCH 06/21] assign component --- .../Example/ARFoundation/ARFoundation.unity | 15 ++++++++++++ .../Samples~/Example/Gyro/Gyro.unity | 15 ++++++++++++ .../Example/RenderPipeline/HDRP.unity | 23 +++++++++++++++++++ .../Samples~/Example/RenderPipeline/URP.unity | 23 +++++++++++++++++++ 4 files changed, 76 insertions(+) diff --git a/com.unity.renderstreaming/Samples~/Example/ARFoundation/ARFoundation.unity b/com.unity.renderstreaming/Samples~/Example/ARFoundation/ARFoundation.unity index 6b4f2cdc0..28d839d38 100644 --- a/com.unity.renderstreaming/Samples~/Example/ARFoundation/ARFoundation.unity +++ b/com.unity.renderstreaming/Samples~/Example/ARFoundation/ARFoundation.unity @@ -1345,6 +1345,21 @@ PrefabInstance: propertyPath: m_IsActive value: 0 objectReference: {fileID: 0} + - target: {fileID: 4184539458356606944, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: senderBaseList.Array.size + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4184539458356606944, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: receiverBaseList.Array.size + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4184539458356606944, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: receiverBaseList.Array.data[0] + value: + objectReference: {fileID: 1915034401} - target: {fileID: 4584148620787798253, guid: 562feaa3a43a01841a00c6ac89b133fb, type: 3} propertyPath: m_Name diff --git a/com.unity.renderstreaming/Samples~/Example/Gyro/Gyro.unity b/com.unity.renderstreaming/Samples~/Example/Gyro/Gyro.unity index 4d822a21c..478b06d74 100644 --- a/com.unity.renderstreaming/Samples~/Example/Gyro/Gyro.unity +++ b/com.unity.renderstreaming/Samples~/Example/Gyro/Gyro.unity @@ -1843,6 +1843,21 @@ PrefabInstance: propertyPath: m_IsActive value: 0 objectReference: {fileID: 0} + - target: {fileID: 4184539458356606944, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: senderBaseList.Array.size + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4184539458356606944, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: receiverBaseList.Array.size + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4184539458356606944, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: receiverBaseList.Array.data[0] + value: + objectReference: {fileID: 1915034401} - target: {fileID: 4584148620787798253, guid: 562feaa3a43a01841a00c6ac89b133fb, type: 3} propertyPath: m_Name diff --git a/com.unity.renderstreaming/Samples~/Example/RenderPipeline/HDRP.unity b/com.unity.renderstreaming/Samples~/Example/RenderPipeline/HDRP.unity index 25f4edfe8..1c3146d4e 100644 --- a/com.unity.renderstreaming/Samples~/Example/RenderPipeline/HDRP.unity +++ b/com.unity.renderstreaming/Samples~/Example/RenderPipeline/HDRP.unity @@ -1307,6 +1307,14 @@ MonoBehaviour: m_Calls: [] m_ActionId: e773b1f9-ce5b-4fa2-9c1f-d194202c43b7 m_ActionName: Menu Controls/TogglePause[/Keyboard/p] + - m_PersistentCalls: + m_Calls: [] + m_ActionId: 524fee92-4ef1-4fd9-9cb1-97fb72ae1195 + m_ActionName: Player Controls/Rotate + - m_PersistentCalls: + m_Calls: [] + m_ActionId: 50305201-a606-4afe-954c-0666ccaf6c53 + m_ActionName: Player Controls/Position m_DefaultActionMap: Player Controls --- !u!1001 &1817378667 PrefabInstance: @@ -1420,6 +1428,21 @@ PrefabInstance: propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} + - target: {fileID: 4184539458356606944, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: senderBaseList.Array.size + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 4184539458356606944, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: senderBaseList.Array.data[0] + value: + objectReference: {fileID: 1299133682} + - target: {fileID: 4184539458356606944, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: senderBaseList.Array.data[1] + value: + objectReference: {fileID: 1299133686} - target: {fileID: 4584148620787798253, guid: 562feaa3a43a01841a00c6ac89b133fb, type: 3} propertyPath: m_Name diff --git a/com.unity.renderstreaming/Samples~/Example/RenderPipeline/URP.unity b/com.unity.renderstreaming/Samples~/Example/RenderPipeline/URP.unity index ce4ed44a5..392cfff12 100644 --- a/com.unity.renderstreaming/Samples~/Example/RenderPipeline/URP.unity +++ b/com.unity.renderstreaming/Samples~/Example/RenderPipeline/URP.unity @@ -503,6 +503,14 @@ MonoBehaviour: m_Calls: [] m_ActionId: e773b1f9-ce5b-4fa2-9c1f-d194202c43b7 m_ActionName: Menu Controls/TogglePause[/Keyboard/p] + - m_PersistentCalls: + m_Calls: [] + m_ActionId: 524fee92-4ef1-4fd9-9cb1-97fb72ae1195 + m_ActionName: Player Controls/Rotate + - m_PersistentCalls: + m_Calls: [] + m_ActionId: 50305201-a606-4afe-954c-0666ccaf6c53 + m_ActionName: Player Controls/Position m_DefaultActionMap: Player Controls --- !u!114 &725451158 MonoBehaviour: @@ -1424,6 +1432,21 @@ PrefabInstance: propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} + - target: {fileID: 4184539458356606944, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: senderBaseList.Array.size + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 4184539458356606944, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: senderBaseList.Array.data[0] + value: + objectReference: {fileID: 725451158} + - target: {fileID: 4184539458356606944, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: senderBaseList.Array.data[1] + value: + objectReference: {fileID: 725451155} - target: {fileID: 4584148620787798253, guid: 562feaa3a43a01841a00c6ac89b133fb, type: 3} propertyPath: m_Name From 45e3b043614aa2678c3555bffcc06247d73fd6fa Mon Sep 17 00:00:00 2001 From: Takashi KANNAN Date: Thu, 25 Aug 2022 10:52:22 +0900 Subject: [PATCH 07/21] remove stats when stop stream --- .../Samples~/Example/Multiplay/Multiplay.cs | 2 +- .../Samples~/Example/Stats/ShowStatsUI.cs | 111 +++++++++++++++--- 2 files changed, 96 insertions(+), 17 deletions(-) diff --git a/com.unity.renderstreaming/Samples~/Example/Multiplay/Multiplay.cs b/com.unity.renderstreaming/Samples~/Example/Multiplay/Multiplay.cs index 7682d85b2..dce46a061 100644 --- a/com.unity.renderstreaming/Samples~/Example/Multiplay/Multiplay.cs +++ b/com.unity.renderstreaming/Samples~/Example/Multiplay/Multiplay.cs @@ -77,7 +77,7 @@ public void OnOffer(SignalingEventData data) if (sender is StreamSenderBase senderBase) { - statsUI.AddSenderBase(senderBase); + statsUI?.AddSenderBase(senderBase); } var inputChannel = newObj.GetComponentInChildren(); diff --git a/com.unity.renderstreaming/Samples~/Example/Stats/ShowStatsUI.cs b/com.unity.renderstreaming/Samples~/Example/Stats/ShowStatsUI.cs index 7c3f274c9..b9ccf3828 100644 --- a/com.unity.renderstreaming/Samples~/Example/Stats/ShowStatsUI.cs +++ b/com.unity.renderstreaming/Samples~/Example/Stats/ShowStatsUI.cs @@ -14,20 +14,94 @@ public class ShowStatsUI : MonoBehaviour [SerializeField] private GameObject scrollView; [SerializeField] private RectTransform displayParent; [SerializeField] private Text baseText; - [SerializeField] private List senderBaseList; [SerializeField] private List receiverBaseList; + private Dictionary> activeSenderList = + new Dictionary>(); + private Dictionary> activeReceiverList = + new Dictionary>(); + private Dictionary lastSenderStats = + new Dictionary(); + private Dictionary lastReceiverStats = + new Dictionary(); + private void Awake() { toggle.onValueChanged.AddListener(SwitchToggle); + + foreach (var senderBase in senderBaseList) + { + SetUpSenderBase(senderBase); + } + + foreach (var receiverBase in receiverBaseList) + { + SetUpReceiverBase(receiverBase); + } } + private void SwitchToggle(bool isOn) { scrollView.SetActive(isOn); } + private void SetUpSenderBase(StreamSenderBase senderBase) + { + senderBase.OnStartedStream += id => + { + if (senderBase.Transceivers.TryGetValue(id, out var transceiver)) + { + if (!activeSenderList.ContainsKey(id)) + { + activeSenderList[id] = new HashSet(); + } + + activeSenderList[id].Add(transceiver.Sender); + } + }; + senderBase.OnStoppedStream += id => + { + if (activeSenderList.TryGetValue(id, out var hashSet)) + { + foreach (var sender in hashSet) + { + DestroyImmediate(lastSenderStats[sender].display.gameObject); + lastSenderStats.Remove(sender); + } + } + + activeSenderList.Remove(id); + }; + } + + private void SetUpReceiverBase(StreamReceiverBase receiverBase) + { + receiverBase.OnStartedStream += id => + { + if (!activeReceiverList.ContainsKey(id)) + { + activeReceiverList[id] = new HashSet(); + } + + activeReceiverList[id].Add(receiverBase.Transceiver.Receiver); + }; + receiverBase.OnStoppedStream += id => + { + if (activeReceiverList.TryGetValue(id, out var hashSet)) + { + foreach (var receiver in hashSet) + { + DestroyImmediate(lastReceiverStats[receiver].display.gameObject); + lastReceiverStats.Remove(receiver); + } + } + + activeReceiverList.Remove(id); + }; + } + private void Start() { StartCoroutine(CollectStats()); @@ -37,11 +111,10 @@ private void OnDestroy() { lastSenderStats.Clear(); lastReceiverStats.Clear(); + activeSenderList.Clear(); + activeReceiverList.Clear(); } - private Dictionary lastSenderStats = new Dictionary(); - private Dictionary lastReceiverStats = new Dictionary(); - class StatsDisplay { public Text display; @@ -56,10 +129,9 @@ private IEnumerator CollectStats() { yield return waitSec; - foreach (var transceiver in senderBaseList.SelectMany(x => x.Transceivers.Values) - .Where(x => x != null && x.Sender != null)) + foreach (var sender in activeSenderList.Values.SelectMany(x => x)) { - var op = transceiver.Sender.GetStats(); + var op = sender.GetStats(); yield return op; if (op.IsError) { @@ -67,7 +139,7 @@ private IEnumerator CollectStats() } var report = op.Value; - if (lastSenderStats.TryGetValue(transceiver.Sender, out var statsDisplay)) + if (lastSenderStats.TryGetValue(sender, out var statsDisplay)) { var displayString = CreateDisplayString(report, statsDisplay.lastReport); statsDisplay.display.text = displayString; @@ -78,14 +150,13 @@ private IEnumerator CollectStats() var text = Instantiate(baseText, displayParent); text.text = ""; text.gameObject.SetActive(true); - lastSenderStats[transceiver.Sender] = new StatsDisplay {display = text, lastReport = report}; + lastSenderStats[sender] = new StatsDisplay {display = text, lastReport = report}; } } - foreach (var transceiver in receiverBaseList.Select(x => x.Transceiver) - .Where(x => x != null && x.Receiver != null)) + foreach (var receiver in activeReceiverList.Values.SelectMany(x => x)) { - var op = transceiver.Receiver.GetStats(); + var op = receiver.GetStats(); yield return op; if (op.IsError) @@ -94,7 +165,7 @@ private IEnumerator CollectStats() } var report = op.Value; - if (lastReceiverStats.TryGetValue(transceiver.Receiver, out var statsDisplay)) + if (lastReceiverStats.TryGetValue(receiver, out var statsDisplay)) { var displayString = CreateDisplayString(report, statsDisplay.lastReport); statsDisplay.display.text = displayString; @@ -105,7 +176,7 @@ private IEnumerator CollectStats() var text = Instantiate(baseText, displayParent); text.text = ""; text.gameObject.SetActive(true); - lastReceiverStats[transceiver.Receiver] = new StatsDisplay {display = text, lastReport = report}; + lastReceiverStats[receiver] = new StatsDisplay {display = text, lastReport = report}; } } @@ -117,6 +188,10 @@ private IEnumerator CollectStats() size.y = baseText.GetComponent().sizeDelta.y * (displayParent.childCount - 1) + 100; displayParent.sizeDelta = size; } + else + { + baseText.gameObject.SetActive(true); + } } } @@ -142,7 +217,8 @@ private static string CreateDisplayString(RTCStatsReport report, RTCStatsReport builder.AppendLine($"Framerate: {inboundStats.framesPerSecond}"); } - if (lastReport.TryGetValue(inboundStats.Id, out var lastStats) && lastStats is RTCInboundRTPStreamStats lastInboundStats) + if (lastReport.TryGetValue(inboundStats.Id, out var lastStats) && + lastStats is RTCInboundRTPStreamStats lastInboundStats) { var duration = (double)(inboundStats.Timestamp - lastInboundStats.Timestamp) / 1000000; var bitrate = (ulong)(8 * (inboundStats.bytesReceived - lastInboundStats.bytesReceived) / duration); @@ -165,7 +241,8 @@ private static string CreateDisplayString(RTCStatsReport report, RTCStatsReport builder.AppendLine($"Framerate: {outboundStats.framesPerSecond}"); } - if (lastReport.TryGetValue(outboundStats.Id, out var lastStats) && lastStats is RTCOutboundRTPStreamStats lastOutboundStats) + if (lastReport.TryGetValue(outboundStats.Id, out var lastStats) && + lastStats is RTCOutboundRTPStreamStats lastOutboundStats) { var duration = (double)(outboundStats.Timestamp - lastOutboundStats.Timestamp) / 1000000; var bitrate = (ulong)(8 * (outboundStats.bytesSent - lastOutboundStats.bytesSent) / duration); @@ -185,6 +262,7 @@ public void AddSenderBase(StreamSenderBase sender) } senderBaseList.Add(sender); + SetUpSenderBase(sender); } public void AddReceiverBase(StreamReceiverBase receiver) @@ -195,6 +273,7 @@ public void AddReceiverBase(StreamReceiverBase receiver) } receiverBaseList.Add(receiver); + SetUpReceiverBase(receiver); } } } From b75f8792d95c262ebeb046e84e86a1d6fe0d7b45 Mon Sep 17 00:00:00 2001 From: Takashi KANNAN Date: Thu, 25 Aug 2022 14:01:05 +0900 Subject: [PATCH 08/21] add more codec info --- .../Samples~/Example/Stats/ShowStatsUI.cs | 73 +++++++++++++------ .../Samples~/Example/Stats/StatsUI.prefab | 54 +++++++++++--- 2 files changed, 91 insertions(+), 36 deletions(-) diff --git a/com.unity.renderstreaming/Samples~/Example/Stats/ShowStatsUI.cs b/com.unity.renderstreaming/Samples~/Example/Stats/ShowStatsUI.cs index b9ccf3828..feda65341 100644 --- a/com.unity.renderstreaming/Samples~/Example/Stats/ShowStatsUI.cs +++ b/com.unity.renderstreaming/Samples~/Example/Stats/ShowStatsUI.cs @@ -1,3 +1,4 @@ +using System; using System.Collections; using System.Collections.Generic; using System.Linq; @@ -141,8 +142,7 @@ private IEnumerator CollectStats() var report = op.Value; if (lastSenderStats.TryGetValue(sender, out var statsDisplay)) { - var displayString = CreateDisplayString(report, statsDisplay.lastReport); - statsDisplay.display.text = displayString; + statsDisplay.display.text = CreateDisplayString(report, statsDisplay.lastReport); statsDisplay.lastReport = report; } else @@ -167,8 +167,7 @@ private IEnumerator CollectStats() var report = op.Value; if (lastReceiverStats.TryGetValue(receiver, out var statsDisplay)) { - var displayString = CreateDisplayString(report, statsDisplay.lastReport); - statsDisplay.display.text = displayString; + statsDisplay.display.text = CreateDisplayString(report, statsDisplay.lastReport); statsDisplay.lastReport = report; } else @@ -180,18 +179,8 @@ private IEnumerator CollectStats() } } - if (lastSenderStats.Any() || lastReceiverStats.Any()) - { - baseText.gameObject.SetActive(false); - // Correct scroll view contents height - var size = displayParent.sizeDelta; - size.y = baseText.GetComponent().sizeDelta.y * (displayParent.childCount - 1) + 100; - displayParent.sizeDelta = size; - } - else - { - baseText.gameObject.SetActive(true); - } + var noStatsData = !lastSenderStats.Any() && !lastReceiverStats.Any(); + baseText.gameObject.SetActive(noStatsData); } } @@ -203,16 +192,34 @@ private static string CreateDisplayString(RTCStatsReport report, RTCStatsReport { if (stats is RTCInboundRTPStreamStats inboundStats) { - builder.AppendLine(inboundStats.Id); + builder.AppendLine($"{inboundStats.kind} receiving stream stats"); if (inboundStats.codecId != null && report.Get(inboundStats.codecId) is RTCCodecStats codecStats) { - builder.AppendLine( - $"Codec: {codecStats.mimeType} {codecStats.sdpFmtpLine}, payloadType={codecStats.payloadType}."); + builder.AppendLine($"Codec: {codecStats.mimeType}"); + if (!string.IsNullOrEmpty(codecStats.sdpFmtpLine)) + { + foreach (var fmtp in codecStats.sdpFmtpLine.Split(";")) + { + builder.AppendLine($" - {fmtp}"); + } + } + if (codecStats.payloadType > 0) + { + builder.AppendLine($" - {nameof(codecStats.payloadType)}={codecStats.payloadType}"); + } + if (codecStats.clockRate > 0) + { + builder.AppendLine($" - {nameof(codecStats.clockRate)}={codecStats.clockRate}"); + } + if (codecStats.channels > 0) + { + builder.AppendLine($" - {nameof(codecStats.channels)}={codecStats.channels}"); + } } if (inboundStats.kind == "video") { - builder.AppendLine($"Decoder: {inboundStats.decoderImplementation}."); + builder.AppendLine($"Decoder: {inboundStats.decoderImplementation}"); builder.AppendLine($"Resolution: {inboundStats.frameWidth}x{inboundStats.frameHeight}"); builder.AppendLine($"Framerate: {inboundStats.framesPerSecond}"); } @@ -227,16 +234,34 @@ private static string CreateDisplayString(RTCStatsReport report, RTCStatsReport } else if (stats is RTCOutboundRTPStreamStats outboundStats) { - builder.AppendLine(outboundStats.Id); + builder.AppendLine($"{outboundStats.kind} sending stream stats"); if (outboundStats.codecId != null && report.Get(outboundStats.codecId) is RTCCodecStats codecStats) { - builder.AppendLine( - $"Codec: {codecStats.mimeType} {codecStats.sdpFmtpLine}, payloadType={codecStats.payloadType}."); + builder.AppendLine($"Codec: {codecStats.mimeType}"); + if (!string.IsNullOrEmpty(codecStats.sdpFmtpLine)) + { + foreach (var fmtp in codecStats.sdpFmtpLine.Split(";")) + { + builder.AppendLine($" - {fmtp}"); + } + } + if (codecStats.payloadType > 0) + { + builder.AppendLine($" - {nameof(codecStats.payloadType)}={codecStats.payloadType}"); + } + if (codecStats.clockRate > 0) + { + builder.AppendLine($" - {nameof(codecStats.clockRate)}={codecStats.clockRate}"); + } + if (codecStats.channels > 0) + { + builder.AppendLine($" - {nameof(codecStats.channels)}={codecStats.channels}"); + } } if (outboundStats.kind == "video") { - builder.AppendLine($"Encoder: {outboundStats.encoderImplementation}."); + builder.AppendLine($"Encoder: {outboundStats.encoderImplementation}"); builder.AppendLine($"Resolution: {outboundStats.frameWidth}x{outboundStats.frameHeight}"); builder.AppendLine($"Framerate: {outboundStats.framesPerSecond}"); } diff --git a/com.unity.renderstreaming/Samples~/Example/Stats/StatsUI.prefab b/com.unity.renderstreaming/Samples~/Example/Stats/StatsUI.prefab index 11cb46b6f..ac4d12ea7 100644 --- a/com.unity.renderstreaming/Samples~/Example/Stats/StatsUI.prefab +++ b/com.unity.renderstreaming/Samples~/Example/Stats/StatsUI.prefab @@ -207,7 +207,7 @@ RectTransform: m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} m_AnchoredPosition: {x: 10, y: -50} - m_SizeDelta: {x: 400, y: 500} + m_SizeDelta: {x: 400, y: 400} m_Pivot: {x: 0, y: 1} --- !u!222 &6013201563383794849 CanvasRenderer: @@ -661,7 +661,7 @@ RectTransform: m_Father: {fileID: 5274144616684119762} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0.51699996} + m_AnchorMin: {x: 0, y: 0.03399998} m_AnchorMax: {x: 1, y: 1} m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 20, y: 20} @@ -901,8 +901,8 @@ MonoBehaviour: m_TargetGraphic: {fileID: 4937906417891939957} m_HandleRect: {fileID: 685544287360755057} m_Direction: 2 - m_Value: 1 - m_Size: 0.483 + m_Value: 0.9999982 + m_Size: 0.96599996 m_NumberOfSteps: 0 m_OnValueChanged: m_PersistentCalls: @@ -1032,6 +1032,7 @@ GameObject: - component: {fileID: 5889328126953563681} - component: {fileID: 8004698135042394718} - component: {fileID: 42992011562252957} + - component: {fileID: 7943079271586643799} m_Layer: 5 m_Name: SampleText m_TagString: Untagged @@ -1056,8 +1057,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 191.5, y: -85} - m_SizeDelta: {x: 363, y: 150} + m_AnchoredPosition: {x: 191.5, y: -32.5} + m_SizeDelta: {x: 363, y: 45} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &8004698135042394718 CanvasRenderer: @@ -1089,18 +1090,32 @@ MonoBehaviour: m_Calls: [] m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} - m_FontSize: 14 + m_FontSize: 20 m_FontStyle: 0 - m_BestFit: 1 - m_MinSize: 10 + m_BestFit: 0 + m_MinSize: 2 m_MaxSize: 30 - m_Alignment: 0 + m_Alignment: 3 m_AlignByGeometry: 0 - m_RichText: 1 + m_RichText: 0 m_HorizontalOverflow: 0 m_VerticalOverflow: 0 m_LineSpacing: 1 m_Text: "Sender/Receiver is not set or\r Send/Receive stream has not started." +--- !u!114 &7943079271586643799 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8618915730201327177} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3} + m_Name: + m_EditorClassIdentifier: + m_HorizontalFit: 0 + m_VerticalFit: 2 --- !u!1 &8623632702126766865 GameObject: m_ObjectHideFlags: 0 @@ -1148,6 +1163,7 @@ GameObject: m_Component: - component: {fileID: 4441963706037454135} - component: {fileID: 8313023332785058290} + - component: {fileID: 3301276212574633394} m_Layer: 5 m_Name: Content m_TagString: Untagged @@ -1174,7 +1190,7 @@ RectTransform: m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 1, y: 1} m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 500} + m_SizeDelta: {x: 0, y: 400} m_Pivot: {x: 0, y: 1} --- !u!114 &8313023332785058290 MonoBehaviour: @@ -1202,3 +1218,17 @@ MonoBehaviour: m_ChildScaleWidth: 0 m_ChildScaleHeight: 0 m_ReverseArrangement: 0 +--- !u!114 &3301276212574633394 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9025353632180297766} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3} + m_Name: + m_EditorClassIdentifier: + m_HorizontalFit: 0 + m_VerticalFit: 2 From 840338a530f8045360c4ab8d1e61fb15f8db9b45 Mon Sep 17 00:00:00 2001 From: Takashi KANNAN Date: Thu, 25 Aug 2022 14:12:23 +0900 Subject: [PATCH 09/21] change toggle to button --- .../Samples~/Example/Stats/ShowStatsUI.cs | 24 +- .../Samples~/Example/Stats/StatsUI.prefab | 540 ++++++++++-------- 2 files changed, 328 insertions(+), 236 deletions(-) diff --git a/com.unity.renderstreaming/Samples~/Example/Stats/ShowStatsUI.cs b/com.unity.renderstreaming/Samples~/Example/Stats/ShowStatsUI.cs index feda65341..4432d135f 100644 --- a/com.unity.renderstreaming/Samples~/Example/Stats/ShowStatsUI.cs +++ b/com.unity.renderstreaming/Samples~/Example/Stats/ShowStatsUI.cs @@ -1,4 +1,3 @@ -using System; using System.Collections; using System.Collections.Generic; using System.Linq; @@ -11,7 +10,8 @@ namespace Unity.RenderStreaming.Samples { public class ShowStatsUI : MonoBehaviour { - [SerializeField] private Toggle toggle; + [SerializeField] private Button showStatsButton; + [SerializeField] private Button hideStatsButton; [SerializeField] private GameObject scrollView; [SerializeField] private RectTransform displayParent; [SerializeField] private Text baseText; @@ -29,7 +29,19 @@ public class ShowStatsUI : MonoBehaviour private void Awake() { - toggle.onValueChanged.AddListener(SwitchToggle); + showStatsButton.onClick.AddListener(() => + { + scrollView.gameObject.SetActive(true); + hideStatsButton.gameObject.SetActive(true); + showStatsButton.gameObject.SetActive(false); + }); + + hideStatsButton.onClick.AddListener(() => + { + scrollView.gameObject.SetActive(false); + showStatsButton.gameObject.SetActive(true); + hideStatsButton.gameObject.SetActive(false); + }); foreach (var senderBase in senderBaseList) { @@ -42,12 +54,6 @@ private void Awake() } } - - private void SwitchToggle(bool isOn) - { - scrollView.SetActive(isOn); - } - private void SetUpSenderBase(StreamSenderBase senderBase) { senderBase.OnStartedStream += id => diff --git a/com.unity.renderstreaming/Samples~/Example/Stats/StatsUI.prefab b/com.unity.renderstreaming/Samples~/Example/Stats/StatsUI.prefab index ac4d12ea7..bd6f8b028 100644 --- a/com.unity.renderstreaming/Samples~/Example/Stats/StatsUI.prefab +++ b/com.unity.renderstreaming/Samples~/Example/Stats/StatsUI.prefab @@ -1,172 +1,5 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: ---- !u!1 &84690453141449616 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 8853322739930514912} - - component: {fileID: 7292634889300788118} - - component: {fileID: 2718163478282295130} - m_Layer: 5 - m_Name: Label - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &8853322739930514912 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 84690453141449616} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 6985079903909829280} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 17.5, y: -0.5} - m_SizeDelta: {x: -45, y: -3} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!222 &7292634889300788118 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 84690453141449616} - m_CullTransparentMesh: 1 ---- !u!114 &2718163478282295130 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 84690453141449616} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} - m_RaycastTarget: 1 - m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_FontData: - m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} - m_FontSize: 14 - m_FontStyle: 0 - m_BestFit: 1 - m_MinSize: 10 - m_MaxSize: 30 - m_Alignment: 3 - m_AlignByGeometry: 0 - m_RichText: 1 - m_HorizontalOverflow: 0 - m_VerticalOverflow: 0 - m_LineSpacing: 1 - m_Text: ShowStats ---- !u!1 &1275545719089395135 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 6985079903909829280} - - component: {fileID: 922234672837089703} - m_Layer: 5 - m_Name: Toggle - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &6985079903909829280 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1275545719089395135} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 1499291070238798743} - - {fileID: 8853322739930514912} - m_Father: {fileID: 508261314311064870} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 10, y: 0} - m_SizeDelta: {x: 200, y: 50} - m_Pivot: {x: 0, y: 1} ---- !u!114 &922234672837089703 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1275545719089395135} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 9085046f02f69544eb97fd06b6048fe2, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Navigation: - m_Mode: 3 - m_WrapAround: 0 - m_SelectOnUp: {fileID: 0} - m_SelectOnDown: {fileID: 0} - m_SelectOnLeft: {fileID: 0} - m_SelectOnRight: {fileID: 0} - m_Transition: 1 - m_Colors: - m_NormalColor: {r: 1, g: 1, b: 1, a: 1} - m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} - m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} - m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} - m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} - m_ColorMultiplier: 1 - m_FadeDuration: 0.1 - m_SpriteState: - m_HighlightedSprite: {fileID: 0} - m_PressedSprite: {fileID: 0} - m_SelectedSprite: {fileID: 0} - m_DisabledSprite: {fileID: 0} - m_AnimationTriggers: - m_NormalTrigger: Normal - m_HighlightedTrigger: Highlighted - m_PressedTrigger: Pressed - m_SelectedTrigger: Selected - m_DisabledTrigger: Disabled - m_Interactable: 1 - m_TargetGraphic: {fileID: 6082638569524903324} - toggleTransition: 1 - graphic: {fileID: 4922755142398535253} - m_Group: {fileID: 0} - onValueChanged: - m_PersistentCalls: - m_Calls: [] - m_IsOn: 0 --- !u!1 &1508457991030496397 GameObject: m_ObjectHideFlags: 0 @@ -202,11 +35,11 @@ RectTransform: - {fileID: 5861133140963408233} - {fileID: 8197558794462998189} m_Father: {fileID: 508261314311064870} - m_RootOrder: 1 + m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 10, y: -50} + m_AnchoredPosition: {x: 20, y: -70} m_SizeDelta: {x: 400, y: 400} m_Pivot: {x: 0, y: 1} --- !u!222 &6013201563383794849 @@ -277,7 +110,7 @@ MonoBehaviour: m_OnValueChanged: m_PersistentCalls: m_Calls: [] ---- !u!1 &1903777596917375403 +--- !u!1 &4336321685055900636 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -285,51 +118,53 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 6418838806734040705} - - component: {fileID: 2877676547360236797} - - component: {fileID: 4922755142398535253} + - component: {fileID: 1559758009331826223} + - component: {fileID: 1160744472685865286} + - component: {fileID: 1051397798189411585} + - component: {fileID: 6356612620610388326} m_Layer: 5 - m_Name: Checkmark + m_Name: ShowStatsButton m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!224 &6418838806734040705 +--- !u!224 &1559758009331826223 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1903777596917375403} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_GameObject: {fileID: 4336321685055900636} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1499291070238798743} + m_Children: + - {fileID: 28741704521763190} + m_Father: {fileID: 508261314311064870} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.5, y: 0.5} - m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 20, y: 20} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!222 &2877676547360236797 + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 20, y: -10} + m_SizeDelta: {x: 150, y: 50} + m_Pivot: {x: 0, y: 1} +--- !u!222 &1160744472685865286 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1903777596917375403} + m_GameObject: {fileID: 4336321685055900636} m_CullTransparentMesh: 1 ---- !u!114 &4922755142398535253 +--- !u!114 &1051397798189411585 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1903777596917375403} + m_GameObject: {fileID: 4336321685055900636} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} @@ -343,8 +178,8 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_Sprite: {fileID: 10901, guid: 0000000000000000f000000000000000, type: 0} - m_Type: 0 + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 m_PreserveAspect: 0 m_FillCenter: 1 m_FillMethod: 4 @@ -353,6 +188,50 @@ MonoBehaviour: m_FillOrigin: 0 m_UseSpriteMesh: 0 m_PixelsPerUnitMultiplier: 1 +--- !u!114 &6356612620610388326 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4336321685055900636} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1051397798189411585} + m_OnClick: + m_PersistentCalls: + m_Calls: [] --- !u!1 &4417714638525154769 GameObject: m_ObjectHideFlags: 0 @@ -509,7 +388,8 @@ RectTransform: m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: - - {fileID: 6985079903909829280} + - {fileID: 1559758009331826223} + - {fileID: 1019104027539349918} - {fileID: 1482305760229870820} m_Father: {fileID: 0} m_RootOrder: 0 @@ -531,7 +411,8 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 511209fecc3947f7acbafd29efca3ac6, type: 3} m_Name: m_EditorClassIdentifier: - toggle: {fileID: 922234672837089703} + showStatsButton: {fileID: 6356612620610388326} + hideStatsButton: {fileID: 4793911301685806387} scrollView: {fileID: 1508457991030496397} displayParent: {fileID: 4441963706037454135} baseText: {fileID: 42992011562252957} @@ -661,7 +542,7 @@ RectTransform: m_Father: {fileID: 5274144616684119762} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0.03399998} + m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 1, y: 1} m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 20, y: 20} @@ -901,13 +782,13 @@ MonoBehaviour: m_TargetGraphic: {fileID: 4937906417891939957} m_HandleRect: {fileID: 685544287360755057} m_Direction: 2 - m_Value: 0.9999982 - m_Size: 0.96599996 + m_Value: 0 + m_Size: 1 m_NumberOfSteps: 0 m_OnValueChanged: m_PersistentCalls: m_Calls: [] ---- !u!1 &7321020524749991337 +--- !u!1 &6816706130152734188 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -915,75 +796,78 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 1499291070238798743} - - component: {fileID: 5054060802465439885} - - component: {fileID: 6082638569524903324} + - component: {fileID: 28741704521763190} + - component: {fileID: 16787838395215301} + - component: {fileID: 586061541987187285} m_Layer: 5 - m_Name: Background + m_Name: Text (Legacy) m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!224 &1499291070238798743 +--- !u!224 &28741704521763190 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7321020524749991337} + m_GameObject: {fileID: 6816706130152734188} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 6418838806734040705} - m_Father: {fileID: 6985079903909829280} + m_Children: [] + m_Father: {fileID: 1559758009331826223} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0.5} - m_AnchorMax: {x: 0, y: 0.5} - m_AnchoredPosition: {x: 5, y: 0} - m_SizeDelta: {x: 30, y: 30} - m_Pivot: {x: 0, y: 0.5} ---- !u!222 &5054060802465439885 + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &16787838395215301 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7321020524749991337} + m_GameObject: {fileID: 6816706130152734188} m_CullTransparentMesh: 1 ---- !u!114 &6082638569524903324 +--- !u!114 &586061541987187285 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7321020524749991337} + m_GameObject: {fileID: 6816706130152734188} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} m_RaycastTarget: 1 m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} - m_Type: 1 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 - m_UseSpriteMesh: 0 - m_PixelsPerUnitMultiplier: 1 + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 20 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 2 + m_MaxSize: 40 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Show Stats --- !u!1 &7509323698888019833 GameObject: m_ObjectHideFlags: 0 @@ -1021,6 +905,208 @@ RectTransform: m_AnchoredPosition: {x: 0.00012207031, y: 0} m_SizeDelta: {x: -20, y: -20} m_Pivot: {x: 0.5, y: 0.5} +--- !u!1 &8449246051402004281 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8100158162725705421} + - component: {fileID: 4756263681233279512} + - component: {fileID: 8539554199204724271} + m_Layer: 5 + m_Name: Text (Legacy) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &8100158162725705421 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8449246051402004281} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1019104027539349918} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &4756263681233279512 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8449246051402004281} + m_CullTransparentMesh: 1 +--- !u!114 &8539554199204724271 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8449246051402004281} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 20 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 2 + m_MaxSize: 40 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Hide Stats +--- !u!1 &8500738507390821914 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1019104027539349918} + - component: {fileID: 2191820665037860841} + - component: {fileID: 2076869317792558193} + - component: {fileID: 4793911301685806387} + m_Layer: 5 + m_Name: HideStatsButton + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!224 &1019104027539349918 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8500738507390821914} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 8100158162725705421} + m_Father: {fileID: 508261314311064870} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 20, y: -10} + m_SizeDelta: {x: 150, y: 50} + m_Pivot: {x: 0, y: 1} +--- !u!222 &2191820665037860841 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8500738507390821914} + m_CullTransparentMesh: 1 +--- !u!114 &2076869317792558193 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8500738507390821914} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!114 &4793911301685806387 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8500738507390821914} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 2076869317792558193} + m_OnClick: + m_PersistentCalls: + m_Calls: [] --- !u!1 &8618915730201327177 GameObject: m_ObjectHideFlags: 0 @@ -1190,7 +1276,7 @@ RectTransform: m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 1, y: 1} m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 400} + m_SizeDelta: {x: 0, y: 65} m_Pivot: {x: 0, y: 1} --- !u!114 &8313023332785058290 MonoBehaviour: From 7e470040c684c94d7d1c366138aacf44fa813728 Mon Sep 17 00:00:00 2001 From: Takashi KANNAN Date: Thu, 25 Aug 2022 14:56:56 +0900 Subject: [PATCH 10/21] expose streambase component on signalinghandlerbase --- com.unity.renderstreaming/Runtime/Scripts/Broadcast.cs | 5 +++-- .../Runtime/Scripts/SignalingHandlerBase.cs | 9 +++++++-- .../Runtime/Scripts/SingleConnection.cs | 2 ++ 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/com.unity.renderstreaming/Runtime/Scripts/Broadcast.cs b/com.unity.renderstreaming/Runtime/Scripts/Broadcast.cs index abc3d35a9..05b2688d7 100644 --- a/com.unity.renderstreaming/Runtime/Scripts/Broadcast.cs +++ b/com.unity.renderstreaming/Runtime/Scripts/Broadcast.cs @@ -8,11 +8,12 @@ public class Broadcast : SignalingHandlerBase, IOfferHandler, IAddChannelHandler, IDisconnectHandler, IDeletedConnectionHandler, IAddReceiverHandler { - [SerializeField] - private List streams = new List(); + [SerializeField] private List streams = new List(); private List connectionIds = new List(); + public override IEnumerable Streams => streams; + public void AddComponent(Component component) { streams.Add(component); diff --git a/com.unity.renderstreaming/Runtime/Scripts/SignalingHandlerBase.cs b/com.unity.renderstreaming/Runtime/Scripts/SignalingHandlerBase.cs index 59497b7d5..0d14473db 100644 --- a/com.unity.renderstreaming/Runtime/Scripts/SignalingHandlerBase.cs +++ b/com.unity.renderstreaming/Runtime/Scripts/SignalingHandlerBase.cs @@ -27,6 +27,11 @@ public abstract class SignalingHandlerBase : MonoBehaviour { private IRenderStreamingHandler m_handler; + /// + /// + /// + public virtual IEnumerable Streams => null; + /// /// /// @@ -303,12 +308,12 @@ internal void SetHandler(IRenderStreamingHandler handler) public interface IStreamSender { /// - /// + /// /// MediaStreamTrack Track { get; } /// - /// + /// /// IReadOnlyDictionary Transceivers { get; } diff --git a/com.unity.renderstreaming/Runtime/Scripts/SingleConnection.cs b/com.unity.renderstreaming/Runtime/Scripts/SingleConnection.cs index 8fd0d4ac9..343e70442 100644 --- a/com.unity.renderstreaming/Runtime/Scripts/SingleConnection.cs +++ b/com.unity.renderstreaming/Runtime/Scripts/SingleConnection.cs @@ -12,6 +12,8 @@ public class SingleConnection : SignalingHandlerBase, private string connectionId; + public override IEnumerable Streams => streams; + public void AddComponent(Component component) { streams.Add(component); From b5307302c6178b7c54a3f12b1ccd7159d2807fc4 Mon Sep 17 00:00:00 2001 From: Takashi KANNAN Date: Thu, 25 Aug 2022 14:58:03 +0900 Subject: [PATCH 11/21] fix stats ui --- .../Samples~/Example/Stats/ShowStatsUI.cs | 68 +++++++------------ .../Samples~/Example/Stats/StatsUI.prefab | 11 ++- 2 files changed, 30 insertions(+), 49 deletions(-) diff --git a/com.unity.renderstreaming/Samples~/Example/Stats/ShowStatsUI.cs b/com.unity.renderstreaming/Samples~/Example/Stats/ShowStatsUI.cs index 4432d135f..e9c041e3f 100644 --- a/com.unity.renderstreaming/Samples~/Example/Stats/ShowStatsUI.cs +++ b/com.unity.renderstreaming/Samples~/Example/Stats/ShowStatsUI.cs @@ -15,8 +15,7 @@ public class ShowStatsUI : MonoBehaviour [SerializeField] private GameObject scrollView; [SerializeField] private RectTransform displayParent; [SerializeField] private Text baseText; - [SerializeField] private List senderBaseList; - [SerializeField] private List receiverBaseList; + [SerializeField] private List signalingHandlerBase; private Dictionary> activeSenderList = new Dictionary>(); @@ -29,29 +28,34 @@ public class ShowStatsUI : MonoBehaviour private void Awake() { - showStatsButton.onClick.AddListener(() => - { - scrollView.gameObject.SetActive(true); - hideStatsButton.gameObject.SetActive(true); - showStatsButton.gameObject.SetActive(false); - }); - - hideStatsButton.onClick.AddListener(() => - { - scrollView.gameObject.SetActive(false); - showStatsButton.gameObject.SetActive(true); - hideStatsButton.gameObject.SetActive(false); - }); + showStatsButton.onClick.AddListener(ShowStats); + hideStatsButton.onClick.AddListener(HideStats); - foreach (var senderBase in senderBaseList) + foreach (var streamBase in signalingHandlerBase.SelectMany(x => x.Streams)) { - SetUpSenderBase(senderBase); + if (streamBase is StreamSenderBase senderBase) + { + SetUpSenderBase(senderBase); + } + if (streamBase is StreamReceiverBase receiverBase) + { + SetUpReceiverBase(receiverBase); + } } + } - foreach (var receiverBase in receiverBaseList) - { - SetUpReceiverBase(receiverBase); - } + public void ShowStats() + { + scrollView.gameObject.SetActive(true); + hideStatsButton.gameObject.SetActive(true); + showStatsButton.gameObject.SetActive(false); + } + + public void HideStats() + { + scrollView.gameObject.SetActive(false); + showStatsButton.gameObject.SetActive(true); + hideStatsButton.gameObject.SetActive(false); } private void SetUpSenderBase(StreamSenderBase senderBase) @@ -284,27 +288,5 @@ private static string CreateDisplayString(RTCStatsReport report, RTCStatsReport return builder.ToString(); } - - public void AddSenderBase(StreamSenderBase sender) - { - if (senderBaseList.Contains(sender)) - { - return; - } - - senderBaseList.Add(sender); - SetUpSenderBase(sender); - } - - public void AddReceiverBase(StreamReceiverBase receiver) - { - if (receiverBaseList.Contains(receiver)) - { - return; - } - - receiverBaseList.Add(receiver); - SetUpReceiverBase(receiver); - } } } diff --git a/com.unity.renderstreaming/Samples~/Example/Stats/StatsUI.prefab b/com.unity.renderstreaming/Samples~/Example/Stats/StatsUI.prefab index bd6f8b028..8c3d70da0 100644 --- a/com.unity.renderstreaming/Samples~/Example/Stats/StatsUI.prefab +++ b/com.unity.renderstreaming/Samples~/Example/Stats/StatsUI.prefab @@ -39,7 +39,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 20, y: -70} + m_AnchoredPosition: {x: 20, y: -60} m_SizeDelta: {x: 400, y: 400} m_Pivot: {x: 0, y: 1} --- !u!222 &6013201563383794849 @@ -148,7 +148,7 @@ RectTransform: m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} m_AnchoredPosition: {x: 20, y: -10} - m_SizeDelta: {x: 150, y: 50} + m_SizeDelta: {x: 150, y: 40} m_Pivot: {x: 0, y: 1} --- !u!222 &1160744472685865286 CanvasRenderer: @@ -416,8 +416,7 @@ MonoBehaviour: scrollView: {fileID: 1508457991030496397} displayParent: {fileID: 4441963706037454135} baseText: {fileID: 42992011562252957} - senderBaseList: [] - receiverBaseList: [] + signalingHandlerBase: [] --- !u!1 &5478974256622935485 GameObject: m_ObjectHideFlags: 0 @@ -1023,7 +1022,7 @@ RectTransform: m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} m_AnchoredPosition: {x: 20, y: -10} - m_SizeDelta: {x: 150, y: 50} + m_SizeDelta: {x: 150, y: 40} m_Pivot: {x: 0, y: 1} --- !u!222 &2191820665037860841 CanvasRenderer: @@ -1187,7 +1186,7 @@ MonoBehaviour: m_HorizontalOverflow: 0 m_VerticalOverflow: 0 m_LineSpacing: 1 - m_Text: "Sender/Receiver is not set or\r Send/Receive stream has not started." + m_Text: "SignalingHandler is not set or\r Send/Receive stream has not started." --- !u!114 &7943079271586643799 MonoBehaviour: m_ObjectHideFlags: 0 From 0503468dc359cf95b5030645b21a3346c4e19c73 Mon Sep 17 00:00:00 2001 From: Takashi KANNAN Date: Thu, 25 Aug 2022 14:58:38 +0900 Subject: [PATCH 12/21] fix scene setting --- .../Example/ARFoundation/ARFoundation.unity | 14 ++- .../Example/Bidirectional/Bidirectional.unity | 106 ++++++++++-------- .../Example/Broadcast/Broadcast.unity | 36 ++++-- .../Samples~/Example/Gyro/Gyro.unity | 10 ++ .../Samples~/Example/Receiver/Receiver.unity | 45 ++++++-- .../Example/RenderPipeline/HDRP.unity | 10 ++ .../Samples~/Example/RenderPipeline/URP.unity | 10 ++ 7 files changed, 159 insertions(+), 72 deletions(-) diff --git a/com.unity.renderstreaming/Samples~/Example/ARFoundation/ARFoundation.unity b/com.unity.renderstreaming/Samples~/Example/ARFoundation/ARFoundation.unity index 28d839d38..2471f4358 100644 --- a/com.unity.renderstreaming/Samples~/Example/ARFoundation/ARFoundation.unity +++ b/com.unity.renderstreaming/Samples~/Example/ARFoundation/ARFoundation.unity @@ -1293,12 +1293,12 @@ PrefabInstance: - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, type: 3} propertyPath: m_AnchoredPosition.x - value: 0 + value: 20 objectReference: {fileID: 0} - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, type: 3} propertyPath: m_AnchoredPosition.y - value: 0 + value: -20 objectReference: {fileID: 0} - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, type: 3} @@ -1360,6 +1360,16 @@ PrefabInstance: propertyPath: receiverBaseList.Array.data[0] value: objectReference: {fileID: 1915034401} + - target: {fileID: 4184539458356606944, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: signalingHandlerBase.Array.size + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4184539458356606944, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: signalingHandlerBase.Array.data[0] + value: + objectReference: {fileID: 1915034405} - target: {fileID: 4584148620787798253, guid: 562feaa3a43a01841a00c6ac89b133fb, type: 3} propertyPath: m_Name diff --git a/com.unity.renderstreaming/Samples~/Example/Bidirectional/Bidirectional.unity b/com.unity.renderstreaming/Samples~/Example/Bidirectional/Bidirectional.unity index 13c160edc..20027684e 100644 --- a/com.unity.renderstreaming/Samples~/Example/Bidirectional/Bidirectional.unity +++ b/com.unity.renderstreaming/Samples~/Example/Bidirectional/Bidirectional.unity @@ -511,10 +511,10 @@ RectTransform: m_Father: {fileID: 932364532} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 188.24998, y: -25} - m_SizeDelta: {x: 376.49997, y: 50} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 50} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &185332756 MonoBehaviour: @@ -831,6 +831,16 @@ PrefabInstance: propertyPath: receiverBaseList.Array.data[1] value: objectReference: {fileID: 1915034408} + - target: {fileID: 4184539458356606944, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: signalingHandlerBase.Array.size + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4184539458356606944, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: signalingHandlerBase.Array.data[0] + value: + objectReference: {fileID: 1915034406} - target: {fileID: 4584148620787798253, guid: 562feaa3a43a01841a00c6ac89b133fb, type: 3} propertyPath: m_Name @@ -1166,10 +1176,10 @@ RectTransform: m_Father: {fileID: 932364532} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 376.49997, y: -60} - m_SizeDelta: {x: 376.49997, y: 50} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 50} m_Pivot: {x: 1, y: 1} --- !u!114 &346362251 MonoBehaviour: @@ -2125,10 +2135,10 @@ RectTransform: m_Father: {fileID: 1423621364} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 396.49997, y: -180} - m_SizeDelta: {x: 376.49997, y: 170} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0, y: 0} --- !u!114 &932364533 MonoBehaviour: @@ -2267,10 +2277,10 @@ RectTransform: m_Father: {fileID: 2134522315} m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 376.49997, y: -120} - m_SizeDelta: {x: 376.49997, y: 50} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 50} m_Pivot: {x: 1, y: 1} --- !u!114 &1013695940 MonoBehaviour: @@ -2875,10 +2885,10 @@ RectTransform: m_Father: {fileID: 131784669} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 0, y: -250} - m_SizeDelta: {x: 782.99994, y: 250} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 250} m_Pivot: {x: 0, y: 0} --- !u!114 &1180904221 MonoBehaviour: @@ -2940,10 +2950,10 @@ RectTransform: m_Father: {fileID: 1180904220} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 587.24994, y: -130} - m_SizeDelta: {x: 371.49997, y: 220} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1221238573 MonoBehaviour: @@ -3458,10 +3468,10 @@ RectTransform: m_Father: {fileID: 1180904220} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 195.74998, y: -130} - m_SizeDelta: {x: 371.49997, y: 220} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1363584101 MonoBehaviour: @@ -3644,10 +3654,10 @@ RectTransform: m_Father: {fileID: 131784669} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 391.49997, y: -350} - m_SizeDelta: {x: 782.99994, y: 200} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 200} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1423621365 MonoBehaviour: @@ -4538,10 +4548,10 @@ RectTransform: m_Father: {fileID: 2134522315} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 188.24998, y: -25} - m_SizeDelta: {x: 376.49997, y: 50} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 50} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1859585770 MonoBehaviour: @@ -5034,10 +5044,10 @@ RectTransform: m_Father: {fileID: 2134522315} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 188.24998, y: -85} - m_SizeDelta: {x: 376.49997, y: 50} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 50} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &2125586392 MonoBehaviour: @@ -5171,10 +5181,10 @@ RectTransform: m_Father: {fileID: 932364532} m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 376.49997, y: -120} - m_SizeDelta: {x: 376.49997, y: 50} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 50} m_Pivot: {x: 1, y: 1} --- !u!114 &2128695120 MonoBehaviour: @@ -5293,10 +5303,10 @@ RectTransform: m_Father: {fileID: 1423621364} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 10, y: -180} - m_SizeDelta: {x: 376.49997, y: 170} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0, y: 0} --- !u!114 &2134522316 MonoBehaviour: diff --git a/com.unity.renderstreaming/Samples~/Example/Broadcast/Broadcast.unity b/com.unity.renderstreaming/Samples~/Example/Broadcast/Broadcast.unity index 8516cf277..78e9ed0d8 100644 --- a/com.unity.renderstreaming/Samples~/Example/Broadcast/Broadcast.unity +++ b/com.unity.renderstreaming/Samples~/Example/Broadcast/Broadcast.unity @@ -648,7 +648,7 @@ RectTransform: - {fileID: 651274779} - {fileID: 675120845} m_Father: {fileID: 1215389823} - m_RootOrder: 4 + m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} @@ -2297,7 +2297,8 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 28e4557ba7cb056499034647b21b6361, type: 3} m_Name: m_EditorClassIdentifier: - m_bitrate: 1000 + m_minBitrate: 1000 + m_maxBitrate: 1000 --- !u!114 &725451156 MonoBehaviour: m_ObjectHideFlags: 0 @@ -2312,7 +2313,8 @@ MonoBehaviour: m_EditorClassIdentifier: streamingSize: {x: 1280, y: 720} m_frameRate: 30 - m_bitrate: 1000 + m_minBitrate: 1000 + m_maxBitrate: 1000 m_scaleFactor: 1 depth: 0 antiAliasing: 1 @@ -2459,7 +2461,7 @@ PrefabInstance: - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, type: 3} propertyPath: m_RootOrder - value: 0 + value: 5 objectReference: {fileID: 0} - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, type: 3} @@ -2566,6 +2568,16 @@ PrefabInstance: propertyPath: senderBaseList.Array.data[1] value: objectReference: {fileID: 725451155} + - target: {fileID: 4184539458356606944, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: signalingHandlerBase.Array.size + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4184539458356606944, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: signalingHandlerBase.Array.data[0] + value: + objectReference: {fileID: 1623734774} - target: {fileID: 4584148620787798253, guid: 562feaa3a43a01841a00c6ac89b133fb, type: 3} propertyPath: m_Name @@ -2673,7 +2685,7 @@ RectTransform: m_Children: - {fileID: 244876989} m_Father: {fileID: 1215389823} - m_RootOrder: 6 + m_RootOrder: 4 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 1, y: 0} m_AnchorMax: {x: 1, y: 0} @@ -3046,7 +3058,7 @@ RectTransform: m_Children: - {fileID: 1127658836} m_Father: {fileID: 1215389823} - m_RootOrder: 2 + m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 1, y: 0} @@ -3139,7 +3151,7 @@ RectTransform: - {fileID: 647684928} - {fileID: 92522335} m_Father: {fileID: 1215389823} - m_RootOrder: 5 + m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} @@ -3272,7 +3284,7 @@ PrefabInstance: - target: {fileID: 4037113455314838168, guid: 7aa5bec5b1e406445af144843fe4d62c, type: 3} propertyPath: m_RootOrder - value: 1 + value: 6 objectReference: {fileID: 0} - target: {fileID: 4037113455314838168, guid: 7aa5bec5b1e406445af144843fe4d62c, type: 3} @@ -4287,13 +4299,13 @@ RectTransform: m_LocalScale: {x: 0, y: 0, z: 0} m_ConstrainProportionsScale: 0 m_Children: - - {fileID: 757982964} - - {fileID: 1023262581} - {fileID: 920982462} - {fileID: 1287993067} - {fileID: 212310407} - {fileID: 992023663} - {fileID: 781387196} + - {fileID: 757982964} + - {fileID: 1023262581} m_Father: {fileID: 0} m_RootOrder: 6 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -4449,7 +4461,7 @@ RectTransform: m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1215389823} - m_RootOrder: 3 + m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} @@ -4470,7 +4482,7 @@ MonoBehaviour: m_EditorClassIdentifier: m_Material: {fileID: 0} m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 + m_RaycastTarget: 0 m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_Maskable: 1 m_OnCullStateChanged: diff --git a/com.unity.renderstreaming/Samples~/Example/Gyro/Gyro.unity b/com.unity.renderstreaming/Samples~/Example/Gyro/Gyro.unity index 478b06d74..af8c83d61 100644 --- a/com.unity.renderstreaming/Samples~/Example/Gyro/Gyro.unity +++ b/com.unity.renderstreaming/Samples~/Example/Gyro/Gyro.unity @@ -1858,6 +1858,16 @@ PrefabInstance: propertyPath: receiverBaseList.Array.data[0] value: objectReference: {fileID: 1915034401} + - target: {fileID: 4184539458356606944, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: signalingHandlerBase.Array.size + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4184539458356606944, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: signalingHandlerBase.Array.data[0] + value: + objectReference: {fileID: 1915034405} - target: {fileID: 4584148620787798253, guid: 562feaa3a43a01841a00c6ac89b133fb, type: 3} propertyPath: m_Name diff --git a/com.unity.renderstreaming/Samples~/Example/Receiver/Receiver.unity b/com.unity.renderstreaming/Samples~/Example/Receiver/Receiver.unity index bfc7a9d79..3c1d47109 100644 --- a/com.unity.renderstreaming/Samples~/Example/Receiver/Receiver.unity +++ b/com.unity.renderstreaming/Samples~/Example/Receiver/Receiver.unity @@ -286,7 +286,7 @@ RectTransform: m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} m_AnchoredPosition: {x: 840, y: -10} - m_SizeDelta: {x: 200, y: 40} + m_SizeDelta: {x: 150, y: 40} m_Pivot: {x: 1, y: 1} --- !u!114 &159113884 MonoBehaviour: @@ -592,7 +592,7 @@ RectTransform: m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 200, y: 40} + m_SizeDelta: {x: 150, y: 40} m_Pivot: {x: 1, y: 1} --- !u!114 &662432479 MonoBehaviour: @@ -799,7 +799,7 @@ RectTransform: m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 400, y: 40} + m_SizeDelta: {x: 350, y: 40} m_Pivot: {x: 1, y: 1} --- !u!114 &935674850 MonoBehaviour: @@ -1333,6 +1333,21 @@ PrefabInstance: propertyPath: m_SizeDelta.y value: 100 objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_LocalScale.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_LocalScale.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: m_LocalScale.z + value: 1 + objectReference: {fileID: 0} - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, type: 3} propertyPath: m_LocalPosition.x @@ -1356,17 +1371,17 @@ PrefabInstance: - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, type: 3} propertyPath: m_LocalRotation.x - value: 0 + value: -0 objectReference: {fileID: 0} - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, type: 3} propertyPath: m_LocalRotation.y - value: 0 + value: -0 objectReference: {fileID: 0} - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, type: 3} propertyPath: m_LocalRotation.z - value: 0 + value: -0 objectReference: {fileID: 0} - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, type: 3} @@ -1376,7 +1391,7 @@ PrefabInstance: - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, type: 3} propertyPath: m_AnchoredPosition.y - value: -50 + value: -10 objectReference: {fileID: 0} - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, type: 3} @@ -1433,6 +1448,16 @@ PrefabInstance: propertyPath: receiverBaseList.Array.data[1] value: objectReference: {fileID: 1915034407} + - target: {fileID: 4184539458356606944, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: signalingHandlerBase.Array.size + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4184539458356606944, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: signalingHandlerBase.Array.data[0] + value: + objectReference: {fileID: 1915034404} - target: {fileID: 4584148620787798253, guid: 562feaa3a43a01841a00c6ac89b133fb, type: 3} propertyPath: m_Name @@ -1558,8 +1583,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: -25} - m_SizeDelta: {x: 0, y: 80} + m_AnchoredPosition: {x: 15, y: -40} + m_SizeDelta: {x: -330, y: 80} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1537721410 MonoBehaviour: @@ -1579,7 +1604,7 @@ MonoBehaviour: m_Top: 0 m_Bottom: 0 m_ChildAlignment: 4 - m_Spacing: 20 + m_Spacing: 10 m_ChildForceExpandWidth: 0 m_ChildForceExpandHeight: 1 m_ChildControlWidth: 0 diff --git a/com.unity.renderstreaming/Samples~/Example/RenderPipeline/HDRP.unity b/com.unity.renderstreaming/Samples~/Example/RenderPipeline/HDRP.unity index 1c3146d4e..d437cef33 100644 --- a/com.unity.renderstreaming/Samples~/Example/RenderPipeline/HDRP.unity +++ b/com.unity.renderstreaming/Samples~/Example/RenderPipeline/HDRP.unity @@ -1443,6 +1443,16 @@ PrefabInstance: propertyPath: senderBaseList.Array.data[1] value: objectReference: {fileID: 1299133686} + - target: {fileID: 4184539458356606944, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: signalingHandlerBase.Array.size + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4184539458356606944, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: signalingHandlerBase.Array.data[0] + value: + objectReference: {fileID: 1131364784} - target: {fileID: 4584148620787798253, guid: 562feaa3a43a01841a00c6ac89b133fb, type: 3} propertyPath: m_Name diff --git a/com.unity.renderstreaming/Samples~/Example/RenderPipeline/URP.unity b/com.unity.renderstreaming/Samples~/Example/RenderPipeline/URP.unity index 392cfff12..a753b957a 100644 --- a/com.unity.renderstreaming/Samples~/Example/RenderPipeline/URP.unity +++ b/com.unity.renderstreaming/Samples~/Example/RenderPipeline/URP.unity @@ -1447,6 +1447,16 @@ PrefabInstance: propertyPath: senderBaseList.Array.data[1] value: objectReference: {fileID: 725451155} + - target: {fileID: 4184539458356606944, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: signalingHandlerBase.Array.size + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4184539458356606944, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: signalingHandlerBase.Array.data[0] + value: + objectReference: {fileID: 1623734776} - target: {fileID: 4584148620787798253, guid: 562feaa3a43a01841a00c6ac89b133fb, type: 3} propertyPath: m_Name From 346b26f4576d67ad06539258a5558757313f5d2b Mon Sep 17 00:00:00 2001 From: Takashi KANNAN Date: Thu, 25 Aug 2022 16:23:39 +0900 Subject: [PATCH 13/21] observe change signalinghander --- .../Samples~/Example/Stats/ShowStatsUI.cs | 193 +++++++++++------- .../Samples~/Example/Stats/StatsUI.prefab | 6 +- 2 files changed, 124 insertions(+), 75 deletions(-) diff --git a/com.unity.renderstreaming/Samples~/Example/Stats/ShowStatsUI.cs b/com.unity.renderstreaming/Samples~/Example/Stats/ShowStatsUI.cs index e9c041e3f..2ac50a61a 100644 --- a/com.unity.renderstreaming/Samples~/Example/Stats/ShowStatsUI.cs +++ b/com.unity.renderstreaming/Samples~/Example/Stats/ShowStatsUI.cs @@ -1,3 +1,4 @@ +using System; using System.Collections; using System.Collections.Generic; using System.Linq; @@ -15,104 +16,42 @@ public class ShowStatsUI : MonoBehaviour [SerializeField] private GameObject scrollView; [SerializeField] private RectTransform displayParent; [SerializeField] private Text baseText; - [SerializeField] private List signalingHandlerBase; + [SerializeField] private List signalingHandlerList; private Dictionary> activeSenderList = new Dictionary>(); - private Dictionary> activeReceiverList = - new Dictionary>(); + + private Dictionary> activeReceiverList = + new Dictionary>(); + private Dictionary lastSenderStats = new Dictionary(); + private Dictionary lastReceiverStats = new Dictionary(); + private HashSet alreadySetupSenderList = new HashSet(); + private void Awake() { showStatsButton.onClick.AddListener(ShowStats); hideStatsButton.onClick.AddListener(HideStats); - - foreach (var streamBase in signalingHandlerBase.SelectMany(x => x.Streams)) - { - if (streamBase is StreamSenderBase senderBase) - { - SetUpSenderBase(senderBase); - } - if (streamBase is StreamReceiverBase receiverBase) - { - SetUpReceiverBase(receiverBase); - } - } } - public void ShowStats() + private void ShowStats() { scrollView.gameObject.SetActive(true); hideStatsButton.gameObject.SetActive(true); showStatsButton.gameObject.SetActive(false); } - public void HideStats() + private void HideStats() { scrollView.gameObject.SetActive(false); showStatsButton.gameObject.SetActive(true); hideStatsButton.gameObject.SetActive(false); } - private void SetUpSenderBase(StreamSenderBase senderBase) - { - senderBase.OnStartedStream += id => - { - if (senderBase.Transceivers.TryGetValue(id, out var transceiver)) - { - if (!activeSenderList.ContainsKey(id)) - { - activeSenderList[id] = new HashSet(); - } - - activeSenderList[id].Add(transceiver.Sender); - } - }; - senderBase.OnStoppedStream += id => - { - if (activeSenderList.TryGetValue(id, out var hashSet)) - { - foreach (var sender in hashSet) - { - DestroyImmediate(lastSenderStats[sender].display.gameObject); - lastSenderStats.Remove(sender); - } - } - - activeSenderList.Remove(id); - }; - } - - private void SetUpReceiverBase(StreamReceiverBase receiverBase) - { - receiverBase.OnStartedStream += id => - { - if (!activeReceiverList.ContainsKey(id)) - { - activeReceiverList[id] = new HashSet(); - } - - activeReceiverList[id].Add(receiverBase.Transceiver.Receiver); - }; - receiverBase.OnStoppedStream += id => - { - if (activeReceiverList.TryGetValue(id, out var hashSet)) - { - foreach (var receiver in hashSet) - { - DestroyImmediate(lastReceiverStats[receiver].display.gameObject); - lastReceiverStats.Remove(receiver); - } - } - - activeReceiverList.Remove(id); - }; - } - private void Start() { StartCoroutine(CollectStats()); @@ -124,6 +63,17 @@ private void OnDestroy() lastReceiverStats.Clear(); activeSenderList.Clear(); activeReceiverList.Clear(); + alreadySetupSenderList.Clear(); + } + + public void AddSignalingHandler(SignalingHandlerBase handlerBase) + { + if (signalingHandlerList.Contains(handlerBase)) + { + return; + } + + signalingHandlerList.Add(handlerBase); } class StatsDisplay @@ -140,6 +90,19 @@ private IEnumerator CollectStats() { yield return waitSec; + foreach (var streamBase in signalingHandlerList.SelectMany(x => x.Streams)) + { + if (streamBase is StreamSenderBase senderBase) + { + SetUpSenderBase(senderBase); + } + + if (streamBase is StreamReceiverBase receiverBase) + { + SetUpReceiverBase(receiverBase); + } + } + foreach (var sender in activeSenderList.Values.SelectMany(x => x)) { var op = sender.GetStats(); @@ -194,6 +157,86 @@ private IEnumerator CollectStats() } } + private void SetUpSenderBase(StreamSenderBase senderBase) + { + if (alreadySetupSenderList.Contains(senderBase)) + { + return; + } + + senderBase.OnStartedStream += id => + { + if (!activeSenderList.ContainsKey(id)) + { + activeSenderList[id] = new HashSet(); + } + + if (senderBase.Transceivers.TryGetValue(id, out var transceiver)) + { + activeSenderList[id].Add(transceiver.Sender); + } + }; + senderBase.OnStoppedStream += id => + { + if (activeSenderList.TryGetValue(id, out var hashSet)) + { + foreach (var sender in hashSet) + { + DestroyImmediate(lastSenderStats[sender].display.gameObject); + lastSenderStats.Remove(sender); + } + } + + activeSenderList.Remove(id); + }; + + foreach (var pair in senderBase.Transceivers) + { + if (!activeSenderList.ContainsKey(pair.Key)) + { + activeSenderList[pair.Key] = new HashSet(); + } + + activeSenderList[pair.Key].Add(pair.Value.Sender); + } + + alreadySetupSenderList.Add(senderBase); + } + + private void SetUpReceiverBase(StreamReceiverBase receiverBase) + { + if (activeReceiverList.ContainsKey(receiverBase)) + { + return; + } + + activeReceiverList[receiverBase] = new HashSet(); + + receiverBase.OnStartedStream += id => + { + activeReceiverList[receiverBase].Add(receiverBase.Transceiver.Receiver); + }; + receiverBase.OnStoppedStream += id => + { + if (activeReceiverList.TryGetValue(receiverBase, out var hashSet)) + { + foreach (var receiver in hashSet) + { + DestroyImmediate(lastReceiverStats[receiver].display.gameObject); + lastReceiverStats.Remove(receiver); + } + } + + activeReceiverList.Remove(receiverBase); + }; + + var transceiver = receiverBase.Transceiver; + if (transceiver != null && transceiver.Receiver != null) + { + activeReceiverList[receiverBase].Add(transceiver.Receiver); + } + } + private static string CreateDisplayString(RTCStatsReport report, RTCStatsReport lastReport) { var builder = new StringBuilder(); @@ -213,14 +256,17 @@ private static string CreateDisplayString(RTCStatsReport report, RTCStatsReport builder.AppendLine($" - {fmtp}"); } } + if (codecStats.payloadType > 0) { builder.AppendLine($" - {nameof(codecStats.payloadType)}={codecStats.payloadType}"); } + if (codecStats.clockRate > 0) { builder.AppendLine($" - {nameof(codecStats.clockRate)}={codecStats.clockRate}"); } + if (codecStats.channels > 0) { builder.AppendLine($" - {nameof(codecStats.channels)}={codecStats.channels}"); @@ -255,14 +301,17 @@ private static string CreateDisplayString(RTCStatsReport report, RTCStatsReport builder.AppendLine($" - {fmtp}"); } } + if (codecStats.payloadType > 0) { builder.AppendLine($" - {nameof(codecStats.payloadType)}={codecStats.payloadType}"); } + if (codecStats.clockRate > 0) { builder.AppendLine($" - {nameof(codecStats.clockRate)}={codecStats.clockRate}"); } + if (codecStats.channels > 0) { builder.AppendLine($" - {nameof(codecStats.channels)}={codecStats.channels}"); diff --git a/com.unity.renderstreaming/Samples~/Example/Stats/StatsUI.prefab b/com.unity.renderstreaming/Samples~/Example/Stats/StatsUI.prefab index 8c3d70da0..704eac718 100644 --- a/com.unity.renderstreaming/Samples~/Example/Stats/StatsUI.prefab +++ b/com.unity.renderstreaming/Samples~/Example/Stats/StatsUI.prefab @@ -39,7 +39,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 20, y: -60} + m_AnchoredPosition: {x: 20, y: -70} m_SizeDelta: {x: 400, y: 400} m_Pivot: {x: 0, y: 1} --- !u!222 &6013201563383794849 @@ -147,7 +147,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 20, y: -10} + m_AnchoredPosition: {x: 20, y: -20} m_SizeDelta: {x: 150, y: 40} m_Pivot: {x: 0, y: 1} --- !u!222 &1160744472685865286 @@ -1021,7 +1021,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 20, y: -10} + m_AnchoredPosition: {x: 20, y: -20} m_SizeDelta: {x: 150, y: 40} m_Pivot: {x: 0, y: 1} --- !u!222 &2191820665037860841 From cbdad004c01fea778ae230bd9b0de7867297bf1f Mon Sep 17 00:00:00 2001 From: Takashi KANNAN Date: Thu, 25 Aug 2022 16:23:59 +0900 Subject: [PATCH 14/21] fix each sample scene --- .../Example/ARFoundation/ARFoundation.unity | 8 +- .../Example/Bidirectional/Bidirectional.unity | 6 +- .../Example/Broadcast/Broadcast.unity | 10 ++ .../Samples~/Example/Gyro/Gyro.unity | 10 ++ .../Samples~/Example/Multiplay/Multiplay.cs | 23 ++-- .../Example/Multiplay/Multiplay.unity | 115 ------------------ .../Example/Multiplay/MultiplaySample.cs | 3 +- .../Samples~/Example/Receiver/Receiver.unity | 103 +++------------- .../Example/RenderPipeline/HDRP.unity | 10 ++ .../Samples~/Example/RenderPipeline/URP.unity | 10 ++ 10 files changed, 74 insertions(+), 224 deletions(-) diff --git a/com.unity.renderstreaming/Samples~/Example/ARFoundation/ARFoundation.unity b/com.unity.renderstreaming/Samples~/Example/ARFoundation/ARFoundation.unity index 2471f4358..8bb0734ff 100644 --- a/com.unity.renderstreaming/Samples~/Example/ARFoundation/ARFoundation.unity +++ b/com.unity.renderstreaming/Samples~/Example/ARFoundation/ARFoundation.unity @@ -1362,12 +1362,12 @@ PrefabInstance: objectReference: {fileID: 1915034401} - target: {fileID: 4184539458356606944, guid: 562feaa3a43a01841a00c6ac89b133fb, type: 3} - propertyPath: signalingHandlerBase.Array.size + propertyPath: signalingHandlerList.Array.size value: 1 objectReference: {fileID: 0} - target: {fileID: 4184539458356606944, guid: 562feaa3a43a01841a00c6ac89b133fb, type: 3} - propertyPath: signalingHandlerBase.Array.data[0] + propertyPath: signalingHandlerList.Array.data[0] value: objectReference: {fileID: 1915034405} - target: {fileID: 4584148620787798253, guid: 562feaa3a43a01841a00c6ac89b133fb, @@ -1638,12 +1638,12 @@ PrefabInstance: - target: {fileID: 4037113455314838168, guid: 7aa5bec5b1e406445af144843fe4d62c, type: 3} propertyPath: m_AnchoredPosition.x - value: 0 + value: -20 objectReference: {fileID: 0} - target: {fileID: 4037113455314838168, guid: 7aa5bec5b1e406445af144843fe4d62c, type: 3} propertyPath: m_AnchoredPosition.y - value: 0 + value: -20 objectReference: {fileID: 0} - target: {fileID: 4037113455314838168, guid: 7aa5bec5b1e406445af144843fe4d62c, type: 3} diff --git a/com.unity.renderstreaming/Samples~/Example/Bidirectional/Bidirectional.unity b/com.unity.renderstreaming/Samples~/Example/Bidirectional/Bidirectional.unity index 20027684e..59799c3b9 100644 --- a/com.unity.renderstreaming/Samples~/Example/Bidirectional/Bidirectional.unity +++ b/com.unity.renderstreaming/Samples~/Example/Bidirectional/Bidirectional.unity @@ -754,7 +754,7 @@ PrefabInstance: - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, type: 3} propertyPath: m_AnchoredPosition.y - value: -10 + value: 0 objectReference: {fileID: 0} - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, type: 3} @@ -833,12 +833,12 @@ PrefabInstance: objectReference: {fileID: 1915034408} - target: {fileID: 4184539458356606944, guid: 562feaa3a43a01841a00c6ac89b133fb, type: 3} - propertyPath: signalingHandlerBase.Array.size + propertyPath: signalingHandlerList.Array.size value: 1 objectReference: {fileID: 0} - target: {fileID: 4184539458356606944, guid: 562feaa3a43a01841a00c6ac89b133fb, type: 3} - propertyPath: signalingHandlerBase.Array.data[0] + propertyPath: signalingHandlerList.Array.data[0] value: objectReference: {fileID: 1915034406} - target: {fileID: 4584148620787798253, guid: 562feaa3a43a01841a00c6ac89b133fb, diff --git a/com.unity.renderstreaming/Samples~/Example/Broadcast/Broadcast.unity b/com.unity.renderstreaming/Samples~/Example/Broadcast/Broadcast.unity index 78e9ed0d8..73714b483 100644 --- a/com.unity.renderstreaming/Samples~/Example/Broadcast/Broadcast.unity +++ b/com.unity.renderstreaming/Samples~/Example/Broadcast/Broadcast.unity @@ -2573,11 +2573,21 @@ PrefabInstance: propertyPath: signalingHandlerBase.Array.size value: 1 objectReference: {fileID: 0} + - target: {fileID: 4184539458356606944, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: signalingHandlerList.Array.size + value: 1 + objectReference: {fileID: 0} - target: {fileID: 4184539458356606944, guid: 562feaa3a43a01841a00c6ac89b133fb, type: 3} propertyPath: signalingHandlerBase.Array.data[0] value: objectReference: {fileID: 1623734774} + - target: {fileID: 4184539458356606944, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: signalingHandlerList.Array.data[0] + value: + objectReference: {fileID: 1623734774} - target: {fileID: 4584148620787798253, guid: 562feaa3a43a01841a00c6ac89b133fb, type: 3} propertyPath: m_Name diff --git a/com.unity.renderstreaming/Samples~/Example/Gyro/Gyro.unity b/com.unity.renderstreaming/Samples~/Example/Gyro/Gyro.unity index af8c83d61..646c35583 100644 --- a/com.unity.renderstreaming/Samples~/Example/Gyro/Gyro.unity +++ b/com.unity.renderstreaming/Samples~/Example/Gyro/Gyro.unity @@ -1863,11 +1863,21 @@ PrefabInstance: propertyPath: signalingHandlerBase.Array.size value: 1 objectReference: {fileID: 0} + - target: {fileID: 4184539458356606944, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: signalingHandlerList.Array.size + value: 1 + objectReference: {fileID: 0} - target: {fileID: 4184539458356606944, guid: 562feaa3a43a01841a00c6ac89b133fb, type: 3} propertyPath: signalingHandlerBase.Array.data[0] value: objectReference: {fileID: 1915034405} + - target: {fileID: 4184539458356606944, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: signalingHandlerList.Array.data[0] + value: + objectReference: {fileID: 1915034405} - target: {fileID: 4584148620787798253, guid: 562feaa3a43a01841a00c6ac89b133fb, type: 3} propertyPath: m_Name diff --git a/com.unity.renderstreaming/Samples~/Example/Multiplay/Multiplay.cs b/com.unity.renderstreaming/Samples~/Example/Multiplay/Multiplay.cs index dce46a061..bbdc95513 100644 --- a/com.unity.renderstreaming/Samples~/Example/Multiplay/Multiplay.cs +++ b/com.unity.renderstreaming/Samples~/Example/Multiplay/Multiplay.cs @@ -12,12 +12,8 @@ class Multiplay : SignalingHandlerBase, private List connectionIds = new List(); private List streams = new List(); private Dictionary dictObj = new Dictionary(); - private ShowStatsUI statsUI; - public void SetStatsUI(ShowStatsUI statsUI) - { - this.statsUI = statsUI; - } + public override IEnumerable Streams => streams; public void OnDeletedConnection(SignalingEventData eventData) { @@ -36,7 +32,7 @@ private void Disconnect(string connectionId) connectionIds.Remove(connectionId); var obj = dictObj[connectionId]; - var sender = obj.GetComponentInChildren(); + var sender = obj.GetComponentInChildren(); var inputChannel = obj.GetComponentInChildren(); var multiplayChannel = obj.GetComponentInChildren(); @@ -47,6 +43,10 @@ private void Disconnect(string connectionId) RemoveChannel(connectionId, inputChannel); RemoveChannel(connectionId, multiplayChannel); + streams.Remove(sender); + streams.Remove(inputChannel); + streams.Remove(multiplayChannel); + if (ExistConnection(connectionId)) DeleteConnection(connectionId); } @@ -64,7 +64,7 @@ public void OnOffer(SignalingEventData data) var newObj = Instantiate(prefab, initialPosition, Quaternion.identity); dictObj.Add(data.connectionId, newObj); - var sender = newObj.GetComponentInChildren(); + var sender = newObj.GetComponentInChildren(); if (sender is VideoStreamSender videoStreamSender) { @@ -75,11 +75,6 @@ public void OnOffer(SignalingEventData data) videoStreamSender.SetCodec(RenderStreamingSettings.SenderVideoCodec); } - if (sender is StreamSenderBase senderBase) - { - statsUI?.AddSenderBase(senderBase); - } - var inputChannel = newObj.GetComponentInChildren(); var multiplayChannel = newObj.GetComponentInChildren(); var playerController = newObj.GetComponentInChildren(); @@ -88,6 +83,10 @@ public void OnOffer(SignalingEventData data) multiplayChannel.OnChangeLabel = new ChangeLabelEvent(); multiplayChannel.OnChangeLabel.AddListener(playerController.SetLabel); + streams.Add(sender); + streams.Add(inputChannel); + streams.Add(multiplayChannel); + AddSender(data.connectionId, sender); AddChannel(data.connectionId, inputChannel); AddChannel(data.connectionId, multiplayChannel); diff --git a/com.unity.renderstreaming/Samples~/Example/Multiplay/Multiplay.unity b/com.unity.renderstreaming/Samples~/Example/Multiplay/Multiplay.unity index 47755ad2d..e5a86f0a4 100644 --- a/com.unity.renderstreaming/Samples~/Example/Multiplay/Multiplay.unity +++ b/com.unity.renderstreaming/Samples~/Example/Multiplay/Multiplay.unity @@ -4058,126 +4058,11 @@ PrefabInstance: propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} - - target: {fileID: 685544287360755057, guid: 562feaa3a43a01841a00c6ac89b133fb, - type: 3} - propertyPath: m_AnchorMax.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 685544287360755057, guid: 562feaa3a43a01841a00c6ac89b133fb, - type: 3} - propertyPath: m_AnchorMax.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 685544287360755057, guid: 562feaa3a43a01841a00c6ac89b133fb, - type: 3} - propertyPath: m_AnchorMin.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1482305760229870820, guid: 562feaa3a43a01841a00c6ac89b133fb, - type: 3} - propertyPath: m_SizeDelta.x - value: 600 - objectReference: {fileID: 0} - - target: {fileID: 1482305760229870820, guid: 562feaa3a43a01841a00c6ac89b133fb, - type: 3} - propertyPath: m_SizeDelta.y - value: 700 - objectReference: {fileID: 0} - - target: {fileID: 1508457991030496397, guid: 562feaa3a43a01841a00c6ac89b133fb, - type: 3} - propertyPath: m_IsActive - value: 0 - objectReference: {fileID: 0} - target: {fileID: 4584148620787798253, guid: 562feaa3a43a01841a00c6ac89b133fb, type: 3} propertyPath: m_Name value: StatsUI objectReference: {fileID: 0} - - target: {fileID: 4584148620787798253, guid: 562feaa3a43a01841a00c6ac89b133fb, - type: 3} - propertyPath: m_IsActive - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 5861133140963408233, guid: 562feaa3a43a01841a00c6ac89b133fb, - type: 3} - propertyPath: m_AnchorMax.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 5861133140963408233, guid: 562feaa3a43a01841a00c6ac89b133fb, - type: 3} - propertyPath: m_SizeDelta.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 5889328126953563681, guid: 562feaa3a43a01841a00c6ac89b133fb, - type: 3} - propertyPath: m_AnchorMax.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 5889328126953563681, guid: 562feaa3a43a01841a00c6ac89b133fb, - type: 3} - propertyPath: m_AnchorMin.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 5889328126953563681, guid: 562feaa3a43a01841a00c6ac89b133fb, - type: 3} - propertyPath: m_SizeDelta.x - value: 563 - objectReference: {fileID: 0} - - target: {fileID: 5889328126953563681, guid: 562feaa3a43a01841a00c6ac89b133fb, - type: 3} - propertyPath: m_AnchoredPosition.x - value: 291.5 - objectReference: {fileID: 0} - - target: {fileID: 5889328126953563681, guid: 562feaa3a43a01841a00c6ac89b133fb, - type: 3} - propertyPath: m_AnchoredPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 8197558794462998189, guid: 562feaa3a43a01841a00c6ac89b133fb, - type: 3} - propertyPath: m_AnchorMax.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 8197558794462998189, guid: 562feaa3a43a01841a00c6ac89b133fb, - type: 3} - propertyPath: m_SizeDelta.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 8277204699089381438, guid: 562feaa3a43a01841a00c6ac89b133fb, - type: 3} - propertyPath: m_AnchorMax.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 8277204699089381438, guid: 562feaa3a43a01841a00c6ac89b133fb, - type: 3} - propertyPath: m_AnchorMax.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 8277204699089381438, guid: 562feaa3a43a01841a00c6ac89b133fb, - type: 3} - propertyPath: m_SizeDelta.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 8277204699089381438, guid: 562feaa3a43a01841a00c6ac89b133fb, - type: 3} - propertyPath: m_SizeDelta.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 9208257010345579798, guid: 562feaa3a43a01841a00c6ac89b133fb, - type: 3} - propertyPath: m_AnchorMax.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 9208257010345579798, guid: 562feaa3a43a01841a00c6ac89b133fb, - type: 3} - propertyPath: m_AnchorMax.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 9208257010345579798, guid: 562feaa3a43a01841a00c6ac89b133fb, - type: 3} - propertyPath: m_AnchorMin.x - value: 0 - objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 562feaa3a43a01841a00c6ac89b133fb, type: 3} --- !u!224 &2040023228 stripped diff --git a/com.unity.renderstreaming/Samples~/Example/Multiplay/MultiplaySample.cs b/com.unity.renderstreaming/Samples~/Example/Multiplay/MultiplaySample.cs index d9c5d839e..03327c730 100644 --- a/com.unity.renderstreaming/Samples~/Example/Multiplay/MultiplaySample.cs +++ b/com.unity.renderstreaming/Samples~/Example/Multiplay/MultiplaySample.cs @@ -69,7 +69,6 @@ void SetUpHost(string username) var instance = GameObject.Instantiate(prefabHost); var handler = instance.GetComponent(); - handler.SetStatsUI(statsUI); // host player var hostPlayer = GameObject.Instantiate(prefabPlayer); @@ -79,6 +78,7 @@ void SetUpHost(string username) playerInput.PerformPairingWithAllLocalDevices(); playerController.CheckPairedDevices(); + statsUI.AddSignalingHandler(handler); renderStreaming.Run(signaling: RenderStreamingSettings.Signaling, handlers: new SignalingHandlerBase[] {handler} ); @@ -89,6 +89,7 @@ IEnumerator SetUpGuest(string username, string connectionId) var guestPlayer = GameObject.Instantiate(prefabGuest); var handler = guestPlayer.GetComponent(); + statsUI.AddSignalingHandler(handler); renderStreaming.Run(signaling: RenderStreamingSettings.Signaling, handlers: new SignalingHandlerBase[] {handler} ); diff --git a/com.unity.renderstreaming/Samples~/Example/Receiver/Receiver.unity b/com.unity.renderstreaming/Samples~/Example/Receiver/Receiver.unity index 3c1d47109..cc03ae078 100644 --- a/com.unity.renderstreaming/Samples~/Example/Receiver/Receiver.unity +++ b/com.unity.renderstreaming/Samples~/Example/Receiver/Receiver.unity @@ -1333,21 +1333,6 @@ PrefabInstance: propertyPath: m_SizeDelta.y value: 100 objectReference: {fileID: 0} - - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, - type: 3} - propertyPath: m_LocalScale.x - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, - type: 3} - propertyPath: m_LocalScale.y - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, - type: 3} - propertyPath: m_LocalScale.z - value: 1 - objectReference: {fileID: 0} - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, type: 3} propertyPath: m_LocalPosition.x @@ -1391,7 +1376,7 @@ PrefabInstance: - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, type: 3} propertyPath: m_AnchoredPosition.y - value: -10 + value: 0 objectReference: {fileID: 0} - target: {fileID: 508261314311064870, guid: 562feaa3a43a01841a00c6ac89b133fb, type: 3} @@ -1418,60 +1403,25 @@ PrefabInstance: propertyPath: m_AnchorMax.y value: 0 objectReference: {fileID: 0} - - target: {fileID: 685544287360755057, guid: 562feaa3a43a01841a00c6ac89b133fb, - type: 3} - propertyPath: m_AnchorMin.y - value: 0.314 - objectReference: {fileID: 0} - - target: {fileID: 1482305760229870820, guid: 562feaa3a43a01841a00c6ac89b133fb, - type: 3} - propertyPath: m_SizeDelta.y - value: 360 - objectReference: {fileID: 0} - - target: {fileID: 1508457991030496397, guid: 562feaa3a43a01841a00c6ac89b133fb, - type: 3} - propertyPath: m_IsActive - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4184539458356606944, guid: 562feaa3a43a01841a00c6ac89b133fb, - type: 3} - propertyPath: receiverBaseList.Array.size - value: 2 - objectReference: {fileID: 0} - - target: {fileID: 4184539458356606944, guid: 562feaa3a43a01841a00c6ac89b133fb, - type: 3} - propertyPath: receiverBaseList.Array.data[0] - value: - objectReference: {fileID: 1915034401} - - target: {fileID: 4184539458356606944, guid: 562feaa3a43a01841a00c6ac89b133fb, - type: 3} - propertyPath: receiverBaseList.Array.data[1] - value: - objectReference: {fileID: 1915034407} - target: {fileID: 4184539458356606944, guid: 562feaa3a43a01841a00c6ac89b133fb, type: 3} - propertyPath: signalingHandlerBase.Array.size + propertyPath: signalingHandlerList.Array.size value: 1 objectReference: {fileID: 0} - target: {fileID: 4184539458356606944, guid: 562feaa3a43a01841a00c6ac89b133fb, type: 3} - propertyPath: signalingHandlerBase.Array.data[0] + propertyPath: signalingHandlerList.Array.data[0] value: objectReference: {fileID: 1915034404} - - target: {fileID: 4584148620787798253, guid: 562feaa3a43a01841a00c6ac89b133fb, - type: 3} - propertyPath: m_Name - value: StatsUI - objectReference: {fileID: 0} - - target: {fileID: 5861133140963408233, guid: 562feaa3a43a01841a00c6ac89b133fb, + - target: {fileID: 4441963706037454135, guid: 562feaa3a43a01841a00c6ac89b133fb, type: 3} - propertyPath: m_AnchorMax.x + propertyPath: m_SizeDelta.y value: 0 objectReference: {fileID: 0} - - target: {fileID: 5861133140963408233, guid: 562feaa3a43a01841a00c6ac89b133fb, + - target: {fileID: 4584148620787798253, guid: 562feaa3a43a01841a00c6ac89b133fb, type: 3} - propertyPath: m_SizeDelta.x - value: 0 + propertyPath: m_Name + value: StatsUI objectReference: {fileID: 0} - target: {fileID: 5889328126953563681, guid: 562feaa3a43a01841a00c6ac89b133fb, type: 3} @@ -1486,46 +1436,21 @@ PrefabInstance: - target: {fileID: 5889328126953563681, guid: 562feaa3a43a01841a00c6ac89b133fb, type: 3} propertyPath: m_SizeDelta.x - value: 0 + value: 363 objectReference: {fileID: 0} - target: {fileID: 5889328126953563681, guid: 562feaa3a43a01841a00c6ac89b133fb, type: 3} - propertyPath: m_AnchoredPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 5889328126953563681, guid: 562feaa3a43a01841a00c6ac89b133fb, - type: 3} - propertyPath: m_AnchoredPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 8197558794462998189, guid: 562feaa3a43a01841a00c6ac89b133fb, - type: 3} - propertyPath: m_AnchorMax.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 8197558794462998189, guid: 562feaa3a43a01841a00c6ac89b133fb, - type: 3} propertyPath: m_SizeDelta.y value: 0 objectReference: {fileID: 0} - - target: {fileID: 8277204699089381438, guid: 562feaa3a43a01841a00c6ac89b133fb, - type: 3} - propertyPath: m_AnchorMax.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 8277204699089381438, guid: 562feaa3a43a01841a00c6ac89b133fb, - type: 3} - propertyPath: m_AnchorMax.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 8277204699089381438, guid: 562feaa3a43a01841a00c6ac89b133fb, + - target: {fileID: 5889328126953563681, guid: 562feaa3a43a01841a00c6ac89b133fb, type: 3} - propertyPath: m_SizeDelta.x - value: 0 + propertyPath: m_AnchoredPosition.x + value: 191.5 objectReference: {fileID: 0} - - target: {fileID: 8277204699089381438, guid: 562feaa3a43a01841a00c6ac89b133fb, + - target: {fileID: 5889328126953563681, guid: 562feaa3a43a01841a00c6ac89b133fb, type: 3} - propertyPath: m_SizeDelta.y + propertyPath: m_AnchoredPosition.y value: 0 objectReference: {fileID: 0} - target: {fileID: 9208257010345579798, guid: 562feaa3a43a01841a00c6ac89b133fb, diff --git a/com.unity.renderstreaming/Samples~/Example/RenderPipeline/HDRP.unity b/com.unity.renderstreaming/Samples~/Example/RenderPipeline/HDRP.unity index d437cef33..4d1db76f6 100644 --- a/com.unity.renderstreaming/Samples~/Example/RenderPipeline/HDRP.unity +++ b/com.unity.renderstreaming/Samples~/Example/RenderPipeline/HDRP.unity @@ -1448,11 +1448,21 @@ PrefabInstance: propertyPath: signalingHandlerBase.Array.size value: 1 objectReference: {fileID: 0} + - target: {fileID: 4184539458356606944, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: signalingHandlerList.Array.size + value: 1 + objectReference: {fileID: 0} - target: {fileID: 4184539458356606944, guid: 562feaa3a43a01841a00c6ac89b133fb, type: 3} propertyPath: signalingHandlerBase.Array.data[0] value: objectReference: {fileID: 1131364784} + - target: {fileID: 4184539458356606944, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: signalingHandlerList.Array.data[0] + value: + objectReference: {fileID: 1131364784} - target: {fileID: 4584148620787798253, guid: 562feaa3a43a01841a00c6ac89b133fb, type: 3} propertyPath: m_Name diff --git a/com.unity.renderstreaming/Samples~/Example/RenderPipeline/URP.unity b/com.unity.renderstreaming/Samples~/Example/RenderPipeline/URP.unity index a753b957a..0ea51371f 100644 --- a/com.unity.renderstreaming/Samples~/Example/RenderPipeline/URP.unity +++ b/com.unity.renderstreaming/Samples~/Example/RenderPipeline/URP.unity @@ -1452,11 +1452,21 @@ PrefabInstance: propertyPath: signalingHandlerBase.Array.size value: 1 objectReference: {fileID: 0} + - target: {fileID: 4184539458356606944, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: signalingHandlerList.Array.size + value: 1 + objectReference: {fileID: 0} - target: {fileID: 4184539458356606944, guid: 562feaa3a43a01841a00c6ac89b133fb, type: 3} propertyPath: signalingHandlerBase.Array.data[0] value: objectReference: {fileID: 1623734776} + - target: {fileID: 4184539458356606944, guid: 562feaa3a43a01841a00c6ac89b133fb, + type: 3} + propertyPath: signalingHandlerList.Array.data[0] + value: + objectReference: {fileID: 1623734776} - target: {fileID: 4584148620787798253, guid: 562feaa3a43a01841a00c6ac89b133fb, type: 3} propertyPath: m_Name From 428f7c2b55bcd622fc3d53085b0d90e34d823c4c Mon Sep 17 00:00:00 2001 From: Takashi KANNAN Date: Thu, 25 Aug 2022 21:46:56 +0900 Subject: [PATCH 15/21] show stats on webapp --- WebApp/client/public/bidirectional/js/main.js | 21 ++--- WebApp/client/public/js/stats.js | 91 +++++++++++++++++++ WebApp/client/public/multiplay/js/main.js | 19 ++-- WebApp/client/public/receiver/js/main.js | 16 ++-- 4 files changed, 119 insertions(+), 28 deletions(-) create mode 100644 WebApp/client/public/js/stats.js diff --git a/WebApp/client/public/bidirectional/js/main.js b/WebApp/client/public/bidirectional/js/main.js index f9ddab644..80d23b966 100644 --- a/WebApp/client/public/bidirectional/js/main.js +++ b/WebApp/client/public/bidirectional/js/main.js @@ -1,5 +1,6 @@ import { SendVideo } from "./sendvideo.js"; import { getServerConfig } from "../../js/config.js"; +import { createDisplayStringArray } from "../../js/stats.js"; const defaultStreamWidth = 1280; const defaultStreamHeight = 720; @@ -203,6 +204,8 @@ function showCodecSelect() { codecPreferences.disabled = false; } +let lastStats; + function showStatsMessage() { setInterval(async () => { if (localVideo.videoWidth) { @@ -221,21 +224,11 @@ function showStatsMessage() { return; } - let message = ""; - stats.forEach(stat => { - if (stat.type === 'inbound-rtp' && stat.kind === 'video' && stat.codecId !== undefined) { - const codec = stats.get(stat.codecId); - message += `Using for receive video ${codec.mimeType} ${codec.sdpFmtpLine}, payloadType=${codec.payloadType}. Decoder: ${stat.decoderImplementation} \n`; - } - if (stat.type === 'outbound-rtp' && stat.kind === 'video' && stat.codecId !== undefined) { - const codec = stats.get(stat.codecId); - message += `Using for send video ${codec.mimeType} ${codec.sdpFmtpLine}, payloadType=${codec.payloadType}. Encoder: ${stat.encoderImplementation} \n`; - } - }); - - if (message != "") { + const array = createDisplayStringArray(stats, lastStats); + if (array.length) { messageDiv.style.display = 'block'; - messageDiv.innerText = message; + messageDiv.innerHTML = array.join('
'); } + lastStats = stats; }, 1000); } \ No newline at end of file diff --git a/WebApp/client/public/js/stats.js b/WebApp/client/public/js/stats.js new file mode 100644 index 000000000..bdc9833a3 --- /dev/null +++ b/WebApp/client/public/js/stats.js @@ -0,0 +1,91 @@ +/** + * create display string array from RTCStatsReport + * @param {RTCStatsReport} report - current RTCStatsReport + * @param {RTCStatsReport} lastReport - latest RTCStatsReport + * @return {Array} - display string Array + */ +export function createDisplayStringArray(report, lastReport) { + let array = new Array(); + + report.forEach(stat => { + if (stat.type === 'inbound-rtp') { + array.push(`${stat.kind} receiving stream stats`); + + if (stat.codecId != undefined) { + const codec = report.get(stat.codecId); + array.push(`Codec: ${codec.mimeType}`); + + if (codec.sdpFmtpLine) { + codec.sdpFmtpLine.split(";").forEach(fmtp => { + array.push(` - ${fmtp}`); + }); + } + + if (codec.payloadType) { + array.push(` - payloadType=${codec.payloadType}`); + } + + if (codec.clockRate) { + array.push(` - clockRate=${codec.clockRate}`); + } + + if (codec.channels) { + array.push(` - channels=${codec.channels}`); + } + } + + if (stat.kind == "video") { + array.push(`Decoder: ${stat.decoderImplementation}`); + array.push(`Resolution: ${stat.frameWidth}x${stat.frameHeight}`); + array.push(`Framerate: ${stat.framesPerSecond}`); + } + + if (lastReport && lastReport.has(stat.id)) { + const lastStats = lastReport.get(stat.id); + const duration = (stat.timestamp - lastStats.timestamp) / 1000000; + const bitrate = (8 * (stat.bytesReceived - lastStats.bytesReceived) / duration); + array.push(`Bitrate: ${bitrate}`); + } + } else if (stat.type === 'outbound-rtp') { + array.push(`${stat.kind} sending stream stats`); + + if (stat.codecId != undefined) { + const codec = report.get(stat.codecId); + array.push(`Codec: ${codec.mimeType}`); + + if (codec.sdpFmtpLine) { + codec.sdpFmtpLine.split(";").forEach(fmtp => { + array.push(` - ${fmtp}`); + }); + } + + if (codec.payloadType) { + array.push(` - payloadType=${codec.payloadType}`); + } + + if (codec.clockRate) { + array.push(` - clockRate=${codec.clockRate}`); + } + + if (codec.channels) { + array.push(` - channels=${codec.channels}`); + } + } + + if (stat.kind == "video") { + array.push(`Encoder: ${stat.encoderImplementation}`); + array.push(`Resolution: ${stat.frameWidth}x${stat.frameHeight}`); + array.push(`Framerate: ${stat.framesPerSecond}`); + } + + if (lastReport && lastReport.has(stat.id)) { + const lastStats = lastReport.get(stat.id); + const duration = (stat.timestamp - lastStats.timestamp) / 1000000; + const bitrate = (8 * (stat.bytesSent - lastStats.bytesSent) / duration); + array.push(`Bitrate: ${bitrate}`); + } + } + }); + + return array; +} \ No newline at end of file diff --git a/WebApp/client/public/multiplay/js/main.js b/WebApp/client/public/multiplay/js/main.js index ab9292b3b..e65503d52 100644 --- a/WebApp/client/public/multiplay/js/main.js +++ b/WebApp/client/public/multiplay/js/main.js @@ -6,6 +6,10 @@ import { getServerConfig } from "../../js/config.js"; +import { + createDisplayStringArray +} from "../../js/stats.js" + setup(); let playButton; @@ -167,6 +171,8 @@ function showCodecSelect() { codecPreferences.disabled = false; } +let lastStats; + function showStatsMessage() { setInterval(async () => { if (videoPlayer == null) { @@ -177,13 +183,12 @@ function showStatsMessage() { if (stats == null) { return; } - stats.forEach(stat => { - if (!(stat.type === 'inbound-rtp' && stat.kind === 'video') || stat.codecId === undefined) { - return; - } - const codec = stats.get(stat.codecId); + + const array = createDisplayStringArray(stats, lastStats); + if (array.length) { messageDiv.style.display = 'block'; - messageDiv.innerText = `Using ${codec.mimeType} ${codec.sdpFmtpLine}, payloadType=${codec.payloadType}. Decoder: ${stat.decoderImplementation}`; - }); + messageDiv.innerHTML = array.join('
'); + } + lastStats = stats; }, 1000); } \ No newline at end of file diff --git a/WebApp/client/public/receiver/js/main.js b/WebApp/client/public/receiver/js/main.js index ad75b859a..44717995d 100644 --- a/WebApp/client/public/receiver/js/main.js +++ b/WebApp/client/public/receiver/js/main.js @@ -1,5 +1,6 @@ import { Receiver } from "./receiver.js"; import { getServerConfig } from "../../js/config.js"; +import { createDisplayStringArray } from "../../js/stats.js"; setup(); @@ -215,6 +216,8 @@ function showCodecSelect() { codecPreferences.disabled = false; } +let lastStats; + function showStatsMessage() { setInterval(async () => { if (receiver == null) { @@ -225,13 +228,12 @@ function showStatsMessage() { if (stats == null) { return; } - stats.forEach(stat => { - if (!(stat.type === 'inbound-rtp' && stat.kind === 'video') || stat.codecId === undefined) { - return; - } - const codec = stats.get(stat.codecId); + + const array = createDisplayStringArray(stats, lastStats); + if (array.length) { messageDiv.style.display = 'block'; - messageDiv.innerText = `Using ${codec.mimeType} ${codec.sdpFmtpLine}, payloadType=${codec.payloadType}. Decoder: ${stat.decoderImplementation}`; - }); + messageDiv.innerHTML = array.join('
'); + } + lastStats = stats; }, 1000); } \ No newline at end of file From 9f53c624e36814f82d00fd201a0d8cb20996e4f5 Mon Sep 17 00:00:00 2001 From: Takashi KANNAN Date: Fri, 26 Aug 2022 08:39:03 +0900 Subject: [PATCH 16/21] fix compile error on unity 2020.3 --- .../Samples~/Example/Stats/ShowStatsUI.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/com.unity.renderstreaming/Samples~/Example/Stats/ShowStatsUI.cs b/com.unity.renderstreaming/Samples~/Example/Stats/ShowStatsUI.cs index 2ac50a61a..25da0f0e6 100644 --- a/com.unity.renderstreaming/Samples~/Example/Stats/ShowStatsUI.cs +++ b/com.unity.renderstreaming/Samples~/Example/Stats/ShowStatsUI.cs @@ -251,7 +251,7 @@ private static string CreateDisplayString(RTCStatsReport report, RTCStatsReport builder.AppendLine($"Codec: {codecStats.mimeType}"); if (!string.IsNullOrEmpty(codecStats.sdpFmtpLine)) { - foreach (var fmtp in codecStats.sdpFmtpLine.Split(";")) + foreach (var fmtp in codecStats.sdpFmtpLine.Split(';')) { builder.AppendLine($" - {fmtp}"); } @@ -296,7 +296,7 @@ private static string CreateDisplayString(RTCStatsReport report, RTCStatsReport builder.AppendLine($"Codec: {codecStats.mimeType}"); if (!string.IsNullOrEmpty(codecStats.sdpFmtpLine)) { - foreach (var fmtp in codecStats.sdpFmtpLine.Split(";")) + foreach (var fmtp in codecStats.sdpFmtpLine.Split(';')) { builder.AppendLine($" - {fmtp}"); } From 53284a25e29811cac901d05ad38160217d2531db Mon Sep 17 00:00:00 2001 From: Takashi KANNAN Date: Fri, 26 Aug 2022 10:40:34 +0900 Subject: [PATCH 17/21] fix bitrate unit --- WebApp/client/public/js/stats.js | 12 ++++++------ .../Samples~/Example/Stats/ShowStatsUI.cs | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/WebApp/client/public/js/stats.js b/WebApp/client/public/js/stats.js index bdc9833a3..6d6067188 100644 --- a/WebApp/client/public/js/stats.js +++ b/WebApp/client/public/js/stats.js @@ -42,9 +42,9 @@ export function createDisplayStringArray(report, lastReport) { if (lastReport && lastReport.has(stat.id)) { const lastStats = lastReport.get(stat.id); - const duration = (stat.timestamp - lastStats.timestamp) / 1000000; - const bitrate = (8 * (stat.bytesReceived - lastStats.bytesReceived) / duration); - array.push(`Bitrate: ${bitrate}`); + const duration = (stat.timestamp - lastStats.timestamp) / 1000; + const bitrate = (8 * (stat.bytesReceived - lastStats.bytesReceived) / duration) / 1000; + array.push(`Bitrate: ${bitrate.toFixed(2)} kbit/sec`); } } else if (stat.type === 'outbound-rtp') { array.push(`${stat.kind} sending stream stats`); @@ -80,9 +80,9 @@ export function createDisplayStringArray(report, lastReport) { if (lastReport && lastReport.has(stat.id)) { const lastStats = lastReport.get(stat.id); - const duration = (stat.timestamp - lastStats.timestamp) / 1000000; - const bitrate = (8 * (stat.bytesSent - lastStats.bytesSent) / duration); - array.push(`Bitrate: ${bitrate}`); + const duration = (stat.timestamp - lastStats.timestamp) / 1000; + const bitrate = (8 * (stat.bytesSent - lastStats.bytesSent) / duration) / 1000; + array.push(`Bitrate: ${bitrate.toFixed(2)} kbit/sec`); } } }); diff --git a/com.unity.renderstreaming/Samples~/Example/Stats/ShowStatsUI.cs b/com.unity.renderstreaming/Samples~/Example/Stats/ShowStatsUI.cs index 25da0f0e6..7f8d4b739 100644 --- a/com.unity.renderstreaming/Samples~/Example/Stats/ShowStatsUI.cs +++ b/com.unity.renderstreaming/Samples~/Example/Stats/ShowStatsUI.cs @@ -284,8 +284,8 @@ private static string CreateDisplayString(RTCStatsReport report, RTCStatsReport lastStats is RTCInboundRTPStreamStats lastInboundStats) { var duration = (double)(inboundStats.Timestamp - lastInboundStats.Timestamp) / 1000000; - var bitrate = (ulong)(8 * (inboundStats.bytesReceived - lastInboundStats.bytesReceived) / duration); - builder.AppendLine($"Bitrate: {bitrate}"); + var bitrate = (8 * (inboundStats.bytesReceived - lastInboundStats.bytesReceived) / duration) / 1000; + builder.AppendLine($"Bitrate: {bitrate:F2} kbit/sec"); } } else if (stats is RTCOutboundRTPStreamStats outboundStats) @@ -329,8 +329,8 @@ private static string CreateDisplayString(RTCStatsReport report, RTCStatsReport lastStats is RTCOutboundRTPStreamStats lastOutboundStats) { var duration = (double)(outboundStats.Timestamp - lastOutboundStats.Timestamp) / 1000000; - var bitrate = (ulong)(8 * (outboundStats.bytesSent - lastOutboundStats.bytesSent) / duration); - builder.AppendLine($"Bitrate: {bitrate}"); + var bitrate = (8 * (outboundStats.bytesSent - lastOutboundStats.bytesSent) / duration) / 1000; + builder.AppendLine($"Bitrate: {bitrate:F2} kbit/sec"); } } } From 15888647b512bcc4eb069dbeb77a978339e33567 Mon Sep 17 00:00:00 2001 From: Takashi KANNAN Date: Fri, 26 Aug 2022 12:17:41 +0900 Subject: [PATCH 18/21] fix conflict --- .../Samples~/Example/Multiplay/MultiplaySample.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/com.unity.renderstreaming/Samples~/Example/Multiplay/MultiplaySample.cs b/com.unity.renderstreaming/Samples~/Example/Multiplay/MultiplaySample.cs index 03327c730..af31a2fe2 100644 --- a/com.unity.renderstreaming/Samples~/Example/Multiplay/MultiplaySample.cs +++ b/com.unity.renderstreaming/Samples~/Example/Multiplay/MultiplaySample.cs @@ -102,7 +102,6 @@ IEnumerator SetUpGuest(string username, string connectionId) channel.OnStartedChannel += _ => { StartCoroutine(ChangeLabel(channel, username)); }; receiveVideoViewer.SetCodec(RenderStreamingSettings.ReceiverVideoCodec); - statsUI.AddReceiverBase(receiveVideoViewer); // todo(kazuki): yield return new WaitForSeconds(1f); From f521cc6b95c8d1501c156febe760a9500750f6b3 Mon Sep 17 00:00:00 2001 From: Takashi KANNAN Date: Fri, 26 Aug 2022 13:02:55 +0900 Subject: [PATCH 19/21] stop stats interval when disconnect --- WebApp/client/public/bidirectional/js/main.js | 16 ++++++++++++++-- WebApp/client/public/multiplay/js/main.js | 17 +++++++++++++++-- WebApp/client/public/receiver/js/main.js | 13 ++++++++++++- 3 files changed, 41 insertions(+), 5 deletions(-) diff --git a/WebApp/client/public/bidirectional/js/main.js b/WebApp/client/public/bidirectional/js/main.js index 80d23b966..8a4e1725a 100644 --- a/WebApp/client/public/bidirectional/js/main.js +++ b/WebApp/client/public/bidirectional/js/main.js @@ -40,7 +40,6 @@ let useCustomResolution = false; setUpInputSelect(); showCodecSelect(); -showStatsMessage(); let sendVideo = new SendVideo(); sendVideo.ondisconnect = async (message) => { @@ -124,11 +123,13 @@ async function setUp() { codecPreferences.disabled = true; await sendVideo.setupConnection(remoteVideo, connectionId, useWebSocket, selectedCodecs); + showStatsMessage(); } async function hangUp() { hangUpButton.disabled = true; setupButton.disabled = false; + clearStatsMessage(); await sendVideo.hangUp(connectionId); textForConnectionId.value = getRandom(); connectionId = null; @@ -205,9 +206,10 @@ function showCodecSelect() { } let lastStats; +let intervalId; function showStatsMessage() { - setInterval(async () => { + intervalId = setInterval(async () => { if (localVideo.videoWidth) { localVideoStatsDiv.innerHTML = `Sending resolution: ${localVideo.videoWidth} x ${localVideo.videoHeight} px`; } @@ -231,4 +233,14 @@ function showStatsMessage() { } lastStats = stats; }, 1000); +} + +function clearStatsMessage() { + if (intervalId) { + clearInterval(intervalId); + } + lastStats = null; + intervalId = null; + localVideoStatsDiv.innerHTML = ''; + remoteVideoStatsDiv.innerHTML = ''; } \ No newline at end of file diff --git a/WebApp/client/public/multiplay/js/main.js b/WebApp/client/public/multiplay/js/main.js index e65503d52..b92d1f982 100644 --- a/WebApp/client/public/multiplay/js/main.js +++ b/WebApp/client/public/multiplay/js/main.js @@ -128,16 +128,20 @@ async function setupVideoPlayer(elements) { await videoPlayer.setupConnection(useWebSocket, selectedCodecs); videoPlayer.ondisconnect = onDisconnect; + showStatsMessage(); + return videoPlayer; } -function onDisconnect(message) { +async function onDisconnect(message) { if (message) { messageDiv.style.display = 'block'; messageDiv.innerText = message; } + clearStatsMessage(); clearChildren(playerDiv); + await videoPlayer.stop(); videoPlayer = null; if (supportsSetCodecPreferences) { codecPreferences.disabled = false; @@ -172,9 +176,10 @@ function showCodecSelect() { } let lastStats; +let intervalId; function showStatsMessage() { - setInterval(async () => { + intervalId = setInterval(async () => { if (videoPlayer == null) { return; } @@ -191,4 +196,12 @@ function showStatsMessage() { } lastStats = stats; }, 1000); +} + +function clearStatsMessage() { + if (intervalId) { + clearInterval(intervalId); + } + lastStats = null; + intervalId = null; } \ No newline at end of file diff --git a/WebApp/client/public/receiver/js/main.js b/WebApp/client/public/receiver/js/main.js index 44717995d..0685f0e41 100644 --- a/WebApp/client/public/receiver/js/main.js +++ b/WebApp/client/public/receiver/js/main.js @@ -171,6 +171,7 @@ async function setupVideoPlayer(elements) { await videoPlayer.setupConnection(useWebSocket, selectedCodecs); videoPlayer.ondisconnect = onDisconnect; + showStatsMessage(); return videoPlayer; } @@ -181,6 +182,7 @@ async function onDisconnect(message) { messageDiv.innerText = message; } + clearStatsMessage(); clearChildren(playerDiv); await receiver.stop(); receiver = null; @@ -217,9 +219,10 @@ function showCodecSelect() { } let lastStats; +let intervalId; function showStatsMessage() { - setInterval(async () => { + intervalId = setInterval(async () => { if (receiver == null) { return; } @@ -236,4 +239,12 @@ function showStatsMessage() { } lastStats = stats; }, 1000); +} + +function clearStatsMessage() { + if (intervalId) { + clearInterval(intervalId); + } + lastStats = null; + intervalId = null; } \ No newline at end of file From e3d4310a71493876eb1b18c062a177c1d2563edc Mon Sep 17 00:00:00 2001 From: Takashi KANNAN Date: Fri, 26 Aug 2022 13:08:27 +0900 Subject: [PATCH 20/21] clear messagediv --- WebApp/client/public/bidirectional/js/main.js | 8 +++++--- WebApp/client/public/multiplay/js/main.js | 4 +++- WebApp/client/public/receiver/js/main.js | 4 +++- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/WebApp/client/public/bidirectional/js/main.js b/WebApp/client/public/bidirectional/js/main.js index 8a4e1725a..dcb0083a1 100644 --- a/WebApp/client/public/bidirectional/js/main.js +++ b/WebApp/client/public/bidirectional/js/main.js @@ -43,12 +43,12 @@ showCodecSelect(); let sendVideo = new SendVideo(); sendVideo.ondisconnect = async (message) => { + await hangUp(); + if (message) { messageDiv.style.display = 'block'; messageDiv.innerText = message; } - - await hangUp(); }; let useWebSocket; @@ -127,9 +127,9 @@ async function setUp() { } async function hangUp() { + clearStatsMessage(); hangUpButton.disabled = true; setupButton.disabled = false; - clearStatsMessage(); await sendVideo.hangUp(connectionId); textForConnectionId.value = getRandom(); connectionId = null; @@ -243,4 +243,6 @@ function clearStatsMessage() { intervalId = null; localVideoStatsDiv.innerHTML = ''; remoteVideoStatsDiv.innerHTML = ''; + messageDiv.style.display = 'none'; + messageDiv.innerHTML = ''; } \ No newline at end of file diff --git a/WebApp/client/public/multiplay/js/main.js b/WebApp/client/public/multiplay/js/main.js index b92d1f982..920ae43bd 100644 --- a/WebApp/client/public/multiplay/js/main.js +++ b/WebApp/client/public/multiplay/js/main.js @@ -134,12 +134,12 @@ async function setupVideoPlayer(elements) { } async function onDisconnect(message) { + clearStatsMessage(); if (message) { messageDiv.style.display = 'block'; messageDiv.innerText = message; } - clearStatsMessage(); clearChildren(playerDiv); await videoPlayer.stop(); videoPlayer = null; @@ -204,4 +204,6 @@ function clearStatsMessage() { } lastStats = null; intervalId = null; + messageDiv.style.display = 'none'; + messageDiv.innerHTML = ''; } \ No newline at end of file diff --git a/WebApp/client/public/receiver/js/main.js b/WebApp/client/public/receiver/js/main.js index 0685f0e41..bdc0d5bc8 100644 --- a/WebApp/client/public/receiver/js/main.js +++ b/WebApp/client/public/receiver/js/main.js @@ -177,12 +177,12 @@ async function setupVideoPlayer(elements) { } async function onDisconnect(message) { + clearStatsMessage(); if (message) { messageDiv.style.display = 'block'; messageDiv.innerText = message; } - clearStatsMessage(); clearChildren(playerDiv); await receiver.stop(); receiver = null; @@ -247,4 +247,6 @@ function clearStatsMessage() { } lastStats = null; intervalId = null; + messageDiv.style.display = 'none'; + messageDiv.innerHTML = ''; } \ No newline at end of file From c9133481045de145d396e2d53ba349876de06f16 Mon Sep 17 00:00:00 2001 From: Takashi KANNAN Date: Fri, 26 Aug 2022 13:11:52 +0900 Subject: [PATCH 21/21] fix --- WebApp/client/public/multiplay/js/main.js | 1 - WebApp/client/public/receiver/js/main.js | 1 - 2 files changed, 2 deletions(-) diff --git a/WebApp/client/public/multiplay/js/main.js b/WebApp/client/public/multiplay/js/main.js index 920ae43bd..e1d5e9838 100644 --- a/WebApp/client/public/multiplay/js/main.js +++ b/WebApp/client/public/multiplay/js/main.js @@ -40,7 +40,6 @@ async function setup() { useWebSocket = res.useWebSocket; showWarningIfNeeded(res.startupMode); showCodecSelect(); - showStatsMessage(); showPlayButton(); } diff --git a/WebApp/client/public/receiver/js/main.js b/WebApp/client/public/receiver/js/main.js index bdc0d5bc8..e5368dbe4 100644 --- a/WebApp/client/public/receiver/js/main.js +++ b/WebApp/client/public/receiver/js/main.js @@ -35,7 +35,6 @@ async function setup() { showWarningIfNeeded(res.startupMode); showCodecSelect(); showPlayButton(); - showStatsMessage(); } function showWarningIfNeeded(startupMode) {