diff --git a/Samples~/Menu/Menu.unity b/Samples~/Menu/Menu.unity index d4f393ce31..f021699f29 100644 --- a/Samples~/Menu/Menu.unity +++ b/Samples~/Menu/Menu.unity @@ -157,7 +157,7 @@ RectTransform: 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.5} + m_AnchoredPosition: {x: 0, y: -0.4999981} m_SizeDelta: {x: -20, y: -13} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &46960953 @@ -763,7 +763,7 @@ RectTransform: 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.5} + m_AnchoredPosition: {x: 0, y: -0.4999981} m_SizeDelta: {x: -20, y: -13} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &173133240 @@ -1504,7 +1504,7 @@ RectTransform: m_Children: - {fileID: 158143827} m_Father: {fileID: 1648950604} - m_RootOrder: 15 + m_RootOrder: 16 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} @@ -2117,7 +2117,7 @@ RectTransform: 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.5} + m_AnchoredPosition: {x: 0, y: -0.4999981} m_SizeDelta: {x: -20, y: -13} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &539845919 @@ -4144,7 +4144,6 @@ MonoBehaviour: streamSizeSelector: {fileID: 1314871455} textureWidthInput: {fileID: 903402936} textureHeightInput: {fileID: 1896809386} - toggleSwitchStreamSizeInput: {fileID: 0} toggleLimitTextureSize: {fileID: 158143828} buttonPeerConnection: {fileID: 189517637} buttonDataChannel: {fileID: 595998595} @@ -4161,6 +4160,7 @@ MonoBehaviour: buttonBandwidth: {fileID: 150123349} buttonPerfectNegotiation: {fileID: 300533285} buttonLatency: {fileID: 1996324046} + buttonReplaceTrack: {fileID: 1666683156} --- !u!1 &1243673635 GameObject: m_ObjectHideFlags: 0 @@ -5850,6 +5850,7 @@ RectTransform: - {fileID: 811312172} - {fileID: 300533284} - {fileID: 1996324045} + - {fileID: 1666683155} - {fileID: 323227749} m_Father: {fileID: 660889755} m_RootOrder: 0 @@ -6133,6 +6134,127 @@ RectTransform: m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: -20, y: -20} m_Pivot: {x: 0.5, y: 0.5} +--- !u!1 &1666683154 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1666683155} + - component: {fileID: 1666683158} + - component: {fileID: 1666683157} + - component: {fileID: 1666683156} + m_Layer: 5 + m_Name: ReplaceTrack + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1666683155 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1666683154} + 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_Children: + - {fileID: 1802585131} + m_Father: {fileID: 1648950604} + m_RootOrder: 15 + 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_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1666683156 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1666683154} + 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: 1666683157} + m_OnClick: + m_PersistentCalls: + m_Calls: [] +--- !u!114 &1666683157 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1666683154} + 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!222 &1666683158 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1666683154} + m_CullTransparentMesh: 1 --- !u!1 &1701955626 GameObject: m_ObjectHideFlags: 0 @@ -6487,6 +6609,85 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1781638542} m_CullTransparentMesh: 1 +--- !u!1 &1802585130 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1802585131} + - component: {fileID: 1802585133} + - component: {fileID: 1802585132} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1802585131 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1802585130} + 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_Children: [] + m_Father: {fileID: 1666683155} + 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!114 &1802585132 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1802585130} + 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: 32 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 3 + m_MaxSize: 40 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: ReplaceTrack +--- !u!222 &1802585133 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1802585130} + m_CullTransparentMesh: 1 --- !u!1 &1813582002 GameObject: m_ObjectHideFlags: 0 @@ -7320,7 +7521,7 @@ RectTransform: 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.5} + m_AnchoredPosition: {x: 0, y: -0.4999981} m_SizeDelta: {x: -20, y: -13} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &2012783087 diff --git a/Samples~/PerfectNegotiation/PerfectNegotiationSample.cs b/Samples~/PerfectNegotiation/PerfectNegotiationSample.cs index e9314e246b..a50af966a6 100644 --- a/Samples~/PerfectNegotiation/PerfectNegotiationSample.cs +++ b/Samples~/PerfectNegotiation/PerfectNegotiationSample.cs @@ -86,227 +86,227 @@ private void Update() impoliteSourceCamera2.backgroundColor = Color.LerpUnclamped(cyan, green, lerp); } - public void PostMessage(Peer from, Message message) + void PostMessage(Peer from, Message message) { var other = from == politePeer ? impolitePeer : politePeer; other.OnMessage(message); } -} -class Message -{ - public RTCSessionDescription description; - public RTCIceCandidate candidate; -} + class Message + { + public RTCSessionDescription description; + public RTCIceCandidate candidate; + } -class Peer : IDisposable -{ - private readonly PerfectNegotiationSample parent; - private readonly bool polite; - private readonly RTCPeerConnection pc; - private readonly VideoStreamTrack sourceVideoTrack1; - private readonly VideoStreamTrack sourceVideoTrack2; - private readonly List sendingTransceiverList = new List(); - - private bool makingOffer; - private bool ignoreOffer; - private bool srdAnswerPending; - private bool sldGetBackStable; - - private const int width = 256; - private const int height = 256; - - public Peer( - PerfectNegotiationSample parent, - bool polite, - Camera source1, - Camera source2, - RawImage receive) + class Peer : IDisposable { - this.parent = parent; - this.polite = polite; + private readonly PerfectNegotiationSample parent; + private readonly bool polite; + private readonly RTCPeerConnection pc; + private readonly VideoStreamTrack sourceVideoTrack1; + private readonly VideoStreamTrack sourceVideoTrack2; + private readonly List sendingTransceiverList = new List(); + + private bool makingOffer; + private bool ignoreOffer; + private bool srdAnswerPending; + private bool sldGetBackStable; + + private const int width = 256; + private const int height = 256; + + public Peer( + PerfectNegotiationSample parent, + bool polite, + Camera source1, + Camera source2, + RawImage receive) + { + this.parent = parent; + this.polite = polite; - var config = GetSelectedSdpSemantics(); - pc = new RTCPeerConnection(ref config); + var config = GetSelectedSdpSemantics(); + pc = new RTCPeerConnection(ref config); - pc.OnTrack = e => - { - Debug.Log($"{this} OnTrack"); - if (e.Track is VideoStreamTrack video) + pc.OnTrack = e => { - video.OnVideoReceived += tex => + Debug.Log($"{this} OnTrack"); + if (e.Track is VideoStreamTrack video) { - receive.texture = tex; - }; - } - }; - - pc.OnIceCandidate = candidate => - { - var message = new Message {candidate = candidate}; - this.parent.PostMessage(this, message); - }; - - pc.OnNegotiationNeeded = () => - { - this.parent.StartCoroutine(NegotiationProcess()); - }; - - sourceVideoTrack1 = source1.CaptureStreamTrack(width, height, 0); - sourceVideoTrack2 = source2.CaptureStreamTrack(width, height, 0); - } - - private IEnumerator NegotiationProcess() - { - Debug.Log($"{this} SLD due to negotiationneeded"); - - yield return new WaitWhile(() => sldGetBackStable); - - Assert.AreEqual(pc.SignalingState, RTCSignalingState.Stable, - $"{this} negotiationneeded always fires in stable state"); - Assert.AreEqual(makingOffer, false, $"{this} negotiationneeded not already in progress"); + video.OnVideoReceived += tex => + { + receive.texture = tex; + }; + } + }; + + pc.OnIceCandidate = candidate => + { + var message = new Message { candidate = candidate }; + this.parent.PostMessage(this, message); + }; - makingOffer = true; - var op = pc.SetLocalDescription(); - yield return op; + pc.OnNegotiationNeeded = () => + { + this.parent.StartCoroutine(NegotiationProcess()); + }; - if (op.IsError) - { - Debug.LogError($"{this} {op.Error.message}"); - makingOffer = false; - yield break; + sourceVideoTrack1 = source1.CaptureStreamTrack(width, height, 0); + sourceVideoTrack2 = source2.CaptureStreamTrack(width, height, 0); } - Assert.AreEqual(pc.SignalingState, RTCSignalingState.HaveLocalOffer, - $"{this} negotiationneeded always fires in stable state"); - Assert.AreEqual(pc.LocalDescription.type, RTCSdpType.Offer, $"{this} negotiationneeded SLD worked"); - makingOffer = false; - - var offer = new Message {description = pc.LocalDescription}; - parent.PostMessage(this, offer); - } - - public void Dispose() - { - sendingTransceiverList.Clear(); - sourceVideoTrack1.Dispose(); - sourceVideoTrack2.Dispose(); - pc.Dispose(); - } + private IEnumerator NegotiationProcess() + { + Debug.Log($"{this} SLD due to negotiationneeded"); - public override string ToString() - { - var str = polite ? "polite" : "impolite"; - return $"[{str}-{base.ToString()}]"; - } + yield return new WaitWhile(() => sldGetBackStable); - private static RTCConfiguration GetSelectedSdpSemantics() - { - RTCConfiguration config = default; - config.iceServers = new[] {new RTCIceServer {urls = new[] {"stun:stun.l.google.com:19302"}}}; + Assert.AreEqual(pc.SignalingState, RTCSignalingState.Stable, + $"{this} negotiationneeded always fires in stable state"); + Assert.AreEqual(makingOffer, false, $"{this} negotiationneeded not already in progress"); - return config; - } + makingOffer = true; + var op = pc.SetLocalDescription(); + yield return op; - public void OnMessage(Message message) - { - if (message.candidate != null) - { - if (!pc.AddIceCandidate(message.candidate) && !ignoreOffer) + if (op.IsError) { - Debug.LogError($"{this} this candidate can't accept current signaling state {pc.SignalingState}."); + Debug.LogError($"{this} {op.Error.message}"); + makingOffer = false; + yield break; } - return; + Assert.AreEqual(pc.SignalingState, RTCSignalingState.HaveLocalOffer, + $"{this} negotiationneeded always fires in stable state"); + Assert.AreEqual(pc.LocalDescription.type, RTCSdpType.Offer, $"{this} negotiationneeded SLD worked"); + makingOffer = false; + + var offer = new Message { description = pc.LocalDescription }; + parent.PostMessage(this, offer); } - parent.StartCoroutine(OfferAnswerProcess(message.description)); - } + public void Dispose() + { + sendingTransceiverList.Clear(); + sourceVideoTrack1.Dispose(); + sourceVideoTrack2.Dispose(); + pc.Dispose(); + } - private IEnumerator OfferAnswerProcess(RTCSessionDescription description) - { - var isStable = - pc.SignalingState == RTCSignalingState.Stable || - (pc.SignalingState == RTCSignalingState.HaveLocalOffer && srdAnswerPending); - ignoreOffer = - description.type == RTCSdpType.Offer && !polite && (makingOffer || !isStable); - if (ignoreOffer) + public override string ToString() { - Debug.Log($"{this} glare - ignoring offer"); - yield break; + var str = polite ? "polite" : "impolite"; + return $"[{str}-{base.ToString()}]"; } - yield return new WaitWhile(() => makingOffer); + private static RTCConfiguration GetSelectedSdpSemantics() + { + RTCConfiguration config = default; + config.iceServers = new[] { new RTCIceServer { urls = new[] { "stun:stun.l.google.com:19302" } } }; - srdAnswerPending = description.type == RTCSdpType.Answer; - Debug.Log($"{this} SRD {description.type} SignalingState {pc.SignalingState}"); - var op1 = pc.SetRemoteDescription(ref description); - yield return op1; - Assert.IsFalse(op1.IsError, $"{this} {op1.Error.message}"); + return config; + } - srdAnswerPending = false; - if (description.type == RTCSdpType.Offer) + public void OnMessage(Message message) { - Assert.AreEqual(pc.RemoteDescription.type, RTCSdpType.Offer, $"{this} SRD worked"); - Assert.AreEqual(pc.SignalingState, RTCSignalingState.HaveRemoteOffer, $"{this} Remote offer"); - Debug.Log($"{this} SLD to get back to stable"); - sldGetBackStable = true; - - var op2 = pc.SetLocalDescription(); - yield return op2; - Assert.IsFalse(op2.IsError, $"{this} {op2.Error.message}"); + if (message.candidate != null) + { + if (!pc.AddIceCandidate(message.candidate) && !ignoreOffer) + { + Debug.LogError($"{this} this candidate can't accept current signaling state {pc.SignalingState}."); + } - Assert.AreEqual(pc.LocalDescription.type, RTCSdpType.Answer, $"{this} onmessage SLD worked"); - Assert.AreEqual(pc.SignalingState, RTCSignalingState.Stable, - $"{this} onmessage not racing with negotiationneeded"); - sldGetBackStable = false; + return; + } - var answer = new Message {description = pc.LocalDescription}; - parent.PostMessage(this, answer); + parent.StartCoroutine(OfferAnswerProcess(message.description)); } - else - { - Assert.AreEqual(pc.RemoteDescription.type, RTCSdpType.Answer, $"{this} Answer was set"); - Assert.AreEqual(pc.SignalingState, RTCSignalingState.Stable, $"{this} answered"); - } - } - public void SwapTransceivers() - { - Debug.Log($"{this} swapTransceivers"); - if (sendingTransceiverList.Count == 0) + private IEnumerator OfferAnswerProcess(RTCSessionDescription description) { - var transceiver1 = pc.AddTransceiver(sourceVideoTrack1); - transceiver1.Direction = RTCRtpTransceiverDirection.SendOnly; - var transceiver2 = pc.AddTransceiver(sourceVideoTrack2); - transceiver2.Direction = RTCRtpTransceiverDirection.Inactive; - - if (WebRTCSettings.UseVideoCodec != null) + var isStable = + pc.SignalingState == RTCSignalingState.Stable || + (pc.SignalingState == RTCSignalingState.HaveLocalOffer && srdAnswerPending); + ignoreOffer = + description.type == RTCSdpType.Offer && !polite && (makingOffer || !isStable); + if (ignoreOffer) { - var codecs = new[] {WebRTCSettings.UseVideoCodec}; - transceiver1.SetCodecPreferences(codecs); - transceiver2.SetCodecPreferences(codecs); + Debug.Log($"{this} glare - ignoring offer"); + yield break; } - sendingTransceiverList.Add(transceiver1); - sendingTransceiverList.Add(transceiver2); - return; - } + yield return new WaitWhile(() => makingOffer); - if (sendingTransceiverList[0].CurrentDirection == RTCRtpTransceiverDirection.SendOnly) - { - sendingTransceiverList[0].Direction = RTCRtpTransceiverDirection.Inactive; - sendingTransceiverList[0].Sender.ReplaceTrack(null); - sendingTransceiverList[1].Direction = RTCRtpTransceiverDirection.SendOnly; - sendingTransceiverList[1].Sender.ReplaceTrack(sourceVideoTrack2); + srdAnswerPending = description.type == RTCSdpType.Answer; + Debug.Log($"{this} SRD {description.type} SignalingState {pc.SignalingState}"); + var op1 = pc.SetRemoteDescription(ref description); + yield return op1; + Assert.IsFalse(op1.IsError, $"{this} {op1.Error.message}"); + + srdAnswerPending = false; + if (description.type == RTCSdpType.Offer) + { + Assert.AreEqual(pc.RemoteDescription.type, RTCSdpType.Offer, $"{this} SRD worked"); + Assert.AreEqual(pc.SignalingState, RTCSignalingState.HaveRemoteOffer, $"{this} Remote offer"); + Debug.Log($"{this} SLD to get back to stable"); + sldGetBackStable = true; + + var op2 = pc.SetLocalDescription(); + yield return op2; + Assert.IsFalse(op2.IsError, $"{this} {op2.Error.message}"); + + Assert.AreEqual(pc.LocalDescription.type, RTCSdpType.Answer, $"{this} onmessage SLD worked"); + Assert.AreEqual(pc.SignalingState, RTCSignalingState.Stable, + $"{this} onmessage not racing with negotiationneeded"); + sldGetBackStable = false; + + var answer = new Message { description = pc.LocalDescription }; + parent.PostMessage(this, answer); + } + else + { + Assert.AreEqual(pc.RemoteDescription.type, RTCSdpType.Answer, $"{this} Answer was set"); + Assert.AreEqual(pc.SignalingState, RTCSignalingState.Stable, $"{this} answered"); + } } - else + + public void SwapTransceivers() { - sendingTransceiverList[1].Direction = RTCRtpTransceiverDirection.Inactive; - sendingTransceiverList[1].Sender.ReplaceTrack(null); - sendingTransceiverList[0].Direction = RTCRtpTransceiverDirection.SendOnly; - sendingTransceiverList[0].Sender.ReplaceTrack(sourceVideoTrack1); + Debug.Log($"{this} swapTransceivers"); + if (sendingTransceiverList.Count == 0) + { + var transceiver1 = pc.AddTransceiver(sourceVideoTrack1); + transceiver1.Direction = RTCRtpTransceiverDirection.SendOnly; + var transceiver2 = pc.AddTransceiver(sourceVideoTrack2); + transceiver2.Direction = RTCRtpTransceiverDirection.Inactive; + + if (WebRTCSettings.UseVideoCodec != null) + { + var codecs = new[] { WebRTCSettings.UseVideoCodec }; + transceiver1.SetCodecPreferences(codecs); + transceiver2.SetCodecPreferences(codecs); + } + + sendingTransceiverList.Add(transceiver1); + sendingTransceiverList.Add(transceiver2); + return; + } + + if (sendingTransceiverList[0].CurrentDirection == RTCRtpTransceiverDirection.SendOnly) + { + sendingTransceiverList[0].Direction = RTCRtpTransceiverDirection.Inactive; + sendingTransceiverList[0].Sender.ReplaceTrack(null); + sendingTransceiverList[1].Direction = RTCRtpTransceiverDirection.SendOnly; + sendingTransceiverList[1].Sender.ReplaceTrack(sourceVideoTrack2); + } + else + { + sendingTransceiverList[1].Direction = RTCRtpTransceiverDirection.Inactive; + sendingTransceiverList[1].Sender.ReplaceTrack(null); + sendingTransceiverList[0].Direction = RTCRtpTransceiverDirection.SendOnly; + sendingTransceiverList[0].Sender.ReplaceTrack(sourceVideoTrack1); + } } } } diff --git a/Samples~/ReplaceTrack.meta b/Samples~/ReplaceTrack.meta new file mode 100644 index 0000000000..f4d0a2c41b --- /dev/null +++ b/Samples~/ReplaceTrack.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 610cc6c4869ecbf43af946d4f3e390ce +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Samples~/ReplaceTrack/ReplaceTrack.unity b/Samples~/ReplaceTrack/ReplaceTrack.unity new file mode 100644 index 0000000000..3c12f0053c --- /dev/null +++ b/Samples~/ReplaceTrack/ReplaceTrack.unity @@ -0,0 +1,1977 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +OcclusionCullingSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 + m_SceneGUID: 00000000000000000000000000000000 + m_OcclusionCullingData: {fileID: 0} +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_Fog: 0 + m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + m_FogMode: 3 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 300 + m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} + m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} + m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 0 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 0} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 1 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 0} + m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} + m_UseRadianceAmbientProbe: 0 +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 12 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 1 + m_LightmapEditorSettings: + serializedVersion: 12 + m_Resolution: 2 + m_BakeResolution: 40 + m_AtlasSize: 1024 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_ExtractAmbientOcclusion: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 1 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 2 + m_BakeBackend: 1 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 512 + m_PVRBounces: 2 + m_PVREnvironmentSampleCount: 256 + m_PVREnvironmentReferencePointCount: 2048 + m_PVRFilteringMode: 1 + m_PVRDenoiserTypeDirect: 1 + m_PVRDenoiserTypeIndirect: 1 + m_PVRDenoiserTypeAO: 1 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVREnvironmentMIS: 1 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ExportTrainingData: 0 + m_TrainingDataDestination: TrainingData + m_LightProbeSampleCountMultiplier: 4 + m_LightingDataAsset: {fileID: 0} + m_LightingSettings: {fileID: 4890085278179872738, guid: bfb6365c16ff5dc43ae5dfdcbfad3244, + type: 2} +--- !u!196 &4 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666667 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + maxJobWorkers: 0 + preserveTilesOutsideBounds: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &200677307 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 200677308} + - component: {fileID: 200677310} + - component: {fileID: 200677309} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &200677308 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 200677307} + 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_Children: [] + m_Father: {fileID: 365653228} + 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: 10, y: 10} + m_SizeDelta: {x: 160, y: 30} + m_Pivot: {x: 0, y: 0} +--- !u!114 &200677309 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 200677307} + 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: 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_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 18 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 1 + m_MaxSize: 40 + m_Alignment: 3 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: xxxxxxxx +--- !u!222 &200677310 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 200677307} + m_CullTransparentMesh: 1 +--- !u!1 &217699973 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 217699974} + - component: {fileID: 217699976} + - component: {fileID: 217699975} + m_Layer: 0 + m_Name: Cube2 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &217699974 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 217699973} + m_LocalRotation: {x: 0.08717229, y: -0.8995905, z: 0.21045253, w: -0.37262273} + m_LocalPosition: {x: 0.00002026558, y: 0, z: 4.657908} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 546939889} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &217699975 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 217699973} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &217699976 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 217699973} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &301200147 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 301200148} + m_Layer: 5 + m_Name: Image1 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &301200148 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 301200147} + 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_Children: + - {fileID: 1839397353} + - {fileID: 1568238197} + m_Father: {fileID: 1813489710} + 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: 270, y: 180} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!1 &365653227 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 365653228} + m_Layer: 5 + m_Name: Image2 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &365653228 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 365653227} + 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_Children: + - {fileID: 1036416883} + - {fileID: 200677308} + m_Father: {fileID: 1813489710} + 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: 270, y: 180} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!1 &372881753 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 372881754} + - component: {fileID: 372881755} + m_Layer: 5 + m_Name: horizontal layout + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &372881754 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 372881753} + 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_Children: + - {fileID: 1813489710} + - {fileID: 1694700325} + m_Father: {fileID: 1172682653} + 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: 800, y: 0} + m_Pivot: {x: 0.5, y: 1} +--- !u!114 &372881755 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 372881753} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 30649d3a9faa99c48a7b1166b86bf2a0, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_ChildAlignment: 4 + m_Spacing: 0 + m_ChildForceExpandWidth: 1 + m_ChildForceExpandHeight: 1 + m_ChildControlWidth: 0 + m_ChildControlHeight: 0 + m_ChildScaleWidth: 0 + m_ChildScaleHeight: 0 + m_ReverseArrangement: 0 +--- !u!1001 &517024934 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 858092574} + m_Modifications: + - target: {fileID: 4037113455314838168, guid: 7aa5bec5b1e406445af144843fe4d62c, + type: 3} + propertyPath: m_Pivot.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4037113455314838168, guid: 7aa5bec5b1e406445af144843fe4d62c, + type: 3} + propertyPath: m_Pivot.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4037113455314838168, guid: 7aa5bec5b1e406445af144843fe4d62c, + type: 3} + propertyPath: m_RootOrder + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4037113455314838168, guid: 7aa5bec5b1e406445af144843fe4d62c, + type: 3} + propertyPath: m_AnchorMax.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4037113455314838168, guid: 7aa5bec5b1e406445af144843fe4d62c, + type: 3} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4037113455314838168, guid: 7aa5bec5b1e406445af144843fe4d62c, + type: 3} + propertyPath: m_AnchorMin.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4037113455314838168, guid: 7aa5bec5b1e406445af144843fe4d62c, + type: 3} + propertyPath: m_AnchorMin.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4037113455314838168, guid: 7aa5bec5b1e406445af144843fe4d62c, + type: 3} + propertyPath: m_SizeDelta.x + value: 100 + objectReference: {fileID: 0} + - target: {fileID: 4037113455314838168, guid: 7aa5bec5b1e406445af144843fe4d62c, + type: 3} + propertyPath: m_SizeDelta.y + value: 100 + objectReference: {fileID: 0} + - target: {fileID: 4037113455314838168, guid: 7aa5bec5b1e406445af144843fe4d62c, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4037113455314838168, guid: 7aa5bec5b1e406445af144843fe4d62c, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4037113455314838168, guid: 7aa5bec5b1e406445af144843fe4d62c, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4037113455314838168, guid: 7aa5bec5b1e406445af144843fe4d62c, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4037113455314838168, guid: 7aa5bec5b1e406445af144843fe4d62c, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4037113455314838168, guid: 7aa5bec5b1e406445af144843fe4d62c, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4037113455314838168, guid: 7aa5bec5b1e406445af144843fe4d62c, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4037113455314838168, guid: 7aa5bec5b1e406445af144843fe4d62c, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4037113455314838168, guid: 7aa5bec5b1e406445af144843fe4d62c, + type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4037113455314838168, guid: 7aa5bec5b1e406445af144843fe4d62c, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4037113455314838168, guid: 7aa5bec5b1e406445af144843fe4d62c, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4037113455314838168, guid: 7aa5bec5b1e406445af144843fe4d62c, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4037113455314838175, guid: 7aa5bec5b1e406445af144843fe4d62c, + type: 3} + propertyPath: m_Name + value: BackButtonManager + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 7aa5bec5b1e406445af144843fe4d62c, type: 3} +--- !u!224 &517024935 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 4037113455314838168, guid: 7aa5bec5b1e406445af144843fe4d62c, + type: 3} + m_PrefabInstance: {fileID: 517024934} + m_PrefabAsset: {fileID: 0} +--- !u!1 &546939886 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 546939889} + - component: {fileID: 546939888} + m_Layer: 0 + m_Name: Camera 2 + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!20 &546939888 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 546939886} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.19215688, g: 0.4745098, b: 0.20642585, a: 1} + m_projectionMatrixMode: 1 + m_GateFitMode: 2 + m_FOVAxisMode: 0 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + m_FocalLength: 50 + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.3 + far clip plane: 1000 + field of view: 60 + orthographic: 0 + orthographic size: 5 + m_Depth: -1 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 1 + m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!4 &546939889 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 546939886} + m_LocalRotation: {x: -0.08717229, y: 0.8995905, z: -0.21045253, w: -0.37262273} + m_LocalPosition: {x: -1015, y: 441.7115, z: -226.21486} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 217699974} + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &645746053 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 645746055} + - component: {fileID: 645746054} + m_Layer: 0 + m_Name: Directional Light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!108 &645746054 +Light: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 645746053} + m_Enabled: 1 + serializedVersion: 10 + m_Type: 1 + m_Shape: 0 + m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} + m_Intensity: 1 + m_Range: 10 + m_SpotAngle: 30 + m_InnerSpotAngle: 21.80208 + m_CookieSize: 10 + m_Shadows: + m_Type: 2 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_CullingMatrixOverride: + e00: 1 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 1 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 1 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 1 + m_UseCullingMatrixOverride: 0 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingLayerMask: 1 + m_Lightmapping: 4 + m_LightShadowCasterMode: 0 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} + m_UseBoundingSphereOverride: 0 + m_UseViewFrustumForShadowCasterCull: 1 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!4 &645746055 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 645746053} + 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_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} +--- !u!1 &779739936 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 779739937} + - component: {fileID: 779739939} + - component: {fileID: 779739938} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &779739937 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 779739936} + 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_Children: [] + m_Father: {fileID: 1960343919} + 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: 10, y: 10} + m_SizeDelta: {x: 160, y: 30} + m_Pivot: {x: 0, y: 0} +--- !u!114 &779739938 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 779739936} + 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: 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_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 18 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 1 + m_MaxSize: 40 + m_Alignment: 3 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: xxxxxxxx +--- !u!222 &779739939 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 779739936} + m_CullTransparentMesh: 1 +--- !u!1 &814089928 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 814089931} + - component: {fileID: 814089930} + m_Layer: 0 + m_Name: UICamera + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!20 &814089930 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 814089928} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 2 + m_BackGroundColor: {r: 1, g: 1, b: 1, a: 0} + m_projectionMatrixMode: 1 + m_GateFitMode: 2 + m_FOVAxisMode: 0 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + m_FocalLength: 50 + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.3 + far clip plane: 1000 + field of view: 60 + orthographic: 0 + orthographic size: 5 + m_Depth: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 1 + m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!4 &814089931 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 814089928} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 823.3642, y: 439.6452, z: -229.16667} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &858092570 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 858092574} + - component: {fileID: 858092573} + - component: {fileID: 858092572} + - component: {fileID: 858092571} + - component: {fileID: 858092575} + m_Layer: 5 + m_Name: Canvas + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &858092571 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 858092570} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 1 + m_BlockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 +--- !u!114 &858092572 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 858092570} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 1 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 800, y: 600} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 0 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 1 + m_PresetInfoIsWorld: 0 +--- !u!223 &858092573 +Canvas: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 858092570} + m_Enabled: 1 + serializedVersion: 3 + m_RenderMode: 0 + m_Camera: {fileID: 0} + m_PlaneDistance: 100 + m_PixelPerfect: 0 + m_ReceivesEvents: 1 + m_OverrideSorting: 0 + m_OverridePixelPerfect: 0 + m_SortingBucketNormalizedSize: 0 + m_AdditionalShaderChannelsFlag: 0 + m_SortingLayerID: 0 + m_SortingOrder: 0 + m_TargetDisplay: 0 +--- !u!224 &858092574 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 858092570} + 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_Children: + - {fileID: 1172682653} + - {fileID: 517024935} + m_Father: {fileID: 0} + m_RootOrder: 3 + 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_Pivot: {x: 0, y: 0} +--- !u!114 &858092575 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 858092570} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3f0d5a74d42e5fb4cb73db30b947b67d, type: 3} + m_Name: + m_EditorClassIdentifier: + switchButton: {fileID: 1951402377} + camera1: {fileID: 934963288} + camera2: {fileID: 546939888} + sourceImage1: {fileID: 1839397354} + sourceImage2: {fileID: 1036416884} + receiveImage: {fileID: 2123783124} + textSourceImage1: {fileID: 1568238198} + textSourceImage2: {fileID: 200677309} + textReceiveImage: {fileID: 779739938} + rotateObjects: + - {fileID: 1823897046} + - {fileID: 217699974} +--- !u!1 &934963286 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 934963289} + - component: {fileID: 934963288} + m_Layer: 0 + m_Name: Camera 1 + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!20 &934963288 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 934963286} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 1} + m_projectionMatrixMode: 1 + m_GateFitMode: 2 + m_FOVAxisMode: 0 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + m_FocalLength: 50 + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.3 + far clip plane: 1000 + field of view: 60 + orthographic: 0 + orthographic size: 5 + m_Depth: -1 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 1 + m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!4 &934963289 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 934963286} + m_LocalRotation: {x: -0.08717229, y: 0.8995905, z: -0.21045253, w: -0.37262273} + m_LocalPosition: {x: 826.31604, y: 441.7115, z: -226.21486} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1823897046} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1036416882 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1036416883} + - component: {fileID: 1036416885} + - component: {fileID: 1036416884} + m_Layer: 5 + m_Name: SourceRawImage + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1036416883 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1036416882} + 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_Children: [] + m_Father: {fileID: 365653228} + 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: 270, y: 180} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1036416884 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1036416882} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1344c3c82d62a2a41a3576d8abb8e3ea, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0, g: 0, b: 0, 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_Texture: {fileID: 0} + m_UVRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 +--- !u!222 &1036416885 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1036416882} + m_CullTransparentMesh: 0 +--- !u!1 &1068560632 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1068560635} + - component: {fileID: 1068560634} + - component: {fileID: 1068560633} + m_Layer: 0 + m_Name: EventSystem + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1068560633 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1068560632} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3} + m_Name: + m_EditorClassIdentifier: + m_HorizontalAxis: Horizontal + m_VerticalAxis: Vertical + m_SubmitButton: Submit + m_CancelButton: Cancel + m_InputActionsPerSecond: 10 + m_RepeatDelay: 0.5 + m_ForceModuleActive: 0 +--- !u!114 &1068560634 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1068560632} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_FirstSelected: {fileID: 0} + m_sendNavigationEvents: 1 + m_DragThreshold: 10 +--- !u!4 &1068560635 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1068560632} + 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_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1172682652 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1172682653} + - component: {fileID: 1172682654} + m_Layer: 5 + m_Name: vertical layout + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1172682653 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1172682652} + 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_Children: + - {fileID: 372881754} + m_Father: {fileID: 858092574} + 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!114 &1172682654 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1172682652} + 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: 4 + m_Spacing: 0 + m_ChildForceExpandWidth: 1 + m_ChildForceExpandHeight: 1 + m_ChildControlWidth: 0 + m_ChildControlHeight: 1 + m_ChildScaleWidth: 0 + m_ChildScaleHeight: 0 + m_ReverseArrangement: 0 +--- !u!1 &1381406279 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1381406280} + - component: {fileID: 1381406282} + - component: {fileID: 1381406281} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1381406280 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1381406279} + 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_Children: [] + m_Father: {fileID: 1951402376} + 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!114 &1381406281 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1381406279} + 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: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Replace Track +--- !u!222 &1381406282 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1381406279} + m_CullTransparentMesh: 1 +--- !u!1 &1568238196 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1568238197} + - component: {fileID: 1568238199} + - component: {fileID: 1568238198} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1568238197 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1568238196} + 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_Children: [] + m_Father: {fileID: 301200148} + 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: 10, y: 10} + m_SizeDelta: {x: 160, y: 30} + m_Pivot: {x: 0, y: 0} +--- !u!114 &1568238198 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1568238196} + 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: 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_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 18 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 1 + m_MaxSize: 40 + m_Alignment: 3 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: xxxxxxxx +--- !u!222 &1568238199 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1568238196} + m_CullTransparentMesh: 1 +--- !u!1 &1694700324 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1694700325} + - component: {fileID: 1694700326} + m_Layer: 5 + m_Name: vertical layout (2) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1694700325 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1694700324} + 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_Children: + - {fileID: 1960343919} + - {fileID: 1898681816} + m_Father: {fileID: 372881754} + 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: 400, y: 400} + m_Pivot: {x: 0.5, y: 1} +--- !u!114 &1694700326 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1694700324} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_ChildAlignment: 4 + m_Spacing: 0 + m_ChildForceExpandWidth: 1 + m_ChildForceExpandHeight: 1 + m_ChildControlWidth: 0 + m_ChildControlHeight: 0 + m_ChildScaleWidth: 0 + m_ChildScaleHeight: 0 + m_ReverseArrangement: 0 +--- !u!1 &1813489709 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1813489710} + - component: {fileID: 1813489711} + m_Layer: 5 + m_Name: vertical layout (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1813489710 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1813489709} + 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_Children: + - {fileID: 301200148} + - {fileID: 365653228} + m_Father: {fileID: 372881754} + 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: 400, y: 400} + m_Pivot: {x: 0.5, y: 1} +--- !u!114 &1813489711 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1813489709} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_ChildAlignment: 4 + m_Spacing: 0 + m_ChildForceExpandWidth: 1 + m_ChildForceExpandHeight: 1 + m_ChildControlWidth: 0 + m_ChildControlHeight: 0 + m_ChildScaleWidth: 0 + m_ChildScaleHeight: 0 + m_ReverseArrangement: 0 +--- !u!1 &1823897042 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1823897046} + - component: {fileID: 1823897045} + - component: {fileID: 1823897044} + m_Layer: 0 + m_Name: Cube1 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &1823897044 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1823897042} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &1823897045 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1823897042} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &1823897046 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1823897042} + m_LocalRotation: {x: 0.08717229, y: -0.8995905, z: 0.21045253, w: -0.37262273} + m_LocalPosition: {x: 0.00002026558, y: 0, z: 4.6579084} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 934963289} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1839397352 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1839397353} + - component: {fileID: 1839397355} + - component: {fileID: 1839397354} + m_Layer: 5 + m_Name: SourceRawImage + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1839397353 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1839397352} + 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_Children: [] + m_Father: {fileID: 301200148} + 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: 270, y: 180} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1839397354 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1839397352} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1344c3c82d62a2a41a3576d8abb8e3ea, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0, g: 0, b: 0, 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_Texture: {fileID: 0} + m_UVRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 +--- !u!222 &1839397355 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1839397352} + m_CullTransparentMesh: 0 +--- !u!1 &1898681815 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1898681816} + m_Layer: 5 + m_Name: GameObject + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1898681816 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1898681815} + 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_Children: + - {fileID: 1951402376} + m_Father: {fileID: 1694700325} + 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: 400, y: 33.2369} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!1 &1951402375 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1951402376} + - component: {fileID: 1951402379} + - component: {fileID: 1951402378} + - component: {fileID: 1951402377} + m_Layer: 5 + m_Name: Button + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1951402376 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1951402375} + 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_Children: + - {fileID: 1381406280} + m_Father: {fileID: 1898681816} + 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: 160, y: 30} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1951402377 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1951402375} + 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: 1951402378} + m_OnClick: + m_PersistentCalls: + m_Calls: [] +--- !u!114 &1951402378 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1951402375} + 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!222 &1951402379 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1951402375} + m_CullTransparentMesh: 1 +--- !u!1 &1960343918 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1960343919} + m_Layer: 5 + m_Name: Image + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1960343919 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1960343918} + 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_Children: + - {fileID: 2123783123} + - {fileID: 779739937} + m_Father: {fileID: 1694700325} + 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: 300, y: 200} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!1 &2123783122 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2123783123} + - component: {fileID: 2123783125} + - component: {fileID: 2123783124} + m_Layer: 5 + m_Name: ReceiveRawImage + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2123783123 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2123783122} + 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_Children: [] + m_Father: {fileID: 1960343919} + 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: 300, y: 200} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &2123783124 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2123783122} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1344c3c82d62a2a41a3576d8abb8e3ea, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0, g: 0, b: 0, 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_Texture: {fileID: 0} + m_UVRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 +--- !u!222 &2123783125 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2123783122} + m_CullTransparentMesh: 0 diff --git a/Samples~/ReplaceTrack/ReplaceTrack.unity.meta b/Samples~/ReplaceTrack/ReplaceTrack.unity.meta new file mode 100644 index 0000000000..70c1671f0f --- /dev/null +++ b/Samples~/ReplaceTrack/ReplaceTrack.unity.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 9607119e15db6cb40a49916fb3a70f9f +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Samples~/ReplaceTrack/ReplaceTrackSample.cs b/Samples~/ReplaceTrack/ReplaceTrackSample.cs new file mode 100644 index 0000000000..50be71f991 --- /dev/null +++ b/Samples~/ReplaceTrack/ReplaceTrackSample.cs @@ -0,0 +1,289 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using Unity.WebRTC; +using Unity.WebRTC.Samples; +using UnityEngine.Assertions; +using UnityEngine.UI; + +class ReplaceTrackSample : MonoBehaviour +{ +#pragma warning disable 0649 + [SerializeField] private Button switchButton; + [SerializeField] private Camera camera1; + [SerializeField] private Camera camera2; + [SerializeField] private RawImage sourceImage1; + [SerializeField] private RawImage sourceImage2; + [SerializeField] private RawImage receiveImage; + [SerializeField] private Text textSourceImage1; + [SerializeField] private Text textSourceImage2; + [SerializeField] private Text textReceiveImage; + [SerializeField] private Transform[] rotateObjects; +#pragma warning restore 0649 + + private Peer peer1, peer2; + + private void Awake() + { + WebRTC.Initialize(WebRTCSettings.LimitTextureSize); + } + + private void OnDestroy() + { + peer1?.Dispose(); + peer2?.Dispose(); + WebRTC.Dispose(); + } + + private void Start() + { + peer1 = new Peer(this, true, camera1, camera2, null); + peer2 = new Peer(this, false, null, null, receiveImage); + + sourceImage1.texture = camera1.targetTexture; + sourceImage2.texture = camera2.targetTexture; + + sourceImage1.color = Color.white; + sourceImage2.color = Color.white; + receiveImage.color = Color.white; + + switchButton.onClick.AddListener(peer1.SwitchTrack); + + StartCoroutine(WebRTC.Update()); + } + + private void Update() + { + if (rotateObjects != null) + { + foreach(var rotateObject in rotateObjects) + { + float t = Time.deltaTime; + rotateObject.Rotate(100 * t, 200 * t, 300 * t); + } + } + + string TextureResolutionText(RawImage image) + { + if(image != null && image.texture != null) + return string.Format($"{image.texture.width}x{image.texture.height}"); + return string.Empty; + } + + textSourceImage1.text = TextureResolutionText(sourceImage1); + textSourceImage2.text = TextureResolutionText(sourceImage2); + textReceiveImage.text = TextureResolutionText(receiveImage); + } + + void PostMessage(Peer from, Message message) + { + var other = from == peer1 ? peer2 : peer1; + other.OnMessage(message); + } + + class Message + { + public RTCSessionDescription description; + public RTCIceCandidate candidate; + } + + class Peer : IDisposable + { + private readonly ReplaceTrackSample parent; + private readonly bool polite; + private readonly RTCPeerConnection pc; + private readonly VideoStreamTrack sourceVideoTrack1; + private readonly VideoStreamTrack sourceVideoTrack2; + RTCRtpTransceiver sendingTransceiver = null; + + private bool makingOffer; + private bool ignoreOffer; + private bool srdAnswerPending; + private bool sldGetBackStable; + + private const int minWidth = 320; + private const int minHeight = 240; + + public Peer( + ReplaceTrackSample parent, + bool polite, + Camera source1, + Camera source2, + RawImage receive) + { + this.parent = parent; + this.polite = polite; + + + var config = GetSelectedSdpSemantics(); + pc = new RTCPeerConnection(ref config); + + pc.OnTrack = e => + { + if (e.Track is VideoStreamTrack video) + { + video.OnVideoReceived += tex => + { + receive.texture = tex; + }; + } + }; + + pc.OnIceCandidate = candidate => + { + var message = new Message { candidate = candidate }; + this.parent.PostMessage(this, message); + }; + + pc.OnNegotiationNeeded = () => + { + this.parent.StartCoroutine(NegotiationProcess()); + }; + + int width = WebRTCSettings.StreamSize.x; + int height = WebRTCSettings.StreamSize.y; + sourceVideoTrack1 = source1?.CaptureStreamTrack(width, height, 0); + + int width2 = Mathf.Max(width / 2, minWidth); + int height2 = Mathf.Max(height / 2, minHeight); + sourceVideoTrack2 = source2?.CaptureStreamTrack(width2, height2, 0); + } + + private IEnumerator NegotiationProcess() + { + Debug.Log($"{this} SLD due to negotiationneeded"); + + yield return new WaitWhile(() => sldGetBackStable); + + Assert.AreEqual(pc.SignalingState, RTCSignalingState.Stable, + $"{this} negotiationneeded always fires in stable state"); + Assert.AreEqual(makingOffer, false, $"{this} negotiationneeded not already in progress"); + + makingOffer = true; + var op = pc.SetLocalDescription(); + yield return op; + + if (op.IsError) + { + Debug.LogError($"{this} {op.Error.message}"); + makingOffer = false; + yield break; + } + + Assert.AreEqual(pc.SignalingState, RTCSignalingState.HaveLocalOffer, + $"{this} negotiationneeded always fires in stable state"); + Assert.AreEqual(pc.LocalDescription.type, RTCSdpType.Offer, $"{this} negotiationneeded SLD worked"); + makingOffer = false; + + var offer = new Message { description = pc.LocalDescription }; + parent.PostMessage(this, offer); + } + + public void Dispose() + { + //sendingTransceiverList.Clear(); + sourceVideoTrack1?.Dispose(); + sourceVideoTrack2?.Dispose(); + pc.Dispose(); + } + + public override string ToString() + { + var str = polite ? "polite" : "impolite"; + return $"[{str}-{base.ToString()}]"; + } + + private static RTCConfiguration GetSelectedSdpSemantics() + { + RTCConfiguration config = default; + config.iceServers = new[] { new RTCIceServer { urls = new[] { "stun:stun.l.google.com:19302" } } }; + + return config; + } + + public void OnMessage(Message message) + { + if (message.candidate != null) + { + if (!pc.AddIceCandidate(message.candidate) && !ignoreOffer) + { + Debug.LogError($"{this} this candidate can't accept current signaling state {pc.SignalingState}, ignoreOffer {ignoreOffer}."); + } + + return; + } + + parent.StartCoroutine(OfferAnswerProcess(message.description)); + } + + private IEnumerator OfferAnswerProcess(RTCSessionDescription description) + { + var isStable = + pc.SignalingState == RTCSignalingState.Stable || + (pc.SignalingState == RTCSignalingState.HaveLocalOffer && srdAnswerPending); + ignoreOffer = + description.type == RTCSdpType.Offer && !polite && (makingOffer || !isStable); + if (ignoreOffer) + { + Debug.Log($"{this} glare - ignoring offer"); + yield break; + } + + yield return new WaitWhile(() => makingOffer); + + srdAnswerPending = description.type == RTCSdpType.Answer; + Debug.Log($"{this} SRD {description.type} SignalingState {pc.SignalingState}"); + var op1 = pc.SetRemoteDescription(ref description); + yield return op1; + Assert.IsFalse(op1.IsError, $"{this} {op1.Error.message}"); + + srdAnswerPending = false; + if (description.type == RTCSdpType.Offer) + { + Assert.AreEqual(pc.RemoteDescription.type, RTCSdpType.Offer, $"{this} SRD worked"); + Assert.AreEqual(pc.SignalingState, RTCSignalingState.HaveRemoteOffer, $"{this} Remote offer"); + Debug.Log($"{this} SLD to get back to stable"); + sldGetBackStable = true; + + var op2 = pc.SetLocalDescription(); + yield return op2; + Assert.IsFalse(op2.IsError, $"{this} {op2.Error.message}"); + + Assert.AreEqual(pc.LocalDescription.type, RTCSdpType.Answer, $"{this} onmessage SLD worked"); + Assert.AreEqual(pc.SignalingState, RTCSignalingState.Stable, + $"{this} onmessage not racing with negotiationneeded"); + sldGetBackStable = false; + + var answer = new Message { description = pc.LocalDescription }; + parent.PostMessage(this, answer); + } + else + { + Assert.AreEqual(pc.RemoteDescription.type, RTCSdpType.Answer, $"{this} Answer was set"); + Assert.AreEqual(pc.SignalingState, RTCSignalingState.Stable, $"{this} answered"); + } + } + + public void SwitchTrack() + { + if (sendingTransceiver == null) + { + var transceiver = pc.AddTransceiver(sourceVideoTrack1); + transceiver.Direction = RTCRtpTransceiverDirection.SendRecv; + + if (WebRTCSettings.UseVideoCodec != null) + { + var codecs = new[] { WebRTCSettings.UseVideoCodec }; + transceiver.SetCodecPreferences(codecs); + } + + sendingTransceiver = transceiver; + return; + } + + var nextTrack = sendingTransceiver.Sender.Track == sourceVideoTrack1 ? sourceVideoTrack2 : sourceVideoTrack1; + sendingTransceiver.Sender.ReplaceTrack(nextTrack); + } + } +} diff --git a/Samples~/ReplaceTrack/ReplaceTrackSample.cs.meta b/Samples~/ReplaceTrack/ReplaceTrackSample.cs.meta new file mode 100644 index 0000000000..3e3a8d75e0 --- /dev/null +++ b/Samples~/ReplaceTrack/ReplaceTrackSample.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3f0d5a74d42e5fb4cb73db30b947b67d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Samples~/Scripts/SceneSelectUI.cs b/Samples~/Scripts/SceneSelectUI.cs index 886ffadc89..daa9a36aea 100644 --- a/Samples~/Scripts/SceneSelectUI.cs +++ b/Samples~/Scripts/SceneSelectUI.cs @@ -56,6 +56,7 @@ internal class SceneSelectUI : MonoBehaviour [SerializeField] private Button buttonBandwidth; [SerializeField] private Button buttonPerfectNegotiation; [SerializeField] private Button buttonLatency; + [SerializeField] private Button buttonReplaceTrack; List streamSizeList = new List() { @@ -142,6 +143,7 @@ void Start() buttonBandwidth.onClick.AddListener(OnPressedBandwidthButton); buttonPerfectNegotiation.onClick.AddListener(OnPressedPerfectNegotiationButton); buttonLatency.onClick.AddListener(OnPressedLatencyButton); + buttonReplaceTrack.onClick.AddListener(OnPressedReplaceTrackButton); // This sample uses Compute Shader, so almost Android devices don't work correctly. if (!SystemInfo.supportsComputeShaders) @@ -262,10 +264,13 @@ private void OnPressedPerfectNegotiationButton() { SceneManager.LoadScene("PerfectNegotiation", LoadSceneMode.Single); } - private void OnPressedLatencyButton() { SceneManager.LoadScene("E2ELatency", LoadSceneMode.Single); } + private void OnPressedReplaceTrackButton() + { + SceneManager.LoadScene("ReplaceTrack", LoadSceneMode.Single); + } } } diff --git a/WebRTC~/ProjectSettings/EditorBuildSettings.asset b/WebRTC~/ProjectSettings/EditorBuildSettings.asset index d84872164e..51354d41fa 100644 --- a/WebRTC~/ProjectSettings/EditorBuildSettings.asset +++ b/WebRTC~/ProjectSettings/EditorBuildSettings.asset @@ -53,4 +53,7 @@ EditorBuildSettings: - enabled: 1 path: Assets/Samples/E2ELatency/E2ELatency.unity guid: d85785bc886b68348b04331dab320a33 + - enabled: 1 + path: Assets/Samples/ReplaceTrack/ReplaceTrack.unity + guid: 9607119e15db6cb40a49916fb3a70f9f m_configObjects: {}