From f5f9bea07bc41712fddb3d8d81a984db340a30bf Mon Sep 17 00:00:00 2001 From: TORISOUP Date: Mon, 19 Feb 2024 23:44:22 +0900 Subject: [PATCH 1/8] add R3 --- .gitignore | 1 + Assets/NuGet.config | 16 ++++++++++++++++ Assets/NuGet.config.meta | 23 +++++++++++++++++++++++ Assets/Packages.meta | 8 ++++++++ Assets/packages.config | 9 +++++++++ Assets/packages.config.meta | 23 +++++++++++++++++++++++ Packages/manifest.json | 8 +++++--- Packages/packages-lock.json | 18 +++++++++++++++++- 8 files changed, 102 insertions(+), 4 deletions(-) create mode 100644 Assets/NuGet.config create mode 100644 Assets/NuGet.config.meta create mode 100644 Assets/Packages.meta create mode 100644 Assets/packages.config create mode 100644 Assets/packages.config.meta diff --git a/.gitignore b/.gitignore index 0d9eeb3..d0c4b0b 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ [Bb]uilds/ [Ll]ogs/ .idea/ +Assets/Packages/ # Uncomment this line if you wish to ignore the asset store tools plugin # [Aa]ssets/AssetStoreTools* diff --git a/Assets/NuGet.config b/Assets/NuGet.config new file mode 100644 index 0000000..82fb1c8 --- /dev/null +++ b/Assets/NuGet.config @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Assets/NuGet.config.meta b/Assets/NuGet.config.meta new file mode 100644 index 0000000..be68931 --- /dev/null +++ b/Assets/NuGet.config.meta @@ -0,0 +1,23 @@ +fileFormatVersion: 2 +guid: 4b1766057686aea429f05c982d558efa +labels: +- NuGetForUnity +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + Any: + second: + enabled: 1 + settings: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Packages.meta b/Assets/Packages.meta new file mode 100644 index 0000000..2a65d09 --- /dev/null +++ b/Assets/Packages.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 56fa8a2d0cafecc4480e64715d949906 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/packages.config b/Assets/packages.config new file mode 100644 index 0000000..cc72ca7 --- /dev/null +++ b/Assets/packages.config @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/Assets/packages.config.meta b/Assets/packages.config.meta new file mode 100644 index 0000000..34e2d0b --- /dev/null +++ b/Assets/packages.config.meta @@ -0,0 +1,23 @@ +fileFormatVersion: 2 +guid: 129b3dc07f63dc3439303cd28419a350 +labels: +- NuGetForUnity +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + Any: + second: + enabled: 1 + settings: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/manifest.json b/Packages/manifest.json index ac5d6f0..807998c 100644 --- a/Packages/manifest.json +++ b/Packages/manifest.json @@ -1,5 +1,9 @@ { "dependencies": { + "com.cysharp.r3": "https://github.com/Cysharp/R3.git?path=src/R3.Unity/Assets/R3.Unity", + "com.cysharp.unitask": "https://github.com/Cysharp/UniTask.git?path=src/UniTask/Assets/Plugins/UniTask", + "com.github-glitchenzo.nugetforunity": "https://github.com/GlitchEnzo/NuGetForUnity.git?path=/src/NuGetForUnity", + "com.neuecc.unirx": "https://github.com/neuecc/UniRx.git?path=Assets/Plugins/UniRx/Scripts", "com.unity.collab-proxy": "1.17.7", "com.unity.ide.rider": "3.0.18", "com.unity.ide.visualstudio": "2.0.17", @@ -39,8 +43,6 @@ "com.unity.modules.video": "1.0.0", "com.unity.modules.vr": "1.0.0", "com.unity.modules.wind": "1.0.0", - "com.unity.modules.xr": "1.0.0", - "com.neuecc.unirx": "https://github.com/neuecc/UniRx.git?path=Assets/Plugins/UniRx/Scripts", - "com.cysharp.unitask": "https://github.com/Cysharp/UniTask.git?path=src/UniTask/Assets/Plugins/UniTask" + "com.unity.modules.xr": "1.0.0" } } diff --git a/Packages/packages-lock.json b/Packages/packages-lock.json index d57ddad..22412e0 100644 --- a/Packages/packages-lock.json +++ b/Packages/packages-lock.json @@ -1,11 +1,27 @@ { "dependencies": { + "com.cysharp.r3": { + "version": "https://github.com/Cysharp/R3.git?path=src/R3.Unity/Assets/R3.Unity", + "depth": 0, + "source": "git", + "dependencies": { + "com.unity.modules.imgui": "1.0.0" + }, + "hash": "dd89b7dae413ef0f479ac45f1f2b06776fef726d" + }, "com.cysharp.unitask": { "version": "https://github.com/Cysharp/UniTask.git?path=src/UniTask/Assets/Plugins/UniTask", "depth": 0, "source": "git", "dependencies": {}, - "hash": "d210e3d76adc0cce77f4ad2af1ade88dad6b1d5a" + "hash": "809d23edae0df58fd0f61b4b6f67855c59d1b2fb" + }, + "com.github-glitchenzo.nugetforunity": { + "version": "https://github.com/GlitchEnzo/NuGetForUnity.git?path=/src/NuGetForUnity", + "depth": 0, + "source": "git", + "dependencies": {}, + "hash": "75f68222d0a4bd2b468dbf3e6a17a191d28041ab" }, "com.neuecc.unirx": { "version": "https://github.com/neuecc/UniRx.git?path=Assets/Plugins/UniRx/Scripts", From 4c76e9b944494fdbeeb0424cb064ad4e3b8b50cd Mon Sep 17 00:00:00 2001 From: TORISOUP Date: Mon, 19 Feb 2024 23:45:13 +0900 Subject: [PATCH 2/8] Remove UniRx --- Packages/manifest.json | 1 - Packages/packages-lock.json | 7 ------- 2 files changed, 8 deletions(-) diff --git a/Packages/manifest.json b/Packages/manifest.json index 807998c..d8d8167 100644 --- a/Packages/manifest.json +++ b/Packages/manifest.json @@ -3,7 +3,6 @@ "com.cysharp.r3": "https://github.com/Cysharp/R3.git?path=src/R3.Unity/Assets/R3.Unity", "com.cysharp.unitask": "https://github.com/Cysharp/UniTask.git?path=src/UniTask/Assets/Plugins/UniTask", "com.github-glitchenzo.nugetforunity": "https://github.com/GlitchEnzo/NuGetForUnity.git?path=/src/NuGetForUnity", - "com.neuecc.unirx": "https://github.com/neuecc/UniRx.git?path=Assets/Plugins/UniRx/Scripts", "com.unity.collab-proxy": "1.17.7", "com.unity.ide.rider": "3.0.18", "com.unity.ide.visualstudio": "2.0.17", diff --git a/Packages/packages-lock.json b/Packages/packages-lock.json index 22412e0..6ce8028 100644 --- a/Packages/packages-lock.json +++ b/Packages/packages-lock.json @@ -23,13 +23,6 @@ "dependencies": {}, "hash": "75f68222d0a4bd2b468dbf3e6a17a191d28041ab" }, - "com.neuecc.unirx": { - "version": "https://github.com/neuecc/UniRx.git?path=Assets/Plugins/UniRx/Scripts", - "depth": 0, - "source": "git", - "dependencies": {}, - "hash": "284d5c50d3f1ddd9fa7df3d382ea904732a9c2ff" - }, "com.unity.collab-proxy": { "version": "1.17.7", "depth": 0, From cc30df48ac8fddfdd46222744c493f571e906b0f Mon Sep 17 00:00:00 2001 From: TORISOUP Date: Mon, 19 Feb 2024 23:51:08 +0900 Subject: [PATCH 3/8] =?UTF-8?q?R3=E3=81=AB=E7=A7=BB=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Plugins/Client/NicoliveApiClient.cs | 4 --- .../Plugins/Client/NicoliveCommentClient.cs | 29 +++++++------------ .../Plugins/Client/NiconicoUserClient.cs | 2 -- .../Plugins/Client/NicovideoApiClient.cs | 3 -- .../Plugins/TORISOUP.NicoliveClient.asmdef | 3 +- .../NicoliveClient/Plugins/Utilities.meta | 10 ------- .../Plugins/Utilities/IObservableExtension.cs | 18 ------------ .../Utilities/IObservableExtension.cs.meta | 13 --------- 8 files changed, 13 insertions(+), 69 deletions(-) delete mode 100644 Assets/TORISOUP/NicoliveClient/Plugins/Utilities.meta delete mode 100644 Assets/TORISOUP/NicoliveClient/Plugins/Utilities/IObservableExtension.cs delete mode 100644 Assets/TORISOUP/NicoliveClient/Plugins/Utilities/IObservableExtension.cs.meta diff --git a/Assets/TORISOUP/NicoliveClient/Plugins/Client/NicoliveApiClient.cs b/Assets/TORISOUP/NicoliveClient/Plugins/Client/NicoliveApiClient.cs index 719065f..63dbcae 100644 --- a/Assets/TORISOUP/NicoliveClient/Plugins/Client/NicoliveApiClient.cs +++ b/Assets/TORISOUP/NicoliveClient/Plugins/Client/NicoliveApiClient.cs @@ -1,15 +1,11 @@ using System; -using System.Collections; using System.Collections.Generic; using System.Linq; using System.Text; -using System.Text.RegularExpressions; using System.Threading; using Cysharp.Threading.Tasks; using TORISOUP.NicoliveClient.Request; using TORISOUP.NicoliveClient.Response; -using TORISOUP.NicoliveClient.Utilities; -using UniRx; using UnityEngine; using UnityEngine.Networking; diff --git a/Assets/TORISOUP/NicoliveClient/Plugins/Client/NicoliveCommentClient.cs b/Assets/TORISOUP/NicoliveClient/Plugins/Client/NicoliveCommentClient.cs index c67f632..eca6273 100644 --- a/Assets/TORISOUP/NicoliveClient/Plugins/Client/NicoliveCommentClient.cs +++ b/Assets/TORISOUP/NicoliveClient/Plugins/Client/NicoliveCommentClient.cs @@ -4,9 +4,9 @@ using Cysharp.Threading.Tasks; using TORISOUP.NicoliveClient.Comment; using TORISOUP.NicoliveClient.Response; -using UniRx; using UnityEngine; using WebSocketSharp; +using R3; namespace TORISOUP.NicoliveClient.Client { @@ -35,14 +35,14 @@ public class NicoliveCommentClient : IDisposable /// public string ThreadId { get; private set; } - private IObservable _onMessageAsObservable; - private readonly object _lockObject = new object(); - private CancellationTokenSource _cancellationTokenSource = new CancellationTokenSource(); + private Observable _onMessageAsObservable; + private readonly object _lockObject = new(); + private CancellationTokenSource _cancellationTokenSource = new(); /// /// 受信したコメントオブジェクトを通知する /// - public IObservable OnMessageAsObservable + public Observable OnMessageAsObservable { get { @@ -56,7 +56,6 @@ public IObservable OnMessageAsObservable private bool _isDisposed; private readonly string _userId; private WebSocket _ws; - private AsyncSubject _disposedEventAsyncSubject; #region コンストラクタ @@ -84,17 +83,18 @@ private void Initialize() { _ws = new WebSocket(WebSocketUri.AbsoluteUri, "msg.nicovideo.jp#json"); - _disposedEventAsyncSubject = new AsyncSubject(); + var ct = _cancellationTokenSource.Token; + _onMessageAsObservable = Observable.FromEvent, MessageEventArgs>( h => (sender, e) => h(e), h => _ws.OnMessage += h, - h => _ws.OnMessage -= h) - .ObserveOn(Scheduler.ThreadPool) //Jsonのパース処理をThreadPoolで行う + h => _ws.OnMessage -= h, + ct) + .ObserveOnThreadPool() .Select(x => JsonUtility.FromJson(x.Data)) .Where(x => x.chat.IsSuccess()) .Select(x => x.chat.ToChat(RoomId)) - .TakeUntil(_disposedEventAsyncSubject) .ObserveOnMainThread() //Unityメインスレッドに戻す .Share(); } @@ -162,14 +162,7 @@ public void Dispose() lock (_lockObject) { Disconnect(); - - if (_disposedEventAsyncSubject != null) - { - _disposedEventAsyncSubject.OnNext(Unit.Default); - _disposedEventAsyncSubject.OnCompleted(); - _disposedEventAsyncSubject.Dispose(); - } - + _ws = null; _isDisposed = true; } diff --git a/Assets/TORISOUP/NicoliveClient/Plugins/Client/NiconicoUserClient.cs b/Assets/TORISOUP/NicoliveClient/Plugins/Client/NiconicoUserClient.cs index ee6baae..523d57a 100644 --- a/Assets/TORISOUP/NicoliveClient/Plugins/Client/NiconicoUserClient.cs +++ b/Assets/TORISOUP/NicoliveClient/Plugins/Client/NiconicoUserClient.cs @@ -1,9 +1,7 @@ using System; -using System.Collections; using System.Text.RegularExpressions; using System.Threading; using Cysharp.Threading.Tasks; -using UniRx; using UnityEngine; using UnityEngine.Networking; diff --git a/Assets/TORISOUP/NicoliveClient/Plugins/Client/NicovideoApiClient.cs b/Assets/TORISOUP/NicoliveClient/Plugins/Client/NicovideoApiClient.cs index a7a0563..87b76c5 100644 --- a/Assets/TORISOUP/NicoliveClient/Plugins/Client/NicovideoApiClient.cs +++ b/Assets/TORISOUP/NicoliveClient/Plugins/Client/NicovideoApiClient.cs @@ -1,13 +1,10 @@ using System; -using System.Collections; using System.Linq; using System.Text.RegularExpressions; using System.Threading; using System.Xml.Linq; using Cysharp.Threading.Tasks; using TORISOUP.NicoliveClient.Response; -using TORISOUP.NicoliveClient.Utilities; -using UniRx; using UnityEngine.Networking; namespace TORISOUP.NicoliveClient.Client diff --git a/Assets/TORISOUP/NicoliveClient/Plugins/TORISOUP.NicoliveClient.asmdef b/Assets/TORISOUP/NicoliveClient/Plugins/TORISOUP.NicoliveClient.asmdef index e70e97d..4c5b0b2 100644 --- a/Assets/TORISOUP/NicoliveClient/Plugins/TORISOUP.NicoliveClient.asmdef +++ b/Assets/TORISOUP/NicoliveClient/Plugins/TORISOUP.NicoliveClient.asmdef @@ -3,7 +3,8 @@ "rootNamespace": "", "references": [ "GUID:560b04d1a97f54a4e82edc0cbbb69285", - "GUID:f51ebe6a0ceec4240a699833d6309b23" + "GUID:f51ebe6a0ceec4240a699833d6309b23", + "GUID:77221876cc6b8244180b96e320b1bcd4" ], "includePlatforms": [], "excludePlatforms": [], diff --git a/Assets/TORISOUP/NicoliveClient/Plugins/Utilities.meta b/Assets/TORISOUP/NicoliveClient/Plugins/Utilities.meta deleted file mode 100644 index dee0803..0000000 --- a/Assets/TORISOUP/NicoliveClient/Plugins/Utilities.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 1628287b59bf0ca41807ae573e21ba26 -folderAsset: yes -timeCreated: 1517416928 -licenseType: Pro -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/TORISOUP/NicoliveClient/Plugins/Utilities/IObservableExtension.cs b/Assets/TORISOUP/NicoliveClient/Plugins/Utilities/IObservableExtension.cs deleted file mode 100644 index 9c979bf..0000000 --- a/Assets/TORISOUP/NicoliveClient/Plugins/Utilities/IObservableExtension.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; -using UniRx; - -namespace TORISOUP.NicoliveClient.Utilities -{ - internal static class IObservableExtension - { - /// - /// 対象をHot変換する - /// - public static IObservable Kick(this IObservable original) - { - var connectableObservable = original.PublishLast(); - connectableObservable.Connect(); - return connectableObservable; - } - } -} diff --git a/Assets/TORISOUP/NicoliveClient/Plugins/Utilities/IObservableExtension.cs.meta b/Assets/TORISOUP/NicoliveClient/Plugins/Utilities/IObservableExtension.cs.meta deleted file mode 100644 index 417d041..0000000 --- a/Assets/TORISOUP/NicoliveClient/Plugins/Utilities/IObservableExtension.cs.meta +++ /dev/null @@ -1,13 +0,0 @@ -fileFormatVersion: 2 -guid: b71d7e8dc83f82745859bf305c8fb67e -timeCreated: 1517416928 -licenseType: Pro -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: From 00221c6a891b95d41d6649214603db6a01f6fca2 Mon Sep 17 00:00:00 2001 From: TORISOUP Date: Tue, 20 Feb 2024 01:04:24 +0900 Subject: [PATCH 4/8] =?UTF-8?q?R3=E5=AF=BE=E5=BF=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Example/Console/NicoliveSampleScene.unity | 510 ++++++++++++++++-- .../Scripts/LoginPanel/LoginManager.cs | 33 +- .../Scripts/LoginPanel/LoginPresenter.cs | 34 +- .../MainPanel/CommentPanel/CommentPanel.cs | 39 +- .../CommentRenderPanel/CommentRenderPanel.cs | 6 +- .../MainPanel/EnquetePanel/EnquetePanel.cs | 1 - .../ProgramIdPanel/ProgramIdPanel.cs | 2 +- .../ProgramInfoPanel/ProgramInfoPanel.cs | 1 - .../ProgramStatisticsPanel.cs | 4 +- .../ScheduledProgramPanel.cs | 1 - .../MainPanel/SegmentPanel/SegmentPanel.cs | 1 - .../Console/Scripts/NicoliveSampleManager.cs | 20 +- .../Example/Console/Scripts/ObservableExt.cs | 23 + .../Console/Scripts/ObservableExt.cs.meta | 3 + .../TORISOUP.NicoliveClient.Example.asmdef | 4 +- .../Plugins/Client/NicoliveCommentClient.cs | 26 +- .../Plugins/TORISOUP.NicoliveClient.asmdef | 1 - Assets/TORISOUP/NicoliveClient/version.txt | 2 +- 18 files changed, 596 insertions(+), 115 deletions(-) create mode 100644 Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/ObservableExt.cs create mode 100644 Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/ObservableExt.cs.meta diff --git a/Assets/TORISOUP/NicoliveClient/Example/Console/NicoliveSampleScene.unity b/Assets/TORISOUP/NicoliveClient/Example/Console/NicoliveSampleScene.unity index 101e3c7..9909c82 100644 --- a/Assets/TORISOUP/NicoliveClient/Example/Console/NicoliveSampleScene.unity +++ b/Assets/TORISOUP/NicoliveClient/Example/Console/NicoliveSampleScene.unity @@ -558,10 +558,10 @@ RectTransform: m_Father: {fileID: 1577010319} 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: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 199.62, y: -82.816666} + m_SizeDelta: {x: 399.24, y: 33.126667} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &32152858 MonoBehaviour: @@ -920,6 +920,128 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 75585768} m_CullTransparentMesh: 0 +--- !u!1 &81207801 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 81207802} + - component: {fileID: 81207805} + - component: {fileID: 81207804} + - component: {fileID: 81207803} + m_Layer: 5 + m_Name: LoginFromButton + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &81207802 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 81207801} + 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: 464716142} + m_Father: {fileID: 514997953} + 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} + m_AnchoredPosition: {x: 0, y: -123.21225} + m_SizeDelta: {x: 350, y: 74.6} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &81207803 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 81207801} + 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: Highlighted + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 81207804} + m_OnClick: + m_PersistentCalls: + m_Calls: [] +--- !u!114 &81207804 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 81207801} + 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 &81207805 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 81207801} + m_CullTransparentMesh: 0 --- !u!1 &139773839 GameObject: m_ObjectHideFlags: 0 @@ -1872,10 +1994,10 @@ RectTransform: m_Father: {fileID: 357773227} 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_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 265.895, y: -94.321106} + m_SizeDelta: {x: 531.79, y: 26.948889} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &295524483 MonoBehaviour: @@ -1949,10 +2071,10 @@ RectTransform: m_Father: {fileID: 357773227} 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: 265.895, y: -40.423332} + m_SizeDelta: {x: 531.79, y: 26.948889} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &313561600 MonoBehaviour: @@ -2796,10 +2918,10 @@ RectTransform: m_Father: {fileID: 1577010319} 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: 199.62, y: -16.563334} + m_SizeDelta: {x: 399.24, y: 33.126667} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &459548716 MonoBehaviour: @@ -2907,6 +3029,86 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 459548714} m_CullTransparentMesh: 0 +--- !u!1 &464716141 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 464716142} + - component: {fileID: 464716144} + - component: {fileID: 464716143} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &464716142 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 464716141} + 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: 81207802} + 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 &464716143 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 464716141} + 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: 15 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 49 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: "\u904E\u53BB\u306E\u30BB\u30C3\u30B7\u30E7\u30F3\u3092\u7528\u3044\u3066\u30ED\u30B0\u30A4\u30F3" +--- !u!222 &464716144 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 464716141} + m_CullTransparentMesh: 0 --- !u!1 &469201797 GameObject: m_ObjectHideFlags: 0 @@ -2975,6 +3177,8 @@ MonoBehaviour: _pass: {fileID: 1372320182} _singIn: {fileID: 745468078} _errorMessage: {fileID: 1486162350} + _logoutButton: {fileID: 1130318996} + _loginBySavedUserButton: {fileID: 81207803} --- !u!114 &469201801 MonoBehaviour: m_ObjectHideFlags: 0 @@ -3320,12 +3524,14 @@ RectTransform: - {fileID: 1377608435} - {fileID: 745468077} - {fileID: 1486162349} + - {fileID: 81207802} + - {fileID: 1130318995} m_Father: {fileID: 1465874629} 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.000061035156, y: -9.8654785} + m_AnchoredPosition: {x: 0, y: -9.8654785} m_SizeDelta: {x: -228, y: -103.5} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &514997954 @@ -3383,7 +3589,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!224 &519724246 RectTransform: m_ObjectHideFlags: 0 @@ -3676,10 +3882,10 @@ RectTransform: m_Father: {fileID: 357773227} 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: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 265.895, y: -67.37222} + m_SizeDelta: {x: 531.79, y: 26.948889} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &542649016 MonoBehaviour: @@ -5409,10 +5615,10 @@ RectTransform: m_Father: {fileID: 357773227} m_RootOrder: 6 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: 265.895, y: -175.16777} + m_SizeDelta: {x: 531.79, y: 26.948889} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &777081575 MonoBehaviour: @@ -5716,10 +5922,10 @@ RectTransform: m_Father: {fileID: 1577010319} 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: 199.62, y: -49.690002} + m_SizeDelta: {x: 399.24, y: 33.126667} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &827257452 MonoBehaviour: @@ -6677,6 +6883,86 @@ LightingSettings: m_PVRFilteringAtrousPositionSigmaIndirect: 2 m_PVRFilteringAtrousPositionSigmaAO: 1 m_PVRTiledBaking: 0 +--- !u!1 &903267114 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 903267115} + - component: {fileID: 903267117} + - component: {fileID: 903267116} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &903267115 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 903267114} + 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: 1130318995} + 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 &903267116 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 903267114} + 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: 37 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 49 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: "\u30ED\u30B0\u30A2\u30A6\u30C8" +--- !u!222 &903267117 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 903267114} + m_CullTransparentMesh: 0 --- !u!1 &933803495 GameObject: m_ObjectHideFlags: 0 @@ -8136,6 +8422,128 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1104772069} m_CullTransparentMesh: 0 +--- !u!1 &1130318994 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1130318995} + - component: {fileID: 1130318998} + - component: {fileID: 1130318997} + - component: {fileID: 1130318996} + m_Layer: 5 + m_Name: LogoutButton + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1130318995 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1130318994} + 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: 903267115} + m_Father: {fileID: 514997953} + m_RootOrder: 5 + 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: -210.1} + m_SizeDelta: {x: 350, y: 74.6} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1130318996 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1130318994} + 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: Highlighted + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1130318997} + m_OnClick: + m_PersistentCalls: + m_Calls: [] +--- !u!114 &1130318997 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1130318994} + 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 &1130318998 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1130318994} + m_CullTransparentMesh: 0 --- !u!1 &1139456583 GameObject: m_ObjectHideFlags: 0 @@ -9613,7 +10021,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: 61.68, y: -41.74} + m_AnchoredPosition: {x: 61.680054, y: -41.73999} m_SizeDelta: {x: 108.2, y: 30} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1431946274 @@ -9825,10 +10233,10 @@ RectTransform: m_Father: {fileID: 357773227} m_RootOrder: 4 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: 265.895, y: -121.27} + m_SizeDelta: {x: 531.79, y: 26.948889} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1444940925 MonoBehaviour: @@ -9982,10 +10390,10 @@ RectTransform: m_Father: {fileID: 357773227} m_RootOrder: 7 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: 265.895, y: -202.11665} + m_SizeDelta: {x: 531.79, y: 26.948889} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1462386919 MonoBehaviour: @@ -11743,10 +12151,10 @@ RectTransform: m_Father: {fileID: 357773227} 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: 265.895, y: -13.474444} + m_SizeDelta: {x: 531.79, y: 26.948889} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1746167130 MonoBehaviour: @@ -14305,10 +14713,10 @@ RectTransform: m_Father: {fileID: 357773227} m_RootOrder: 5 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: 265.895, y: -148.21889} + m_SizeDelta: {x: 531.79, y: 26.948889} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &2074313684 MonoBehaviour: @@ -14904,10 +15312,10 @@ RectTransform: m_Father: {fileID: 357773227} m_RootOrder: 8 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: 265.895, y: -229.06554} + m_SizeDelta: {x: 531.79, y: 26.948889} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &2132104705 MonoBehaviour: diff --git a/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/LoginPanel/LoginManager.cs b/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/LoginPanel/LoginManager.cs index 9cf6e70..c53fdbf 100644 --- a/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/LoginPanel/LoginManager.cs +++ b/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/LoginPanel/LoginManager.cs @@ -1,8 +1,8 @@ using System; using System.Threading; using Cysharp.Threading.Tasks; +using R3; using TORISOUP.NicoliveClient.Client; -using UniRx; using UnityEngine; namespace TORISOUP.NicoliveClient.Example.Console.Scripts.LoginPanel @@ -17,13 +17,13 @@ public class LoginManager : MonoBehaviour /// public NiconicoUser CurrentUser { get; private set; } - private readonly ReactiveProperty _isLoggedIn = new ReactiveProperty(); + private readonly ReactiveProperty _isLoggedIn = new(); /// /// ログイン状態であるか /// - public IReadOnlyReactiveProperty IsLoggedIn => _isLoggedIn; + public ReadOnlyReactiveProperty IsLoggedIn => _isLoggedIn; /// /// ログイン処理を実行する @@ -41,5 +41,32 @@ public async UniTask LoginAsync(string mail, string pass, CancellationToken ct) _isLoggedIn.Value = false; } } + + public void SaveUser(NiconicoUser niconicoUser) + { + PlayerPrefs.SetString("UserId", niconicoUser.UserId); + PlayerPrefs.SetString("UserSession", niconicoUser.UserSession); + } + + public void LoadUser() + { + var userId = PlayerPrefs.GetString("UserId"); + var userSession = PlayerPrefs.GetString("UserSession"); + if (string.IsNullOrEmpty(userId) || string.IsNullOrEmpty(userSession)) + { + _isLoggedIn.Value = false; + return; + } + CurrentUser = new NiconicoUser(userId, userSession); + _isLoggedIn.Value = true; + } + + public void Logout() + { + PlayerPrefs.DeleteKey("UserId"); + PlayerPrefs.DeleteKey("UserSession"); + CurrentUser = default; + _isLoggedIn.Value = false; + } } } \ No newline at end of file diff --git a/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/LoginPanel/LoginPresenter.cs b/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/LoginPanel/LoginPresenter.cs index b68ae21..8b4c6e1 100644 --- a/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/LoginPanel/LoginPresenter.cs +++ b/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/LoginPanel/LoginPresenter.cs @@ -1,7 +1,6 @@ using System; using Cysharp.Threading.Tasks; using Cysharp.Threading.Tasks.Linq; -using UniRx; using UnityEngine; using UnityEngine.UI; @@ -19,6 +18,9 @@ public class LoginPresenter : MonoBehaviour [SerializeField] private Button _singIn; [SerializeField] private Text _errorMessage; + [SerializeField] private Button _logoutButton; + [SerializeField] private Button _loginBySavedUserButton; + void Start() { //ログインボタンが押された @@ -32,6 +34,8 @@ void Start() { _errorMessage.text = ""; await _loginManager.LoginAsync(_mail.text, _pass.text, ct); + + _loginManager.SaveUser(_loginManager.CurrentUser); } catch (Exception e) { @@ -40,6 +44,34 @@ void Start() }, this.GetCancellationTokenOnDestroy()) .Forget(); + + _loginBySavedUserButton + .OnClickAsAsyncEnumerable(this.GetCancellationTokenOnDestroy()) + .ForEachAsync( + _ => + { + try + { + _errorMessage.text = ""; + _loginManager.LoadUser(); + } + catch (Exception e) + { + _errorMessage.text = e.Message; + } + }, + this.GetCancellationTokenOnDestroy()) + .Forget(); + + _logoutButton + .OnClickAsAsyncEnumerable(this.GetCancellationTokenOnDestroy()) + .ForEachAsync( + _ => + { + _loginManager.Logout(); + }, + this.GetCancellationTokenOnDestroy()) + .Forget(); } } } \ No newline at end of file diff --git a/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/CommentPanel/CommentPanel.cs b/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/CommentPanel/CommentPanel.cs index ea0302e..8f49a11 100644 --- a/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/CommentPanel/CommentPanel.cs +++ b/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/CommentPanel/CommentPanel.cs @@ -3,11 +3,11 @@ using System.Linq; using Cysharp.Threading.Tasks; using Cysharp.Threading.Tasks.Linq; +using R3; +using R3.Triggers; using TORISOUP.NicoliveClient.Client; using TORISOUP.NicoliveClient.Comment; using TORISOUP.NicoliveClient.Response; -using UniRx; -using UniRx.Triggers; using UnityEngine; using UnityEngine.UI; @@ -32,24 +32,20 @@ public class CommentPanel : MonoBehaviour /// /// 受信したコメント情報 /// - public IObservable OnCommentRecieved - { - get { return _onCommentRecieved; } - } + public Observable OnCommentReceived => _onCommentReceived; //接続状態 - private ReactiveProperty _isConnected = new BoolReactiveProperty(); + private readonly ReactiveProperty _isConnected = new(); //接続しているObservableを切断する時に必要 - private IDisposable _recieveDisposable; + private IDisposable _receiveDisposable; //全クランアントから配送されたコメント情報を全てこのSubjectに集約する - private Subject _onCommentRecieved = new Subject(); + private readonly Subject _onCommentReceived = new(); private IEnumerable _commentClients; - private readonly ReactiveProperty _commentServerInfos = - new ReactiveProperty(); + private readonly ReactiveProperty _commentServerInfos = new(); void Start() { @@ -62,7 +58,7 @@ void Start() try { var info = await _manager.NicoliveApiClient.GetProgramInfoAsync(c); - _commentServerInfos.Value = info.Rooms.Select(r => r.CommentServerInfo).ToArray(); + _commentServerInfos.OnNext(info.Rooms.Select(r => r.CommentServerInfo).ToArray()); } catch (Exception e)when (e is not OperationCanceledException) { @@ -75,19 +71,18 @@ void Start() _commentServerInfos .Where(x => x != null) .Select(x => x.Length) - .DistinctUntilChanged() .Subscribe(x => { //接続していない かつ 部屋数が1以上のときのみ接続できる _connectButton.interactable = !_isConnected.Value && x > 0; - _roomCountText.text = string.Format("現在の部屋数:{0}", x); + _roomCountText.text = $"現在の部屋数:{x}"; }) .AddTo(ct); //接続状態が更新されたらボタンに反映する _isConnected.Subscribe(x => { - _connectButton.interactable = !x && _manager.CurrentRooms.Count > 0; + _connectButton.interactable = !x && _commentServerInfos.Value.Length > 0; _disconnectButton.interactable = x; }) .AddTo(ct); @@ -131,14 +126,12 @@ private void Connect() .ToArray(); if (_commentClients == null) return; - + //全部屋の情報をまとめて1つのObservableにする - _recieveDisposable = - _commentClients - .Select(x => x.OnMessageAsObservable) - .Merge() - .TakeUntilDestroy(this) //このGameObjectが破棄されたらOnCompletedを差し込む - .Subscribe(_onCommentRecieved); // Mergeした結果を1つのSubjectに流し込む + _receiveDisposable = + Observable + .Merge(_commentClients.Select(x => x.OnMessageAsObservable)) + .Subscribe(x => _onCommentReceived.OnNext(x)); // Mergeした結果を1つのSubjectに流し込む //接続開始 foreach (var c in _commentClients) @@ -154,7 +147,7 @@ private void Connect() private void Disconnect() { //先にObservableを停止 - if (_recieveDisposable != null) _recieveDisposable.Dispose(); + _receiveDisposable?.Dispose(); //各クライアントを破棄 if (_commentClients != null) diff --git a/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/CommentRenderPanel/CommentRenderPanel.cs b/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/CommentRenderPanel/CommentRenderPanel.cs index 5a7f5c4..5500385 100644 --- a/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/CommentRenderPanel/CommentRenderPanel.cs +++ b/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/CommentRenderPanel/CommentRenderPanel.cs @@ -1,6 +1,6 @@ -using UniRx; -using UnityEngine; +using UnityEngine; using UnityEngine.UI; +using R3; namespace TORISOUP.NicoliveClient.Example.Console.Scripts.MainPanel.CommentRenderPanel { @@ -17,7 +17,7 @@ void Start() { var renderPanelCount = _renderAreaParent.childCount; - _commentPanelManager.OnCommentRecieved + _commentPanelManager.OnCommentReceived .Subscribe(message => { diff --git a/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/EnquetePanel/EnquetePanel.cs b/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/EnquetePanel/EnquetePanel.cs index 9d5974e..75a3981 100644 --- a/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/EnquetePanel/EnquetePanel.cs +++ b/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/EnquetePanel/EnquetePanel.cs @@ -2,7 +2,6 @@ using System.Linq; using Cysharp.Threading.Tasks; using Cysharp.Threading.Tasks.Linq; -using UniRx; using UnityEngine; using UnityEngine.UI; diff --git a/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/ProgramIdPanel/ProgramIdPanel.cs b/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/ProgramIdPanel/ProgramIdPanel.cs index d791d6a..b12dab4 100644 --- a/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/ProgramIdPanel/ProgramIdPanel.cs +++ b/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/ProgramIdPanel/ProgramIdPanel.cs @@ -2,7 +2,7 @@ using System.Linq; using Cysharp.Threading.Tasks; using Cysharp.Threading.Tasks.Linq; -using UniRx; +using R3; using UnityEngine; using UnityEngine.UI; diff --git a/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/ProgramInfoPanel/ProgramInfoPanel.cs b/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/ProgramInfoPanel/ProgramInfoPanel.cs index 5894670..d164bfa 100644 --- a/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/ProgramInfoPanel/ProgramInfoPanel.cs +++ b/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/ProgramInfoPanel/ProgramInfoPanel.cs @@ -3,7 +3,6 @@ using System.Text; using Cysharp.Threading.Tasks; using Cysharp.Threading.Tasks.Linq; -using UniRx; using UnityEngine; using UnityEngine.UI; diff --git a/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/ProgramStatisticsPanel/ProgramStatisticsPanel.cs b/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/ProgramStatisticsPanel/ProgramStatisticsPanel.cs index 04c73c9..9ffa38c 100644 --- a/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/ProgramStatisticsPanel/ProgramStatisticsPanel.cs +++ b/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/ProgramStatisticsPanel/ProgramStatisticsPanel.cs @@ -1,6 +1,6 @@ using System; using Cysharp.Threading.Tasks; -using UniRx; +using R3; using UnityEngine; using UnityEngine.UI; @@ -21,7 +21,7 @@ void Start() _getButton.OnClickAsObservable() .ThrottleFirst(TimeSpan.FromSeconds(5)) - .Subscribe(_ => command.Execute()) + .Subscribe(_ => command.Execute(Unit.Default)) .AddTo(ct); command.Subscribe(_ => diff --git a/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/ScheduledProgramPanel/ScheduledProgramPanel.cs b/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/ScheduledProgramPanel/ScheduledProgramPanel.cs index 499dcf6..a2eab4b 100644 --- a/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/ScheduledProgramPanel/ScheduledProgramPanel.cs +++ b/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/ScheduledProgramPanel/ScheduledProgramPanel.cs @@ -2,7 +2,6 @@ using System.Text; using Cysharp.Threading.Tasks; using Cysharp.Threading.Tasks.Linq; -using UniRx; using UnityEngine; using UnityEngine.UI; diff --git a/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/SegmentPanel/SegmentPanel.cs b/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/SegmentPanel/SegmentPanel.cs index 172bf73..90a663e 100644 --- a/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/SegmentPanel/SegmentPanel.cs +++ b/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/SegmentPanel/SegmentPanel.cs @@ -2,7 +2,6 @@ using System.Linq; using Cysharp.Threading.Tasks; using Cysharp.Threading.Tasks.Linq; -using UniRx; using UnityEngine; using UnityEngine.UI; diff --git a/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/NicoliveSampleManager.cs b/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/NicoliveSampleManager.cs index 7633466..99ad96a 100644 --- a/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/NicoliveSampleManager.cs +++ b/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/NicoliveSampleManager.cs @@ -1,11 +1,12 @@ using System; +using System.Collections.Generic; using System.Text.RegularExpressions; using System.Threading; using Cysharp.Threading.Tasks; using TORISOUP.NicoliveClient.Client; using TORISOUP.NicoliveClient.Example.Console.Scripts.LoginPanel; using TORISOUP.NicoliveClient.Response; -using UniRx; +using R3; using UnityEngine; namespace TORISOUP.NicoliveClient.Example.Console.Scripts @@ -16,7 +17,7 @@ public class NicoliveSampleManager : MonoBehaviour [SerializeField] private GameObject _loginPanel; [SerializeField] private GameObject _mainPanel; [SerializeField] private GameObject _blockPanel; - + private Regex _lvRegex = new Regex(@"^lv\d+$"); public NicoliveApiClient NicoliveApiClient @@ -27,10 +28,7 @@ public NicoliveApiClient NicoliveApiClient /// /// 現在の部屋情報 /// - public ReactiveDictionary CurrentRooms - { - get { return _currentRooms; } - } + public Dictionary CurrentRooms => _currentRooms; /// /// 現在のユーザ情報 @@ -40,15 +38,15 @@ public NiconicoUser CurrentUser get { return _loginManager.CurrentUser; } } - private ReactiveDictionary _currentRooms = new ReactiveDictionary(); + private readonly Dictionary _currentRooms = new(); private NicoliveApiClient _nicoliveApiClient; - private StringReactiveProperty _currentProgramId = new StringReactiveProperty(""); + private readonly ReactiveProperty _currentProgramId = new ReactiveProperty(""); /// /// 現在の対象番組ID /// - public IReadOnlyReactiveProperty CurrentProgramId + public ReadOnlyReactiveProperty CurrentProgramId { get { return _currentProgramId; } } @@ -58,7 +56,7 @@ public IReadOnlyReactiveProperty CurrentProgramId /// /// 有効な番組IDが設定されているか /// - public IReadOnlyReactiveProperty IsSetProgramId + public ReadOnlyReactiveProperty IsSetProgramId { get { @@ -97,7 +95,7 @@ private void Start() /// public async UniTask GetCurrentProgramIdAsync(CancellationToken ct) { - if (!_loginManager.IsLoggedIn.Value) + if (!_loginManager.IsLoggedIn.CurrentValue) { Debug.LogWarning("ログインしていません"); throw new Exception("Not logged in."); diff --git a/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/ObservableExt.cs b/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/ObservableExt.cs new file mode 100644 index 0000000..a402584 --- /dev/null +++ b/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/ObservableExt.cs @@ -0,0 +1,23 @@ +using R3; + +namespace TORISOUP.NicoliveClient.Example +{ + public static class ObservableDebugExt + { + public static Observable Debug(this Observable source, string label = null) + { +#if DEBUG + var l = (label == null) ? "" : $"[{label}] "; + return source.Materialize() + .Do( + onNext: x => UnityEngine.Debug.Log(l + x), + onDispose: () => UnityEngine.Debug.Log($"{l}OnDispose"), + onSubscribe: () => UnityEngine.Debug.Log($"{l}OnSubscribe") + ) + .Dematerialize(); +#else + return source; +#endif + } + } +} \ No newline at end of file diff --git a/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/ObservableExt.cs.meta b/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/ObservableExt.cs.meta new file mode 100644 index 0000000..c6141de --- /dev/null +++ b/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/ObservableExt.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 5974a1aa98714e4d8dde846451caaf23 +timeCreated: 1708355934 \ No newline at end of file diff --git a/Assets/TORISOUP/NicoliveClient/Example/TORISOUP.NicoliveClient.Example.asmdef b/Assets/TORISOUP/NicoliveClient/Example/TORISOUP.NicoliveClient.Example.asmdef index 05488f4..25a113b 100644 --- a/Assets/TORISOUP/NicoliveClient/Example/TORISOUP.NicoliveClient.Example.asmdef +++ b/Assets/TORISOUP/NicoliveClient/Example/TORISOUP.NicoliveClient.Example.asmdef @@ -2,10 +2,10 @@ "name": "TORISOUP.NicoliveClient.Example", "rootNamespace": "", "references": [ - "GUID:560b04d1a97f54a4e82edc0cbbb69285", "GUID:f51ebe6a0ceec4240a699833d6309b23", "GUID:d973473ad59dc49459586b82e5bd4bc1", - "GUID:5c01796d064528144a599661eaab93a6" + "GUID:5c01796d064528144a599661eaab93a6", + "GUID:77221876cc6b8244180b96e320b1bcd4" ], "includePlatforms": [], "excludePlatforms": [], diff --git a/Assets/TORISOUP/NicoliveClient/Plugins/Client/NicoliveCommentClient.cs b/Assets/TORISOUP/NicoliveClient/Plugins/Client/NicoliveCommentClient.cs index eca6273..13cbb5c 100644 --- a/Assets/TORISOUP/NicoliveClient/Plugins/Client/NicoliveCommentClient.cs +++ b/Assets/TORISOUP/NicoliveClient/Plugins/Client/NicoliveCommentClient.cs @@ -37,7 +37,8 @@ public class NicoliveCommentClient : IDisposable private Observable _onMessageAsObservable; private readonly object _lockObject = new(); - private CancellationTokenSource _cancellationTokenSource = new(); + private readonly CancellationTokenSource _cancellationTokenSource = new(); + private readonly Subject _resetSubject = new(); /// /// 受信したコメントオブジェクトを通知する @@ -84,7 +85,7 @@ private void Initialize() _ws = new WebSocket(WebSocketUri.AbsoluteUri, "msg.nicovideo.jp#json"); var ct = _cancellationTokenSource.Token; - + _onMessageAsObservable = Observable.FromEvent, MessageEventArgs>( h => (sender, e) => h(e), @@ -96,6 +97,7 @@ private void Initialize() .Where(x => x.chat.IsSuccess()) .Select(x => x.chat.ToChat(RoomId)) .ObserveOnMainThread() //Unityメインスレッドに戻す + .TakeUntil(_resetSubject) .Share(); } @@ -108,7 +110,6 @@ private void Initialize() public void Connect(int resFrom) { Disconnect(); - _cancellationTokenSource = new CancellationTokenSource(); if (resFrom < 0) resFrom = 0; @@ -136,21 +137,19 @@ private async UniTaskVoid ConnectAsync(int resFrom, CancellationToken ct) while (!ct.IsCancellationRequested) { await Task.Delay(TimeSpan.FromSeconds(10), cancellationToken: ct).ConfigureAwait(false); - if (_ws != null && _ws.IsAlive) _ws.Ping(); + if (_ws is { IsAlive: true }) _ws.Ping(); } } - + /// - /// コメントサーバから切断する + /// コメントサーバから切断し、Observableをリセットする /// public void Disconnect() { - _cancellationTokenSource?.Cancel(); - _cancellationTokenSource?.Dispose(); - - if (_ws != null && _ws.IsAlive) + if (_ws is { IsAlive: true }) { - _ws.CloseAsync(); + _resetSubject.OnNext(Unit.Default); + _ws.Close(); } } @@ -162,7 +161,10 @@ public void Dispose() lock (_lockObject) { Disconnect(); - + + _resetSubject.OnCompleted(); + _cancellationTokenSource?.Cancel(); + _cancellationTokenSource?.Dispose(); _ws = null; _isDisposed = true; } diff --git a/Assets/TORISOUP/NicoliveClient/Plugins/TORISOUP.NicoliveClient.asmdef b/Assets/TORISOUP/NicoliveClient/Plugins/TORISOUP.NicoliveClient.asmdef index 4c5b0b2..ab8075c 100644 --- a/Assets/TORISOUP/NicoliveClient/Plugins/TORISOUP.NicoliveClient.asmdef +++ b/Assets/TORISOUP/NicoliveClient/Plugins/TORISOUP.NicoliveClient.asmdef @@ -2,7 +2,6 @@ "name": "TORISOUP.NicoliveClient", "rootNamespace": "", "references": [ - "GUID:560b04d1a97f54a4e82edc0cbbb69285", "GUID:f51ebe6a0ceec4240a699833d6309b23", "GUID:77221876cc6b8244180b96e320b1bcd4" ], diff --git a/Assets/TORISOUP/NicoliveClient/version.txt b/Assets/TORISOUP/NicoliveClient/version.txt index e4484d5..39a3dd4 100644 --- a/Assets/TORISOUP/NicoliveClient/version.txt +++ b/Assets/TORISOUP/NicoliveClient/version.txt @@ -1 +1 @@ -2023.8.29 \ No newline at end of file +2024.2.20 \ No newline at end of file From e4a72409090d903d9d0d91c1263fcebd7466e31a Mon Sep 17 00:00:00 2001 From: TORISOUP Date: Tue, 20 Feb 2024 01:08:37 +0900 Subject: [PATCH 5/8] Add package json --- .../NicoliveClient/Plugins/package.json | 18 ++++++++++++++++++ .../NicoliveClient/Plugins/package.json.meta | 7 +++++++ TORISOUP.NicoliveClient.csproj.DotSettings | 2 -- 3 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 Assets/TORISOUP/NicoliveClient/Plugins/package.json create mode 100644 Assets/TORISOUP/NicoliveClient/Plugins/package.json.meta delete mode 100644 TORISOUP.NicoliveClient.csproj.DotSettings diff --git a/Assets/TORISOUP/NicoliveClient/Plugins/package.json b/Assets/TORISOUP/NicoliveClient/Plugins/package.json new file mode 100644 index 0000000..f83f022 --- /dev/null +++ b/Assets/TORISOUP/NicoliveClient/Plugins/package.json @@ -0,0 +1,18 @@ +{ + "name": "jp.torisoup.unitynicoliveclient", + "displayName": "UnityNicoliveClient", + "version": "1.0.0", + "unity": "2021.3", + "description": "Nicolive client", + "author": { + "name": "TORISOUP", + "url": "https://github.com/TORISOUP" + }, + + "keywords": [ + "Niconico" + ], + + "dependencies": { + } +} \ No newline at end of file diff --git a/Assets/TORISOUP/NicoliveClient/Plugins/package.json.meta b/Assets/TORISOUP/NicoliveClient/Plugins/package.json.meta new file mode 100644 index 0000000..4436d10 --- /dev/null +++ b/Assets/TORISOUP/NicoliveClient/Plugins/package.json.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 1e241c8e5095de3438d5e1a39da91125 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/TORISOUP.NicoliveClient.csproj.DotSettings b/TORISOUP.NicoliveClient.csproj.DotSettings deleted file mode 100644 index 34a151f..0000000 --- a/TORISOUP.NicoliveClient.csproj.DotSettings +++ /dev/null @@ -1,2 +0,0 @@ - - True \ No newline at end of file From 3745a04a32af8f85ef7d7da70149cd05914c0dca Mon Sep 17 00:00:00 2001 From: TORISOUP Date: Tue, 20 Feb 2024 01:15:04 +0900 Subject: [PATCH 6/8] Update README --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index 44d10d9..f7d7322 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,20 @@ UnityNicoliveClientはニコニコ生放送の新配信番組をUnityから操 新配信のユーザ生放送にのみ対応しています。 +# 導入方法 + +## R3版(v1.0.0~) + +UPMから導入してください。 + +``` +https://github.com/TORISOUP/UnityNicoliveClient.git?path=Assets/TORISOUP/NicoliveClient/Plugins +``` + +## UniRx版 + +[v2023.09.06](https://github.com/TORISOUP/UnityNicoliveClient/releases/tag/v2023.09.06) + # 依存ライブラリ 次のライブラリを別途導入する必要があります。 From 99ee131f57ae9c946da30ee5c373b43366b554df Mon Sep 17 00:00:00 2001 From: TORISOUP Date: Tue, 20 Feb 2024 01:15:38 +0900 Subject: [PATCH 7/8] rm version.txt --- Assets/TORISOUP/NicoliveClient/version.txt | 1 - Assets/TORISOUP/NicoliveClient/version.txt.meta | 9 --------- 2 files changed, 10 deletions(-) delete mode 100644 Assets/TORISOUP/NicoliveClient/version.txt delete mode 100644 Assets/TORISOUP/NicoliveClient/version.txt.meta diff --git a/Assets/TORISOUP/NicoliveClient/version.txt b/Assets/TORISOUP/NicoliveClient/version.txt deleted file mode 100644 index 39a3dd4..0000000 --- a/Assets/TORISOUP/NicoliveClient/version.txt +++ /dev/null @@ -1 +0,0 @@ -2024.2.20 \ No newline at end of file diff --git a/Assets/TORISOUP/NicoliveClient/version.txt.meta b/Assets/TORISOUP/NicoliveClient/version.txt.meta deleted file mode 100644 index 70aa359..0000000 --- a/Assets/TORISOUP/NicoliveClient/version.txt.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 420e4324d934f4941b63a05b8355bdb1 -timeCreated: 1517504505 -licenseType: Pro -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: From 9e2715f4ec40fb8eaae9fbe7e285afbf1dd82b0c Mon Sep 17 00:00:00 2001 From: TORISOUP Date: Tue, 20 Feb 2024 01:19:23 +0900 Subject: [PATCH 8/8] Update README --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f7d7322..e88ca8a 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,8 @@ https://github.com/TORISOUP/UnityNicoliveClient.git?path=Assets/TORISOUP/Nicoliv 次のライブラリを別途導入する必要があります。 -* UniRx +* R3 +* R3.Unity * UniTask # 機能一覧 @@ -199,8 +200,14 @@ MITライセンス UniRx Copyright (c) 2014 Yoshifumi Kawai https://github.com/neuecc/UniRx/blob/master/LICENSE +R3 +Copyright (c) 2024 Cysharp, Inc. https://github.com/Cysharp/R3/blob/main/LICENSE + UniTask Copyright (c) 2019 Yoshifumi Kawai / Cysharp, Inc. https://github.com/Cysharp/UniTask/blob/master/LICENSE websocket-sharp Copyright (c) 2010-2018 sta.blockhead https://github.com/sta/websocket-sharp/blob/master/LICENSE.txt + +NugetForUnity +Copyright (c) 2018 Patrick McCarthy https://github.com/GlitchEnzo/NuGetForUnity/blob/master/LICENSE \ No newline at end of file