diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..c8cb4a6 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,86 @@ +* text=auto + +# Unity files +*.meta -text merge=unityyamlmerge diff +*.unity -text merge=unityyamlmerge diff +*.asset -text merge=unityyamlmerge diff +*.prefab -text merge=unityyamlmerge diff +*.mat -text merge=unityyamlmerge diff +*.anim -text merge=unityyamlmerge diff +*.controller -text merge=unityyamlmerge diff +*.overrideController -text merge=unityyamlmerge diff +*.physicMaterial -text merge=unityyamlmerge diff +*.physicsMaterial2D -text merge=unityyamlmerge diff +*.playable -text merge=unityyamlmerge diff +*.mask -text merge=unityyamlmerge diff +*.brush -text merge=unityyamlmerge diff +*.flare -text merge=unityyamlmerge diff +*.fontsettings -text merge=unityyamlmerge diff +*.guiskin -text merge=unityyamlmerge diff +*.giparams -text merge=unityyamlmerge diff +*.renderTexture -text merge=unityyamlmerge diff +*.spriteatlas -text merge=unityyamlmerge diff +*.terrainlayer -text merge=unityyamlmerge diff +*.mixer -text merge=unityyamlmerge diff +*.shadervariants -text merge=unityyamlmerge diff + +# Image formats +*.psd filter=lfs diff=lfs merge=lfs -text +*.jpg filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.gif filter=lfs diff=lfs merge=lfs -text +*.bmp filter=lfs diff=lfs merge=lfs -text +*.tga filter=lfs diff=lfs merge=lfs -text +*.tiff filter=lfs diff=lfs merge=lfs -text +*.tif filter=lfs diff=lfs merge=lfs -text +*.iff filter=lfs diff=lfs merge=lfs -text +*.pict filter=lfs diff=lfs merge=lfs -text +*.dds filter=lfs diff=lfs merge=lfs -text +*.xcf filter=lfs diff=lfs merge=lfs -text + +# Audio formats +*.mp3 filter=lfs diff=lfs merge=lfs -text +*.ogg filter=lfs diff=lfs merge=lfs -text +*.wav filter=lfs diff=lfs merge=lfs -text +*.aiff filter=lfs diff=lfs merge=lfs -text +*.aif filter=lfs diff=lfs merge=lfs -text +*.mod filter=lfs diff=lfs merge=lfs -text +*.it filter=lfs diff=lfs merge=lfs -text +*.s3m filter=lfs diff=lfs merge=lfs -text +*.xm filter=lfs diff=lfs merge=lfs -text + +# Video formats +*.mov filter=lfs diff=lfs merge=lfs -text +*.avi filter=lfs diff=lfs merge=lfs -text +*.asf filter=lfs diff=lfs merge=lfs -text +*.mpg filter=lfs diff=lfs merge=lfs -text +*.mpeg filter=lfs diff=lfs merge=lfs -text +*.mp4 filter=lfs diff=lfs merge=lfs -text + +# 3D formats +*.fbx filter=lfs diff=lfs merge=lfs -text +*.obj filter=lfs diff=lfs merge=lfs -text +*.max filter=lfs diff=lfs merge=lfs -text +*.blend filter=lfs diff=lfs merge=lfs -text +*.dae filter=lfs diff=lfs merge=lfs -text +*.mb filter=lfs diff=lfs merge=lfs -text +*.ma filter=lfs diff=lfs merge=lfs -text +*.3ds filter=lfs diff=lfs merge=lfs -text +*.dfx filter=lfs diff=lfs merge=lfs -text +*.c4d filter=lfs diff=lfs merge=lfs -text +*.lwo filter=lfs diff=lfs merge=lfs -text +*.lwo2 filter=lfs diff=lfs merge=lfs -text +*.abc filter=lfs diff=lfs merge=lfs -text +*.3dm filter=lfs diff=lfs merge=lfs -text + +# Build +*.dll filter=lfs diff=lfs merge=lfs -text +*.pdb filter=lfs diff=lfs merge=lfs -text +*.mdb filter=lfs diff=lfs merge=lfs -text + +# Packaging +*.zip filter=lfs diff=lfs merge=lfs -text +*.7z filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.rar filter=lfs diff=lfs merge=lfs -text +*.tar filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore index e9558d7..0d9eeb3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,33 +1,49 @@ -# Unity [Ll]ibrary/ [Tt]emp/ [Oo]bj/ +[Bb]uild/ +[Bb]uilds/ +[Ll]ogs/ +.idea/ -_UpgradeReport_Files/ -# Unity? -*.pidb +# Uncomment this line if you wish to ignore the asset store tools plugin +# [Aa]ssets/AssetStoreTools* + +# Visual Studio cache directory +.vs/ + +# Gradle cache directory +.gradle/ + +# Autogenerated VS/MD/Consulo solution and project files +ExportedObj/ +.consulo/ *.csproj *.unityproj +*.sln +*.suo +*.tmp +*.user +*.userprefs +*.pidb *.booproj -UpgradeLog* -*.dat -UpgradeLog* -MIKOMA.sdf -MIKOMA.VC.opendb +*.svd +*.pdb +*.mdb +*.opendb +*.VC.db -# Mac -*.DS_Store -*.Thumbs.db.* +# Unity3D generated meta files +*.pidb.meta +*.pdb.meta +*.mdb.meta -# Unity? MonoDevelop? -*.svd -*.user -*.userprefs -*.suo -*.sln -/*.png -*.log -Build/ -Assets/ExcludeAssets -UnitTestResults.xml -.vs/ \ No newline at end of file +# Unity3D generated file on crash reports +sysinfo.txt + +# Builds +*.apk +*.unitypackage + +# Crashlytics generated file +crashlytics-build.properties diff --git a/Assets/NicoliveClient/Example/Console/Scripts/LoginPanel/LoginManager.cs b/Assets/NicoliveClient/Example/Console/Scripts/LoginPanel/LoginManager.cs deleted file mode 100644 index d906159..0000000 --- a/Assets/NicoliveClient/Example/Console/Scripts/LoginPanel/LoginManager.cs +++ /dev/null @@ -1,57 +0,0 @@ -using UniRx; -using UnityEngine; - -namespace NicoliveClient.Example -{ - /// - /// ログイン状態の管理 - /// - public class LoginManager : MonoBehaviour - { - /// - /// ログイン中のユーザ情報 - /// - public NiconicoUser CurrentUser { get; private set; } - - private ReactiveProperty _isLoggedIn = new ReactiveProperty(); - - private ReactiveProperty _errorMessage = new ReactiveProperty(); - - - /// - /// ログイン状態であるか - /// - public IReadOnlyReactiveProperty IsLoggedIn - { - get { return _isLoggedIn; } - } - - /// - /// ログイン失敗時のメッセージ - /// - public IReadOnlyReactiveProperty ErrorMessage - { - get { return _errorMessage; } - } - - - /// - /// ログイン処理を実行する - /// - public void Login(string mail, string pass) - { - _errorMessage.Value = ""; - - NiconicoUserClient.LoginAsync(mail, pass) - .Subscribe(x => - { - CurrentUser = x; - _isLoggedIn.Value = true; - }, ex => - { - _errorMessage.Value = ex.Message; - _isLoggedIn.Value = false; - }); - } - } -} diff --git a/Assets/NicoliveClient/Example/Console/Scripts/LoginPanel/LoginPresenter.cs b/Assets/NicoliveClient/Example/Console/Scripts/LoginPanel/LoginPresenter.cs deleted file mode 100644 index aec757d..0000000 --- a/Assets/NicoliveClient/Example/Console/Scripts/LoginPanel/LoginPresenter.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System; -using UniRx; -using UnityEngine; -using UnityEngine.UI; - -namespace NicoliveClient.Example -{ - /// - /// ログイン画面のUIとの接合部 - /// - public class LoginPresenter : MonoBehaviour - { - [SerializeField] private LoginManager _loginManager; - - [SerializeField] private InputField _mail; - [SerializeField] private InputField _pass; - [SerializeField] private Button _singIn; - [SerializeField] private Text _errorMessage; - - void Start() - { - //ログインボタンが押された - _singIn.OnClickAsObservable() - .ThrottleFirst(TimeSpan.FromSeconds(3)) //連打防止 - .Subscribe(_ => - { - _loginManager.Login(_mail.text, _pass.text); - }); - - //エラーメッセージ表示 - _loginManager.ErrorMessage.SubscribeToText(_errorMessage); - - } - - } -} diff --git a/Assets/NicoliveClient/Example/Console/Scripts/MainPanel/EnquetePanel/EnquetePanel.cs b/Assets/NicoliveClient/Example/Console/Scripts/MainPanel/EnquetePanel/EnquetePanel.cs deleted file mode 100644 index 314f3c9..0000000 --- a/Assets/NicoliveClient/Example/Console/Scripts/MainPanel/EnquetePanel/EnquetePanel.cs +++ /dev/null @@ -1,67 +0,0 @@ -using System; -using System.Linq; -using UniRx; -using UnityEngine; -using UnityEngine.UI; - -namespace NicoliveClient.Example -{ - public class EnquetePanel : MonoBehaviour - { - [SerializeField] private NicoliveSampleManager _manager; - - [SerializeField] private Button StartButton; - [SerializeField] private Button ShowResultButton; - [SerializeField] private Button EndButton; - - [SerializeField] private InputField QuestionTitleInputField; - [SerializeField] private InputField[] itemInputFields; - - [SerializeField] private Text ResultLabel; - - void Start() - { - //アンケート開始 - StartButton.OnClickAsObservable() - .ThrottleFirst(TimeSpan.FromSeconds(3)) //連打防止 - .Subscribe(_ => - { - var title = QuestionTitleInputField.text; - var items = itemInputFields.Select(x => x.text); - - _manager.NicoliveApiClient - .StartEnqueteAsync(title, items) - .Subscribe(__ => ResultLabel.text = "アンケートを開始しました", Debug.LogError); - - }); - - //アンケート結果の表示&取得 - ShowResultButton.OnClickAsObservable() - .ThrottleFirst(TimeSpan.FromSeconds(3)) //連打防止 - .Subscribe(_ => - { - _manager.NicoliveApiClient - .ShowResultEnqueteAsync() - .Subscribe(result => - { - var message = result.Items.Select(x => string.Format("{0}:{1}%", x.Name, x.Rate)) - .Aggregate((p, c) => p + " / " + c); - ResultLabel.text = message; - }, Debug.LogError); - }); - - - //アンケートの終了 - EndButton.OnClickAsObservable() - .ThrottleFirst(TimeSpan.FromSeconds(3)) //連打防止 - .Subscribe(_ => - { - _manager.NicoliveApiClient - .FinishEnqueteAsync() - .Subscribe(__ => ResultLabel.text = "アンケートを終了しました", Debug.LogError); - }); - - } - - } -} diff --git a/Assets/NicoliveClient/Example/Console/Scripts/MainPanel/OperatorCommentPanel/OperatorCommentPanel.cs b/Assets/NicoliveClient/Example/Console/Scripts/MainPanel/OperatorCommentPanel/OperatorCommentPanel.cs deleted file mode 100644 index 5c88ea9..0000000 --- a/Assets/NicoliveClient/Example/Console/Scripts/MainPanel/OperatorCommentPanel/OperatorCommentPanel.cs +++ /dev/null @@ -1,51 +0,0 @@ -using System; -using UniRx; -using UnityEngine; -using UnityEngine.UI; - -namespace NicoliveClient.Example -{ - /// - /// 運営コメントパネルのUI - /// - public class OperatorCommentPanel : MonoBehaviour - { - [SerializeField] private NicoliveSampleManager _manager; - - [SerializeField] private InputField _nameInputField; - [SerializeField] private InputField _bodyInputField; - [SerializeField] private Dropdown _colorDropdown; - [SerializeField] private Toggle _isPermanentToggle; - [SerializeField] private Button _sendButton; - [SerializeField] private Button _deleteButton; - void Start() - { - _sendButton.OnClickAsObservable() - .ThrottleFirst(TimeSpan.FromSeconds(1)) //連打防止 - .Subscribe(_ => - { - - //運営コメント送信 - _manager.NicoliveApiClient - .SendOperatorCommentAsync( - _bodyInputField.text, - _nameInputField.text, - _colorDropdown.options[_colorDropdown.value].text, - _isPermanentToggle.isOn - ).Subscribe(__ => { }, Debug.LogError); - }); - - _deleteButton.OnClickAsObservable() - .ThrottleFirst(TimeSpan.FromSeconds(1)) //連打防止 - .Subscribe(_ => - { - - //運営コメント削除 - _manager.NicoliveApiClient - .DeleteOperatorCommentAsync() - .Subscribe(__ => { }, Debug.LogError); - }); - } - - } -} diff --git a/Assets/NicoliveClient/Example/Console/Scripts/MainPanel/ProgramIdPanel/ProgramIdPanel.cs b/Assets/NicoliveClient/Example/Console/Scripts/MainPanel/ProgramIdPanel/ProgramIdPanel.cs deleted file mode 100644 index 6fe520a..0000000 --- a/Assets/NicoliveClient/Example/Console/Scripts/MainPanel/ProgramIdPanel/ProgramIdPanel.cs +++ /dev/null @@ -1,42 +0,0 @@ -using System; -using UniRx; -using UnityEngine; -using UnityEngine.UI; - -namespace NicoliveClient.Example -{ - /// - /// 番組ID部分のUI表示 - /// - public class ProgramIdPanel : MonoBehaviour - { - [SerializeField] private NicoliveSampleManager _manager; - - [SerializeField] private InputField _programIdInputField; - [SerializeField] private Button _getCurrentProgramIdButton; - [SerializeField] private Button _setProgramIdButton; - [SerializeField] private Text _currentProgramIdText; - - void Start() - { - _getCurrentProgramIdButton - .OnClickAsObservable() - .ThrottleFirst(TimeSpan.FromSeconds(3)) //連打防止 - .Subscribe(_ => - { - //取得したIDは一旦UIに反映 - _manager.GetCurrentProgramIdAsync() - .Subscribe(x => _programIdInputField.text = x, Debug.LogError); - }); - - //設定ボタンが押されたらUIの値を反映する - _setProgramIdButton.OnClickAsObservable() - .Subscribe(_ => _manager.SetTargetProgramId(_programIdInputField.text)); - - //現在の操作対象lv表示 - _manager.CurrentProgramId - .SubscribeToText(_currentProgramIdText); - } - - } -} diff --git a/Assets/NicoliveClient/Example/Console/Scripts/MainPanel/ProgramInfoPanel/ProgramInfoPanel.cs b/Assets/NicoliveClient/Example/Console/Scripts/MainPanel/ProgramInfoPanel/ProgramInfoPanel.cs deleted file mode 100644 index 6379343..0000000 --- a/Assets/NicoliveClient/Example/Console/Scripts/MainPanel/ProgramInfoPanel/ProgramInfoPanel.cs +++ /dev/null @@ -1,48 +0,0 @@ -using System; -using System.Linq; -using System.Text; -using UniRx; -using UnityEngine; -using UnityEngine.UI; - -namespace NicoliveClient.Example -{ - public class ProgramInfoPanel : MonoBehaviour - { - [SerializeField] private NicoliveSampleManager _manager; - - [SerializeField] private Button _getButton; - [SerializeField] private Text _programInfoLabel; - - void Start() - { - _getButton.OnClickAsObservable() - .ThrottleFirst(TimeSpan.FromSeconds(5)) - .Subscribe(_ => - { - _manager.NicoliveApiClient.GetProgramInfoAsync() - .Subscribe(programInfo => - { - //番組情報を取得して一部を表示する - var builder = new StringBuilder(); - builder.Append("title:" + programInfo.Title + "\n"); - builder.Append("type:" + programInfo.SocialGroup.Type.ToString() + "\n"); - builder.Append("socialGroupId:" + programInfo.SocialGroup.Id + "\n"); - builder.Append("tags:" + programInfo.Categories.Aggregate((p, c) => p + "," + c) + "\n"); - builder.Append("room count:" + programInfo.Rooms.Length + "\n"); - builder.Append("status:" + programInfo.Status.ToString() + "\n"); - _programInfoLabel.text = builder.ToString(); - - //部屋一覧を登録する - foreach (var room in programInfo.Rooms) - { - if (!_manager.CurrentRooms.ContainsKey(room.Id)) - { - _manager.CurrentRooms[room.Id] = room; - } - } - }, Debug.LogError); - }); - } - } -} diff --git a/Assets/NicoliveClient/Example/Console/Scripts/MainPanel/ProgramStatisticsPanel/ProgramStatisticsPanel.cs b/Assets/NicoliveClient/Example/Console/Scripts/MainPanel/ProgramStatisticsPanel/ProgramStatisticsPanel.cs deleted file mode 100644 index febc1b5..0000000 --- a/Assets/NicoliveClient/Example/Console/Scripts/MainPanel/ProgramStatisticsPanel/ProgramStatisticsPanel.cs +++ /dev/null @@ -1,38 +0,0 @@ -using System; -using System.Linq; -using System.Text; -using NicoliveClient.Example; -using UniRx; -using UnityEngine; -using UnityEngine.UI; - -namespace NicoliveClient.Example -{ - public class ProgramStatisticsPanel : MonoBehaviour - { - - [SerializeField] private NicoliveSampleManager _manager; - - [SerializeField] private Button _getButton; - [SerializeField] private Text _programStatisticsLabel; - - void Start() - { - var command = _manager.IsSetProgramId.ToReactiveCommand(); - - _getButton.OnClickAsObservable() - .ThrottleFirst(TimeSpan.FromSeconds(5)) - .Subscribe(_ => command.Execute()); - - command.Subscribe(_ => - { - _manager.NicoliveApiClient.GetProgramStatisticsAsync() - .Subscribe(result => - { - _programStatisticsLabel.text = - string.Format("来場者数:{0} / コメント数:{1}", result.WatchCount, result.CommentCount); - }, Debug.LogError); - }); - } - } -} diff --git a/Assets/NicoliveClient/Example/Console/Scripts/MainPanel/ScheduledProgramPanel/ScheduledProgramPanel.cs b/Assets/NicoliveClient/Example/Console/Scripts/MainPanel/ScheduledProgramPanel/ScheduledProgramPanel.cs deleted file mode 100644 index a1712e6..0000000 --- a/Assets/NicoliveClient/Example/Console/Scripts/MainPanel/ScheduledProgramPanel/ScheduledProgramPanel.cs +++ /dev/null @@ -1,46 +0,0 @@ -using System; -using System.Text; -using UniRx; -using UnityEngine; -using UnityEngine.UI; - -namespace NicoliveClient.Example -{ - public class ScheduledProgramPanel : MonoBehaviour - { - [SerializeField] - private NicoliveSampleManager _manager; - - [SerializeField] - private Button _getButton; - - [SerializeField] - private Text _resultLabel; - - void Start() - { - _getButton.OnClickAsObservable() - .ThrottleFirst(TimeSpan.FromSeconds(5)) - .Subscribe(_ => - { - _manager.NicoliveApiClient.GetScheduledProgramListAsync() - .Subscribe(result => - { - if (result.Length == 0) - { - _resultLabel.text = "現在予定されている番組はありません"; - return; - } - - var builder = new StringBuilder(); - foreach (var schedule in result) - { - builder.Append(string.Format("{0}:{1}:{2}\n", schedule.ProgramId, schedule.SocialGroupId, schedule.Status)); - } - - _resultLabel.text = builder.ToString(); - }, Debug.LogError); - }); - } - } -} diff --git a/Assets/NicoliveClient/Example/Console/Scripts/MainPanel/SegmentPanel/SegmentPanel.cs b/Assets/NicoliveClient/Example/Console/Scripts/MainPanel/SegmentPanel/SegmentPanel.cs deleted file mode 100644 index f979ef0..0000000 --- a/Assets/NicoliveClient/Example/Console/Scripts/MainPanel/SegmentPanel/SegmentPanel.cs +++ /dev/null @@ -1,71 +0,0 @@ -using System; -using System.Linq; -using UniRx; -using UnityEngine; -using UnityEngine.UI; - -namespace NicoliveClient.Example -{ - /// - /// 番組時間に関係する操作 - /// - public class SegmentPanel : MonoBehaviour - { - [SerializeField] private NicoliveSampleManager _manager; - - [SerializeField] private Button _startButton; - [SerializeField] private Button _endButton; - [SerializeField] private Button _getExtensionButton; - [SerializeField] private Button _extendButton; - [SerializeField] private Text _extendLabel; - - void Start() - { - _startButton.OnClickAsObservable() - .ThrottleFirst(TimeSpan.FromSeconds(1)) - .Subscribe(_ => - { - //番組開始 - _manager.NicoliveApiClient - .StartProgramAsync() - .Subscribe(__ => { }, Debug.LogError); - }); - - _endButton.OnClickAsObservable() - .ThrottleFirst(TimeSpan.FromSeconds(1)) - .Subscribe(_ => - { - //番組終了 - _manager.NicoliveApiClient - .EndProgramAsync() - .Subscribe(__ => { }, Debug.LogError); - }); - - _getExtensionButton - .OnClickAsObservable() - .ThrottleFirst(TimeSpan.FromSeconds(1)) - .Subscribe(_ => - { - //延長上限取得 - _manager.NicoliveApiClient - .GetExtensionAsync() - .Subscribe(extensions => - { - var max = extensions.Max(x => x.Minutes); - _extendLabel.text = max + "分延長可能"; - }, Debug.LogError); - }); - - _extendButton - .OnClickAsObservable() - .ThrottleFirst(TimeSpan.FromSeconds(5)) - .Subscribe(_ => - { - //番組延長 - _manager.NicoliveApiClient - .ExtendProgramAsync(30) - .Subscribe(__ => { }, Debug.LogError); - }); - } - } -} diff --git a/Assets/NicoliveClient/Plugins/Client/NicoliveApiClient.cs b/Assets/NicoliveClient/Plugins/Client/NicoliveApiClient.cs deleted file mode 100644 index 2b63239..0000000 --- a/Assets/NicoliveClient/Plugins/Client/NicoliveApiClient.cs +++ /dev/null @@ -1,748 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Text.RegularExpressions; -using Assets.NicoliveClient.Plugins.Utilities; -using UniRx; -using UnityEngine; -using UnityEngine.Networking; - -namespace NicoliveClient -{ - public class NicoliveApiClient - { - private NiconicoUser _niconicoUser; - - /// - /// 現在の操作対象となっている番組ID - /// - public string NicoliveProgramId { get; private set; } - - /// - /// pgから始まる方の番組ID - /// - private string _pgProgramId; - - private string _userAgent = "UnityNicoliveClient"; - - #region Setup - - /// - /// NicoliveApiClientを初期化する - /// - /// ユーザ情報 - public NicoliveApiClient(NiconicoUser niconicoUser) - { - _niconicoUser = niconicoUser; - } - - /// - /// NicoliveApiClientを初期化する - /// - /// ユーザ情報 - /// 操作対象の番組ID(lv) - public NicoliveApiClient(NiconicoUser niconicoUser, string nicoliveProgramId) - { - _niconicoUser = niconicoUser; - NicoliveProgramId = nicoliveProgramId; - } - - /// - /// 操作対象とする番組IDを設定する - /// - public void SetNicoliveProgramId(string id) - { - if (NicoliveProgramId != id) _pgProgramId = null; - NicoliveProgramId = id; - } - - /// - /// UserAgentを設定する - /// - public void SetCustomUserAgent(string userAgent) - { - _userAgent = userAgent; - } - - #endregion - - - #region 放送中番組取得 - - /// - /// 現在放送中の番組IDを取得する - /// - [Obsolete("放送中のコミュニティ番組IDを取得する場合はGetCurrentCommunityProgramIdAsync()を利用して下さい")] - public IObservable GetCurrentNicoliveProgramIdAsync() - { - return GetCurrentCommunityProgramIdAsync(); - } - - /// - /// 現在放送中(テスト中含む)のコミュニティ番組の番組IDを取得する。 - /// 更新頻度が遅めのAPIなので、数分待たないと最新情報が取得できない場合がある。 - /// チャンネル番組の放送中IDを取得する場合はGetScheduledProgramListAsync()を使うこと。 - /// - public IObservable GetCurrentCommunityProgramIdAsync() - { - return Observable.FromCoroutine(GetScheduledProgramListCoroutine) - .Select(schedules => - { - foreach (var schedule in schedules) - { - if ( - schedule.SocialGroupType == SocialGroupType.Community && - (schedule.Status == ProgramStatus.Test || schedule.Status == ProgramStatus.OnAir)) - { - return schedule.ProgramId; - } - } - - throw new NicoliveApiClientException("現在放送中の番組はありません"); - }).Kick(); - } - - #endregion - - #region 放送予定番組一覧取得 - - /// - /// 放送予定、現在放送中の番組一覧を取得する - /// (更新頻度が遅めのAPIなので、数分待たないと最新値が取得できない場合がある) - /// - public IObservable GetScheduledProgramListAsync() - { - return Observable.FromCoroutine(GetScheduledProgramListCoroutine).Kick(); - } - - private IEnumerator GetScheduledProgramListCoroutine(IObserver observer) - { - var url = "https://live2.nicovideo.jp/unama/tool/v1/program_schedules"; - - using (var www = UnityWebRequest.Get(url)) - { - www.SetRequestHeader("Content-type", "application/json"); - www.SetRequestHeader("Cookie", "user_session=" + _niconicoUser.UserSession); - www.SetRequestHeader("User-Agent", _userAgent); - -#if UNITY_2017_2_OR_NEWER - yield return www.SendWebRequest(); -#else - yield return www.Send(); -#endif - -#if UNITY_2017_1_OR_NEWER - if (www.isHttpError || www.isNetworkError) -#else - if (www.isError) -#endif - { - observer.OnError(new NicoliveApiClientException(www.downloadHandler.text)); - yield break; - } - - var json = www.downloadHandler.text; - - var dto = JsonUtility.FromJson>(json); - var schedules = dto.data.Select(x => x.ToProgramSchedule()).ToArray(); - - observer.OnNext(schedules); - observer.OnCompleted(); - } - } - - #endregion - - #region 運営コメント - - /// - /// 運営コメントを投稿する - /// - /// 本文 - /// 投稿者名(nullで非表示) - /// 表示色 - /// 永続表示するか - /// - public IObservable SendOperatorCommentAsync(string text, string name = "", string color = "white", bool isPermanent = false) - { - return Observable.FromCoroutine(o => PutOperatorCommentCoroutine(o, name, text, color, isPermanent)).Kick(); - } - - private IEnumerator PutOperatorCommentCoroutine(IObserver observer, string name, string text, string color, bool isPermanent) - { - var url = string.Format("https://live2.nicovideo.jp/watch/{0}/operator_comment", NicoliveProgramId); - - var json = JsonUtility.ToJson(new OperatorCommentRequest - { - text = text, - userName = name, - isPermanent = isPermanent, - color = color - }); - - using (var www = UnityWebRequest.Put(url, Encoding.UTF8.GetBytes(json))) - { - www.SetRequestHeader("Content-type", "application/json"); - www.SetRequestHeader("Cookie", "user_session=" + _niconicoUser.UserSession); - www.SetRequestHeader("User-Agent", _userAgent); - -#if UNITY_2017_2_OR_NEWER - yield return www.SendWebRequest(); -#else - yield return www.Send(); -#endif - -#if UNITY_2017_1_OR_NEWER - if (www.isHttpError || www.isNetworkError) -#else - if (www.isError) -#endif - { - observer.OnError(new NicoliveApiClientException(www.downloadHandler.text)); - yield break; - } - - observer.OnNext(Unit.Default); - observer.OnCompleted(); - } - } - - /// - /// 運営コメントの表示をやめる - /// - public IObservable DeleteOperatorCommentAsync() - { - return Observable.FromCoroutine(DeleteOperatorCommentCoroutine).Kick(); - } - - private IEnumerator DeleteOperatorCommentCoroutine(IObserver observer) - { - var url = string.Format("https://live2.nicovideo.jp/watch/{0}/operator_comment", NicoliveProgramId); - - using (var www = UnityWebRequest.Delete(url)) - { - www.SetRequestHeader("Cookie", "user_session=" + _niconicoUser.UserSession); - www.SetRequestHeader("User-Agent", _userAgent); - -#if UNITY_2017_2_OR_NEWER - yield return www.SendWebRequest(); -#else - yield return www.Send(); -#endif - -#if UNITY_2017_1_OR_NEWER - if (www.isHttpError || www.isNetworkError) -#else - if (www.isError) -#endif - { - observer.OnError(new NicoliveApiClientException(www.downloadHandler.text)); - yield break; - } - - observer.OnNext(Unit.Default); - observer.OnCompleted(); - } - } - - #endregion - - #region 番組開始/終了 - - /// - /// 番組を開始する - /// - /// - public IObservable StartProgramAsync() - { - return Observable.FromCoroutine(o => SegmentCoroutine(o, "on_air")).Kick(); - } - - /// - /// 番組を終了する - /// - /// - public IObservable EndProgramAsync() - { - return Observable.FromCoroutine(o => SegmentCoroutine(o, "end")).Kick(); - } - - private IEnumerator SegmentCoroutine(IObserver observer, string state) - { - var url = string.Format("https://live2.nicovideo.jp/watch/{0}/segment", NicoliveProgramId); - - var json = "{\"state\":\"" + state + "\"}"; - - - using (var www = UnityWebRequest.Put(url, json)) - { - www.SetRequestHeader("Content-type", "application/json"); - www.SetRequestHeader("Cookie", "user_session=" + _niconicoUser.UserSession); - www.SetRequestHeader("User-Agent", _userAgent); - -#if UNITY_2017_2_OR_NEWER - yield return www.SendWebRequest(); -#else - yield return www.Send(); -#endif - -#if UNITY_2017_1_OR_NEWER - if (www.isHttpError || www.isNetworkError) -#else - if (www.isError) -#endif - { - observer.OnError(new NicoliveApiClientException(www.downloadHandler.text)); - yield break; - } - - observer.OnNext(Unit.Default); - - - observer.OnCompleted(); - } - } - - #endregion - - #region 番組延長 - - /// - /// 延長手段を取得する - /// - /// - public IObservable GetExtensionAsync() - { - return Observable.FromCoroutine(GetExtensionCoroutine).Kick(); - } - - private IEnumerator GetExtensionCoroutine(IObserver observer) - { - var url = string.Format("https://live2.nicovideo.jp/watch/{0}/extension", NicoliveProgramId); - - using (var www = UnityWebRequest.Get(url)) - { - www.SetRequestHeader("Content-type", "application/json"); - www.SetRequestHeader("Cookie", "user_session=" + _niconicoUser.UserSession); - www.SetRequestHeader("User-Agent", _userAgent); -#if UNITY_2017_2_OR_NEWER - yield return www.SendWebRequest(); -#else - yield return www.Send(); -#endif -#if UNITY_2017_1_OR_NEWER - if (www.isHttpError || www.isNetworkError) -#else - if (www.isError) -#endif - { - observer.OnError(new NicoliveApiClientException(www.downloadHandler.text)); - yield break; - } - - var json = www.downloadHandler.text; - var extensions = JsonUtility.FromJson>(json); - - observer.OnNext(extensions.data.methods.Select(x => x.ToExtensionMethods()).ToArray()); - observer.OnCompleted(); - } - } - - /// - /// 番組延長を行う - /// - /// 分数(30分単位) - /// - public IObservable ExtendProgramAsync(int minutes) - { - return Observable.FromCoroutine(o => ExtendProgramCoroutine(o, minutes)).Kick(); - } - - private IEnumerator ExtendProgramCoroutine(IObserver observer, int minutes) - { - var url = string.Format("https://live2.nicovideo.jp/watch/{0}/extension", NicoliveProgramId); - - using (var www = UnityWebRequest.Post(url, "POST")) - { - var data = Encoding.UTF8.GetBytes("{\"minutes\":" + minutes + "}"); - www.uploadHandler = new UploadHandlerRaw(data); - www.SetRequestHeader("Content-type", "application/json"); - www.SetRequestHeader("Cookie", "user_session=" + _niconicoUser.UserSession); - www.SetRequestHeader("User-Agent", _userAgent); - -#if UNITY_2017_2_OR_NEWER - yield return www.SendWebRequest(); -#else - yield return www.Send(); -#endif - -#if UNITY_2017_1_OR_NEWER - if (www.isHttpError || www.isNetworkError) -#else - if (www.isError) -#endif - { - observer.OnError(new NicoliveApiClientException(www.downloadHandler.text)); - yield break; - } - - var json = www.downloadHandler.text; - var extendDto = JsonUtility.FromJson>(json); - observer.OnNext(new ExtendResult(extendDto.data.end_time)); - observer.OnCompleted(); - } - } - - #endregion - - #region 番組情報取得 - - /// - /// 番組情報を取得する - /// - public IObservable GetProgramInfoAsync(string programId) - { - return Observable.FromCoroutine(o => GetProgramInfo(o, programId)).Kick(); - } - - /// - /// 番組情報を取得する - /// SetNicoliveProgramId()で設定された番組IDを対象とする - /// - public IObservable GetProgramInfoAsync() - { - return Observable.FromCoroutine(o => GetProgramInfo(o, null)).Kick(); - } - - private IEnumerator GetProgramInfo(IObserver observer, string programId) - { - var lv = string.IsNullOrEmpty(programId) ? NicoliveProgramId : programId; - var url = string.Format("https://live2.nicovideo.jp/watch/{0}/programinfo", lv); - - using (var www = UnityWebRequest.Get(url)) - { - www.SetRequestHeader("Content-type", "application/json"); - www.SetRequestHeader("Cookie", "user_session=" + _niconicoUser.UserSession); - www.SetRequestHeader("User-Agent", _userAgent); - -#if UNITY_2017_2_OR_NEWER - yield return www.SendWebRequest(); -#else - yield return www.Send(); -#endif - -#if UNITY_2017_1_OR_NEWER - if (www.isHttpError || www.isNetworkError) -#else - if (www.isError) -#endif - { - observer.OnError(new NicoliveApiClientException(www.downloadHandler.text)); - yield break; - } - - var json = www.downloadHandler.text; - try - { - var dto = JsonUtility.FromJson>(json); - var programInfo = dto.data.ToProgramInfo(); - - observer.OnNext(programInfo); - observer.OnCompleted(); - } - catch - { - observer.OnError(new Exception("番組情報が取得できませんでした")); - } - } - } - - #endregion - - #region 番組統計情報取得 - - /// - /// 番組統計情報を取得する - /// - public IObservable GetProgramStatisticsAsync() - { - return Observable.FromCoroutine(GetProgramStatistics).Kick(); - } - - private IEnumerator GetProgramStatistics(IObserver observer) - { - var url = string.Format("https://live2.nicovideo.jp/watch/{0}/statistics", NicoliveProgramId); - - using (var www = UnityWebRequest.Get(url)) - { - www.SetRequestHeader("Content-type", "application/json"); - www.SetRequestHeader("Cookie", "user_session=" + _niconicoUser.UserSession); - www.SetRequestHeader("User-Agent", _userAgent); - -#if UNITY_2017_2_OR_NEWER - yield return www.SendWebRequest(); -#else - yield return www.Send(); -#endif - -#if UNITY_2017_1_OR_NEWER - if (www.isHttpError || www.isNetworkError) -#else - if (www.isError) -#endif - { - observer.OnError(new NicoliveApiClientException(www.downloadHandler.text)); - yield break; - } - - var json = www.downloadHandler.text; - - var dto = JsonUtility.FromJson>(json); - var statistics = dto.data.ToStatisticsResult(); - - observer.OnNext(statistics); - observer.OnCompleted(); - } - } - - #endregion - - #region アンケート - - /// - /// アンケートを開始する - /// - /// アンケートタイトル - /// 設問 - /// - public IObservable StartEnqueteAsync(string title, IEnumerable questions) - { - var enqueteObservable = Observable.FromCoroutine(o => StartEnqueteCoroutine(o, title, questions)); - - if (string.IsNullOrEmpty(_pgProgramId)) - { - return GetPgProgramIdAsync() - .Do(pg => _pgProgramId = pg) //pgがない場合は取得する - .SelectMany(_ => enqueteObservable).Kick(); - } - - return enqueteObservable.Kick(); - } - - private IEnumerator StartEnqueteCoroutine(IObserver observer, string title, IEnumerable questions) - { - var url = string.Format("https://live2.nicovideo.jp/unama/api/v1/programs/{0}/enquete", _pgProgramId); - - var items = questions as string[] ?? questions.ToArray(); - - if (items.Length < 2) - { - observer.OnError(new NicoliveApiClientException("アンケートの実行には回答が2つ以上必要です")); - yield break; - } - - var json = JsonUtility.ToJson(new EnqueteRequest - { - programId = _pgProgramId, - question = title, - items = items - }); - - using (var www = UnityWebRequest.Post(url, "POST")) - { - var data = Encoding.UTF8.GetBytes(json); - www.uploadHandler = new UploadHandlerRaw(data); - www.SetRequestHeader("Content-type", "application/json"); - www.SetRequestHeader("Cookie", "user_session=" + _niconicoUser.UserSession); - www.SetRequestHeader("User-Agent", _userAgent); - -#if UNITY_2017_2_OR_NEWER - yield return www.SendWebRequest(); -#else - yield return www.Send(); -#endif - -#if UNITY_2017_1_OR_NEWER - if (www.isHttpError || www.isNetworkError) -#else - if (www.isError) -#endif - { - observer.OnError(new NicoliveApiClientException(www.downloadHandler.text)); - yield break; - } - - observer.OnNext(Unit.Default); - observer.OnCompleted(); - } - } - - - /// - /// アンケートの結果を表示する - /// - /// - public IObservable ShowResultEnqueteAsync() - { - var enqueteObservable = Observable.FromCoroutine(ShowResultEnqueteCoroutine); - - if (string.IsNullOrEmpty(_pgProgramId)) - { - return GetPgProgramIdAsync() - .Do(pg => _pgProgramId = pg) //pgがない場合は取得する - .SelectMany(_ => enqueteObservable).Kick(); - } - - return enqueteObservable.Kick(); - } - - private IEnumerator ShowResultEnqueteCoroutine(IObserver observer) - { - var url = string.Format("https://live2.nicovideo.jp/unama/api/v1/programs/{0}/enquete/show_result", _pgProgramId); - - var json = "{ \"programId\":" + _pgProgramId + " }"; - - using (var www = UnityWebRequest.Post(url, "POST")) - { - var data = Encoding.UTF8.GetBytes(json); - www.uploadHandler = new UploadHandlerRaw(data); - www.SetRequestHeader("Content-type", "application/json"); - www.SetRequestHeader("Cookie", "user_session=" + _niconicoUser.UserSession); - www.SetRequestHeader("User-Agent", _userAgent); - -#if UNITY_2017_2_OR_NEWER - yield return www.SendWebRequest(); -#else - yield return www.Send(); -#endif - -#if UNITY_2017_1_OR_NEWER - if (www.isHttpError || www.isNetworkError) -#else - if (www.isError) -#endif - { - observer.OnError(new NicoliveApiClientException(www.downloadHandler.text)); - yield break; - } - - var result = www.downloadHandler.text; - var dto = JsonUtility.FromJson>(result); - - observer.OnNext(dto.data.ToEnqueteResult()); - observer.OnCompleted(); - } - } - - - /// - /// アンケートの結果を表示する - /// - /// - public IObservable FinishEnqueteAsync() - { - var enqueteObservable = Observable.FromCoroutine(FinishEnqueteCoroutine); - - if (string.IsNullOrEmpty(_pgProgramId)) - { - return GetPgProgramIdAsync() - .Do(pg => _pgProgramId = pg) //pgがない場合は取得する - .SelectMany(_ => enqueteObservable).Kick(); - } - - return enqueteObservable.Kick(); - } - - private IEnumerator FinishEnqueteCoroutine(IObserver observer) - { - var url = string.Format("https://live2.nicovideo.jp/unama/api/v1/programs/{0}/enquete/end", _pgProgramId); - - var json = "{ \"programId\":" + _pgProgramId + " }"; - - using (var www = UnityWebRequest.Post(url, "POST")) - { - var data = Encoding.UTF8.GetBytes(json); - www.uploadHandler = new UploadHandlerRaw(data); - www.SetRequestHeader("Content-type", "application/json"); - www.SetRequestHeader("Cookie", "user_session=" + _niconicoUser.UserSession); - www.SetRequestHeader("User-Agent", _userAgent); - -#if UNITY_2017_2_OR_NEWER - yield return www.SendWebRequest(); -#else - yield return www.Send(); -#endif - -#if UNITY_2017_1_OR_NEWER - if (www.isHttpError || www.isNetworkError) -#else - if (www.isError) -#endif - { - observer.OnError(new NicoliveApiClientException(www.downloadHandler.text)); - yield break; - } - - observer.OnNext(Unit.Default); - observer.OnCompleted(); - } - } - - #endregion - - #region pg取得 - - /// - /// pgから始まる方の番組IDを取得する - /// - public IObservable GetPgProgramIdAsync() - { - return Observable.FromCoroutine(GetPgProgramIdCoroutine).Kick(); - } - - private IEnumerator GetPgProgramIdCoroutine(IObserver observer) - { - var url = string.Format("https://live2.nicovideo.jp/watch/{0}/player", NicoliveProgramId); - - using (var www = UnityWebRequest.Get(url)) - { - www.SetRequestHeader("Cookie", "user_session=" + _niconicoUser.UserSession); - www.SetRequestHeader("User-Agent", _userAgent); - -#if UNITY_2017_2_OR_NEWER - yield return www.SendWebRequest(); -#else - yield return www.Send(); -#endif - -#if UNITY_2017_1_OR_NEWER - if (www.isHttpError || www.isNetworkError) -#else - if (www.isError) -#endif - { - observer.OnError(new NicoliveApiClientException(www.downloadHandler.text)); - yield break; - } - - var json = www.downloadHandler.text; - var programId = Regex.Match(json, "programId\":\"(.*?)\"").Groups[1].Value; - observer.OnNext(programId); - observer.OnCompleted(); - } - } - - #endregion - - } - - - public class NicoliveApiClientException : Exception - { - public NicoliveApiClientException(string message) : base(message) - { - } - } -} diff --git a/Assets/NicoliveClient/Plugins/Client/NiconicoUserClient.cs b/Assets/NicoliveClient/Plugins/Client/NiconicoUserClient.cs deleted file mode 100644 index 0592d99..0000000 --- a/Assets/NicoliveClient/Plugins/Client/NiconicoUserClient.cs +++ /dev/null @@ -1,70 +0,0 @@ -using System; -using System.Collections; -using System.Text.RegularExpressions; -using UniRx; -using UnityEngine; -using UnityEngine.Networking; - -namespace NicoliveClient -{ - /// - /// ニコニコのアカウント系APIを実行してユーザ情報を返すクライアント - /// - public static class NiconicoUserClient - { - /// - /// ニコニコにログインする - /// - /// メールアドレス - /// パスワード - /// 成功時:NiconicoUser,失敗時:NiconicoLoginException - public static IObservable LoginAsync(string mail, string password) - { - return Observable.FromCoroutine(o => LoginCoroutine(o, mail, password)); - } - - private static IEnumerator LoginCoroutine(IObserver observer, string mail, string password) - { - var url = "https://account.nicovideo.jp/api/v1/login"; - - var userSessionRegex = new Regex(@"user_session=user_session_(\w+);"); - - var form = new WWWForm(); - form.AddField("mail", mail); - form.AddField("password", password); - - using (var www = UnityWebRequest.Post(url, form)) - { - www.redirectLimit = 0; - -#if UNITY_2017_2_OR_NEWER - yield return www.SendWebRequest(); -#else - yield return www.Send(); -#endif - - var cookie = www.GetResponseHeader("Set-Cookie"); - var match = userSessionRegex.Match(cookie); - - if (match.Success) - { - var userSession = "user_session_" + match.Groups[1]; - var userId = match.Groups[1].ToString().Split('_')[0]; - observer.OnNext(new NiconicoUser(userId, userSession)); - observer.OnCompleted(); - } - else - { - observer.OnError(new NiconicoLoginException("ログインに失敗しました")); - } - } - } - } - - public class NiconicoLoginException : Exception - { - public NiconicoLoginException(string message) : base(message) - { - } - } -} diff --git a/Assets/NicoliveClient/Plugins/Client/NicovideoApiClient.cs b/Assets/NicoliveClient/Plugins/Client/NicovideoApiClient.cs deleted file mode 100644 index f0e486a..0000000 --- a/Assets/NicoliveClient/Plugins/Client/NicovideoApiClient.cs +++ /dev/null @@ -1,105 +0,0 @@ -using System; -using System.Collections; -using System.Linq; -using System.Text.RegularExpressions; -using System.Xml.Linq; -using Assets.NicoliveClient.Plugins.Utilities; -using UniRx; -using UnityEngine.Networking; - -namespace NicoliveClient.Nicovideo -{ - /// - /// ニコニコ動画向けAPIClient - /// - public static class NicovideoApiClient - { - public static IObservable GetNicovideoInfoFromMylist(ulong mylistId) - { - return Observable.FromCoroutine( - observer => GetNicovideoInfoFromMylistCoroutine(observer, mylistId, null)).Kick(); - } - - public static IObservable GetNicovideoInfoFromMylist(ulong mylistId, NiconicoUser user) - { - return Observable.FromCoroutine( - observer => GetNicovideoInfoFromMylistCoroutine(observer, mylistId, user.UserSession)).Kick(); - } - - private static IEnumerator GetNicovideoInfoFromMylistCoroutine( - IObserver observer, ulong mylistId, string userSession) - { - var url = string.Format("https://www.nicovideo.jp/mylist/{0}?rss=2.0", mylistId); - - using (var www = UnityWebRequest.Get(url)) - { - if (!string.IsNullOrEmpty(userSession)) www.SetRequestHeader("Cookie", "user_session=" + userSession); - -#if UNITY_2017_2_OR_NEWER - yield return www.SendWebRequest(); -#else - yield return www.Send(); -#endif - -#if UNITY_2017_1_OR_NEWER - if (www.isHttpError || www.isNetworkError) -#else - if (www.isError) -#endif - { - observer.OnError(new NicovideoApiClientException(www.downloadHandler.text)); - yield break; - } - - try - { - var titleRegex = new Regex(@"マイリスト (\w+)‐ニコニコ動画"); - var uriRegex = new Regex(@"src=""(https?://[\w/:%#\$&\?\(\)~\.=\+\-]+)"""); - var viodeIdRegex = new Regex(@"(sm\d+)"); - - var xml = www.downloadHandler.text; - - // XMLをパースして動画情報を取得 - var xdoc = XDocument.Parse(xml); - var rss = xdoc.Element("rss"); - var channel = rss.Element("channel"); - var t = channel.Element("title").Value; - var mylistTitle = titleRegex.Match(t).Groups[1].Value; - - var videos = channel.Elements("item").Select(i => - { - try - { - var title = i.Element("title").Value; - var link = i.Element("link").Value; - var des = i.Element("description").Value; - var thumbnailUri = uriRegex.Match(des).Groups[1].Value; - var videoId = viodeIdRegex.Match(link).Groups[1].Value; - return new VideoInfo(title, videoId, thumbnailUri); - } - catch - { - return default(VideoInfo); - } - }).Where(x => !string.IsNullOrEmpty(x.VideoId)).ToArray(); - - observer.OnNext(new MylistInfo(mylistTitle, videos)); - observer.OnCompleted(); - } - catch (Exception ex) - { - UnityEngine.Debug.LogError(ex); - observer.OnError(ex); - yield break; - } - } - } - } - - public class NicovideoApiClientException : Exception - { - public NicovideoApiClientException(string message) : base(message) - { - } - } -} \ No newline at end of file diff --git a/Assets/NicoliveClient/Plugins/NiconicoUser.cs b/Assets/NicoliveClient/Plugins/NiconicoUser.cs deleted file mode 100644 index ecb96cb..0000000 --- a/Assets/NicoliveClient/Plugins/NiconicoUser.cs +++ /dev/null @@ -1,21 +0,0 @@ -namespace NicoliveClient -{ - public struct NiconicoUser - { - /// - /// ユーザID - /// - public string UserId { get; private set; } - - /// - /// ユーザセッション(APIの実行に必要) - /// - public string UserSession { get; private set; } - - public NiconicoUser(string userId, string userSession) : this() - { - UserId = userId; - UserSession = userSession; - } - } -} diff --git a/Assets/NicoliveClient/Plugins/version.txt b/Assets/NicoliveClient/Plugins/version.txt deleted file mode 100644 index b28a5eb..0000000 --- a/Assets/NicoliveClient/Plugins/version.txt +++ /dev/null @@ -1 +0,0 @@ -2019.5.30 diff --git a/Assets/Plugins/UniRx/Examples.meta b/Assets/Plugins/UniRx/Examples.meta deleted file mode 100644 index e2df69d..0000000 --- a/Assets/Plugins/UniRx/Examples.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 26fd45379587f9048aa9a068ffe13c07 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Examples/Sample01_ObservableWWW.cs b/Assets/Plugins/UniRx/Examples/Sample01_ObservableWWW.cs deleted file mode 100644 index 260ffcb..0000000 --- a/Assets/Plugins/UniRx/Examples/Sample01_ObservableWWW.cs +++ /dev/null @@ -1,90 +0,0 @@ -#if !(UNITY_METRO || UNITY_WP8) - -#if UNITY_2018_3_OR_NEWER -#pragma warning disable CS0618 -#endif - -using UnityEngine; - -namespace UniRx.Examples -{ - // sample script, attach your object. - public class Sample01_ObservableWWW : MonoBehaviour - { - void Start() - { - // Basic: Download from google. - { - ObservableWWW.Get("http://google.co.jp/") - .Subscribe( - x => Debug.Log(x.Substring(0, 100)), // onSuccess - ex => Debug.LogException(ex)); // onError - } - - // Linear Pattern with LINQ Query Expressions - // download after google, start bing download - { - var query = from google in ObservableWWW.Get("http://google.com/") - from bing in ObservableWWW.Get("http://bing.com/") - select new { google, bing }; - - var cancel = query.Subscribe(x => Debug.Log(x.google.Substring(0, 100) + ":" + x.bing.Substring(0, 100))); - - // Call Dispose is cancel downloading. - cancel.Dispose(); - } - - // Observable.WhenAll is for parallel asynchronous operation - // (It's like Observable.Zip but specialized for single async operations like Task.WhenAll of .NET 4) - { - var parallel = Observable.WhenAll( - ObservableWWW.Get("http://google.com/"), - ObservableWWW.Get("http://bing.com/"), - ObservableWWW.Get("http://unity3d.com/")); - - parallel.Subscribe(xs => - { - Debug.Log(xs[0].Substring(0, 100)); // google - Debug.Log(xs[1].Substring(0, 100)); // bing - Debug.Log(xs[2].Substring(0, 100)); // unity - }); - } - - // with Progress - { - // notifier for progress - var progressNotifier = new ScheduledNotifier(); - progressNotifier.Subscribe(x => Debug.Log(x)); // write www.progress - - // pass notifier to WWW.Get/Post - ObservableWWW.Get("http://google.com/", progress: progressNotifier).Subscribe(); - } - - // with Error - { - // If WWW has .error, ObservableWWW throws WWWErrorException to onError pipeline. - // WWWErrorException has RawErrorMessage, HasResponse, StatusCode, ResponseHeaders - ObservableWWW.Get("http://www.google.com/404") - .CatchIgnore((WWWErrorException ex) => - { - Debug.Log(ex.RawErrorMessage); - if (ex.HasResponse) - { - Debug.Log(ex.StatusCode); - } - foreach (var item in ex.ResponseHeaders) - { - Debug.Log(item.Key + ":" + item.Value); - } - }) - .Subscribe(); - } - } - } -} - -#endif - -#if UNITY_2018_3_OR_NEWER -#pragma warning restore CS0618 -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Examples/Sample01_ObservableWWW.cs.meta b/Assets/Plugins/UniRx/Examples/Sample01_ObservableWWW.cs.meta deleted file mode 100644 index 83dc6c0..0000000 --- a/Assets/Plugins/UniRx/Examples/Sample01_ObservableWWW.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: bf3770fc51ac89f45987dbde37ae81bd -timeCreated: 1455373901 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Examples/Sample02_ObservableTriggers.cs b/Assets/Plugins/UniRx/Examples/Sample02_ObservableTriggers.cs deleted file mode 100644 index 5103033..0000000 --- a/Assets/Plugins/UniRx/Examples/Sample02_ObservableTriggers.cs +++ /dev/null @@ -1,24 +0,0 @@ -using UnityEngine; -using UniRx.Triggers; // Triggers Namepsace -using System; - -namespace UniRx.Examples -{ - public class Sample02_ObservableTriggers : MonoBehaviour - { - void Start() - { - // Get the plain object - var cube = GameObject.CreatePrimitive(PrimitiveType.Cube); - - // Add ObservableXxxTrigger for handle MonoBehaviour's event as Observable - cube.AddComponent() - .UpdateAsObservable() - .SampleFrame(30) - .Subscribe(x => Debug.Log("cube"), () => Debug.Log("destroy")); - - // destroy after 3 second:) - GameObject.Destroy(cube, 3f); - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Examples/Sample02_ObservableTriggers.cs.meta b/Assets/Plugins/UniRx/Examples/Sample02_ObservableTriggers.cs.meta deleted file mode 100644 index 447b527..0000000 --- a/Assets/Plugins/UniRx/Examples/Sample02_ObservableTriggers.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: cb5e978d683e94f4d9c2c81be80f93a7 -timeCreated: 1455373901 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Examples/Sample03_GameObjectAsObservable.cs b/Assets/Plugins/UniRx/Examples/Sample03_GameObjectAsObservable.cs deleted file mode 100644 index 49821b4..0000000 --- a/Assets/Plugins/UniRx/Examples/Sample03_GameObjectAsObservable.cs +++ /dev/null @@ -1,23 +0,0 @@ -#if !(UNITY_IPHONE || UNITY_ANDROID || UNITY_METRO) - -using UnityEngine; -using UniRx.Triggers; // for enable gameObject.EventAsObservbale() - -namespace UniRx.Examples -{ - public class Sample03_GameObjectAsObservable : MonoBehaviour - { - void Start() - { - // All events can subscribe by ***AsObservable if enables UniRx.Triggers - this.OnMouseDownAsObservable() - .SelectMany(_ => this.gameObject.UpdateAsObservable()) - .TakeUntil(this.gameObject.OnMouseUpAsObservable()) - .Select(_ => Input.mousePosition) - .RepeatUntilDestroy(this) - .Subscribe(x => Debug.Log(x), ()=> Debug.Log("!!!" + "complete")); - } - } -} - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Examples/Sample03_GameObjectAsObservable.cs.meta b/Assets/Plugins/UniRx/Examples/Sample03_GameObjectAsObservable.cs.meta deleted file mode 100644 index 0045b88..0000000 --- a/Assets/Plugins/UniRx/Examples/Sample03_GameObjectAsObservable.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 005e349e5ccdd2b47bddc813b81afe40 -timeCreated: 1455373897 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Examples/Sample04_ConvertFromUnityCallback.cs b/Assets/Plugins/UniRx/Examples/Sample04_ConvertFromUnityCallback.cs deleted file mode 100644 index 07bf04b..0000000 --- a/Assets/Plugins/UniRx/Examples/Sample04_ConvertFromUnityCallback.cs +++ /dev/null @@ -1,66 +0,0 @@ -using System; -using UnityEngine; - -namespace UniRx.Examples -{ - public class Sample04_ConvertFromUnityCallback : MonoBehaviour - { - // This is about log but more reliable log sample => Sample11_Logger - - private class LogCallback - { - public string Condition; - public string StackTrace; - public UnityEngine.LogType LogType; - } - - static class LogHelper - { - // If static register callback, use Subject for event branching. - -#if (UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5 || UNITY_4_6 || UNITY_4_7) - static Subject subject; - - public static IObservable LogCallbackAsObservable() - { - if (subject == null) - { - subject = new Subject(); - - // Publish to Subject in callback - - - UnityEngine.Application.RegisterLogCallback((condition, stackTrace, type) => - { - subject.OnNext(new LogCallback { Condition = condition, StackTrace = stackTrace, LogType = type }); - }); - } - - return subject.AsObservable(); - } - -#else - // If standard evetns, you can use Observable.FromEvent. - - public static IObservable LogCallbackAsObservable() - { - return Observable.FromEvent( - h => (condition, stackTrace, type) => h(new LogCallback { Condition = condition, StackTrace = stackTrace, LogType = type }), - h => Application.logMessageReceived += h, h => Application.logMessageReceived -= h); - } -#endif - } - - void Awake() - { - // method is separatable and composable - LogHelper.LogCallbackAsObservable() - .Where(x => x.LogType == LogType.Warning) - .Subscribe(x => Debug.Log(x)); - - LogHelper.LogCallbackAsObservable() - .Where(x => x.LogType == LogType.Error) - .Subscribe(x => Debug.Log(x)); - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Examples/Sample04_ConvertFromUnityCallback.cs.meta b/Assets/Plugins/UniRx/Examples/Sample04_ConvertFromUnityCallback.cs.meta deleted file mode 100644 index 902b570..0000000 --- a/Assets/Plugins/UniRx/Examples/Sample04_ConvertFromUnityCallback.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 73e69fd4bbb724045a4e06050fbc5af3 -timeCreated: 1455373899 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Examples/Sample05_ConvertFromCoroutine.cs b/Assets/Plugins/UniRx/Examples/Sample05_ConvertFromCoroutine.cs deleted file mode 100644 index 726bb91..0000000 --- a/Assets/Plugins/UniRx/Examples/Sample05_ConvertFromCoroutine.cs +++ /dev/null @@ -1,45 +0,0 @@ -using System; -using System.Collections; -using System.Threading; -using UnityEngine; -#if UNITY_2018_3_OR_NEWER -#pragma warning disable CS0618 -#endif - -namespace UniRx.Examples -{ - public class Sample05_ConvertFromCoroutine - { - // public method - public static IObservable GetWWW(string url) - { - // convert coroutine to IObservable - return Observable.FromCoroutine((observer, cancellationToken) => GetWWWCore(url, observer, cancellationToken)); - } - - // IEnumerator with callback - static IEnumerator GetWWWCore(string url, IObserver observer, CancellationToken cancellationToken) - { - var www = new UnityEngine.WWW(url); - while (!www.isDone && !cancellationToken.IsCancellationRequested) - { - yield return null; - } - - if (cancellationToken.IsCancellationRequested) yield break; - - if (www.error != null) - { - observer.OnError(new Exception(www.error)); - } - else - { - observer.OnNext(www.text); - observer.OnCompleted(); - } - } - } -} -#if UNITY_2018_3_OR_NEWER -#pragma warning restore CS0618 -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Examples/Sample05_ConvertFromCoroutine.cs.meta b/Assets/Plugins/UniRx/Examples/Sample05_ConvertFromCoroutine.cs.meta deleted file mode 100644 index aaec718..0000000 --- a/Assets/Plugins/UniRx/Examples/Sample05_ConvertFromCoroutine.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 41f3df73f7da66b4980f6d9a86927796 -timeCreated: 1455373898 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Examples/Sample06_ConvertToCoroutine.cs b/Assets/Plugins/UniRx/Examples/Sample06_ConvertToCoroutine.cs deleted file mode 100644 index 30f6b44..0000000 --- a/Assets/Plugins/UniRx/Examples/Sample06_ConvertToCoroutine.cs +++ /dev/null @@ -1,62 +0,0 @@ -using System; -using System.Collections; -using UnityEngine; - -namespace UniRx.Examples -{ - public class Sample06_ConvertToCoroutine : MonoBehaviour - { - // convert IObservable to Coroutine - void Start() - { - StartCoroutine(ComplexCoroutineTest()); - } - - IEnumerator ComplexCoroutineTest() - { - yield return new WaitForSeconds(1); - - var v = default(int); - yield return Observable.Range(1, 10).StartAsCoroutine(x => v = x); - - Debug.Log(v); // 10(callback is last value) - yield return new WaitForSeconds(3); - - yield return Observable.Return(100).StartAsCoroutine(x => v = x); - - Debug.Log(v); // 100 - } - - // Note:ToAwaitableEnumerator/StartAsCoroutine/LazyTask are obsolete way on Unity 5.3 - // You can use ToYieldInstruction. - -#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5 || UNITY_4_6 || UNITY_5_0 || UNITY_5_1 || UNITY_5_2) -#if UNITY_2018_3_OR_NEWER -#pragma warning disable CS0618 -#endif - - IEnumerator TestNewCustomYieldInstruction() - { - // wait Rx Observable. - yield return Observable.Timer(TimeSpan.FromSeconds(1)).ToYieldInstruction(); - - // you can change the scheduler(this is ignore Time.scale) - yield return Observable.Timer(TimeSpan.FromSeconds(1), Scheduler.MainThreadIgnoreTimeScale).ToYieldInstruction(); - - // get return value from ObservableYieldInstruction - var o = ObservableWWW.Get("http://unity3d.com/").ToYieldInstruction(throwOnError: false); - yield return o; - - if (o.HasError) { Debug.Log(o.Error.ToString()); } - if (o.HasResult) { Debug.Log(o.Result); } - - // other sample(wait until transform.position.y >= 100) - yield return this.ObserveEveryValueChanged(x => x.transform).FirstOrDefault(x => x.position.y >= 100).ToYieldInstruction(); - } -#if UNITY_2018_3_OR_NEWER -#pragma warning restore CS0618 -#endif -#endif - - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Examples/Sample06_ConvertToCoroutine.cs.meta b/Assets/Plugins/UniRx/Examples/Sample06_ConvertToCoroutine.cs.meta deleted file mode 100644 index 06fb827..0000000 --- a/Assets/Plugins/UniRx/Examples/Sample06_ConvertToCoroutine.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 5da8247fbc4a4c84e96a727b44903214 -timeCreated: 1455373899 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Examples/Sample07_OrchestratIEnumerator.cs b/Assets/Plugins/UniRx/Examples/Sample07_OrchestratIEnumerator.cs deleted file mode 100644 index e7e2c61..0000000 --- a/Assets/Plugins/UniRx/Examples/Sample07_OrchestratIEnumerator.cs +++ /dev/null @@ -1,45 +0,0 @@ -#pragma warning disable 0168 -#pragma warning disable 0219 - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using UnityEngine; - -namespace UniRx.Examples -{ - public class Sample07_OrchestratIEnumerator : MonoBehaviour - { - // two coroutines - IEnumerator AsyncA() - { - Debug.Log("a start"); - yield return new WaitForSeconds(3); - Debug.Log("a end"); - } - - IEnumerator AsyncB() - { - Debug.Log("b start"); - yield return new WaitForEndOfFrame(); - Debug.Log("b end"); - } - - void Start() - { - // after completed AsyncA, run AsyncB as continuous routine. - // UniRx expands SelectMany(IEnumerator) as SelectMany(IEnumerator.ToObservable()) - var cancel = Observable.FromCoroutine(AsyncA) - .SelectMany(AsyncB) - .Subscribe(); - - // If you want to stop Coroutine(as cancel), call subscription.Dispose() - // cancel.Dispose(); - } - } -} - -#pragma warning restore 0219 -#pragma warning restore 0168 \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Examples/Sample07_OrchestratIEnumerator.cs.meta b/Assets/Plugins/UniRx/Examples/Sample07_OrchestratIEnumerator.cs.meta deleted file mode 100644 index d74d828..0000000 --- a/Assets/Plugins/UniRx/Examples/Sample07_OrchestratIEnumerator.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: d437607dfffa8ff428bda3366354078d -timeCreated: 1455373901 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Examples/Sample08_DetectDoubleClick.cs b/Assets/Plugins/UniRx/Examples/Sample08_DetectDoubleClick.cs deleted file mode 100644 index 366d512..0000000 --- a/Assets/Plugins/UniRx/Examples/Sample08_DetectDoubleClick.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using UnityEngine; - -namespace UniRx.Examples -{ - public class Sample08_DetectDoubleClick : MonoBehaviour - { - void Start() - { - // Global event handling is very useful. - // UniRx can handle there events. - // Observable.EveryUpdate/EveryFixedUpdate/EveryEndOfFrame - // Observable.EveryApplicationFocus/EveryApplicationPause - // Observable.OnceApplicationQuit - - // This DoubleCLick Sample is from - // The introduction to Reactive Programming you've been missing - // https://gist.github.com/staltz/868e7e9bc2a7b8c1f754 - - var clickStream = Observable.EveryUpdate() - .Where(_ => Input.GetMouseButtonDown(0)); - - clickStream.Buffer(clickStream.Throttle(TimeSpan.FromMilliseconds(250))) - .Where(xs => xs.Count >= 2) - .Subscribe(xs => Debug.Log("DoubleClick Detected! Count:" + xs.Count)); - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Examples/Sample08_DetectDoubleClick.cs.meta b/Assets/Plugins/UniRx/Examples/Sample08_DetectDoubleClick.cs.meta deleted file mode 100644 index f26ff52..0000000 --- a/Assets/Plugins/UniRx/Examples/Sample08_DetectDoubleClick.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: eb801bbfb1ffcd64389e90c8f2435b79 -timeCreated: 1455373902 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Examples/Sample09_EventHandling.cs b/Assets/Plugins/UniRx/Examples/Sample09_EventHandling.cs deleted file mode 100644 index 672fd0a..0000000 --- a/Assets/Plugins/UniRx/Examples/Sample09_EventHandling.cs +++ /dev/null @@ -1,69 +0,0 @@ -#pragma warning disable 0067 - -using System; -using UnityEngine; - -namespace UniRx.Examples -{ - public class Sample09_EventHandling : MonoBehaviour - { - public class MyEventArgs : EventArgs - { - public int MyProperty { get; set; } - } - - public event EventHandler FooBar; - public event Action FooFoo; - - CompositeDisposable disposables = new CompositeDisposable(); - - // Subject is Rx's native event expression and recommend way for use Rx as event. - // Subject.OnNext as fire event, - // expose IObserver is subscibable for external source, it's no need convert. - Subject onBarBar = new Subject(); - public IObservable OnBarBar { get { return onBarBar; } } - - void Start() - { - // convert to IO as (sender, eventArgs) - Observable.FromEventPattern, MyEventArgs>( - h => h.Invoke, h => FooBar += h, h => FooBar -= h) - .Subscribe() - .AddTo(disposables); // IDisposable can add to collection easily by AddTo - - // convert to IO, many situation this is useful than FromEventPattern - Observable.FromEvent, MyEventArgs>( - h => (sender, e) => h(e), h => FooBar += h, h => FooBar -= h) - .Subscribe() - .AddTo(disposables); - - // You can convert Action like event. - Observable.FromEvent( - h => FooFoo += h, h => FooFoo -= h) - .Subscribe() - .AddTo(disposables); - - // AOT Safe EventHandling, use dummy capture, see:https://github.com/neuecc/UniRx/wiki/AOT-Exception-Patterns-and-Hacks - var capture = 0; - Observable.FromEventPattern, MyEventArgs>(h => - { - capture.GetHashCode(); // dummy for AOT - return new EventHandler(h); - }, h => FooBar += h, h => FooBar -= h) - .Subscribe() - .AddTo(disposables); - - // Subject as like event. - OnBarBar.Subscribe().AddTo(disposables); - onBarBar.OnNext(1); // fire event - } - - void OnDestroy() - { - // manage subscription lifecycle - disposables.Dispose(); - } - } -} - -#pragma warning restore 0067 \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Examples/Sample09_EventHandling.cs.meta b/Assets/Plugins/UniRx/Examples/Sample09_EventHandling.cs.meta deleted file mode 100644 index a3c44f5..0000000 --- a/Assets/Plugins/UniRx/Examples/Sample09_EventHandling.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 95140e49213aa6f49a470a81873b87c0 -timeCreated: 1455373900 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Examples/Sample10_MainThreadDispatcher.cs b/Assets/Plugins/UniRx/Examples/Sample10_MainThreadDispatcher.cs deleted file mode 100644 index 9523770..0000000 --- a/Assets/Plugins/UniRx/Examples/Sample10_MainThreadDispatcher.cs +++ /dev/null @@ -1,48 +0,0 @@ -using System; -using System.Collections; -using UnityEngine; - -namespace UniRx.Examples -{ - public class Sample10_MainThreadDispatcher - { - public void Run() - { - // MainThreadDispatcher is heart of Rx and Unity integration - - // StartCoroutine can start coroutine besides MonoBehaviour. - MainThreadDispatcher.StartCoroutine(TestAsync()); - - // We have two way of run coroutine, FromCoroutine or StartCoroutine. - // StartCoroutine is Unity primitive way and it's awaitable by yield return. - // FromCoroutine is Rx, it's composable and cancellable by subscription's IDisposable. - // FromCoroutine's overload can have return value, see:Sample05_ConvertFromCoroutine - Observable.FromCoroutine(TestAsync).Subscribe(); - - // Add Action to MainThreadDispatcher. Action is saved queue, run on next update. - MainThreadDispatcher.Post(_ => Debug.Log("test"), null); - - // Timebased operations is run on MainThread(as default) - // All timebased operation(Interval, Timer, Delay, Buffer, etc...)is single thread, thread safe! - Observable.Interval(TimeSpan.FromSeconds(1)) - .Subscribe(x => Debug.Log(x)); - - // Observable.Start use ThreadPool Scheduler as default. - // ObserveOnMainThread return to mainthread - Observable.Start(() => Unit.Default) // asynchronous work - .ObserveOnMainThread() - .Subscribe(x => Debug.Log(x)); - } - - IEnumerator TestAsync() - { - Debug.Log("a"); - yield return new WaitForSeconds(1); - Debug.Log("b"); - yield return new WaitForSeconds(1); - Debug.Log("c"); - yield return new WaitForSeconds(1); - Debug.Log("d"); - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Examples/Sample10_MainThreadDispatcher.cs.meta b/Assets/Plugins/UniRx/Examples/Sample10_MainThreadDispatcher.cs.meta deleted file mode 100644 index ec97b87..0000000 --- a/Assets/Plugins/UniRx/Examples/Sample10_MainThreadDispatcher.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 6a0b959735346af48b772254afc8afdd -timeCreated: 1455373899 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Examples/Sample11_Logger.cs b/Assets/Plugins/UniRx/Examples/Sample11_Logger.cs deleted file mode 100644 index 22d263b..0000000 --- a/Assets/Plugins/UniRx/Examples/Sample11_Logger.cs +++ /dev/null @@ -1,41 +0,0 @@ -using System; -using System.Collections; -using UniRx.Diagnostics; -using UnityEngine; - -namespace UniRx.Examples -{ - public class Sample11_Logger - { - // UniRx.Diagnostics.Logger - // logger is threadsafe, define per class with name. - static readonly UniRx.Diagnostics.Logger logger = new UniRx.Diagnostics.Logger("Sample11"); - - // call once at applicationinit - public void ApplicationInitialize() - { - // Log as Stream, UniRx.Diagnostics.ObservableLogger.Listener is IObservable - // You can subscribe and output to any place. - ObservableLogger.Listener.LogToUnityDebug(); - - // for example, filter only Exception and upload to web. - // (make custom sink(IObserver) is better to use) - ObservableLogger.Listener - .Where(x => x.LogType == LogType.Exception) - .Subscribe(x => - { - // ObservableWWW.Post("", null).Subscribe(); - }); - } - - public void Run() - { - // Debug is write only DebugBuild. - logger.Debug("Debug Message"); - - // or other logging methods - logger.Log("Message"); - logger.Exception(new Exception("test exception")); - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Examples/Sample11_Logger.cs.meta b/Assets/Plugins/UniRx/Examples/Sample11_Logger.cs.meta deleted file mode 100644 index 22f109c..0000000 --- a/Assets/Plugins/UniRx/Examples/Sample11_Logger.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: f5aa72c61e2548a4bac4d65f93c63bf1 -timeCreated: 1455373902 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Examples/Sample12Scene.unity b/Assets/Plugins/UniRx/Examples/Sample12Scene.unity deleted file mode 100644 index fc30a40..0000000 --- a/Assets/Plugins/UniRx/Examples/Sample12Scene.unity +++ /dev/null @@ -1,1535 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!29 &1 -SceneSettings: - m_ObjectHideFlags: 0 - m_PVSData: - m_PVSObjectsArray: [] - m_PVSPortalsArray: [] - m_OcclusionBakeSettings: - smallestOccluder: 5 - smallestHole: 0.25 - backfaceThreshold: 100 ---- !u!104 &2 -RenderSettings: - m_ObjectHideFlags: 0 - serializedVersion: 6 - 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: 3 - 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} ---- !u!157 &4 -LightmapSettings: - m_ObjectHideFlags: 0 - serializedVersion: 6 - m_GIWorkflowMode: 0 - m_LightmapsMode: 1 - m_GISettings: - serializedVersion: 2 - m_BounceScale: 1 - m_IndirectOutputScale: 1 - m_AlbedoBoost: 1 - m_TemporalCoherenceThreshold: 1 - m_EnvironmentLightingMode: 0 - m_EnableBakedLightmaps: 0 - m_EnableRealtimeLightmaps: 0 - m_LightmapEditorSettings: - serializedVersion: 3 - m_Resolution: 2 - m_BakeResolution: 40 - m_TextureWidth: 1024 - m_TextureHeight: 1024 - m_AOMaxDistance: 1 - m_Padding: 2 - m_CompAOExponent: 0 - m_LightmapParameters: {fileID: 0} - m_TextureCompression: 1 - m_FinalGather: 0 - m_FinalGatherRayCount: 1024 - m_ReflectionCompression: 2 - m_LightingDataAsset: {fileID: 0} - m_RuntimeCPUUsage: 25 ---- !u!196 &5 -NavMeshSettings: - serializedVersion: 2 - m_ObjectHideFlags: 0 - m_BuildSettings: - serializedVersion: 2 - agentRadius: 0.5 - agentHeight: 2 - agentSlope: 45 - agentClimb: 0.4 - ledgeDropHeight: 0 - maxJumpAcrossDistance: 0 - accuratePlacement: 0 - minRegionArea: 2 - cellSize: 0.16666667 - manualCellSize: 0 - m_NavMeshData: {fileID: 0} ---- !u!1 &33721919 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 - m_Component: - - 224: {fileID: 33721920} - - 223: {fileID: 33721924} - - 114: {fileID: 33721923} - - 114: {fileID: 33721922} - - 114: {fileID: 33721921} - m_Layer: 5 - m_Name: Canvas - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &33721920 -RectTransform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 33721919} - 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: 921642174} - - {fileID: 530746210} - - {fileID: 46704896} - - {fileID: 579875960} - - {fileID: 1891604357} - m_Father: {fileID: 0} - m_RootOrder: 1 - 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 &33721921 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 33721919} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 18e34490a83a27e44adf93dd4ffd1f22, type: 3} - m_Name: - m_EditorClassIdentifier: - MyButton: {fileID: 921642175} - MyToggle: {fileID: 530746211} - MyInput: {fileID: 46704897} - MyText: {fileID: 579875961} - MySlider: {fileID: 1891604358} - IntRxProp: - value: 0 ---- !u!114 &33721922 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 33721919} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 1301386320, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} - m_Name: - m_EditorClassIdentifier: - m_IgnoreReversedGraphics: 1 - m_BlockingObjects: 0 - m_BlockingMask: - serializedVersion: 2 - m_Bits: 4294967295 ---- !u!114 &33721923 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 33721919} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 1980459831, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} - m_Name: - m_EditorClassIdentifier: - m_UiScaleMode: 0 - 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 ---- !u!223 &33721924 -Canvas: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 33721919} - m_Enabled: 1 - serializedVersion: 2 - m_RenderMode: 0 - m_Camera: {fileID: 0} - m_PlaneDistance: 100 - m_PixelPerfect: 0 - m_ReceivesEvents: 1 - m_OverrideSorting: 0 - m_OverridePixelPerfect: 0 - m_SortingLayerID: 0 - m_SortingOrder: 0 - m_TargetDisplay: 0 ---- !u!1 &46704895 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 - m_Component: - - 224: {fileID: 46704896} - - 222: {fileID: 46704899} - - 114: {fileID: 46704898} - - 114: {fileID: 46704897} - m_Layer: 5 - m_Name: InputField - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &46704896 -RectTransform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 46704895} - 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: 835857415} - - {fileID: 710358450} - m_Father: {fileID: 33721920} - m_RootOrder: 2 - m_AnchorMin: {x: 0.5, y: 0.5} - m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: 0, y: 277} - m_SizeDelta: {x: 160, y: 30} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &46704897 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 46704895} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 575553740, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Navigation: - m_Mode: 3 - 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_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_DisabledSprite: {fileID: 0} - m_AnimationTriggers: - m_NormalTrigger: Normal - m_HighlightedTrigger: Highlighted - m_PressedTrigger: Pressed - m_DisabledTrigger: Disabled - m_Interactable: 1 - m_TargetGraphic: {fileID: 46704898} - m_TextComponent: {fileID: 710358451} - m_Placeholder: {fileID: 835857416} - m_ContentType: 0 - m_InputType: 0 - m_AsteriskChar: 42 - m_KeyboardType: 0 - m_LineType: 0 - m_HideMobileInput: 0 - m_CharacterValidation: 0 - m_CharacterLimit: 0 - m_OnEndEdit: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.InputField+SubmitEvent, UnityEngine.UI, Version=1.0.0.0, - Culture=neutral, PublicKeyToken=null - m_OnValueChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.InputField+OnChangeEvent, UnityEngine.UI, Version=1.0.0.0, - Culture=neutral, PublicKeyToken=null - m_CaretColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} - m_CustomCaretColor: 0 - m_SelectionColor: {r: 0.65882355, g: 0.80784315, b: 1, a: 0.7529412} - m_Text: - m_CaretBlinkRate: 1.7 - m_CaretWidth: 1 - m_ReadOnly: 0 ---- !u!114 &46704898 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 46704895} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - m_Sprite: {fileID: 10911, 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 ---- !u!222 &46704899 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 46704895} ---- !u!1 &163238468 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 - m_Component: - - 224: {fileID: 163238469} - - 222: {fileID: 163238471} - - 114: {fileID: 163238470} - m_Layer: 5 - m_Name: Checkmark - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &163238469 -RectTransform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 163238468} - 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: 1018308463} - m_RootOrder: 0 - m_AnchorMin: {x: 0.5, y: 0.5} - m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 20, y: 20} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &163238470 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 163238468} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - m_Sprite: {fileID: 10901, guid: 0000000000000000f000000000000000, type: 0} - m_Type: 0 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 ---- !u!222 &163238471 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 163238468} ---- !u!1 &530746209 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 - m_Component: - - 224: {fileID: 530746210} - - 114: {fileID: 530746211} - m_Layer: 5 - m_Name: Toggle - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &530746210 -RectTransform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 530746209} - 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: 1018308463} - - {fileID: 1527674668} - m_Father: {fileID: 33721920} - m_RootOrder: 1 - m_AnchorMin: {x: 0.5, y: 0.5} - m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: -160, y: 294} - m_SizeDelta: {x: 160, y: 20} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &530746211 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 530746209} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 2109663825, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Navigation: - m_Mode: 3 - 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_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_DisabledSprite: {fileID: 0} - m_AnimationTriggers: - m_NormalTrigger: Normal - m_HighlightedTrigger: Highlighted - m_PressedTrigger: Pressed - m_DisabledTrigger: Disabled - m_Interactable: 1 - m_TargetGraphic: {fileID: 1018308464} - toggleTransition: 1 - graphic: {fileID: 163238470} - m_Group: {fileID: 0} - onValueChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.Toggle+ToggleEvent, UnityEngine.UI, Version=1.0.0.0, - Culture=neutral, PublicKeyToken=null - m_IsOn: 0 ---- !u!1 &579875959 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 - m_Component: - - 224: {fileID: 579875960} - - 222: {fileID: 579875962} - - 114: {fileID: 579875961} - m_Layer: 5 - m_Name: Text - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &579875960 -RectTransform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 579875959} - 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: 33721920} - m_RootOrder: 3 - m_AnchorMin: {x: 0.5, y: 0.5} - m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: 0, y: 178} - m_SizeDelta: {x: 160, y: 30} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &579875961 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 579875959} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, 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_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - 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: 0 - m_AlignByGeometry: 0 - m_RichText: 1 - m_HorizontalOverflow: 0 - m_VerticalOverflow: 0 - m_LineSpacing: 1 - m_Text: New Text ---- !u!222 &579875962 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 579875959} ---- !u!1 &605953354 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 - m_Component: - - 224: {fileID: 605953355} - m_Layer: 5 - m_Name: Handle Slide Area - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &605953355 -RectTransform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 605953354} - 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: 1022847601} - m_Father: {fileID: 1891604357} - m_RootOrder: 2 - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: -20, y: 0} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!1 &710358449 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 - m_Component: - - 224: {fileID: 710358450} - - 222: {fileID: 710358452} - - 114: {fileID: 710358451} - m_Layer: 5 - m_Name: Text - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &710358450 -RectTransform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 710358449} - 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: 46704896} - m_RootOrder: 1 - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: -0.5} - m_SizeDelta: {x: -20, y: -13} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &710358451 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 710358449} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, 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_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - 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: 0 - m_AlignByGeometry: 0 - m_RichText: 0 - m_HorizontalOverflow: 0 - m_VerticalOverflow: 0 - m_LineSpacing: 1 - m_Text: ---- !u!222 &710358452 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 710358449} ---- !u!1 &801653541 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 - m_Component: - - 224: {fileID: 801653542} - - 222: {fileID: 801653544} - - 114: {fileID: 801653543} - m_Layer: 5 - m_Name: Background - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &801653542 -RectTransform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 801653541} - 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: 1891604357} - m_RootOrder: 0 - m_AnchorMin: {x: 0, y: 0.25} - m_AnchorMax: {x: 1, y: 0.75} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &801653543 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 801653541} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0} - m_Type: 1 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 ---- !u!222 &801653544 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 801653541} ---- !u!1 &835857414 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 - m_Component: - - 224: {fileID: 835857415} - - 222: {fileID: 835857417} - - 114: {fileID: 835857416} - m_Layer: 5 - m_Name: Placeholder - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &835857415 -RectTransform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 835857414} - 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: 46704896} - m_RootOrder: 0 - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: -0.5} - m_SizeDelta: {x: -20, y: -13} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &835857416 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 835857414} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 0.5} - m_RaycastTarget: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - m_FontData: - m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} - m_FontSize: 14 - m_FontStyle: 2 - m_BestFit: 0 - m_MinSize: 10 - m_MaxSize: 40 - m_Alignment: 0 - m_AlignByGeometry: 0 - m_RichText: 1 - m_HorizontalOverflow: 0 - m_VerticalOverflow: 0 - m_LineSpacing: 1 - m_Text: Enter text... ---- !u!222 &835857417 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 835857414} ---- !u!1 &921642173 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 - m_Component: - - 224: {fileID: 921642174} - - 222: {fileID: 921642177} - - 114: {fileID: 921642176} - - 114: {fileID: 921642175} - m_Layer: 5 - m_Name: Button - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &921642174 -RectTransform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 921642173} - 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: 1781955689} - m_Father: {fileID: 33721920} - m_RootOrder: 0 - m_AnchorMin: {x: 0.5, y: 0.5} - m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: -171, y: 218} - m_SizeDelta: {x: 160, y: 30} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &921642175 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 921642173} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Navigation: - m_Mode: 3 - 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_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_DisabledSprite: {fileID: 0} - m_AnimationTriggers: - m_NormalTrigger: Normal - m_HighlightedTrigger: Highlighted - m_PressedTrigger: Pressed - m_DisabledTrigger: Disabled - m_Interactable: 1 - m_TargetGraphic: {fileID: 921642176} - m_OnClick: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, - Culture=neutral, PublicKeyToken=null ---- !u!114 &921642176 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 921642173} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - 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 ---- !u!222 &921642177 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 921642173} ---- !u!1 &930565829 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 - m_Component: - - 224: {fileID: 930565830} - - 222: {fileID: 930565832} - - 114: {fileID: 930565831} - m_Layer: 5 - m_Name: Fill - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &930565830 -RectTransform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 930565829} - 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: 1807094062} - m_RootOrder: 0 - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 10, y: 0} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &930565831 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 930565829} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - 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 ---- !u!222 &930565832 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 930565829} ---- !u!1 &1018308462 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 - m_Component: - - 224: {fileID: 1018308463} - - 222: {fileID: 1018308465} - - 114: {fileID: 1018308464} - m_Layer: 5 - m_Name: Background - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &1018308463 -RectTransform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1018308462} - 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: 163238469} - m_Father: {fileID: 530746210} - m_RootOrder: 0 - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 10, y: -10} - m_SizeDelta: {x: 20, y: 20} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &1018308464 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1018308462} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - 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 ---- !u!222 &1018308465 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1018308462} ---- !u!1 &1022847600 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 - m_Component: - - 224: {fileID: 1022847601} - - 222: {fileID: 1022847603} - - 114: {fileID: 1022847602} - m_Layer: 5 - m_Name: Handle - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &1022847601 -RectTransform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1022847600} - 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: 605953355} - m_RootOrder: 0 - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 20, y: 0} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &1022847602 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1022847600} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - m_Sprite: {fileID: 10913, guid: 0000000000000000f000000000000000, type: 0} - m_Type: 0 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 ---- !u!222 &1022847603 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1022847600} ---- !u!1 &1184379970 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 - m_Component: - - 4: {fileID: 1184379974} - - 114: {fileID: 1184379973} - - 114: {fileID: 1184379972} - - 114: {fileID: 1184379971} - m_Layer: 0 - m_Name: EventSystem - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &1184379971 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1184379970} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 1997211142, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} - m_Name: - m_EditorClassIdentifier: - m_ForceModuleActive: 0 ---- !u!114 &1184379972 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1184379970} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 1077351063, guid: f5f67c52d1564df4a8936ccd202a3bd8, 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 &1184379973 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1184379970} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: -619905303, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} - m_Name: - m_EditorClassIdentifier: - m_FirstSelected: {fileID: 0} - m_sendNavigationEvents: 1 - m_DragThreshold: 5 ---- !u!4 &1184379974 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1184379970} - 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: 2 ---- !u!1 &1527674667 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 - m_Component: - - 224: {fileID: 1527674668} - - 222: {fileID: 1527674670} - - 114: {fileID: 1527674669} - m_Layer: 5 - m_Name: Label - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &1527674668 -RectTransform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1527674667} - 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: 530746210} - m_RootOrder: 1 - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 9, y: -0.5} - m_SizeDelta: {x: -28, y: -3} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &1527674669 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1527674667} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, 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_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - 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: 0 - m_AlignByGeometry: 0 - m_RichText: 1 - m_HorizontalOverflow: 0 - m_VerticalOverflow: 0 - m_LineSpacing: 1 - m_Text: Toggle ---- !u!222 &1527674670 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1527674667} ---- !u!1 &1781955688 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 - m_Component: - - 224: {fileID: 1781955689} - - 222: {fileID: 1781955691} - - 114: {fileID: 1781955690} - m_Layer: 5 - m_Name: Text - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &1781955689 -RectTransform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1781955688} - 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: 921642174} - m_RootOrder: 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 &1781955690 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1781955688} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, 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_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - 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: Button ---- !u!222 &1781955691 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1781955688} ---- !u!1 &1807094061 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 - m_Component: - - 224: {fileID: 1807094062} - m_Layer: 5 - m_Name: Fill Area - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &1807094062 -RectTransform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1807094061} - 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: 930565830} - m_Father: {fileID: 1891604357} - m_RootOrder: 1 - m_AnchorMin: {x: 0, y: 0.25} - m_AnchorMax: {x: 1, y: 0.75} - m_AnchoredPosition: {x: -5, y: 0} - m_SizeDelta: {x: -20, y: 0} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!1 &1838497716 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 - m_Component: - - 4: {fileID: 1838497721} - - 20: {fileID: 1838497720} - - 92: {fileID: 1838497719} - - 124: {fileID: 1838497718} - - 81: {fileID: 1838497717} - m_Layer: 0 - m_Name: Main Camera - m_TagString: MainCamera - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!81 &1838497717 -AudioListener: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1838497716} - m_Enabled: 1 ---- !u!124 &1838497718 -Behaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1838497716} - m_Enabled: 1 ---- !u!92 &1838497719 -Behaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1838497716} - m_Enabled: 1 ---- !u!20 &1838497720 -Camera: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1838497716} - m_Enabled: 1 - serializedVersion: 2 - m_ClearFlags: 1 - m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0.019607844} - 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: 1 - 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: 0 - m_OcclusionCulling: 1 - m_StereoConvergence: 10 - m_StereoSeparation: 0.022 - m_StereoMirrorMode: 0 ---- !u!4 &1838497721 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1838497716} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: -10} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 0 ---- !u!1 &1891604356 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 - m_Component: - - 224: {fileID: 1891604357} - - 114: {fileID: 1891604358} - m_Layer: 5 - m_Name: Slider - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &1891604357 -RectTransform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1891604356} - 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: 801653542} - - {fileID: 1807094062} - - {fileID: 605953355} - m_Father: {fileID: 33721920} - m_RootOrder: 4 - m_AnchorMin: {x: 0.5, y: 0.5} - m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: 0, y: 102} - m_SizeDelta: {x: 160, y: 20} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &1891604358 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1891604356} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: -113659843, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Navigation: - m_Mode: 3 - 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_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_DisabledSprite: {fileID: 0} - m_AnimationTriggers: - m_NormalTrigger: Normal - m_HighlightedTrigger: Highlighted - m_PressedTrigger: Pressed - m_DisabledTrigger: Disabled - m_Interactable: 1 - m_TargetGraphic: {fileID: 1022847602} - m_FillRect: {fileID: 930565830} - m_HandleRect: {fileID: 1022847601} - m_Direction: 0 - m_MinValue: 0 - m_MaxValue: 1 - m_WholeNumbers: 0 - m_Value: 1 - m_OnValueChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.Slider+SliderEvent, UnityEngine.UI, Version=1.0.0.0, - Culture=neutral, PublicKeyToken=null diff --git a/Assets/Plugins/UniRx/Examples/Sample12Scene.unity.meta b/Assets/Plugins/UniRx/Examples/Sample12Scene.unity.meta deleted file mode 100644 index 84b882c..0000000 --- a/Assets/Plugins/UniRx/Examples/Sample12Scene.unity.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 4a4aea8df1ad11c47a1db84432dd30f8 -timeCreated: 1455373896 -licenseType: Pro -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Examples/Sample12_ReactiveProperty.cs b/Assets/Plugins/UniRx/Examples/Sample12_ReactiveProperty.cs deleted file mode 100644 index 94e4242..0000000 --- a/Assets/Plugins/UniRx/Examples/Sample12_ReactiveProperty.cs +++ /dev/null @@ -1,77 +0,0 @@ -// for uGUI(from 4.6) -#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) - -using System; -using UnityEngine; -using UnityEngine.UI; - -namespace UniRx.Examples -{ - public class Sample12_ReactiveProperty : MonoBehaviour - { - // Open Sample12Scene. Set from canvas - public Button MyButton; - public Toggle MyToggle; - public InputField MyInput; - public Text MyText; - public Slider MySlider; - - // You can monitor/modifie in inspector by SpecializedReactiveProperty - public IntReactiveProperty IntRxProp = new IntReactiveProperty(); - - Enemy enemy = new Enemy(1000); - - void Start() - { - // UnityEvent as Observable - // (shortcut, MyButton.OnClickAsObservable()) - MyButton.onClick.AsObservable().Subscribe(_ => enemy.CurrentHp.Value -= 99); - - // Toggle, Input etc as Observable(OnValueChangedAsObservable is helper for provide isOn value on subscribe) - // SubscribeToInteractable is UniRx.UI Extension Method, same as .interactable = x) - MyToggle.OnValueChangedAsObservable().SubscribeToInteractable(MyButton); - - // input shows delay after 1 second -#if !(UNITY_4_6 || UNITY_4_7 || UNITY_5_0 || UNITY_5_1 || UNITY_5_2) - MyInput.OnValueChangedAsObservable() -#else - MyInput.OnValueChangeAsObservable() -#endif - .Where(x => x != null) - .Delay(TimeSpan.FromSeconds(1)) - .SubscribeToText(MyText); // SubscribeToText is UniRx.UI Extension Method - - // converting for human visibility - MySlider.OnValueChangedAsObservable() - .SubscribeToText(MyText, x => Math.Round(x, 2).ToString()); - - // from RxProp, CurrentHp changing(Button Click) is observable - enemy.CurrentHp.SubscribeToText(MyText); - enemy.IsDead.Where(isDead => isDead == true) - .Subscribe(_ => - { - MyToggle.interactable = MyButton.interactable = false; - }); - - // initial text:) - IntRxProp.SubscribeToText(MyText); - } - } - - // Reactive Notification Model - public class Enemy - { - public IReactiveProperty CurrentHp { get; private set; } - - public IReadOnlyReactiveProperty IsDead { get; private set; } - - public Enemy(int initialHp) - { - // Declarative Property - CurrentHp = new ReactiveProperty(initialHp); - IsDead = CurrentHp.Select(x => x <= 0).ToReactiveProperty(); - } - } -} - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Examples/Sample12_ReactiveProperty.cs.meta b/Assets/Plugins/UniRx/Examples/Sample12_ReactiveProperty.cs.meta deleted file mode 100644 index be8afbc..0000000 --- a/Assets/Plugins/UniRx/Examples/Sample12_ReactiveProperty.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 18e34490a83a27e44adf93dd4ffd1f22 -timeCreated: 1455373897 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Examples/Sample13Scene.unity b/Assets/Plugins/UniRx/Examples/Sample13Scene.unity deleted file mode 100644 index f79a123..0000000 --- a/Assets/Plugins/UniRx/Examples/Sample13Scene.unity +++ /dev/null @@ -1,1300 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!29 &1 -SceneSettings: - m_ObjectHideFlags: 0 - m_PVSData: - m_PVSObjectsArray: [] - m_PVSPortalsArray: [] - m_OcclusionBakeSettings: - smallestOccluder: 5 - smallestHole: 0.25 - backfaceThreshold: 100 ---- !u!104 &2 -RenderSettings: - m_ObjectHideFlags: 0 - serializedVersion: 6 - 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: 3 - 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} ---- !u!157 &4 -LightmapSettings: - m_ObjectHideFlags: 0 - serializedVersion: 6 - m_GIWorkflowMode: 0 - m_LightmapsMode: 1 - m_GISettings: - serializedVersion: 2 - m_BounceScale: 1 - m_IndirectOutputScale: 1 - m_AlbedoBoost: 1 - m_TemporalCoherenceThreshold: 1 - m_EnvironmentLightingMode: 0 - m_EnableBakedLightmaps: 0 - m_EnableRealtimeLightmaps: 0 - m_LightmapEditorSettings: - serializedVersion: 3 - m_Resolution: 2 - m_BakeResolution: 40 - m_TextureWidth: 1024 - m_TextureHeight: 1024 - m_AOMaxDistance: 1 - m_Padding: 2 - m_CompAOExponent: 0 - m_LightmapParameters: {fileID: 0} - m_TextureCompression: 1 - m_FinalGather: 0 - m_FinalGatherRayCount: 1024 - m_ReflectionCompression: 2 - m_LightingDataAsset: {fileID: 0} - m_RuntimeCPUUsage: 25 ---- !u!196 &5 -NavMeshSettings: - serializedVersion: 2 - m_ObjectHideFlags: 0 - m_BuildSettings: - serializedVersion: 2 - agentRadius: 0.5 - agentHeight: 2 - agentSlope: 45 - agentClimb: 0.4 - ledgeDropHeight: 0 - maxJumpAcrossDistance: 0 - accuratePlacement: 0 - minRegionArea: 2 - cellSize: 0.16666667 - manualCellSize: 0 - m_NavMeshData: {fileID: 0} ---- !u!1 &48390799 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 - m_Component: - - 224: {fileID: 48390800} - - 222: {fileID: 48390802} - - 114: {fileID: 48390801} - m_Layer: 5 - m_Name: Text - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &48390800 -RectTransform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 48390799} - 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: 2136645852} - m_RootOrder: 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 &48390801 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 48390799} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, 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_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - 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: Clear Checked ---- !u!222 &48390802 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 48390799} ---- !u!1 &80191139 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 - m_Component: - - 224: {fileID: 80191140} - - 114: {fileID: 80191141} - m_Layer: 5 - m_Name: TodoList - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &80191140 -RectTransform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 80191139} - 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: 625561981} - m_RootOrder: 2 - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0.000030517578, y: -864} - m_SizeDelta: {x: 0, y: 744} - m_Pivot: {x: 0.5, y: 0} ---- !u!114 &80191141 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 80191139} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 1297475563, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Padding: - m_Left: 0 - m_Right: 0 - m_Top: 0 - m_Bottom: 0 - m_ChildAlignment: 0 - m_Spacing: 0 - m_ChildForceExpandWidth: 1 - m_ChildForceExpandHeight: 1 ---- !u!1 &300470760 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 - m_Component: - - 4: {fileID: 300470761} - - 114: {fileID: 300470762} - m_Layer: 0 - m_Name: ToDoScene - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &300470761 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 300470760} - 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: 895588078} - m_Father: {fileID: 0} - m_RootOrder: 1 ---- !u!114 &300470762 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 300470760} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 022ecfa555367154c8cf87d61465f7e2, type: 3} - m_Name: - m_EditorClassIdentifier: - Title: {fileID: 852345258} - ToDoInput: {fileID: 566049662} - AddButton: {fileID: 611575448} - ClearButton: {fileID: 2136645853} - TodoList: {fileID: 80191139} - SampleItemPrefab: {fileID: 182208, guid: 173222196f3e1f0448b383f260df7d44, type: 2} ---- !u!1 &448872075 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 - m_Component: - - 4: {fileID: 448872079} - - 114: {fileID: 448872078} - - 114: {fileID: 448872077} - - 114: {fileID: 448872076} - - 114: {fileID: 448872080} - m_Layer: 0 - m_Name: EventSystem - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &448872076 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 448872075} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 1997211142, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} - m_Name: - m_EditorClassIdentifier: - m_ForceModuleActive: 0 ---- !u!114 &448872077 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 448872075} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 1077351063, guid: f5f67c52d1564df4a8936ccd202a3bd8, 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 &448872078 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 448872075} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: -619905303, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} - m_Name: - m_EditorClassIdentifier: - m_FirstSelected: {fileID: 0} - m_sendNavigationEvents: 1 - m_DragThreshold: 5 ---- !u!4 &448872079 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 448872075} - 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: 2 ---- !u!114 &448872080 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 448872075} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 1077351063, guid: f5f67c52d1564df4a8936ccd202a3bd8, 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!1 &566049660 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 - m_Component: - - 224: {fileID: 566049661} - - 222: {fileID: 566049664} - - 114: {fileID: 566049663} - - 114: {fileID: 566049662} - m_Layer: 5 - m_Name: ToDoInput - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &566049661 -RectTransform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 566049660} - 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: 2102338788} - - {fileID: 1368145207} - m_Father: {fileID: 650625965} - m_RootOrder: 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 &566049662 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 566049660} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 575553740, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Navigation: - m_Mode: 3 - 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_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_DisabledSprite: {fileID: 0} - m_AnimationTriggers: - m_NormalTrigger: Normal - m_HighlightedTrigger: Highlighted - m_PressedTrigger: Pressed - m_DisabledTrigger: Disabled - m_Interactable: 1 - m_TargetGraphic: {fileID: 566049663} - m_TextComponent: {fileID: 1368145205} - m_Placeholder: {fileID: 2102338789} - m_ContentType: 0 - m_InputType: 0 - m_AsteriskChar: 42 - m_KeyboardType: 0 - m_LineType: 0 - m_HideMobileInput: 0 - m_CharacterValidation: 0 - m_CharacterLimit: 0 - m_OnEndEdit: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.InputField+SubmitEvent, UnityEngine.UI, Version=1.0.0.0, - Culture=neutral, PublicKeyToken=null - m_OnValueChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.InputField+OnChangeEvent, UnityEngine.UI, Version=1.0.0.0, - Culture=neutral, PublicKeyToken=null - m_CaretColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} - m_CustomCaretColor: 0 - m_SelectionColor: {r: 0.65882355, g: 0.80784315, b: 1, a: 0.7529412} - m_Text: - m_CaretBlinkRate: 1.7 - m_CaretWidth: 1 - m_ReadOnly: 0 ---- !u!114 &566049663 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 566049660} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - m_Sprite: {fileID: 10911, 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 ---- !u!222 &566049664 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 566049660} ---- !u!1 &611575446 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 - m_Component: - - 224: {fileID: 611575447} - - 222: {fileID: 611575450} - - 114: {fileID: 611575449} - - 114: {fileID: 611575448} - m_Layer: 5 - m_Name: AddButton - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &611575447 -RectTransform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 611575446} - 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: 721405894} - m_Father: {fileID: 650625965} - m_RootOrder: 1 - 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 &611575448 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 611575446} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Navigation: - m_Mode: 3 - 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_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_DisabledSprite: {fileID: 0} - m_AnimationTriggers: - m_NormalTrigger: Normal - m_HighlightedTrigger: Highlighted - m_PressedTrigger: Pressed - m_DisabledTrigger: Disabled - m_Interactable: 1 - m_TargetGraphic: {fileID: 611575449} - m_OnClick: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, - Culture=neutral, PublicKeyToken=null ---- !u!114 &611575449 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 611575446} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - 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 ---- !u!222 &611575450 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 611575446} ---- !u!1 &625561980 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 - m_Component: - - 224: {fileID: 625561981} - - 222: {fileID: 625561983} - - 114: {fileID: 625561982} - m_Layer: 5 - m_Name: Panel - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &625561981 -RectTransform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 625561980} - 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: 852345257} - - {fileID: 650625965} - - {fileID: 80191140} - m_Father: {fileID: 895588078} - m_RootOrder: 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 &625561982 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 625561980} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 0.392} - m_RaycastTarget: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0} - m_Type: 1 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 ---- !u!222 &625561983 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 625561980} ---- !u!1 &650625964 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 - m_Component: - - 224: {fileID: 650625965} - - 114: {fileID: 650625966} - m_Layer: 5 - m_Name: InputArea - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &650625965 -RectTransform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 650625964} - 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: 566049661} - - {fileID: 611575447} - - {fileID: 2136645852} - m_Father: {fileID: 625561981} - m_RootOrder: 1 - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 0} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 50} - m_Pivot: {x: 0.5, y: 0} ---- !u!114 &650625966 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 650625964} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: -405508275, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Padding: - m_Left: 0 - m_Right: 0 - m_Top: 0 - m_Bottom: 0 - m_ChildAlignment: 0 - m_Spacing: 0 - m_ChildForceExpandWidth: 1 - m_ChildForceExpandHeight: 1 ---- !u!1 &721405893 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 - m_Component: - - 224: {fileID: 721405894} - - 222: {fileID: 721405896} - - 114: {fileID: 721405895} - m_Layer: 5 - m_Name: Text - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &721405894 -RectTransform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 721405893} - 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: 611575447} - m_RootOrder: 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 &721405895 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 721405893} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, 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_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - 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: Add ---- !u!222 &721405896 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 721405893} ---- !u!1 &852345256 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 - m_Component: - - 224: {fileID: 852345257} - - 222: {fileID: 852345259} - - 114: {fileID: 852345258} - m_Layer: 5 - m_Name: Title - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &852345257 -RectTransform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 852345256} - 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: 625561981} - m_RootOrder: 0 - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 120} - m_Pivot: {x: 0, y: 1} ---- !u!114 &852345258 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 852345256} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, 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_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - m_FontData: - m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} - m_FontSize: 30 - m_FontStyle: 0 - m_BestFit: 0 - m_MinSize: 10 - m_MaxSize: 40 - m_Alignment: 0 - m_AlignByGeometry: 0 - m_RichText: 0 - m_HorizontalOverflow: 0 - m_VerticalOverflow: 0 - m_LineSpacing: 1 - m_Text: TODO App:) ---- !u!222 &852345259 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 852345256} ---- !u!1 &895588077 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 - m_Component: - - 224: {fileID: 895588078} - - 223: {fileID: 895588081} - - 114: {fileID: 895588080} - - 114: {fileID: 895588079} - m_Layer: 5 - m_Name: Canvas - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &895588078 -RectTransform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 895588077} - 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: 625561981} - m_Father: {fileID: 300470761} - m_RootOrder: 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 &895588079 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 895588077} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 1301386320, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} - m_Name: - m_EditorClassIdentifier: - m_IgnoreReversedGraphics: 1 - m_BlockingObjects: 0 - m_BlockingMask: - serializedVersion: 2 - m_Bits: 4294967295 ---- !u!114 &895588080 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 895588077} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 1980459831, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} - m_Name: - m_EditorClassIdentifier: - m_UiScaleMode: 0 - 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 ---- !u!223 &895588081 -Canvas: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 895588077} - m_Enabled: 1 - serializedVersion: 2 - m_RenderMode: 0 - m_Camera: {fileID: 0} - m_PlaneDistance: 100 - m_PixelPerfect: 0 - m_ReceivesEvents: 1 - m_OverrideSorting: 0 - m_OverridePixelPerfect: 0 - m_SortingLayerID: 0 - m_SortingOrder: 0 - m_TargetDisplay: 0 ---- !u!1 &1368145204 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 - m_Component: - - 224: {fileID: 1368145207} - - 222: {fileID: 1368145206} - - 114: {fileID: 1368145205} - m_Layer: 5 - m_Name: Text - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &1368145205 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1368145204} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, 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_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - 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: 0 - m_AlignByGeometry: 0 - m_RichText: 0 - m_HorizontalOverflow: 0 - m_VerticalOverflow: 0 - m_LineSpacing: 1 - m_Text: ---- !u!222 &1368145206 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1368145204} ---- !u!224 &1368145207 -RectTransform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1368145204} - 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: 566049661} - m_RootOrder: 1 - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: -0.5} - m_SizeDelta: {x: -20, y: -13} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!1 &2074703090 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 - m_Component: - - 4: {fileID: 2074703095} - - 20: {fileID: 2074703094} - - 92: {fileID: 2074703093} - - 124: {fileID: 2074703092} - - 81: {fileID: 2074703091} - m_Layer: 0 - m_Name: Main Camera - m_TagString: MainCamera - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!81 &2074703091 -AudioListener: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 2074703090} - m_Enabled: 1 ---- !u!124 &2074703092 -Behaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 2074703090} - m_Enabled: 1 ---- !u!92 &2074703093 -Behaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 2074703090} - m_Enabled: 1 ---- !u!20 &2074703094 -Camera: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 2074703090} - m_Enabled: 1 - serializedVersion: 2 - m_ClearFlags: 1 - m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0.019607844} - 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: 1 - 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: 0 - m_OcclusionCulling: 1 - m_StereoConvergence: 10 - m_StereoSeparation: 0.022 - m_StereoMirrorMode: 0 ---- !u!4 &2074703095 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 2074703090} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: -10} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 0 ---- !u!1 &2102338787 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 - m_Component: - - 224: {fileID: 2102338788} - - 222: {fileID: 2102338790} - - 114: {fileID: 2102338789} - m_Layer: 5 - m_Name: Placeholder - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &2102338788 -RectTransform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 2102338787} - 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: 566049661} - m_RootOrder: 0 - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: -0.5} - m_SizeDelta: {x: -20, y: -13} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &2102338789 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 2102338787} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 0.5} - m_RaycastTarget: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - m_FontData: - m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} - m_FontSize: 14 - m_FontStyle: 2 - m_BestFit: 0 - m_MinSize: 10 - m_MaxSize: 40 - m_Alignment: 0 - m_AlignByGeometry: 0 - m_RichText: 1 - m_HorizontalOverflow: 0 - m_VerticalOverflow: 0 - m_LineSpacing: 1 - m_Text: What needs to be done? ---- !u!222 &2102338790 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 2102338787} ---- !u!1 &2136645851 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 4 - m_Component: - - 224: {fileID: 2136645852} - - 222: {fileID: 2136645855} - - 114: {fileID: 2136645854} - - 114: {fileID: 2136645853} - m_Layer: 5 - m_Name: ClearButton - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &2136645852 -RectTransform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 2136645851} - 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: 48390800} - m_Father: {fileID: 650625965} - m_RootOrder: 2 - 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 &2136645853 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 2136645851} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Navigation: - m_Mode: 3 - 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_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_DisabledSprite: {fileID: 0} - m_AnimationTriggers: - m_NormalTrigger: Normal - m_HighlightedTrigger: Highlighted - m_PressedTrigger: Pressed - m_DisabledTrigger: Disabled - m_Interactable: 1 - m_TargetGraphic: {fileID: 2136645854} - m_OnClick: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, - Culture=neutral, PublicKeyToken=null ---- !u!114 &2136645854 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 2136645851} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - 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 ---- !u!222 &2136645855 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 2136645851} diff --git a/Assets/Plugins/UniRx/Examples/Sample13Scene.unity.meta b/Assets/Plugins/UniRx/Examples/Sample13Scene.unity.meta deleted file mode 100644 index 705d042..0000000 --- a/Assets/Plugins/UniRx/Examples/Sample13Scene.unity.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: b879645f640b02b43a8e78e210c1da1f -timeCreated: 1455373896 -licenseType: Pro -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Examples/Sample13_ToDoApp.cs b/Assets/Plugins/UniRx/Examples/Sample13_ToDoApp.cs deleted file mode 100644 index 0ee70b6..0000000 --- a/Assets/Plugins/UniRx/Examples/Sample13_ToDoApp.cs +++ /dev/null @@ -1,68 +0,0 @@ -// for uGUI(from 4.6) -#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) - -using System.Linq; -using UnityEngine; -using UnityEngine.UI; -using System.Collections; -using UnityEngine.EventSystems; - -namespace UniRx.Examples -{ - public class Sample13_ToDoApp : MonoBehaviour - { - // Open Sample13Scene. Set from canvas - public Text Title; - public InputField ToDoInput; - public Button AddButton; - public Button ClearButton; - public GameObject TodoList; - - // prefab:) - public GameObject SampleItemPrefab; - - ReactiveCollection toDos = new ReactiveCollection(); - - void Start() - { - // merge Button click and push enter key on input field. - var submit = Observable.Merge( - AddButton.OnClickAsObservable().Select(_ => ToDoInput.text), - ToDoInput.OnEndEditAsObservable().Where(_ => Input.GetKeyDown(KeyCode.Return))); - - // add to reactive collection - submit.Where(x => x != "") - .Subscribe(x => - { - ToDoInput.text = ""; // clear input field - var item = Instantiate(SampleItemPrefab) as GameObject; - (item.GetComponentInChildren(typeof(Text)) as Text).text = x; - toDos.Add(item); - }); - - // Collection Change Handling - toDos.ObserveCountChanged().Subscribe(x => Title.text = "TODO App, ItemCount:" + x); - toDos.ObserveAdd().Subscribe(x => - { - x.Value.transform.SetParent(TodoList.transform, false); - }); - toDos.ObserveRemove().Subscribe(x => - { - GameObject.Destroy(x.Value); - }); - - // Clear - ClearButton.OnClickAsObservable() - .Subscribe(_ => - { - var removeTargets = toDos.Where(x => x.GetComponent().isOn).ToArray(); - foreach (var item in removeTargets) - { - toDos.Remove(item); - } - }); - } - } -} - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Examples/Sample13_ToDoApp.cs.meta b/Assets/Plugins/UniRx/Examples/Sample13_ToDoApp.cs.meta deleted file mode 100644 index c240011..0000000 --- a/Assets/Plugins/UniRx/Examples/Sample13_ToDoApp.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 022ecfa555367154c8cf87d61465f7e2 -timeCreated: 1455373897 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Examples/Sample13_ToDoItem.prefab b/Assets/Plugins/UniRx/Examples/Sample13_ToDoItem.prefab deleted file mode 100644 index bd545c6..0000000 --- a/Assets/Plugins/UniRx/Examples/Sample13_ToDoItem.prefab +++ /dev/null @@ -1,284 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1 &152834 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 4 - m_Component: - - 224: {fileID: 22461494} - - 222: {fileID: 22298102} - - 114: {fileID: 11434412} - m_Layer: 5 - m_Name: Background - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &172388 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 4 - m_Component: - - 224: {fileID: 22491898} - - 222: {fileID: 22251748} - - 114: {fileID: 11438756} - m_Layer: 5 - m_Name: Label - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &174974 -GameObject: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 4 - m_Component: - - 224: {fileID: 22463654} - - 222: {fileID: 22278786} - - 114: {fileID: 11497312} - m_Layer: 5 - m_Name: Checkmark - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1 &182208 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - serializedVersion: 4 - m_Component: - - 224: {fileID: 22478562} - - 114: {fileID: 11479148} - m_Layer: 5 - m_Name: Sample13_ToDoItem - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &11434412 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 152834} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - 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 ---- !u!114 &11438756 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 172388} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: .196078435, g: .196078435, b: .196078435, a: 1} - m_FontData: - m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} - m_FontSize: 30 - m_FontStyle: 0 - m_BestFit: 0 - m_MinSize: 10 - m_MaxSize: 40 - m_Alignment: 0 - m_RichText: 1 - m_HorizontalOverflow: 0 - m_VerticalOverflow: 0 - m_LineSpacing: 1 - m_Text: 'TODOITEM - -' ---- !u!114 &11479148 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 182208} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 2109663825, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Navigation: - m_Mode: 3 - 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: .960784316, g: .960784316, b: .960784316, a: 1} - m_PressedColor: {r: .784313738, g: .784313738, b: .784313738, a: 1} - m_DisabledColor: {r: .784313738, g: .784313738, b: .784313738, a: .501960814} - m_ColorMultiplier: 1 - m_FadeDuration: .100000001 - m_SpriteState: - m_HighlightedSprite: {fileID: 0} - m_PressedSprite: {fileID: 0} - m_DisabledSprite: {fileID: 0} - m_AnimationTriggers: - m_NormalTrigger: Normal - m_HighlightedTrigger: Highlighted - m_PressedTrigger: Pressed - m_DisabledTrigger: Disabled - m_Interactable: 1 - m_TargetGraphic: {fileID: 11434412} - toggleTransition: 1 - graphic: {fileID: 11497312} - m_Group: {fileID: 0} - onValueChanged: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.Toggle+ToggleEvent, UnityEngine.UI, Version=1.0.0.0, - Culture=neutral, PublicKeyToken=null - m_IsOn: 1 ---- !u!114 &11497312 -MonoBehaviour: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 174974} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_Sprite: {fileID: 10901, guid: 0000000000000000f000000000000000, type: 0} - m_Type: 0 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 ---- !u!222 &22251748 -CanvasRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 172388} ---- !u!222 &22278786 -CanvasRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 174974} ---- !u!222 &22298102 -CanvasRenderer: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 152834} ---- !u!224 &22461494 -RectTransform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 152834} - 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: 22463654} - m_Father: {fileID: 22478562} - m_RootOrder: 0 - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 10, y: -10} - m_SizeDelta: {x: 20, y: 30} - m_Pivot: {x: .5, y: .5} ---- !u!224 &22463654 -RectTransform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 174974} - 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: 22461494} - m_RootOrder: 0 - m_AnchorMin: {x: .5, y: .5} - m_AnchorMax: {x: .5, y: .5} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 20, y: 30} - m_Pivot: {x: .5, y: .5} ---- !u!224 &22478562 -RectTransform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 182208} - 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: 22461494} - - {fileID: 22491898} - m_Father: {fileID: 0} - m_RootOrder: 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: .5, y: .5} ---- !u!224 &22491898 -RectTransform: - m_ObjectHideFlags: 1 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 100100000} - m_GameObject: {fileID: 172388} - 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: 22478562} - m_RootOrder: 1 - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 9, y: -.5} - m_SizeDelta: {x: -28, y: -3} - m_Pivot: {x: .5, y: .5} ---- !u!1001 &100100000 -Prefab: - m_ObjectHideFlags: 1 - serializedVersion: 2 - m_Modification: - m_TransformParent: {fileID: 0} - m_Modifications: [] - m_RemovedComponents: [] - m_ParentPrefab: {fileID: 0} - m_RootGameObject: {fileID: 182208} - m_IsPrefabParent: 1 diff --git a/Assets/Plugins/UniRx/Examples/Sample13_ToDoItem.prefab.meta b/Assets/Plugins/UniRx/Examples/Sample13_ToDoItem.prefab.meta deleted file mode 100644 index bac13bc..0000000 --- a/Assets/Plugins/UniRx/Examples/Sample13_ToDoItem.prefab.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 173222196f3e1f0448b383f260df7d44 -timeCreated: 1455373909 -licenseType: Pro -NativeFormatImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Examples/UniRx.Examples.asmdef b/Assets/Plugins/UniRx/Examples/UniRx.Examples.asmdef deleted file mode 100644 index 04d0566..0000000 --- a/Assets/Plugins/UniRx/Examples/UniRx.Examples.asmdef +++ /dev/null @@ -1,13 +0,0 @@ -{ - "name": "UniRx.Examples", - "references": [ - "UniRx", - "UniRx.Async" - ], - "optionalUnityReferences": [ - "TestAssemblies" - ], - "includePlatforms": [], - "excludePlatforms": [], - "allowUnsafeCode": false -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Examples/UniRx.Examples.asmdef.meta b/Assets/Plugins/UniRx/Examples/UniRx.Examples.asmdef.meta deleted file mode 100644 index 051ec31..0000000 --- a/Assets/Plugins/UniRx/Examples/UniRx.Examples.asmdef.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 71799519d12379b49b6b53aea974bea5 -AssemblyDefinitionImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/ReadMe.txt b/Assets/Plugins/UniRx/ReadMe.txt deleted file mode 100644 index f32cbda..0000000 --- a/Assets/Plugins/UniRx/ReadMe.txt +++ /dev/null @@ -1,29 +0,0 @@ -UniRx - Reactive Extensions for Unity / Ver 6.2.2 -=== -Created by Yoshifumi Kawai(neuecc) - -UniRx (Reactive Extensions for Unity) is a reimplementation of the .NET Reactive Extensions. -UniRx is Core Library (Port of Rx) + Platform Adaptor (MainThreadScheduler/FromCoroutine/etc) + Framework (ObservableTriggers/ReactiveProeperty/etc) + async/await integration(UniRx.Async) - -Please read Official Site's ReadMe(Manual) - https://github.com/neuecc/UniRx/ - -UniRx is available on the Unity Asset Store (FREE) - http://u3d.as/content/neuecc/uni-rx-reactive-extensions-for-unity/7tT -Blog for update info - https://medium.com/@neuecc - -Support thread on the Unity Forums: Ask me any question - http://forum.unity3d.com/threads/248535-UniRx-Reactive-Extensions-for-Unity -Release Notes, see [UniRx/releases](https://github.com/neuecc/UniRx/releases) - -Author Info ---- -Yoshifumi Kawai(a.k.a. neuecc) is a software developer in Japan. -He is awarding Microsoft MVP for Visual C# since 2011. - -Blog: https://medium.com/@neuecc (English) -Blog: http://neue.cc/ (Japanese) -Twitter: https://twitter.com/neuecc (Japanese) - -License ---- -This library is under the [MIT License](https://github.com/neuecc/UniRx/blob/master/LICENSE). - -Some code is borrowed from [Rx.NET](https://rx.codeplex.com/) and [mono/mcs](https://github.com/mono/mono). diff --git a/Assets/Plugins/UniRx/ReadMe.txt.meta b/Assets/Plugins/UniRx/ReadMe.txt.meta deleted file mode 100644 index 13251e7..0000000 --- a/Assets/Plugins/UniRx/ReadMe.txt.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 52d665ea30c2a3a49a6fa4b3b5a0349a -timeCreated: 1455373909 -licenseType: Pro -TextScriptImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts.meta b/Assets/Plugins/UniRx/Scripts.meta deleted file mode 100644 index 3bc2f67..0000000 --- a/Assets/Plugins/UniRx/Scripts.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 37df35081ab01f047a79d21a93dd2b20 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async.meta b/Assets/Plugins/UniRx/Scripts/Async.meta deleted file mode 100644 index 9d21eee..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: f3b7fbeed6becb444b885432174f59c3 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/AsyncUnit.cs b/Assets/Plugins/UniRx/Scripts/Async/AsyncUnit.cs deleted file mode 100644 index 0898771..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/AsyncUnit.cs +++ /dev/null @@ -1,28 +0,0 @@ -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or - -using System; - -namespace UniRx.Async -{ - public struct AsyncUnit : IEquatable - { - public static readonly AsyncUnit Default = new AsyncUnit(); - - public override int GetHashCode() - { - return 0; - } - - public bool Equals(AsyncUnit other) - { - return true; - } - - public override string ToString() - { - return "()"; - } - } -} -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Async/AsyncUnit.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/AsyncUnit.cs.meta deleted file mode 100644 index 54de077..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/AsyncUnit.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 4f95ac245430d304bb5128d13b6becc8 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/CancellationTokenEqualityComparer.cs b/Assets/Plugins/UniRx/Scripts/Async/CancellationTokenEqualityComparer.cs deleted file mode 100644 index ad17cf5..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/CancellationTokenEqualityComparer.cs +++ /dev/null @@ -1,25 +0,0 @@ -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using System.Collections.Generic; -using System.Threading; - -namespace UniRx.Async -{ - public class CancellationTokenEqualityComparer : IEqualityComparer - { - public static readonly IEqualityComparer Default = new CancellationTokenEqualityComparer(); - - public bool Equals(CancellationToken x, CancellationToken y) - { - return x.Equals(y); - } - - public int GetHashCode(CancellationToken obj) - { - return obj.GetHashCode(); - } - } -} - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Async/CancellationTokenEqualityComparer.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/CancellationTokenEqualityComparer.cs.meta deleted file mode 100644 index c3ba3e3..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/CancellationTokenEqualityComparer.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 7d739f510b125b74fa7290ac4335e46e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/CancellationTokenExtensions.cs b/Assets/Plugins/UniRx/Scripts/Async/CancellationTokenExtensions.cs deleted file mode 100644 index 3b157ac..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/CancellationTokenExtensions.cs +++ /dev/null @@ -1,76 +0,0 @@ -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using System; -using System.Threading; - -namespace UniRx.Async -{ - public static class CancellationTokenExtensions - { - static readonly Action cancellationTokenCallback = Callback; - - public static (UniTask, CancellationTokenRegistration) ToUniTask(this CancellationToken cts) - { - if (cts.IsCancellationRequested) - { - return (UniTask.FromCanceled(cts), default(CancellationTokenRegistration)); - } - - var promise = new UniTaskCompletionSource(); - return (promise.Task, cts.RegisterWithoutCaptureExecutionContext(cancellationTokenCallback, promise)); - } - - static void Callback(object state) - { - var promise = (UniTaskCompletionSource)state; - promise.TrySetResult(AsyncUnit.Default); - } - - public static CancellationTokenRegistration RegisterWithoutCaptureExecutionContext(this CancellationToken cancellationToken, Action callback) - { - var restoreFlow = false; - if (!ExecutionContext.IsFlowSuppressed()) - { - ExecutionContext.SuppressFlow(); - restoreFlow = true; - } - - try - { - return cancellationToken.Register(callback, false); - } - finally - { - if (restoreFlow) - { - ExecutionContext.RestoreFlow(); - } - } - } - - public static CancellationTokenRegistration RegisterWithoutCaptureExecutionContext(this CancellationToken cancellationToken, Action callback, object state) - { - var restoreFlow = false; - if (!ExecutionContext.IsFlowSuppressed()) - { - ExecutionContext.SuppressFlow(); - restoreFlow = true; - } - - try - { - return cancellationToken.Register(callback, state, false); - } - finally - { - if (restoreFlow) - { - ExecutionContext.RestoreFlow(); - } - } - } - } -} - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Async/CancellationTokenExtensions.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/CancellationTokenExtensions.cs.meta deleted file mode 100644 index 28a6958..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/CancellationTokenExtensions.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 4be7209f04146bd45ac5ee775a5f7c26 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/CancellationTokenSourceExtensions.cs b/Assets/Plugins/UniRx/Scripts/Async/CancellationTokenSourceExtensions.cs deleted file mode 100644 index 574fb08..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/CancellationTokenSourceExtensions.cs +++ /dev/null @@ -1,48 +0,0 @@ -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using System.Threading; -using UnityEngine; -using UniRx.Async.Triggers; -using System; - -namespace UniRx.Async -{ - public static class CancellationTokenSourceExtensions - { - public static void CancelAfterSlim(this CancellationTokenSource cts, int millisecondsDelay, bool ignoreTimeScale = false, PlayerLoopTiming delayTiming = PlayerLoopTiming.Update) - { - var delay = UniTask.Delay(millisecondsDelay, ignoreTimeScale, delayTiming, cts.Token); - CancelAfterCore(cts, delay).Forget(); - } - - public static void CancelAfterSlim(this CancellationTokenSource cts, TimeSpan delayTimeSpan, bool ignoreTimeScale = false, PlayerLoopTiming delayTiming = PlayerLoopTiming.Update) - { - var delay = UniTask.Delay(delayTimeSpan, ignoreTimeScale, delayTiming, cts.Token); - CancelAfterCore(cts, delay).Forget(); - } - - static async UniTaskVoid CancelAfterCore(CancellationTokenSource cts, UniTask delayTask) - { - var alreadyCanceled = await delayTask.SuppressCancellationThrow(); - if (!alreadyCanceled) - { - cts.Cancel(); - cts.Dispose(); - } - } - - public static void RegisterRaiseCancelOnDestroy(this CancellationTokenSource cts, Component component) - { - RegisterRaiseCancelOnDestroy(cts, component.gameObject); - } - - public static void RegisterRaiseCancelOnDestroy(this CancellationTokenSource cts, GameObject gameObject) - { - var trigger = gameObject.GetAsyncDestroyTrigger(); - trigger.AddCancellationTriggerOnDestory(cts); - } - } -} - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Async/CancellationTokenSourceExtensions.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/CancellationTokenSourceExtensions.cs.meta deleted file mode 100644 index b08c61d..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/CancellationTokenSourceExtensions.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 22d85d07f1e70ab42a7a4c25bd65e661 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/CompilerServices.meta b/Assets/Plugins/UniRx/Scripts/Async/CompilerServices.meta deleted file mode 100644 index b3f9410..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/CompilerServices.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 8d8816dbda943f9469832859edeabd79 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/CompilerServices/AsyncMethodBuilderAttribute.cs b/Assets/Plugins/UniRx/Scripts/Async/CompilerServices/AsyncMethodBuilderAttribute.cs deleted file mode 100644 index 47692fc..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/CompilerServices/AsyncMethodBuilderAttribute.cs +++ /dev/null @@ -1,18 +0,0 @@ -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) - -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -namespace System.Runtime.CompilerServices -{ - public sealed class AsyncMethodBuilderAttribute : Attribute - { - public Type BuilderType { get; } - - public AsyncMethodBuilderAttribute(Type builderType) - { - BuilderType = builderType; - } - } -} - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Async/CompilerServices/AsyncMethodBuilderAttribute.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/CompilerServices/AsyncMethodBuilderAttribute.cs.meta deleted file mode 100644 index 82f7935..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/CompilerServices/AsyncMethodBuilderAttribute.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 02ce354d37b10454e8376062f7cbe57a -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/CompilerServices/AsyncUniTaskMethodBuilder.cs b/Assets/Plugins/UniRx/Scripts/Async/CompilerServices/AsyncUniTaskMethodBuilder.cs deleted file mode 100644 index 93c3e47..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/CompilerServices/AsyncUniTaskMethodBuilder.cs +++ /dev/null @@ -1,274 +0,0 @@ -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) - -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using System; -using System.Diagnostics; -using System.Runtime.CompilerServices; -using System.Security; - -namespace UniRx.Async.CompilerServices -{ - public struct AsyncUniTaskMethodBuilder - { - UniTaskCompletionSource promise; - Action moveNext; - - // 1. Static Create method. - [DebuggerHidden] - public static AsyncUniTaskMethodBuilder Create() - { - var builder = new AsyncUniTaskMethodBuilder(); - return builder; - } - - // 2. TaskLike Task property. - [DebuggerHidden] - public UniTask Task - { - get - { - if (promise != null) - { - return promise.Task; - } - - if (moveNext == null) - { - return UniTask.CompletedTask; - } - else - { - promise = new UniTaskCompletionSource(); - return promise.Task; - } - } - } - - // 3. SetException - [DebuggerHidden] - public void SetException(Exception exception) - { - if (promise == null) - { - promise = new UniTaskCompletionSource(); - } - if (exception is OperationCanceledException ex) - { - promise.TrySetCanceled(ex); - } - else - { - promise.TrySetException(exception); - } - } - - // 4. SetResult - [DebuggerHidden] - public void SetResult() - { - if (moveNext == null) - { - } - else - { - if (promise == null) - { - promise = new UniTaskCompletionSource(); - } - promise.TrySetResult(); - } - } - - // 5. AwaitOnCompleted - [DebuggerHidden] - public void AwaitOnCompleted(ref TAwaiter awaiter, ref TStateMachine stateMachine) - where TAwaiter : INotifyCompletion - where TStateMachine : IAsyncStateMachine - { - if (moveNext == null) - { - if (promise == null) - { - promise = new UniTaskCompletionSource(); // built future. - } - - var runner = new MoveNextRunner(); - moveNext = runner.Run; - runner.StateMachine = stateMachine; // set after create delegate. - } - - awaiter.OnCompleted(moveNext); - } - - // 6. AwaitUnsafeOnCompleted - [DebuggerHidden] - [SecuritySafeCritical] - public void AwaitUnsafeOnCompleted(ref TAwaiter awaiter, ref TStateMachine stateMachine) - where TAwaiter : ICriticalNotifyCompletion - where TStateMachine : IAsyncStateMachine - { - if (moveNext == null) - { - if (promise == null) - { - promise = new UniTaskCompletionSource(); // built future. - } - - var runner = new MoveNextRunner(); - moveNext = runner.Run; - runner.StateMachine = stateMachine; // set after create delegate. - } - - awaiter.UnsafeOnCompleted(moveNext); - } - - // 7. Start - [DebuggerHidden] - public void Start(ref TStateMachine stateMachine) - where TStateMachine : IAsyncStateMachine - { - stateMachine.MoveNext(); - } - - // 8. SetStateMachine - [DebuggerHidden] - public void SetStateMachine(IAsyncStateMachine stateMachine) - { - } - } - - - public struct AsyncUniTaskMethodBuilder - { - T result; - UniTaskCompletionSource promise; - Action moveNext; - - // 1. Static Create method. - [DebuggerHidden] - public static AsyncUniTaskMethodBuilder Create() - { - var builder = new AsyncUniTaskMethodBuilder(); - return builder; - } - - // 2. TaskLike Task property. - [DebuggerHidden] - public UniTask Task - { - get - { - if (promise != null) - { - return new UniTask(promise); - } - - if (moveNext == null) - { - return new UniTask(result); - } - else - { - promise = new UniTaskCompletionSource(); - return new UniTask(promise); - } - } - } - - // 3. SetException - [DebuggerHidden] - public void SetException(Exception exception) - { - if (promise == null) - { - promise = new UniTaskCompletionSource(); - } - if (exception is OperationCanceledException ex) - { - promise.TrySetCanceled(ex); - } - else - { - promise.TrySetException(exception); - } - } - - // 4. SetResult - [DebuggerHidden] - public void SetResult(T result) - { - if (moveNext == null) - { - this.result = result; - } - else - { - if (promise == null) - { - promise = new UniTaskCompletionSource(); - } - promise.TrySetResult(result); - } - } - - // 5. AwaitOnCompleted - [DebuggerHidden] - public void AwaitOnCompleted(ref TAwaiter awaiter, ref TStateMachine stateMachine) - where TAwaiter : INotifyCompletion - where TStateMachine : IAsyncStateMachine - { - if (moveNext == null) - { - if (promise == null) - { - promise = new UniTaskCompletionSource(); // built future. - } - - var runner = new MoveNextRunner(); - moveNext = runner.Run; - runner.StateMachine = stateMachine; // set after create delegate. - } - - awaiter.OnCompleted(moveNext); - } - - // 6. AwaitUnsafeOnCompleted - [DebuggerHidden] - [SecuritySafeCritical] - public void AwaitUnsafeOnCompleted(ref TAwaiter awaiter, ref TStateMachine stateMachine) - where TAwaiter : ICriticalNotifyCompletion - where TStateMachine : IAsyncStateMachine - { - if (moveNext == null) - { - if (promise == null) - { - promise = new UniTaskCompletionSource(); // built future. - } - - var runner = new MoveNextRunner(); - moveNext = runner.Run; - runner.StateMachine = stateMachine; // set after create delegate. - } - - awaiter.UnsafeOnCompleted(moveNext); - } - - // 7. Start - [DebuggerHidden] - public void Start(ref TStateMachine stateMachine) - where TStateMachine : IAsyncStateMachine - { - stateMachine.MoveNext(); - } - - // 8. SetStateMachine - [DebuggerHidden] - public void SetStateMachine(IAsyncStateMachine stateMachine) - { - } - } -} - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Async/CompilerServices/AsyncUniTaskMethodBuilder.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/CompilerServices/AsyncUniTaskMethodBuilder.cs.meta deleted file mode 100644 index f60d502..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/CompilerServices/AsyncUniTaskMethodBuilder.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 68d72a45afdec574ebc26e7de2c38330 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/CompilerServices/AsyncUniTaskVoidMethodBuilder.cs b/Assets/Plugins/UniRx/Scripts/Async/CompilerServices/AsyncUniTaskVoidMethodBuilder.cs deleted file mode 100644 index 52d2c72..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/CompilerServices/AsyncUniTaskVoidMethodBuilder.cs +++ /dev/null @@ -1,90 +0,0 @@ -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) - -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using System; -using System.Diagnostics; -using System.Runtime.CompilerServices; -using System.Security; - -namespace UniRx.Async.CompilerServices -{ - public struct AsyncUniTaskVoidMethodBuilder - { - Action moveNext; - - // 1. Static Create method. - [DebuggerHidden] - public static AsyncUniTaskVoidMethodBuilder Create() - { - var builder = new AsyncUniTaskVoidMethodBuilder(); - return builder; - } - - // 2. TaskLike Task property(void) - public UniTaskVoid Task => default(UniTaskVoid); - - // 3. SetException - [DebuggerHidden] - public void SetException(Exception exception) - { - UniTaskScheduler.PublishUnobservedTaskException(exception); - } - - // 4. SetResult - [DebuggerHidden] - public void SetResult() - { - // do nothing - } - - // 5. AwaitOnCompleted - [DebuggerHidden] - public void AwaitOnCompleted(ref TAwaiter awaiter, ref TStateMachine stateMachine) - where TAwaiter : INotifyCompletion - where TStateMachine : IAsyncStateMachine - { - if (moveNext == null) - { - var runner = new MoveNextRunner(); - moveNext = runner.Run; - runner.StateMachine = stateMachine; // set after create delegate. - } - - awaiter.OnCompleted(moveNext); - } - - // 6. AwaitUnsafeOnCompleted - [DebuggerHidden] - [SecuritySafeCritical] - public void AwaitUnsafeOnCompleted(ref TAwaiter awaiter, ref TStateMachine stateMachine) - where TAwaiter : ICriticalNotifyCompletion - where TStateMachine : IAsyncStateMachine - { - if (moveNext == null) - { - var runner = new MoveNextRunner(); - moveNext = runner.Run; - runner.StateMachine = stateMachine; // set after create delegate. - } - - awaiter.UnsafeOnCompleted(moveNext); - } - - // 7. Start - [DebuggerHidden] - public void Start(ref TStateMachine stateMachine) - where TStateMachine : IAsyncStateMachine - { - stateMachine.MoveNext(); - } - - // 8. SetStateMachine - [DebuggerHidden] - public void SetStateMachine(IAsyncStateMachine stateMachine) - { - } - } -} - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Async/CompilerServices/AsyncUniTaskVoidMethodBuilder.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/CompilerServices/AsyncUniTaskVoidMethodBuilder.cs.meta deleted file mode 100644 index 9b9e8a0..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/CompilerServices/AsyncUniTaskVoidMethodBuilder.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: e891aaac17b933a47a9d7fa3b8e1226f -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/CompilerServices/MoveNextRunner.cs b/Assets/Plugins/UniRx/Scripts/Async/CompilerServices/MoveNextRunner.cs deleted file mode 100644 index a6f146e..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/CompilerServices/MoveNextRunner.cs +++ /dev/null @@ -1,23 +0,0 @@ -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) - -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using System.Diagnostics; -using System.Runtime.CompilerServices; - -namespace UniRx.Async.CompilerServices -{ - internal class MoveNextRunner - where TStateMachine : IAsyncStateMachine - { - public TStateMachine StateMachine; - - [DebuggerHidden] - public void Run() - { - StateMachine.MoveNext(); - } - } -} - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Async/CompilerServices/MoveNextRunner.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/CompilerServices/MoveNextRunner.cs.meta deleted file mode 100644 index 081f844..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/CompilerServices/MoveNextRunner.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 98649642833cabf44a9dc060ce4c84a1 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/DiagnosticsExtensions.cs b/Assets/Plugins/UniRx/Scripts/Async/DiagnosticsExtensions.cs deleted file mode 100644 index 002929b..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/DiagnosticsExtensions.cs +++ /dev/null @@ -1,270 +0,0 @@ -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Globalization; -using System.IO; -using System.Linq; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Security; -using System.Text; -using System.Text.RegularExpressions; -using System.Threading.Tasks; - -namespace UniRx.Async -{ - public static class DiagnosticsExtensions - { - static bool displayFilenames = true; - - static readonly Regex typeBeautifyRegex = new Regex("`.+$", RegexOptions.Compiled); - - static readonly Dictionary builtInTypeNames = new Dictionary - { - { typeof(void), "void" }, - { typeof(bool), "bool" }, - { typeof(byte), "byte" }, - { typeof(char), "char" }, - { typeof(decimal), "decimal" }, - { typeof(double), "double" }, - { typeof(float), "float" }, - { typeof(int), "int" }, - { typeof(long), "long" }, - { typeof(object), "object" }, - { typeof(sbyte), "sbyte" }, - { typeof(short), "short" }, - { typeof(string), "string" }, - { typeof(uint), "uint" }, - { typeof(ulong), "ulong" }, - { typeof(ushort), "ushort" }, - { typeof(Task), "Task" }, - { typeof(UniTask), "UniTask" }, - { typeof(UniTaskVoid), "UniTaskVoid" } - }; - - public static string ToStringWithCleanupAsyncStackTrace(this Exception exception) - { - if (exception == null) return ""; - - String message = exception.Message; - String s; - - if (message == null || message.Length <= 0) - { - s = exception.GetType().ToString(); - } - else - { - s = exception.GetType().ToString() + ": " + message; - } - - if (exception.InnerException != null) - { - s = s + " ---> " + exception.InnerException.ToString() + Environment.NewLine + " Exception_EndOfInnerExceptionStack"; - } - - string stackTrace = new StackTrace(exception).CleanupAsyncStackTrace(); - if (stackTrace != null) - { - s += Environment.NewLine + stackTrace; - } - - return s; - } - - public static string CleanupAsyncStackTrace(this StackTrace stackTrace) - { - if (stackTrace == null) return ""; - - var sb = new StringBuilder(); - for (int i = 0; i < stackTrace.FrameCount; i++) - { - var sf = stackTrace.GetFrame(i); - - var mb = sf.GetMethod(); - - if (IgnoreLine(mb)) continue; - if (IsAsync(mb)) - { - sb.Append("async "); - TryResolveStateMachineMethod(ref mb, out var decType); - } - - // return type - if (mb is MethodInfo mi) - { - sb.Append(BeautifyType(mi.ReturnType, false)); - sb.Append(" "); - } - - // method name - sb.Append(BeautifyType(mb.DeclaringType, false)); - if (!mb.IsConstructor) - { - sb.Append("."); - } - sb.Append(mb.Name); - if (mb.IsGenericMethod) - { - sb.Append("<"); - foreach (var item in mb.GetGenericArguments()) - { - sb.Append(BeautifyType(item, true)); - } - sb.Append(">"); - } - - // parameter - sb.Append("("); - sb.Append(string.Join(", ", mb.GetParameters().Select(p => BeautifyType(p.ParameterType, true) + " " + p.Name))); - sb.Append(")"); - - // file name - if (displayFilenames && (sf.GetILOffset() != -1)) - { - String fileName = null; - - try - { - fileName = sf.GetFileName(); - } - catch (NotSupportedException) - { - displayFilenames = false; - } - catch (SecurityException) - { - displayFilenames = false; - } - - if (fileName != null) - { - sb.Append(' '); - sb.AppendFormat(CultureInfo.InvariantCulture, "in {0}:{1}", SimplifyPath(fileName), sf.GetFileLineNumber()); - } - } - - sb.AppendLine(); - } - return sb.ToString(); - } - - - static bool IsAsync(MethodBase methodInfo) - { - var declareType = methodInfo.DeclaringType; - return typeof(IAsyncStateMachine).IsAssignableFrom(declareType); - } - - // code from Ben.Demystifier/EnhancedStackTrace.Frame.cs - static bool TryResolveStateMachineMethod(ref MethodBase method, out Type declaringType) - { - declaringType = method.DeclaringType; - - var parentType = declaringType.DeclaringType; - if (parentType == null) - { - return false; - } - - var methods = parentType.GetMethods(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance | BindingFlags.DeclaredOnly); - if (methods == null) - { - return false; - } - - foreach (var candidateMethod in methods) - { - var attributes = candidateMethod.GetCustomAttributes(); - if (attributes == null) - { - continue; - } - - foreach (var asma in attributes) - { - if (asma.StateMachineType == declaringType) - { - method = candidateMethod; - declaringType = candidateMethod.DeclaringType; - // Mark the iterator as changed; so it gets the + annotation of the original method - // async statemachines resolve directly to their builder methods so aren't marked as changed - return asma is IteratorStateMachineAttribute; - } - } - } - - return false; - } - - static string BeautifyType(Type t, bool shortName) - { - if (builtInTypeNames.TryGetValue(t, out var builtin)) - { - return builtin; - } - if (t.IsGenericParameter) return t.Name; - if (t.IsArray) return BeautifyType(t.GetElementType(), shortName) + "[]"; - if (t.FullName?.StartsWith("System.ValueTuple") ?? false) - { - return "(" + string.Join(", ", t.GetGenericArguments().Select(x => BeautifyType(x, true))) + ")"; - } - if (!t.IsGenericType) return shortName ? t.Name : t.FullName ?? t.Name; - - var innerFormat = string.Join(", ", t.GetGenericArguments().Select(x => BeautifyType(x, true))); - - var genericType = t.GetGenericTypeDefinition().FullName; - if (genericType == "System.Threading.Tasks.Task`1") - { - genericType = "Task"; - } - - return typeBeautifyRegex.Replace(genericType, "") + "<" + innerFormat + ">"; - } - - static bool IgnoreLine(MethodBase methodInfo) - { - var declareType = methodInfo.DeclaringType.FullName; - if (declareType == "System.Threading.ExecutionContext") - { - return true; - } - else if (declareType.StartsWith("System.Runtime.CompilerServices")) - { - return true; - } - else if (declareType.StartsWith("UniRx.Async.CompilerServices")) - { - return true; - } - else if (declareType == "System.Threading.Tasks.AwaitTaskContinuation") - { - return true; - } - else if (declareType.StartsWith("System.Threading.Tasks.Task")) - { - return true; - } - - return false; - } - - static string SimplifyPath(string path) - { - var fi = new FileInfo(path); - if (fi.Directory == null) - { - return fi.Name; - } - else - { - return fi.Directory.Name + "/" + fi.Name; - } - } - } -} - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Async/DiagnosticsExtensions.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/DiagnosticsExtensions.cs.meta deleted file mode 100644 index caa6333..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/DiagnosticsExtensions.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: f80fb1c9ed4c99447be1b0a47a8d980b -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/Editor.meta b/Assets/Plugins/UniRx/Scripts/Async/Editor.meta deleted file mode 100644 index b830d4a..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Editor.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: bcf5379e871408b4087821d13c9d65a0 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/Editor/SplitterGUILayout.cs b/Assets/Plugins/UniRx/Scripts/Async/Editor/SplitterGUILayout.cs deleted file mode 100644 index 33e796c..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Editor/SplitterGUILayout.cs +++ /dev/null @@ -1,64 +0,0 @@ -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using System; -using System.Linq; -using System.Reflection; -using UnityEditor; -using UnityEngine; - -namespace UniRx.Async.Editor -{ - // reflection call of UnityEditor.SplitterGUILayout - internal static class SplitterGUILayout - { - static BindingFlags flags = BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static; - - static Lazy splitterStateType = new Lazy(() => - { - var type = typeof(EditorWindow).Assembly.GetTypes().First(x => x.FullName == "UnityEditor.SplitterState"); - return type; - }); - - static Lazy splitterStateCtor = new Lazy(() => - { - var type = splitterStateType.Value; - return type.GetConstructor(flags, null, new Type[] { typeof(float[]), typeof(int[]), typeof(int[]) }, null); - }); - - static Lazy splitterGUILayoutType = new Lazy(() => - { - var type = typeof(EditorWindow).Assembly.GetTypes().First(x => x.FullName == "UnityEditor.SplitterGUILayout"); - return type; - }); - - static Lazy beginVerticalSplit = new Lazy(() => - { - var type = splitterGUILayoutType.Value; - return type.GetMethod("BeginVerticalSplit", flags, null, new Type[] { splitterStateType.Value, typeof(GUILayoutOption[]) }, null); - }); - - static Lazy endVerticalSplit = new Lazy(() => - { - var type = splitterGUILayoutType.Value; - return type.GetMethod("EndVerticalSplit", flags, null, Type.EmptyTypes, null); - }); - - public static object CreateSplitterState(float[] relativeSizes, int[] minSizes, int[] maxSizes) - { - return splitterStateCtor.Value.Invoke(new object[] { relativeSizes, minSizes, maxSizes }); - } - - public static void BeginVerticalSplit(object splitterState, params GUILayoutOption[] options) - { - beginVerticalSplit.Value.Invoke(null, new object[] { splitterState, options }); - } - - public static void EndVerticalSplit() - { - endVerticalSplit.Value.Invoke(null, Type.EmptyTypes); - } - } -} - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Async/Editor/SplitterGUILayout.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/Editor/SplitterGUILayout.cs.meta deleted file mode 100644 index c327343..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Editor/SplitterGUILayout.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 40ef2e46f900131419e869398a8d3c9d -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/Editor/UniRx.Async.Editor.asmdef b/Assets/Plugins/UniRx/Scripts/Async/Editor/UniRx.Async.Editor.asmdef deleted file mode 100644 index 5515264..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Editor/UniRx.Async.Editor.asmdef +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "UniRx.Async.Editor", - "references": [ - "UniRx.Async" - ], - "optionalUnityReferences": [], - "includePlatforms": [ - "Editor" - ], - "excludePlatforms": [], - "allowUnsafeCode": false -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Async/Editor/UniRx.Async.Editor.asmdef.meta b/Assets/Plugins/UniRx/Scripts/Async/Editor/UniRx.Async.Editor.asmdef.meta deleted file mode 100644 index 55efb13..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Editor/UniRx.Async.Editor.asmdef.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 4129704b5a1a13841ba16f230bf24a57 -AssemblyDefinitionImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/Editor/UniTaskTrackerTreeView.cs b/Assets/Plugins/UniRx/Scripts/Async/Editor/UniTaskTrackerTreeView.cs deleted file mode 100644 index a33d02e..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Editor/UniTaskTrackerTreeView.cs +++ /dev/null @@ -1,180 +0,0 @@ -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using UnityEngine; -using UnityEditor; -using System.Collections.Generic; -using System.Linq; -using System.Reflection; -using System; -using UnityEditor.IMGUI.Controls; -using UniRx.Async.Internal; -using System.Text; - -namespace UniRx.Async.Editor -{ - public class UniTaskTrackerViewItem : TreeViewItem - { - public string TaskType { get; set; } - public string Elapsed { get; set; } - public string Status { get; set; } - - string position; - public string Position - { - get { return position; } - set - { - position = value; - PositionFirstLine = GetFirstLine(position); - } - } - - public string PositionFirstLine { get; private set; } - - static string GetFirstLine(string str) - { - var sb = new StringBuilder(); - for (int i = 0; i < str.Length; i++) - { - if (str[i] == '\r' || str[i] == '\n') - { - break; - } - sb.Append(str[i]); - } - return sb.ToString(); - } - - public UniTaskTrackerViewItem(int id) : base(id) - { - - } - } - - public class UniTaskTrackerTreeView : TreeView - { - const string sortedColumnIndexStateKey = "UniTaskTrackerTreeView_sortedColumnIndex"; - - public IReadOnlyList CurrentBindingItems; - - public UniTaskTrackerTreeView() - : this(new TreeViewState(), new MultiColumnHeader(new MultiColumnHeaderState(new[] - { - new MultiColumnHeaderState.Column() { headerContent = new GUIContent("TaskType"), width = 20}, - new MultiColumnHeaderState.Column() { headerContent = new GUIContent("Elapsed"), width = 10}, - new MultiColumnHeaderState.Column() { headerContent = new GUIContent("Status"), width = 10}, - new MultiColumnHeaderState.Column() { headerContent = new GUIContent("Position")}, - }))) - { - } - - UniTaskTrackerTreeView(TreeViewState state, MultiColumnHeader header) - : base(state, header) - { - rowHeight = 20; - showAlternatingRowBackgrounds = true; - showBorder = true; - header.sortingChanged += Header_sortingChanged; - - header.ResizeToFit(); - Reload(); - - header.sortedColumnIndex = SessionState.GetInt(sortedColumnIndexStateKey, 1); - } - - public void ReloadAndSort() - { - var currentSelected = this.state.selectedIDs; - Reload(); - Header_sortingChanged(this.multiColumnHeader); - this.state.selectedIDs = currentSelected; - } - - private void Header_sortingChanged(MultiColumnHeader multiColumnHeader) - { - SessionState.SetInt(sortedColumnIndexStateKey, multiColumnHeader.sortedColumnIndex); - var index = multiColumnHeader.sortedColumnIndex; - var ascending = multiColumnHeader.IsSortedAscending(multiColumnHeader.sortedColumnIndex); - - var items = rootItem.children.Cast(); - - IOrderedEnumerable orderedEnumerable; - switch (index) - { - case 0: - orderedEnumerable = ascending ? items.OrderBy(item => item.TaskType) : items.OrderByDescending(item => item.TaskType); - break; - case 1: - orderedEnumerable = ascending ? items.OrderBy(item => double.Parse(item.Elapsed)) : items.OrderByDescending(item => double.Parse(item.Elapsed)); - break; - case 2: - orderedEnumerable = ascending ? items.OrderBy(item => item.Status) : items.OrderByDescending(item => item.Elapsed); - break; - case 3: - orderedEnumerable = ascending ? items.OrderBy(item => item.Position) : items.OrderByDescending(item => item.PositionFirstLine); - break; - default: - throw new ArgumentOutOfRangeException(nameof(index), index, null); - } - - CurrentBindingItems = rootItem.children = orderedEnumerable.Cast().ToList(); - BuildRows(rootItem); - } - - protected override TreeViewItem BuildRoot() - { - var root = new TreeViewItem { depth = -1 }; - - var children = new List(); - - TaskTracker.ForEachActiveTask((trackingId, awaiterType, status, created, stackTrace) => - { - children.Add(new UniTaskTrackerViewItem(trackingId) { TaskType = awaiterType, Status = status.ToString(), Elapsed = (DateTime.UtcNow - created).TotalSeconds.ToString("00.00"), Position = stackTrace }); - }); - - CurrentBindingItems = children; - root.children = CurrentBindingItems as List; - return root; - } - - protected override bool CanMultiSelect(TreeViewItem item) - { - return false; - } - - protected override void RowGUI(RowGUIArgs args) - { - var item = args.item as UniTaskTrackerViewItem; - - for (var visibleColumnIndex = 0; visibleColumnIndex < args.GetNumVisibleColumns(); visibleColumnIndex++) - { - var rect = args.GetCellRect(visibleColumnIndex); - var columnIndex = args.GetColumn(visibleColumnIndex); - - var labelStyle = args.selected ? EditorStyles.whiteLabel : EditorStyles.label; - labelStyle.alignment = TextAnchor.MiddleLeft; - switch (columnIndex) - { - case 0: - EditorGUI.LabelField(rect, item.TaskType, labelStyle); - break; - case 1: - EditorGUI.LabelField(rect, item.Elapsed, labelStyle); - break; - case 2: - EditorGUI.LabelField(rect, item.Status, labelStyle); - break; - case 3: - EditorGUI.LabelField(rect, item.PositionFirstLine, labelStyle); - break; - default: - throw new ArgumentOutOfRangeException(nameof(columnIndex), columnIndex, null); - } - } - } - } - -} - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Async/Editor/UniTaskTrackerTreeView.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/Editor/UniTaskTrackerTreeView.cs.meta deleted file mode 100644 index d9a74ba..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Editor/UniTaskTrackerTreeView.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 52e2d973a2156674e8c1c9433ed031f7 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/Editor/UniTaskTrackerWindow.cs b/Assets/Plugins/UniRx/Scripts/Async/Editor/UniTaskTrackerWindow.cs deleted file mode 100644 index 602a38d..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Editor/UniTaskTrackerWindow.cs +++ /dev/null @@ -1,211 +0,0 @@ -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using UnityEngine; -using UnityEditor; -using System.Collections.Generic; -using System.Linq; -using System.Reflection; -using System; -using UnityEditor.IMGUI.Controls; -using UniRx.Async.Internal; - -namespace UniRx.Async.Editor -{ - public class UniTaskTrackerWindow : EditorWindow - { - static int interval; - - static UniTaskTrackerWindow window; - - [MenuItem("Window/UniRx/UniTask Tracker")] - public static void OpenWindow() - { - if (window != null) - { - window.Close(); - } - - // will called OnEnable(singleton instance will be set). - GetWindow("UniTask Tracker").Show(); - } - - static readonly GUILayoutOption[] EmptyLayoutOption = new GUILayoutOption[0]; - - UniTaskTrackerTreeView treeView; - object splitterState; - - void OnEnable() - { - window = this; // set singleton. - splitterState = SplitterGUILayout.CreateSplitterState(new float[] { 75f, 25f }, new int[] { 32, 32 }, null); - treeView = new UniTaskTrackerTreeView(); - TaskTracker.EditorEnableState.EnableAutoReload = EditorPrefs.GetBool(TaskTracker.EnableAutoReloadKey, false); - TaskTracker.EditorEnableState.EnableTracking = EditorPrefs.GetBool(TaskTracker.EnableTrackingKey, false); - TaskTracker.EditorEnableState.EnableStackTrace = EditorPrefs.GetBool(TaskTracker.EnableStackTraceKey, false); - } - - void OnGUI() - { - // Head - RenderHeadPanel(); - - // Splittable - SplitterGUILayout.BeginVerticalSplit(this.splitterState, EmptyLayoutOption); - { - // Column Tabble - RenderTable(); - - // StackTrace details - RenderDetailsPanel(); - } - SplitterGUILayout.EndVerticalSplit(); - } - - #region HeadPanel - - public static bool EnableAutoReload => TaskTracker.EditorEnableState.EnableAutoReload; - public static bool EnableTracking => TaskTracker.EditorEnableState.EnableTracking; - public static bool EnableStackTrace => TaskTracker.EditorEnableState.EnableStackTrace; - static readonly GUIContent EnableAutoReloadHeadContent = EditorGUIUtility.TrTextContent("Enable AutoReload", "Reload automatically.", (Texture)null); - static readonly GUIContent ReloadHeadContent = EditorGUIUtility.TrTextContent("Reload", "Reload View.", (Texture)null); - static readonly GUIContent GCHeadContent = EditorGUIUtility.TrTextContent("GC.Collect", "Invoke GC.Collect.", (Texture)null); - static readonly GUIContent EnableTrackingHeadContent = EditorGUIUtility.TrTextContent("Enable Tracking", "Start to track async/await UniTask. Performance impact: low", (Texture)null); - static readonly GUIContent EnableStackTraceHeadContent = EditorGUIUtility.TrTextContent("Enable StackTrace", "Capture StackTrace when task is started. Performance impact: high", (Texture)null); - - // [Enable Tracking] | [Enable StackTrace] - void RenderHeadPanel() - { - EditorGUILayout.BeginVertical(EmptyLayoutOption); - EditorGUILayout.BeginHorizontal(EditorStyles.toolbar, EmptyLayoutOption); - - if (GUILayout.Toggle(EnableAutoReload, EnableAutoReloadHeadContent, EditorStyles.toolbarButton, EmptyLayoutOption) != EnableAutoReload) - { - TaskTracker.EditorEnableState.EnableAutoReload = !EnableAutoReload; - } - - if (GUILayout.Toggle(EnableTracking, EnableTrackingHeadContent, EditorStyles.toolbarButton, EmptyLayoutOption) != EnableTracking) - { - TaskTracker.EditorEnableState.EnableTracking = !EnableTracking; - } - - if (GUILayout.Toggle(EnableStackTrace, EnableStackTraceHeadContent, EditorStyles.toolbarButton, EmptyLayoutOption) != EnableStackTrace) - { - TaskTracker.EditorEnableState.EnableStackTrace = !EnableStackTrace; - } - - GUILayout.FlexibleSpace(); - - if (GUILayout.Button(ReloadHeadContent, EditorStyles.toolbarButton, EmptyLayoutOption)) - { - TaskTracker.CheckAndResetDirty(); - treeView.ReloadAndSort(); - Repaint(); - } - - if (GUILayout.Button(GCHeadContent, EditorStyles.toolbarButton, EmptyLayoutOption)) - { - GC.Collect(0); - } - - EditorGUILayout.EndHorizontal(); - EditorGUILayout.EndVertical(); - } - - #endregion - - #region TableColumn - - Vector2 tableScroll; - GUIStyle tableListStyle; - - void RenderTable() - { - if (tableListStyle == null) - { - tableListStyle = new GUIStyle("CN Box"); - tableListStyle.margin.top = 0; - tableListStyle.padding.left = 3; - } - - EditorGUILayout.BeginVertical(tableListStyle, EmptyLayoutOption); - - this.tableScroll = EditorGUILayout.BeginScrollView(this.tableScroll, new GUILayoutOption[] - { - GUILayout.ExpandWidth(true), - GUILayout.MaxWidth(2000f) - }); - var controlRect = EditorGUILayout.GetControlRect(new GUILayoutOption[] - { - GUILayout.ExpandHeight(true), - GUILayout.ExpandWidth(true) - }); - - - treeView?.OnGUI(controlRect); - - EditorGUILayout.EndScrollView(); - EditorGUILayout.EndVertical(); - } - - private void Update() - { - if (EnableAutoReload) - { - if (interval++ % 120 == 0) - { - if (TaskTracker.CheckAndResetDirty()) - { - treeView.ReloadAndSort(); - Repaint(); - } - } - } - } - - #endregion - - #region Details - - static GUIStyle detailsStyle; - Vector2 detailsScroll; - - void RenderDetailsPanel() - { - if (detailsStyle == null) - { - detailsStyle = new GUIStyle(EditorStyles.wordWrappedLabel); - detailsStyle.wordWrap = false; - detailsStyle.stretchHeight = true; - detailsStyle.margin.right = 15; - } - - string message = ""; - var selected = treeView.state.selectedIDs; - if (selected.Count > 0) - { - var first = selected[0]; - var item = treeView.CurrentBindingItems.FirstOrDefault(x => x.id == first) as UniTaskTrackerViewItem; - if (item != null) - { - message = item.Position; - } - } - - detailsScroll = EditorGUILayout.BeginScrollView(this.detailsScroll, EmptyLayoutOption); - var vector = detailsStyle.CalcSize(new GUIContent(message)); - EditorGUILayout.SelectableLabel(message, detailsStyle, new GUILayoutOption[] - { - GUILayout.ExpandHeight(true), - GUILayout.ExpandWidth(true), - GUILayout.MinWidth(vector.x), - GUILayout.MinHeight(vector.y) - }); - EditorGUILayout.EndScrollView(); - } - - #endregion - } -} - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Async/Editor/UniTaskTrackerWindow.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/Editor/UniTaskTrackerWindow.cs.meta deleted file mode 100644 index 7e502cb..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Editor/UniTaskTrackerWindow.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 5bee3e3860e37484aa3b861bf76d129f -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/EnumerableAsyncExtensions.cs b/Assets/Plugins/UniRx/Scripts/Async/EnumerableAsyncExtensions.cs deleted file mode 100644 index f1230d0..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/EnumerableAsyncExtensions.cs +++ /dev/null @@ -1,36 +0,0 @@ -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using System; -using System.Collections.Generic; - -namespace UniRx.Async -{ - public static class EnumerableAsyncExtensions - { - // overload resolver - .Select(async x => { }) : IEnumerable> - - public static IEnumerable Select(this IEnumerable source, Func selector) - { - return System.Linq.Enumerable.Select(source, selector); - } - - public static IEnumerable> Select(this IEnumerable source, Func> selector) - { - return System.Linq.Enumerable.Select(source, selector); - } - - public static IEnumerable Select(this IEnumerable source, Func selector) - { - return System.Linq.Enumerable.Select(source, selector); - } - - public static IEnumerable> Select(this IEnumerable source, Func> selector) - { - return System.Linq.Enumerable.Select(source, selector); - } - } -} - - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Async/EnumerableAsyncExtensions.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/EnumerableAsyncExtensions.cs.meta deleted file mode 100644 index d2e4930..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/EnumerableAsyncExtensions.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: ff50260d74bd54c4b92cf99895549445 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/EnumeratorAsyncExtensions.cs b/Assets/Plugins/UniRx/Scripts/Async/EnumeratorAsyncExtensions.cs deleted file mode 100644 index 4dd9d33..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/EnumeratorAsyncExtensions.cs +++ /dev/null @@ -1,149 +0,0 @@ -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using System; -using System.Collections; -using System.Runtime.ExceptionServices; -using System.Threading; -using UniRx.Async.Internal; - -namespace UniRx.Async -{ - public static class EnumeratorAsyncExtensions - { - public static IAwaiter GetAwaiter(this IEnumerator enumerator) - { - var awaiter = new EnumeratorAwaiter(enumerator, CancellationToken.None); - if (!awaiter.IsCompleted) - { - PlayerLoopHelper.AddAction(PlayerLoopTiming.Update, awaiter); - } - return awaiter; - } - - public static UniTask ToUniTask(this IEnumerator enumerator) - { - var awaiter = new EnumeratorAwaiter(enumerator, CancellationToken.None); - if (!awaiter.IsCompleted) - { - PlayerLoopHelper.AddAction(PlayerLoopTiming.Update, awaiter); - } - return new UniTask(awaiter); - } - - public static UniTask ConfigureAwait(this IEnumerator enumerator, PlayerLoopTiming timing = PlayerLoopTiming.Update, CancellationToken cancellationToken = default(CancellationToken)) - { - var awaiter = new EnumeratorAwaiter(enumerator, cancellationToken); - if (!awaiter.IsCompleted) - { - PlayerLoopHelper.AddAction(timing, awaiter); - } - return new UniTask(awaiter); - } - - class EnumeratorAwaiter : IAwaiter, IPlayerLoopItem - { - IEnumerator innerEnumerator; - CancellationToken cancellationToken; - Action continuation; - AwaiterStatus status; - ExceptionDispatchInfo exception; - - public EnumeratorAwaiter(IEnumerator innerEnumerator, CancellationToken cancellationToken) - { - if (cancellationToken.IsCancellationRequested) - { - status = AwaiterStatus.Canceled; - return; - } - - this.innerEnumerator = innerEnumerator; - this.status = AwaiterStatus.Pending; - this.cancellationToken = cancellationToken; - this.continuation = null; - - TaskTracker.TrackActiveTask(this, 2); - } - - public bool IsCompleted => status.IsCompleted(); - - public AwaiterStatus Status => status; - - public void GetResult() - { - switch (status) - { - case AwaiterStatus.Succeeded: - break; - case AwaiterStatus.Pending: - Error.ThrowNotYetCompleted(); - break; - case AwaiterStatus.Faulted: - exception.Throw(); - break; - case AwaiterStatus.Canceled: - Error.ThrowOperationCanceledException(); - break; - default: - break; - } - } - - public bool MoveNext() - { - if (cancellationToken.IsCancellationRequested) - { - InvokeContinuation(AwaiterStatus.Canceled); - return false; - } - - var success = false; - try - { - if (innerEnumerator.MoveNext()) - { - return true; - } - else - { - success = true; - } - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - } - - InvokeContinuation(success ? AwaiterStatus.Succeeded : AwaiterStatus.Faulted); - return false; - } - - void InvokeContinuation(AwaiterStatus status) - { - this.status = status; - var cont = this.continuation; - - // cleanup - TaskTracker.RemoveTracking(this); - this.continuation = null; - this.cancellationToken = CancellationToken.None; - this.innerEnumerator = null; - - if (cont != null) cont.Invoke(); - } - - public void OnCompleted(Action continuation) - { - UnsafeOnCompleted(continuation); - } - - public void UnsafeOnCompleted(Action continuation) - { - Error.ThrowWhenContinuationIsAlreadyRegistered(this.continuation); - this.continuation = continuation; - } - } - } -} - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Async/EnumeratorAsyncExtensions.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/EnumeratorAsyncExtensions.cs.meta deleted file mode 100644 index 698b160..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/EnumeratorAsyncExtensions.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: bc661232f11e4a741af54ba1c175d5ee -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/IAwaiter.cs b/Assets/Plugins/UniRx/Scripts/Async/IAwaiter.cs deleted file mode 100644 index 7734aec..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/IAwaiter.cs +++ /dev/null @@ -1,64 +0,0 @@ -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 - -using System.Runtime.CompilerServices; - -namespace UniRx.Async -{ - public enum AwaiterStatus - { - /// The operation has not yet completed. - Pending = 0, - /// The operation completed successfully. - Succeeded = 1, - /// The operation completed with an error. - Faulted = 2, - /// The operation completed due to cancellation. - Canceled = 3 - } - - public interface IAwaiter : ICriticalNotifyCompletion - { - AwaiterStatus Status { get; } - bool IsCompleted { get; } - void GetResult(); - } - - public interface IAwaiter : IAwaiter - { - new T GetResult(); - } - - public static class AwaiterStatusExtensions - { - /// != Pending. - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static bool IsCompleted(this AwaiterStatus status) - { - return status != AwaiterStatus.Pending; - } - - /// == Succeeded. - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static bool IsCompletedSuccessfully(this AwaiterStatus status) - { - return status == AwaiterStatus.Succeeded; - } - - /// == Canceled. - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static bool IsCanceled(this AwaiterStatus status) - { - return status == AwaiterStatus.Canceled; - } - - /// == Faulted. - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static bool IsFaulted(this AwaiterStatus status) - { - return status == AwaiterStatus.Faulted; - } - } -} - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Async/IAwaiter.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/IAwaiter.cs.meta deleted file mode 100644 index b00b802..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/IAwaiter.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 3e4d023d8404ab742b5e808c98097c3c -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/Internal.meta b/Assets/Plugins/UniRx/Scripts/Async/Internal.meta deleted file mode 100644 index baf1836..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Internal.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: c1a712698a489d14f844127ffeb99b61 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/Internal/ArrayPool.cs b/Assets/Plugins/UniRx/Scripts/Async/Internal/ArrayPool.cs deleted file mode 100644 index bd8ea65..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Internal/ArrayPool.cs +++ /dev/null @@ -1,152 +0,0 @@ -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using System; -using System.Threading; - -namespace UniRx.Async.Internal -{ - // Same interface as System.Buffers.ArrayPool but only provides Shared. - - public sealed class ArrayPool // public, can use from other assembly. - { - // Same size as System.Buffers.DefaultArrayPool - const int DefaultMaxNumberOfArraysPerBucket = 50; - - static readonly T[] EmptyArray = new T[0]; - - public static readonly ArrayPool Shared = new ArrayPool(); - - readonly MinimumQueue[] buckets; - readonly SpinLock[] locks; - - ArrayPool() - { - // see: GetQueueIndex - buckets = new MinimumQueue[18]; - locks = new SpinLock[18]; - for (int i = 0; i < buckets.Length; i++) - { - buckets[i] = new MinimumQueue(4); - locks[i] = new SpinLock(false); - } - } - - public T[] Rent(int minimumLength) - { - if (minimumLength < 0) - { - throw new ArgumentOutOfRangeException("minimumLength"); - } - else if (minimumLength == 0) - { - return EmptyArray; - } - - var size = CalculateSize(minimumLength); - var index = GetQueueIndex(size); - if (index != -1) - { - var q = buckets[index]; - var lockTaken = false; - try - { - locks[index].Enter(ref lockTaken); - - if (q.Count != 0) - { - return q.Dequeue(); - } - } - finally - { - if (lockTaken) locks[index].Exit(false); - } - } - - return new T[size]; - } - - public void Return(T[] array, bool clearArray = false) - { - if (array == null || array.Length == 0) - { - return; - } - - var index = GetQueueIndex(array.Length); - if (index != -1) - { - if (clearArray) - { - Array.Clear(array, 0, array.Length); - } - - var q = buckets[index]; - var lockTaken = false; - - try - { - locks[index].Enter(ref lockTaken); - - if (q.Count > DefaultMaxNumberOfArraysPerBucket) - { - return; - } - - q.Enqueue(array); - } - finally - { - if (lockTaken) locks[index].Exit(false); - } - } - } - - static int CalculateSize(int size) - { - size--; - size |= size >> 1; - size |= size >> 2; - size |= size >> 4; - size |= size >> 8; - size |= size >> 16; - size += 1; - - if (size < 8) - { - size = 8; - } - - return size; - } - - static int GetQueueIndex(int size) - { - switch (size) - { - case 8: return 0; - case 16: return 1; - case 32: return 2; - case 64: return 3; - case 128: return 4; - case 256: return 5; - case 512: return 6; - case 1024: return 7; - case 2048: return 8; - case 4096: return 9; - case 8192: return 10; - case 16384: return 11; - case 32768: return 12; - case 65536: return 13; - case 131072: return 14; - case 262144: return 15; - case 524288: return 16; - case 1048576: return 17; // max array length - default: - return -1; - } - } - } -} -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Async/Internal/ArrayPool.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/Internal/ArrayPool.cs.meta deleted file mode 100644 index 693816c..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Internal/ArrayPool.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: f83ebad81fb89fb4882331616ca6d248 -timeCreated: 1532361008 -licenseType: Free -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/Internal/ArrayPoolUtil.cs b/Assets/Plugins/UniRx/Scripts/Async/Internal/ArrayPoolUtil.cs deleted file mode 100644 index 657ede8..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Internal/ArrayPoolUtil.cs +++ /dev/null @@ -1,112 +0,0 @@ -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using System; -using System.Collections.Generic; -using System.Runtime.CompilerServices; - -namespace UniRx.Async.Internal -{ - public static class ArrayPoolUtil - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static void EnsureCapacity(ref T[] array, int index, ArrayPool pool) - { - if (array.Length <= index) - { - EnsureCapacityCore(ref array, index, pool); - } - } - - [MethodImpl(MethodImplOptions.NoInlining)] - static void EnsureCapacityCore(ref T[] array, int index, ArrayPool pool) - { - if (array.Length <= index) - { - var newSize = array.Length * 2; - var newArray = pool.Rent((index < newSize) ? newSize : (index * 2)); - Array.Copy(array, 0, newArray, 0, array.Length); - - pool.Return(array, clearArray: !RuntimeHelpersAbstraction.IsWellKnownNoReferenceContainsType()); - - array = newArray; - } - } - - public static RentArray Materialize(IEnumerable source) - { - if (source is T[] array) - { - return new RentArray(array, array.Length, null); - } - - var defaultCount = 4; - if (source is ICollection coll) - { - defaultCount = coll.Count; - var pool = ArrayPool.Shared; - var buffer = pool.Rent(defaultCount); - coll.CopyTo(buffer, 0); - return new RentArray(buffer, coll.Count, pool); - } - else if (source is IReadOnlyCollection rcoll) - { - defaultCount = rcoll.Count; - } - - if (defaultCount == 0) - { - return new RentArray(Array.Empty(), 0, null); - } - - { - var pool = ArrayPool.Shared; - - var index = 0; - var buffer = pool.Rent(defaultCount); - foreach (var item in source) - { - EnsureCapacity(ref buffer, index, pool); - buffer[index++] = item; - } - - return new RentArray(buffer, index, pool); - } - } - - public struct RentArray : IDisposable - { - public readonly T[] Array; - public readonly int Length; - ArrayPool pool; - - public RentArray(T[] array, int length, ArrayPool pool) - { - this.Array = array; - this.Length = length; - this.pool = pool; - } - - public void Dispose() - { - DisposeManually(!RuntimeHelpersAbstraction.IsWellKnownNoReferenceContainsType()); - } - - public void DisposeManually(bool clearArray) - { - if (pool != null) - { - if (clearArray) - { - System.Array.Clear(Array, 0, Length); - } - - pool.Return(Array, clearArray: false); - pool = null; - } - } - } - } -} - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Async/Internal/ArrayPoolUtil.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/Internal/ArrayPoolUtil.cs.meta deleted file mode 100644 index e06ec65..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Internal/ArrayPoolUtil.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 424cc208fb61d4e448b08fcfa0eee25e -timeCreated: 1532361007 -licenseType: Free -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/Internal/ArrayUtil.cs b/Assets/Plugins/UniRx/Scripts/Async/Internal/ArrayUtil.cs deleted file mode 100644 index ef614eb..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Internal/ArrayUtil.cs +++ /dev/null @@ -1,75 +0,0 @@ -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using System; -using System.Collections.Generic; -using System.Runtime.CompilerServices; - -namespace UniRx.Async.Internal -{ - public static class ArrayUtil - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static void EnsureCapacity(ref T[] array, int index) - { - if (array.Length <= index) - { - EnsureCore(ref array, index); - } - } - - // rare case, no inlining. - [MethodImpl(MethodImplOptions.NoInlining)] - static void EnsureCore(ref T[] array, int index) - { - var newSize = array.Length * 2; - var newArray = new T[(index < newSize) ? newSize : (index * 2)]; - Array.Copy(array, 0, newArray, 0, array.Length); - - array = newArray; - } - - /// - /// Optimizing utility to avoid .ToArray() that creates buffer copy(cut to just size). - /// - public static (T[] array, int length) Materialize(IEnumerable source) - { - if (source is T[] array) - { - return (array, array.Length); - } - - var defaultCount = 4; - if (source is ICollection coll) - { - defaultCount = coll.Count; - var buffer = new T[defaultCount]; - coll.CopyTo(buffer, 0); - return (buffer, defaultCount); - } - else if (source is IReadOnlyCollection rcoll) - { - defaultCount = rcoll.Count; - } - - if (defaultCount == 0) - { - return (Array.Empty(), 0); - } - - { - var index = 0; - var buffer = new T[defaultCount]; - foreach (var item in source) - { - EnsureCapacity(ref buffer, index); - buffer[index++] = item; - } - - return (buffer, index); - } - } - } -} - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Async/Internal/ArrayUtil.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/Internal/ArrayUtil.cs.meta deleted file mode 100644 index 645fc4e..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Internal/ArrayUtil.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 23146a82ec99f2542a87971c8d3d7988 -timeCreated: 1532361007 -licenseType: Free -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/Internal/CancellationTokenHelper.cs b/Assets/Plugins/UniRx/Scripts/Async/Internal/CancellationTokenHelper.cs deleted file mode 100644 index 15f6304..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Internal/CancellationTokenHelper.cs +++ /dev/null @@ -1,32 +0,0 @@ -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using System.Threading; - -namespace UniRx.Async.Internal -{ - public static class CancellationTokenHelper - { - public static bool TrySetOrLinkCancellationToken(ref CancellationToken field, CancellationToken newCancellationToken) - { - if (newCancellationToken == CancellationToken.None) - { - return false; - } - else if (field == CancellationToken.None) - { - field = newCancellationToken; - return true; - } - else if (field == newCancellationToken) - { - return false; - } - - field = CancellationTokenSource.CreateLinkedTokenSource(field, newCancellationToken).Token; - return true; - } - } -} - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Async/Internal/CancellationTokenHelper.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/Internal/CancellationTokenHelper.cs.meta deleted file mode 100644 index d288d5c..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Internal/CancellationTokenHelper.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 53d1b536fc7e2d4458294ee2c7d9b743 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/Internal/ContinuationQueue.cs b/Assets/Plugins/UniRx/Scripts/Async/Internal/ContinuationQueue.cs deleted file mode 100644 index 1b9a199..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Internal/ContinuationQueue.cs +++ /dev/null @@ -1,115 +0,0 @@ -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using System; -using System.Threading; - -namespace UniRx.Async.Internal -{ - internal class ContinuationQueue - { - const int MaxArrayLength = 0X7FEFFFFF; - const int InitialSize = 16; - - SpinLock gate = new SpinLock(); - bool dequing = false; - - int actionListCount = 0; - Action[] actionList = new Action[InitialSize]; - - int waitingListCount = 0; - Action[] waitingList = new Action[InitialSize]; - - public void Enqueue(Action continuation) - { - bool lockTaken = false; - try - { - gate.Enter(ref lockTaken); - - if (dequing) - { - // Ensure Capacity - if (waitingList.Length == waitingListCount) - { - var newLength = waitingListCount * 2; - if ((uint)newLength > MaxArrayLength) newLength = MaxArrayLength; - - var newArray = new Action[newLength]; - Array.Copy(waitingList, newArray, waitingListCount); - waitingList = newArray; - } - waitingList[waitingListCount] = continuation; - waitingListCount++; - } - else - { - // Ensure Capacity - if (actionList.Length == actionListCount) - { - var newLength = actionListCount * 2; - if ((uint)newLength > MaxArrayLength) newLength = MaxArrayLength; - - var newArray = new Action[newLength]; - Array.Copy(actionList, newArray, actionListCount); - actionList = newArray; - } - actionList[actionListCount] = continuation; - actionListCount++; - } - } - finally - { - if (lockTaken) gate.Exit(false); - } - } - - public void Run() - { - { - bool lockTaken = false; - try - { - gate.Enter(ref lockTaken); - if (actionListCount == 0) return; - dequing = true; - } - finally - { - if (lockTaken) gate.Exit(false); - } - } - - for (int i = 0; i < actionListCount; i++) - { - var action = actionList[i]; - actionList[i] = null; - - action(); - } - - { - bool lockTaken = false; - try - { - gate.Enter(ref lockTaken); - dequing = false; - - var swapTempActionList = actionList; - - actionListCount = waitingListCount; - actionList = waitingList; - - waitingListCount = 0; - waitingList = swapTempActionList; - } - finally - { - if (lockTaken) gate.Exit(false); - } - } - } - } -} - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Async/Internal/ContinuationQueue.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/Internal/ContinuationQueue.cs.meta deleted file mode 100644 index 39e6e5c..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Internal/ContinuationQueue.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: f66c32454e50f2546b17deadc80a4c77 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/Internal/Error.cs b/Assets/Plugins/UniRx/Scripts/Async/Internal/Error.cs deleted file mode 100644 index 367e806..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Internal/Error.cs +++ /dev/null @@ -1,63 +0,0 @@ -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using System; -using System.Runtime.CompilerServices; - -namespace UniRx.Async.Internal -{ - internal static class Error - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static void ThrowArgumentNullException(T value, string paramName) - where T : class - { - if (value == null) ThrowArgumentNullExceptionCore(paramName); - } - - [MethodImpl(MethodImplOptions.NoInlining)] - static void ThrowArgumentNullExceptionCore(string paramName) - { - throw new ArgumentNullException(paramName); - } - - [MethodImpl(MethodImplOptions.NoInlining)] - public static void ThrowArgumentException(string message) - { - throw new ArgumentException(message); - } - - [MethodImpl(MethodImplOptions.NoInlining)] - public static void ThrowNotYetCompleted() - { - throw new InvalidOperationException("Not yet completed."); - } - - [MethodImpl(MethodImplOptions.NoInlining)] - public static T ThrowNotYetCompleted() - { - throw new InvalidOperationException("Not yet completed."); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static void ThrowWhenContinuationIsAlreadyRegistered(T continuationField) - where T : class - { - if (continuationField != null) ThrowInvalidOperationExceptionCore("continuation is already registered."); - } - - [MethodImpl(MethodImplOptions.NoInlining)] - static void ThrowInvalidOperationExceptionCore(string message) - { - throw new InvalidOperationException(message); - } - - [MethodImpl(MethodImplOptions.NoInlining)] - public static void ThrowOperationCanceledException() - { - throw new OperationCanceledException(); - } - } -} - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Async/Internal/Error.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/Internal/Error.cs.meta deleted file mode 100644 index 61fd3a4..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Internal/Error.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 5f39f495294d4604b8082202faf98554 -timeCreated: 1532361007 -licenseType: Free -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/Internal/Hack.cs b/Assets/Plugins/UniRx/Scripts/Async/Internal/Hack.cs deleted file mode 100644 index 6f19927..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Internal/Hack.cs +++ /dev/null @@ -1,23 +0,0 @@ -#if NET_4_6 || NET_STANDARD_2_0 || CSHARP_7_OR_LATER - -using System; - -namespace UniRx.Async.Internal -{ - internal static class FuncExtensions - { - // avoid lambda capture - - internal static Action AsFuncOfT(this Action action) - { - return new Action(action.Invoke); - } - - static void Invoke(this Action action, T unused) - { - action(); - } - } -} - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Async/Internal/Hack.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/Internal/Hack.cs.meta deleted file mode 100644 index 6e75492..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Internal/Hack.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 4d5a9a3e1f0f069478969f752fde29a9 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/Internal/LazyPromise.cs b/Assets/Plugins/UniRx/Scripts/Async/Internal/LazyPromise.cs deleted file mode 100644 index 05ef7ba..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Internal/LazyPromise.cs +++ /dev/null @@ -1,130 +0,0 @@ -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using System; -using System.Threading; - -namespace UniRx.Async.Internal -{ - internal sealed class LazyPromise : IAwaiter - { - Func factory; - UniTask value; - - public LazyPromise(Func factory) - { - this.factory = factory; - } - - void Create() - { - var f = Interlocked.Exchange(ref factory, null); - if (f != null) - { - value = f(); - } - } - - public bool IsCompleted - { - get - { - Create(); - return value.IsCompleted; - } - } - - public AwaiterStatus Status - { - get - { - Create(); - return value.Status; - } - } - - public void GetResult() - { - Create(); - value.GetResult(); - } - - void IAwaiter.GetResult() - { - GetResult(); - } - - public void UnsafeOnCompleted(Action continuation) - { - Create(); - value.GetAwaiter().UnsafeOnCompleted(continuation); - } - - public void OnCompleted(Action continuation) - { - UnsafeOnCompleted(continuation); - } - } - - internal sealed class LazyPromise : IAwaiter - { - Func> factory; - UniTask value; - - public LazyPromise(Func> factory) - { - this.factory = factory; - } - - void Create() - { - var f = Interlocked.Exchange(ref factory, null); - if (f != null) - { - value = f(); - } - } - - public bool IsCompleted - { - get - { - Create(); - return value.IsCompleted; - } - } - - public AwaiterStatus Status - { - get - { - Create(); - return value.Status; - } - } - - public T GetResult() - { - Create(); - return value.Result; - } - - void IAwaiter.GetResult() - { - GetResult(); - } - - public void UnsafeOnCompleted(Action continuation) - { - Create(); - value.GetAwaiter().UnsafeOnCompleted(continuation); - } - - public void OnCompleted(Action continuation) - { - UnsafeOnCompleted(continuation); - } - } -} - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Async/Internal/LazyPromise.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/Internal/LazyPromise.cs.meta deleted file mode 100644 index ee8f3f7..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Internal/LazyPromise.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: fe7a4187b7f89f84582fd1e466a7f27e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/Internal/MinimumQueue.cs b/Assets/Plugins/UniRx/Scripts/Async/Internal/MinimumQueue.cs deleted file mode 100644 index 3e190ab..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Internal/MinimumQueue.cs +++ /dev/null @@ -1,122 +0,0 @@ -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member -#endif - -using System; -using System.Runtime.CompilerServices; - -namespace UniRx.Async.Internal -{ - // optimized version of Standard Queue. - public class MinimumQueue - { - const int MinimumGrow = 4; - const int GrowFactor = 200; - - T[] array; - int head; - int tail; - int size; - - public MinimumQueue(int capacity) - { - if (capacity < 0) throw new ArgumentOutOfRangeException("capacity"); - array = new T[capacity]; - head = tail = size = 0; - } - - public int Count - { -#if NET_4_6 || NET_STANDARD_2_0 - [MethodImpl(MethodImplOptions.AggressiveInlining)] -#endif - get { return size; } - } - - public T Peek() - { - if (size == 0) ThrowForEmptyQueue(); - return array[head]; - } - -#if NET_4_6 || NET_STANDARD_2_0 - [MethodImpl(MethodImplOptions.AggressiveInlining)] -#endif - public void Enqueue(T item) - { - if (size == array.Length) - { - Grow(); - } - - array[tail] = item; - MoveNext(ref tail); - size++; - } - -#if NET_4_6 || NET_STANDARD_2_0 - [MethodImpl(MethodImplOptions.AggressiveInlining)] -#endif - public T Dequeue() - { - if (size == 0) ThrowForEmptyQueue(); - - int head = this.head; - T[] array = this.array; - T removed = array[head]; - array[head] = default(T); - MoveNext(ref this.head); - size--; - return removed; - } - - void Grow() - { - int newcapacity = (int)((long)array.Length * (long)GrowFactor / 100); - if (newcapacity < array.Length + MinimumGrow) - { - newcapacity = array.Length + MinimumGrow; - } - SetCapacity(newcapacity); - } - - void SetCapacity(int capacity) - { - T[] newarray = new T[capacity]; - if (size > 0) - { - if (head < tail) - { - Array.Copy(array, head, newarray, 0, size); - } - else - { - Array.Copy(array, head, newarray, 0, array.Length - head); - Array.Copy(array, 0, newarray, array.Length - head, tail); - } - } - - array = newarray; - head = 0; - tail = (size == capacity) ? 0 : size; - } - -#if NET_4_6 || NET_STANDARD_2_0 - [MethodImpl(MethodImplOptions.AggressiveInlining)] -#endif - void MoveNext(ref int index) - { - int tmp = index + 1; - if (tmp == array.Length) - { - tmp = 0; - } - index = tmp; - } - - void ThrowForEmptyQueue() - { - throw new InvalidOperationException("EmptyQueue"); - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Async/Internal/MinimumQueue.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/Internal/MinimumQueue.cs.meta deleted file mode 100644 index dc06736..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Internal/MinimumQueue.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 7d63add489ccc99498114d79702b904d -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/Internal/PlayerLoopRunner.cs b/Assets/Plugins/UniRx/Scripts/Async/Internal/PlayerLoopRunner.cs deleted file mode 100644 index ac15cca..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Internal/PlayerLoopRunner.cs +++ /dev/null @@ -1,153 +0,0 @@ -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) - -using System; -using UnityEngine; - -namespace UniRx.Async.Internal -{ - internal sealed class PlayerLoopRunner - { - const int InitialSize = 16; - - readonly object runningAndQueueLock = new object(); - readonly object arrayLock = new object(); - readonly Action unhandledExceptionCallback; - - int tail = 0; - bool running = false; - IPlayerLoopItem[] loopItems = new IPlayerLoopItem[InitialSize]; - MinimumQueue waitQueue = new MinimumQueue(InitialSize); - - public PlayerLoopRunner() - { - this.unhandledExceptionCallback = ex => Debug.LogException(ex); - } - - public void AddAction(IPlayerLoopItem item) - { - lock (runningAndQueueLock) - { - if (running) - { - waitQueue.Enqueue(item); - return; - } - } - - lock (arrayLock) - { - // Ensure Capacity - if (loopItems.Length == tail) - { - Array.Resize(ref loopItems, checked(tail * 2)); - } - loopItems[tail++] = item; - } - } - - public void Run() - { - lock (runningAndQueueLock) - { - running = true; - } - - lock (arrayLock) - { - var j = tail - 1; - - // eliminate array-bound check for i - for (int i = 0; i < loopItems.Length; i++) - { - var action = loopItems[i]; - if (action != null) - { - try - { - if (!action.MoveNext()) - { - loopItems[i] = null; - } - else - { - continue; // next i - } - } - catch (Exception ex) - { - loopItems[i] = null; - try - { - unhandledExceptionCallback(ex); - } - catch { } - } - } - - // find null, loop from tail - while (i < j) - { - var fromTail = loopItems[j]; - if (fromTail != null) - { - try - { - if (!fromTail.MoveNext()) - { - loopItems[j] = null; - j--; - continue; // next j - } - else - { - // swap - loopItems[i] = fromTail; - loopItems[j] = null; - j--; - goto NEXT_LOOP; // next i - } - } - catch (Exception ex) - { - loopItems[j] = null; - j--; - try - { - unhandledExceptionCallback(ex); - } - catch { } - continue; // next j - } - } - else - { - j--; - } - } - - tail = i; // loop end - break; // LOOP END - - NEXT_LOOP: - continue; - } - - - lock (runningAndQueueLock) - { - running = false; - while (waitQueue.Count != 0) - { - if (loopItems.Length == tail) - { - Array.Resize(ref loopItems, checked(tail * 2)); - } - loopItems[tail++] = waitQueue.Dequeue(); - } - } - } - } - } -} - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Async/Internal/PlayerLoopRunner.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/Internal/PlayerLoopRunner.cs.meta deleted file mode 100644 index 5c36125..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Internal/PlayerLoopRunner.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 340c6d420bb4f484aa8683415ea92571 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/Internal/PromiseHelper.cs b/Assets/Plugins/UniRx/Scripts/Async/Internal/PromiseHelper.cs deleted file mode 100644 index 51b3501..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Internal/PromiseHelper.cs +++ /dev/null @@ -1,34 +0,0 @@ -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using System.Collections.Generic; - -namespace UniRx.Async.Internal -{ - public static class PromiseHelper - { - public static void TrySetResultAll(IEnumerable source, T value) - where TPromise : class, IResolvePromise - { - var rentArray = ArrayPoolUtil.Materialize(source); - var clearArray = true; - try - { - var array = rentArray.Array; - var len = rentArray.Length; - for (int i = 0; i < len; i++) - { - array[i].TrySetResult(value); - array[i] = null; - } - clearArray = false; - } - finally - { - rentArray.DisposeManually(clearArray); - } - } - } -} - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Async/Internal/PromiseHelper.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/Internal/PromiseHelper.cs.meta deleted file mode 100644 index dfc1c50..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Internal/PromiseHelper.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 173f9b763911bf847b7dfbf31ee87fc4 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/Internal/ReusablePromise.cs b/Assets/Plugins/UniRx/Scripts/Async/Internal/ReusablePromise.cs deleted file mode 100644 index 0dbde77..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Internal/ReusablePromise.cs +++ /dev/null @@ -1,399 +0,0 @@ -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using System; -using System.Diagnostics; -using System.Runtime.ExceptionServices; -using System.Threading; - -namespace UniRx.Async.Internal -{ - // 'public', user can use this(but be careful). - - public abstract class ReusablePromise : IAwaiter - { - ExceptionDispatchInfo exception; - object continuation; // Action or Queue - AwaiterStatus status; - - public UniTask Task => new UniTask(this); - - // can override for control 'start/reset' timing. - public virtual bool IsCompleted => status.IsCompleted(); - - public virtual void GetResult() - { - switch (status) - { - case AwaiterStatus.Succeeded: - return; - case AwaiterStatus.Faulted: - exception.Throw(); - break; - case AwaiterStatus.Canceled: - throw new OperationCanceledException(); - default: - break; - } - - throw new InvalidOperationException("Invalid Status:" + status); - } - - public AwaiterStatus Status => status; - - void IAwaiter.GetResult() - { - GetResult(); - } - - public void ResetStatus(bool forceReset) - { - if (forceReset) - { - status = AwaiterStatus.Pending; - } - else if (status == AwaiterStatus.Succeeded) - { - status = AwaiterStatus.Pending; - } - } - - public virtual bool TrySetCanceled() - { - if (status == AwaiterStatus.Pending) - { - status = AwaiterStatus.Canceled; - TryInvokeContinuation(); - return true; - } - return false; - } - - public virtual bool TrySetException(Exception ex) - { - if (status == AwaiterStatus.Pending) - { - status = AwaiterStatus.Faulted; - exception = ExceptionDispatchInfo.Capture(ex); - TryInvokeContinuation(); - return true; - } - return false; - } - - public virtual bool TrySetResult() - { - if (status == AwaiterStatus.Pending) - { - status = AwaiterStatus.Succeeded; - TryInvokeContinuation(); - return true; - } - return false; - } - - void TryInvokeContinuation() - { - if (continuation == null) return; - - if (continuation is Action act) - { - continuation = null; - act(); - } - else - { - // reuse Queue(don't null clear) - var q = (MinimumQueue)continuation; - var size = q.Count; - for (int i = 0; i < size; i++) - { - q.Dequeue().Invoke(); - } - } - } - - public void OnCompleted(Action action) - { - UnsafeOnCompleted(action); - } - - public void UnsafeOnCompleted(Action action) - { - if (continuation == null) - { - continuation = action; - return; - } - else - { - if (continuation is Action act) - { - var q = new MinimumQueue(4); - q.Enqueue(act); - q.Enqueue(action); - continuation = q; - return; - } - else - { - ((MinimumQueue)continuation).Enqueue(action); - } - } - } - } - - public abstract class ReusablePromise : IAwaiter - { - T result; - ExceptionDispatchInfo exception; - object continuation; // Action or Queue - AwaiterStatus status; - - public UniTask Task => new UniTask(this); - - // can override for control 'start/reset' timing. - public virtual bool IsCompleted => status.IsCompleted(); - - protected T RawResult => result; - - protected void ForceSetResult(T result) - { - this.result = result; - } - - public virtual T GetResult() - { - switch (status) - { - case AwaiterStatus.Succeeded: - return result; - case AwaiterStatus.Faulted: - exception.Throw(); - break; - case AwaiterStatus.Canceled: - throw new OperationCanceledException(); - default: - break; - } - - throw new InvalidOperationException("Invalid Status:" + status); - } - - public AwaiterStatus Status => status; - - void IAwaiter.GetResult() - { - GetResult(); - } - - public void ResetStatus(bool forceReset) - { - if (forceReset) - { - status = AwaiterStatus.Pending; - } - else if (status == AwaiterStatus.Succeeded) - { - status = AwaiterStatus.Pending; - } - } - - public virtual bool TrySetCanceled() - { - if (status == AwaiterStatus.Pending) - { - status = AwaiterStatus.Canceled; - TryInvokeContinuation(); - return true; - } - return false; - } - - public virtual bool TrySetException(Exception ex) - { - if (status == AwaiterStatus.Pending) - { - status = AwaiterStatus.Faulted; - exception = ExceptionDispatchInfo.Capture(ex); - TryInvokeContinuation(); - return true; - } - return false; - } - - public virtual bool TrySetResult(T result) - { - if (status == AwaiterStatus.Pending) - { - status = AwaiterStatus.Succeeded; - this.result = result; - TryInvokeContinuation(); - return true; - } - return false; - } - - protected void TryInvokeContinuation() - { - if (continuation == null) return; - - if (continuation is Action act) - { - continuation = null; - act(); - } - else - { - // reuse Queue(don't null clear) - var q = (MinimumQueue)continuation; - var size = q.Count; - for (int i = 0; i < size; i++) - { - q.Dequeue().Invoke(); - } - } - } - - public void OnCompleted(Action action) - { - UnsafeOnCompleted(action); - } - - public void UnsafeOnCompleted(Action action) - { - if (continuation == null) - { - continuation = action; - return; - } - else - { - if (continuation is Action act) - { - var q = new MinimumQueue(4); - q.Enqueue(act); - q.Enqueue(action); - continuation = q; - return; - } - else - { - ((MinimumQueue)continuation).Enqueue(action); - } - } - } - } - -#if !UniRxLibrary - - public abstract class PlayerLoopReusablePromiseBase : ReusablePromise, IPlayerLoopItem - { - readonly PlayerLoopTiming timing; - protected readonly CancellationToken cancellationToken; - bool isRunning = false; - -#if UNITY_EDITOR - string capturedStackTraceForDebugging; -#endif - - public PlayerLoopReusablePromiseBase(PlayerLoopTiming timing, CancellationToken cancellationToken, int skipTrackFrameCountAdditive) - { - this.timing = timing; - this.cancellationToken = cancellationToken; - -#if UNITY_EDITOR - this.capturedStackTraceForDebugging = TaskTracker.CaptureStackTrace(skipTrackFrameCountAdditive + 1); // 1 is self, -#endif - } - - public override bool IsCompleted - { - get - { - if (Status == AwaiterStatus.Canceled || Status == AwaiterStatus.Faulted) return true; - - if (!isRunning) - { - isRunning = true; - ResetStatus(false); - OnRunningStart(); -#if UNITY_EDITOR - TaskTracker.TrackActiveTask(this, capturedStackTraceForDebugging); -#endif - PlayerLoopHelper.AddAction(timing, this); - } - return false; - } - } - - protected abstract void OnRunningStart(); - - protected void Complete() - { - isRunning = false; -#if UNITY_EDITOR - TaskTracker.RemoveTracking(this); -#endif - } - - public abstract bool MoveNext(); - } - - public abstract class PlayerLoopReusablePromiseBase : ReusablePromise, IPlayerLoopItem - { - readonly PlayerLoopTiming timing; - protected readonly CancellationToken cancellationToken; - bool isRunning = false; - -#if UNITY_EDITOR - string capturedStackTraceForDebugging; -#endif - - public PlayerLoopReusablePromiseBase(PlayerLoopTiming timing, CancellationToken cancellationToken, int skipTrackFrameCountAdditive) - { - this.timing = timing; - this.cancellationToken = cancellationToken; - -#if UNITY_EDITOR - this.capturedStackTraceForDebugging = TaskTracker.CaptureStackTrace(skipTrackFrameCountAdditive + 1); // 1 is self, -#endif - } - - public override bool IsCompleted - { - get - { - if (Status == AwaiterStatus.Canceled || Status == AwaiterStatus.Faulted) return true; - - if (!isRunning) - { - isRunning = true; - ResetStatus(false); - OnRunningStart(); -#if UNITY_EDITOR - TaskTracker.TrackActiveTask(this, capturedStackTraceForDebugging); -#endif - PlayerLoopHelper.AddAction(timing, this); - } - return false; - } - } - - protected abstract void OnRunningStart(); - - protected void Complete() - { - isRunning = false; -#if UNITY_EDITOR - TaskTracker.RemoveTracking(this); -#endif - } - - public abstract bool MoveNext(); - } - -#endif -} - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Async/Internal/ReusablePromise.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/Internal/ReusablePromise.cs.meta deleted file mode 100644 index d86918f..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Internal/ReusablePromise.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: a8cfc99b5928c0242919aac2121b02bb -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/Internal/RuntimeHelpersAbstraction.cs b/Assets/Plugins/UniRx/Scripts/Async/Internal/RuntimeHelpersAbstraction.cs deleted file mode 100644 index eb37970..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Internal/RuntimeHelpersAbstraction.cs +++ /dev/null @@ -1,62 +0,0 @@ -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using System; -#if !UniRxLibrary -using UnityEngine; -#endif - -namespace UniRx.Async.Internal -{ - public static class RuntimeHelpersAbstraction - { - // If we can use RuntimeHelpers.IsReferenceOrContainsReferences(.NET Core 2.0), use it. - public static bool IsWellKnownNoReferenceContainsType() - { - return WellKnownNoReferenceContainsType.IsWellKnownType; - } - - static bool WellKnownNoReferenceContainsTypeInitialize(Type t) - { - // The primitive types are Boolean, Byte, SByte, Int16, UInt16, Int32, UInt32, Int64, UInt64, IntPtr, UIntPtr, Char, Double, and Single. - if (t.IsPrimitive) return true; - - if (t.IsEnum) return true; - if (t == typeof(DateTime)) return true; - if (t == typeof(DateTimeOffset)) return true; - if (t == typeof(Guid)) return true; - if (t == typeof(decimal)) return true; - - // unwrap nullable - if (t.IsGenericType && t.GetGenericTypeDefinition() == typeof(Nullable<>)) - { - return WellKnownNoReferenceContainsTypeInitialize(t.GetGenericArguments()[0]); - } - -#if !UniRxLibrary - // or add other wellknown types(Vector, etc...) here - if (t == typeof(Vector2)) return true; - if (t == typeof(Vector3)) return true; - if (t == typeof(Vector4)) return true; - if (t == typeof(Color)) return true; - if (t == typeof(Rect)) return true; - if (t == typeof(Bounds)) return true; - if (t == typeof(Quaternion)) return true; -#endif - - return false; - } - - static class WellKnownNoReferenceContainsType - { - public static readonly bool IsWellKnownType; - - static WellKnownNoReferenceContainsType() - { - IsWellKnownType = WellKnownNoReferenceContainsTypeInitialize(typeof(T)); - } - } - } -} - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Async/Internal/RuntimeHelpersAbstraction.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/Internal/RuntimeHelpersAbstraction.cs.meta deleted file mode 100644 index 4254391..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Internal/RuntimeHelpersAbstraction.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 94975e4d4e0c0ea4ba787d3872ce9bb4 -timeCreated: 1532361007 -licenseType: Free -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/Internal/TaskTracker.cs b/Assets/Plugins/UniRx/Scripts/Async/Internal/TaskTracker.cs deleted file mode 100644 index b7b4104..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Internal/TaskTracker.cs +++ /dev/null @@ -1,150 +0,0 @@ -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Threading; - -namespace UniRx.Async.Internal -{ - public static class TaskTracker - { -#if UNITY_EDITOR - - static int trackingId = 0; - - public const string EnableAutoReloadKey = "UniTaskTrackerWindow_EnableAutoReloadKey"; - public const string EnableTrackingKey = "UniTaskTrackerWindow_EnableTrackingKey"; - public const string EnableStackTraceKey = "UniTaskTrackerWindow_EnableStackTraceKey"; - - public static class EditorEnableState - { - static bool enableAutoReload; - public static bool EnableAutoReload - { - get { return enableAutoReload; } - set - { - enableAutoReload = value; - UnityEditor.EditorPrefs.SetBool(EnableAutoReloadKey, value); - } - } - - static bool enableTracking; - public static bool EnableTracking - { - get { return enableTracking; } - set - { - enableTracking = value; - UnityEditor.EditorPrefs.SetBool(EnableTrackingKey, value); - } - } - - static bool enableStackTrace; - public static bool EnableStackTrace - { - get { return enableStackTrace; } - set - { - enableStackTrace = value; - UnityEditor.EditorPrefs.SetBool(EnableStackTraceKey, value); - } - } - } - -#endif - - - static List> listPool = new List>(); - - static readonly WeakDictionary tracking = new WeakDictionary(); - - [Conditional("UNITY_EDITOR")] - public static void TrackActiveTask(IAwaiter task, int skipFrame = 1) - { -#if UNITY_EDITOR - dirty = true; - if (!EditorEnableState.EnableTracking) return; - var stackTrace = EditorEnableState.EnableStackTrace ? new StackTrace(skipFrame, true).CleanupAsyncStackTrace() : ""; - tracking.TryAdd(task, (Interlocked.Increment(ref trackingId), DateTime.UtcNow, stackTrace)); -#endif - } - - [Conditional("UNITY_EDITOR")] - public static void TrackActiveTask(IAwaiter task, string stackTrace) - { -#if UNITY_EDITOR - dirty = true; - if (!EditorEnableState.EnableTracking) return; - var success = tracking.TryAdd(task, (Interlocked.Increment(ref trackingId), DateTime.UtcNow, stackTrace)); -#endif - } - - public static string CaptureStackTrace(int skipFrame) - { -#if UNITY_EDITOR - if (!EditorEnableState.EnableTracking) return ""; - var stackTrace = EditorEnableState.EnableStackTrace ? new StackTrace(skipFrame + 1, true).CleanupAsyncStackTrace() : ""; - return stackTrace; -#else - return null; -#endif - } - - [Conditional("UNITY_EDITOR")] - public static void RemoveTracking(IAwaiter task) - { -#if UNITY_EDITOR - dirty = true; - if (!EditorEnableState.EnableTracking) return; - var success = tracking.TryRemove(task); -#endif - } - - static bool dirty; - - public static bool CheckAndResetDirty() - { - var current = dirty; - dirty = false; - return current; - } - - /// (trackingId, awaiterType, awaiterStatus, createdTime, stackTrace) - public static void ForEachActiveTask(Action action) - { - lock (listPool) - { - var count = tracking.ToList(ref listPool, clear: false); - try - { - for (int i = 0; i < count; i++) - { - string typeName = null; - var keyType = listPool[i].Key.GetType(); - if (keyType.IsNested) - { - typeName = keyType.DeclaringType.Name + "." + keyType.Name; - } - else - { - typeName = keyType.Name; - } - - action(listPool[i].Value.trackingId, typeName, listPool[i].Key.Status, listPool[i].Value.addTime, listPool[i].Value.stackTrace); - listPool[i] = new KeyValuePair(null, (0, default(DateTime), null)); // clear - } - } - catch - { - listPool.Clear(); - throw; - } - } - } - } -} - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Async/Internal/TaskTracker.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/Internal/TaskTracker.cs.meta deleted file mode 100644 index c171368..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Internal/TaskTracker.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: a203c73eb4ccdbb44bddfd82d38fdda9 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/Internal/WeakDictionary.cs b/Assets/Plugins/UniRx/Scripts/Async/Internal/WeakDictionary.cs deleted file mode 100644 index 5d70492..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Internal/WeakDictionary.cs +++ /dev/null @@ -1,334 +0,0 @@ -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using System; -using System.Collections.Generic; -using System.Threading; - -namespace UniRx.Async.Internal -{ - // Add, Remove, Enumerate with sweep. All operations are thread safe(in spinlock). - public class WeakDictionary - where TKey : class - { - Entry[] buckets; - int size; - SpinLock gate; // mutable struct(not readonly) - - readonly float loadFactor; - readonly IEqualityComparer keyEqualityComparer; - - public WeakDictionary(int capacity = 4, float loadFactor = 0.75f, IEqualityComparer keyComparer = null) - { - var tableSize = CalculateCapacity(capacity, loadFactor); - this.buckets = new Entry[tableSize]; - this.loadFactor = loadFactor; - this.gate = new SpinLock(false); - this.keyEqualityComparer = keyComparer ?? EqualityComparer.Default; - } - - public bool TryAdd(TKey key, TValue value) - { - bool lockTaken = false; - try - { - gate.Enter(ref lockTaken); - return TryAddInternal(key, value); - } - finally - { - if (lockTaken) gate.Exit(false); - } - } - - public bool TryGetValue(TKey key, out TValue value) - { - bool lockTaken = false; - try - { - if (TryGetEntry(key, out _, out var entry)) - { - value = entry.Value; - return true; - } - - value = default(TValue); - return false; - } - finally - { - if (lockTaken) gate.Exit(false); - } - } - - public bool TryRemove(TKey key) - { - bool lockTaken = false; - try - { - if (TryGetEntry(key, out var hashIndex, out var entry)) - { - Remove(hashIndex, entry); - return true; - } - - return false; - } - finally - { - if (lockTaken) gate.Exit(false); - } - } - - bool TryAddInternal(TKey key, TValue value) - { - var nextCapacity = CalculateCapacity(size + 1, loadFactor); - - TRY_ADD_AGAIN: - if (buckets.Length < nextCapacity) - { - // rehash - var nextBucket = new Entry[nextCapacity]; - for (int i = 0; i < buckets.Length; i++) - { - var e = buckets[i]; - while (e != null) - { - AddToBuckets(nextBucket, key, e.Value, e.Hash); - e = e.Next; - } - } - - buckets = nextBucket; - goto TRY_ADD_AGAIN; - } - else - { - // add entry - var successAdd = AddToBuckets(buckets, key, value, keyEqualityComparer.GetHashCode(key)); - if (successAdd) size++; - return successAdd; - } - } - - bool AddToBuckets(Entry[] targetBuckets, TKey newKey, TValue value, int keyHash) - { - var h = keyHash; - var hashIndex = h & (targetBuckets.Length - 1); - - TRY_ADD_AGAIN: - if (targetBuckets[hashIndex] == null) - { - targetBuckets[hashIndex] = new Entry - { - Key = new WeakReference(newKey, false), - Value = value, - Hash = h - }; - - return true; - } - else - { - // add to last. - var entry = targetBuckets[hashIndex]; - while (entry != null) - { - if (entry.Key.TryGetTarget(out var target)) - { - if (keyEqualityComparer.Equals(newKey, target)) - { - return false; // duplicate - } - } - else - { - Remove(hashIndex, entry); - if (targetBuckets[hashIndex] == null) goto TRY_ADD_AGAIN; // add new entry - } - - if (entry.Next != null) - { - entry = entry.Next; - } - else - { - // found last - entry.Next = new Entry - { - Key = new WeakReference(newKey, false), - Value = value, - Hash = h - }; - entry.Next.Prev = entry; - } - } - - return false; - } - } - - bool TryGetEntry(TKey key, out int hashIndex, out Entry entry) - { - var table = buckets; - var hash = keyEqualityComparer.GetHashCode(key); - hashIndex = hash & table.Length - 1; - entry = table[hashIndex]; - - while (entry != null) - { - if (entry.Key.TryGetTarget(out var target)) - { - if (keyEqualityComparer.Equals(key, target)) - { - return true; - } - } - else - { - // sweap - Remove(hashIndex, entry); - } - - entry = entry.Next; - } - - return false; - } - - void Remove(int hashIndex, Entry entry) - { - if (entry.Prev == null && entry.Next == null) - { - buckets[hashIndex] = null; - } - else - { - if (entry.Prev == null) - { - buckets[hashIndex] = entry.Next; - } - if (entry.Prev != null) - { - entry.Prev.Next = entry.Next; - } - if (entry.Next != null) - { - entry.Next.Prev = entry.Prev; - } - } - size--; - } - - public List> ToList() - { - var list = new List>(size); - ToList(ref list, false); - return list; - } - - // avoid allocate everytime. - public int ToList(ref List> list, bool clear = true) - { - if (clear) - { - list.Clear(); - } - - var listIndex = 0; - - bool lockTaken = false; - try - { - for (int i = 0; i < buckets.Length; i++) - { - var entry = buckets[i]; - while (entry != null) - { - if (entry.Key.TryGetTarget(out var target)) - { - var item = new KeyValuePair(target, entry.Value); - if (listIndex < list.Count) - { - list[listIndex++] = item; - } - else - { - list.Add(item); - listIndex++; - } - } - else - { - // sweap - Remove(i, entry); - } - - entry = entry.Next; - } - } - } - finally - { - if (lockTaken) gate.Exit(false); - } - - return listIndex; - } - - static int CalculateCapacity(int collectionSize, float loadFactor) - { - var size = (int)(((float)collectionSize) / loadFactor); - - size--; - size |= size >> 1; - size |= size >> 2; - size |= size >> 4; - size |= size >> 8; - size |= size >> 16; - size += 1; - - if (size < 8) - { - size = 8; - } - return size; - } - - class Entry - { - public WeakReference Key; - public TValue Value; - public int Hash; - public Entry Prev; - public Entry Next; - - // debug only - public override string ToString() - { - if (Key.TryGetTarget(out var target)) - { - return target + "(" + Count() + ")"; - } - else - { - return "(Dead)"; - } - } - - int Count() - { - var count = 1; - var n = this; - while (n.Next != null) - { - count++; - n = n.Next; - } - return count; - } - } - } -} - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Async/Internal/WeakDictionary.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/Internal/WeakDictionary.cs.meta deleted file mode 100644 index 23b6922..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Internal/WeakDictionary.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 6c78563864409714593226af59bcb6f3 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/PlayerLoopHelper.cs b/Assets/Plugins/UniRx/Scripts/Async/PlayerLoopHelper.cs deleted file mode 100644 index 9db5189..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/PlayerLoopHelper.cs +++ /dev/null @@ -1,125 +0,0 @@ -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using System; -using System.Linq; -using UnityEngine; -using UnityEngine.Experimental.LowLevel; -using UniRx.Async.Internal; -using System.Threading; - -namespace UniRx.Async -{ - public static class UniTaskLoopRunners - { - public struct UniTaskLoopRunnerInitialization { }; - public struct UniTaskLoopRunnerEarlyUpdate { }; - public struct UniTaskLoopRunnerFixedUpdate { }; - public struct UniTaskLoopRunnerPreUpdate { }; - public struct UniTaskLoopRunnerUpdate { }; - public struct UniTaskLoopRunnerPreLateUpdate { }; - public struct UniTaskLoopRunnerPostLateUpdate { }; - - // Yield - - public struct UniTaskLoopRunnerYieldInitialization { }; - public struct UniTaskLoopRunnerYieldEarlyUpdate { }; - public struct UniTaskLoopRunnerYieldFixedUpdate { }; - public struct UniTaskLoopRunnerYieldPreUpdate { }; - public struct UniTaskLoopRunnerYieldUpdate { }; - public struct UniTaskLoopRunnerYieldPreLateUpdate { }; - public struct UniTaskLoopRunnerYieldPostLateUpdate { }; - } - - public enum PlayerLoopTiming - { - Initialization = 0, - EarlyUpdate = 1, - FixedUpdate = 2, - PreUpdate = 3, - Update = 4, - PreLateUpdate = 5, - PostLateUpdate = 6 - } - - public interface IPlayerLoopItem - { - bool MoveNext(); - } - - public static class PlayerLoopHelper - { - public static SynchronizationContext UnitySynchronizationContext => unitySynchronizationContetext; - public static int MainThreadId => mainThreadId; - - static int mainThreadId; - static SynchronizationContext unitySynchronizationContetext; - static ContinuationQueue[] yielders; - static PlayerLoopRunner[] runners; - - static PlayerLoopSystem[] InsertRunner(PlayerLoopSystem loopSystem, Type loopRunnerYieldType, ContinuationQueue cq, Type loopRunnerType, PlayerLoopRunner runner) - { - var yieldLoop = new PlayerLoopSystem - { - type = loopRunnerYieldType, - updateDelegate = cq.Run - }; - - var runnerLoop = new PlayerLoopSystem - { - type = loopRunnerType, - updateDelegate = runner.Run - }; - - var dest = new PlayerLoopSystem[loopSystem.subSystemList.Length + 2]; - Array.Copy(loopSystem.subSystemList, 0, dest, 2, loopSystem.subSystemList.Length); - dest[0] = yieldLoop; - dest[1] = runnerLoop; - return dest; - } - - [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)] - static void Init() - { - // capture default(unity) sync-context. - unitySynchronizationContetext = SynchronizationContext.Current; - mainThreadId = Thread.CurrentThread.ManagedThreadId; - - if (runners != null) return; // already initialized - - var playerLoop = PlayerLoop.GetDefaultPlayerLoop(); - Initialize(ref playerLoop); - } - - public static void Initialize(ref PlayerLoopSystem playerLoop) - { - yielders = new ContinuationQueue[7]; - runners = new PlayerLoopRunner[7]; - - var copyList = playerLoop.subSystemList.ToArray(); - - copyList[0].subSystemList = InsertRunner(copyList[0], typeof(UniTaskLoopRunners.UniTaskLoopRunnerYieldInitialization), yielders[0] = new ContinuationQueue(), typeof(UniTaskLoopRunners.UniTaskLoopRunnerInitialization), runners[0] = new PlayerLoopRunner()); - copyList[1].subSystemList = InsertRunner(copyList[1], typeof(UniTaskLoopRunners.UniTaskLoopRunnerYieldEarlyUpdate), yielders[1] = new ContinuationQueue(), typeof(UniTaskLoopRunners.UniTaskLoopRunnerEarlyUpdate), runners[1] = new PlayerLoopRunner()); - copyList[2].subSystemList = InsertRunner(copyList[2], typeof(UniTaskLoopRunners.UniTaskLoopRunnerYieldFixedUpdate), yielders[2] = new ContinuationQueue(), typeof(UniTaskLoopRunners.UniTaskLoopRunnerFixedUpdate), runners[2] = new PlayerLoopRunner()); - copyList[3].subSystemList = InsertRunner(copyList[3], typeof(UniTaskLoopRunners.UniTaskLoopRunnerYieldPreUpdate), yielders[3] = new ContinuationQueue(), typeof(UniTaskLoopRunners.UniTaskLoopRunnerPreUpdate), runners[3] = new PlayerLoopRunner()); - copyList[4].subSystemList = InsertRunner(copyList[4], typeof(UniTaskLoopRunners.UniTaskLoopRunnerYieldUpdate), yielders[4] = new ContinuationQueue(), typeof(UniTaskLoopRunners.UniTaskLoopRunnerUpdate), runners[4] = new PlayerLoopRunner()); - copyList[5].subSystemList = InsertRunner(copyList[5], typeof(UniTaskLoopRunners.UniTaskLoopRunnerYieldPreLateUpdate), yielders[5] = new ContinuationQueue(), typeof(UniTaskLoopRunners.UniTaskLoopRunnerPreLateUpdate), runners[5] = new PlayerLoopRunner()); - copyList[6].subSystemList = InsertRunner(copyList[6], typeof(UniTaskLoopRunners.UniTaskLoopRunnerYieldPostLateUpdate), yielders[6] = new ContinuationQueue(), typeof(UniTaskLoopRunners.UniTaskLoopRunnerPostLateUpdate), runners[6] = new PlayerLoopRunner()); - - playerLoop.subSystemList = copyList; - PlayerLoop.SetPlayerLoop(playerLoop); - } - - public static void AddAction(PlayerLoopTiming timing, IPlayerLoopItem action) - { - runners[(int)timing].AddAction(action); - } - - public static void AddContinuation(PlayerLoopTiming timing, Action continuation) - { - yielders[(int)timing].Enqueue(continuation); - } - } -} - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Async/PlayerLoopHelper.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/PlayerLoopHelper.cs.meta deleted file mode 100644 index 5faff84..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/PlayerLoopHelper.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 15fb5b85042f19640b973ce651795aca -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/Progress.cs b/Assets/Plugins/UniRx/Scripts/Async/Progress.cs deleted file mode 100644 index c9f6f24..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Progress.cs +++ /dev/null @@ -1,87 +0,0 @@ -#if NET_4_6 || NET_STANDARD_2_0 || CSHARP_7_OR_LATER -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using System; -using System.Collections.Generic; - -namespace UniRx.Async -{ - /// - /// Lightweight IProgress[T] factory. - /// - public static class Progress - { - public static IProgress Create(Action handler) - { - if (handler == null) return NullProgress.Instance; - return new AnonymousProgress(handler); - } - - public static IProgress CreateOnlyValueChanged(Action handler, IEqualityComparer comparer = null) - { - if (handler == null) return NullProgress.Instance; - return new OnlyValueChangedProgress(handler, comparer ?? UnityEqualityComparer.GetDefault()); - } - - sealed class NullProgress : IProgress - { - public static readonly IProgress Instance = new NullProgress(); - - NullProgress() - { - - } - - public void Report(T value) - { - } - } - - sealed class AnonymousProgress : IProgress - { - readonly Action action; - - public AnonymousProgress(Action action) - { - this.action = action; - } - - public void Report(T value) - { - action(value); - } - } - - sealed class OnlyValueChangedProgress : IProgress - { - readonly Action action; - readonly IEqualityComparer comparer; - bool isFirstCall; - T latestValue; - - public OnlyValueChangedProgress(Action action, IEqualityComparer comparer) - { - this.action = action; - this.comparer = comparer; - this.isFirstCall = true; - } - - public void Report(T value) - { - if (isFirstCall) - { - isFirstCall = false; - } - else if (comparer.Equals(value, latestValue)) - { - return; - } - - latestValue = value; - action(value); - } - } - } -} - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Async/Progress.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/Progress.cs.meta deleted file mode 100644 index f0e1f19..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Progress.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: e3377e2ae934ed54fb8fd5388e2d9eb9 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/Triggers.meta b/Assets/Plugins/UniRx/Scripts/Async/Triggers.meta deleted file mode 100644 index 88930be..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Triggers.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: f0a08d034ce44e14d8f3ffaa49a03a82 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncAnimatorTrigger.cs b/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncAnimatorTrigger.cs deleted file mode 100644 index 2617c0b..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncAnimatorTrigger.cs +++ /dev/null @@ -1,54 +0,0 @@ - -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using System.Collections.Generic; -using System.Threading; -using UnityEngine; - -namespace UniRx.Async.Triggers -{ - [DisallowMultipleComponent] - public class AsyncAnimatorTrigger : AsyncTriggerBase - { - AsyncTriggerPromise onAnimatorIK; - AsyncTriggerPromiseDictionary onAnimatorIKs; - AsyncTriggerPromise onAnimatorMove; - AsyncTriggerPromiseDictionary onAnimatorMoves; - - - protected override IEnumerable GetPromises() - { - return Concat(onAnimatorIK, onAnimatorIKs, onAnimatorMove, onAnimatorMoves); - } - - - void OnAnimatorIK(int layerIndex) - { - TrySetResult(onAnimatorIK, onAnimatorIKs, layerIndex); - } - - - public UniTask OnAnimatorIKAsync(CancellationToken cancellationToken = default(CancellationToken)) - { - return GetOrAddPromise(ref onAnimatorIK, ref onAnimatorIKs, cancellationToken); - } - - - void OnAnimatorMove() - { - TrySetResult(onAnimatorMove, onAnimatorMoves, AsyncUnit.Default); - } - - - public UniTask OnAnimatorMoveAsync(CancellationToken cancellationToken = default(CancellationToken)) - { - return GetOrAddPromise(ref onAnimatorMove, ref onAnimatorMoves, cancellationToken); - } - - - } -} - -#endif - diff --git a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncAnimatorTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncAnimatorTrigger.cs.meta deleted file mode 100644 index 29b2826..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncAnimatorTrigger.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: ae912c37ac7f4cd42b25f22452435103 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncAwakeTrigger.cs b/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncAwakeTrigger.cs deleted file mode 100644 index 2666507..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncAwakeTrigger.cs +++ /dev/null @@ -1,55 +0,0 @@ -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using UnityEngine; - -namespace UniRx.Async.Triggers -{ - [DisallowMultipleComponent] - public class AsyncAwakeTrigger : MonoBehaviour - { - bool called = false; - UniTaskCompletionSource promise; - - void Awake() - { - called = true; - promise?.TrySetResult(); - } - - public UniTask AwakeAsync() - { - if (called) return UniTask.CompletedTask; - PlayerLoopHelper.AddAction(PlayerLoopTiming.Update, new AwakeMonitor(this)); - return new UniTask(promise ?? (promise = new UniTaskCompletionSource())); - } - - private void OnDestroy() - { - promise?.TrySetCanceled(); - } - - class AwakeMonitor : IPlayerLoopItem - { - readonly AsyncAwakeTrigger trigger; - - public AwakeMonitor(AsyncAwakeTrigger trigger) - { - this.trigger = trigger; - } - - public bool MoveNext() - { - if (trigger.called) return false; - if (trigger == null) - { - trigger.OnDestroy(); - return false; - } - return true; - } - } - } -} - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncAwakeTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncAwakeTrigger.cs.meta deleted file mode 100644 index 097fdb6..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncAwakeTrigger.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: ef2840a2586894741a0ae211b8fd669b -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncBeginDragTrigger.cs b/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncBeginDragTrigger.cs deleted file mode 100644 index db97fb6..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncBeginDragTrigger.cs +++ /dev/null @@ -1,41 +0,0 @@ - -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using System.Collections.Generic; -using System.Threading; -using UnityEngine; -using UnityEngine.EventSystems; - -namespace UniRx.Async.Triggers -{ - [DisallowMultipleComponent] - public class AsyncBeginDragTrigger : AsyncTriggerBase - { - AsyncTriggerPromise onBeginDrag; - AsyncTriggerPromiseDictionary onBeginDrags; - - - protected override IEnumerable GetPromises() - { - return Concat(onBeginDrag, onBeginDrags); - } - - - void OnBeginDrag(PointerEventData eventData) - { - TrySetResult(onBeginDrag, onBeginDrags, eventData); - } - - - public UniTask OnBeginDragAsync(CancellationToken cancellationToken = default(CancellationToken)) - { - return GetOrAddPromise(ref onBeginDrag, ref onBeginDrags, cancellationToken); - } - - - } -} - -#endif - diff --git a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncBeginDragTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncBeginDragTrigger.cs.meta deleted file mode 100644 index d4a44e9..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncBeginDragTrigger.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 171fd2191eb22af4fbd92b51815ca757 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncCancelTrigger.cs b/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncCancelTrigger.cs deleted file mode 100644 index f5a89fa..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncCancelTrigger.cs +++ /dev/null @@ -1,41 +0,0 @@ - -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using System.Collections.Generic; -using System.Threading; -using UnityEngine; -using UnityEngine.EventSystems; - -namespace UniRx.Async.Triggers -{ - [DisallowMultipleComponent] - public class AsyncCancelTrigger : AsyncTriggerBase - { - AsyncTriggerPromise onCancel; - AsyncTriggerPromiseDictionary onCancels; - - - protected override IEnumerable GetPromises() - { - return Concat(onCancel, onCancels); - } - - - void OnCancel(BaseEventData eventData) - { - TrySetResult(onCancel, onCancels, eventData); - } - - - public UniTask OnCancelAsync(CancellationToken cancellationToken = default(CancellationToken)) - { - return GetOrAddPromise(ref onCancel, ref onCancels, cancellationToken); - } - - - } -} - -#endif - diff --git a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncCancelTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncCancelTrigger.cs.meta deleted file mode 100644 index 285efd5..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncCancelTrigger.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 291886b6e5f2d044a85b2a4dedcaca97 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncCanvasGroupChangedTrigger.cs b/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncCanvasGroupChangedTrigger.cs deleted file mode 100644 index 28853e3..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncCanvasGroupChangedTrigger.cs +++ /dev/null @@ -1,41 +0,0 @@ - -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using System.Collections.Generic; -using System.Threading; -using UnityEngine; -using UnityEngine.EventSystems; - -namespace UniRx.Async.Triggers -{ - [DisallowMultipleComponent] - public class AsyncCanvasGroupChangedTrigger : AsyncTriggerBase - { - AsyncTriggerPromise onCanvasGroupChanged; - AsyncTriggerPromiseDictionary onCanvasGroupChangeds; - - - protected override IEnumerable GetPromises() - { - return Concat(onCanvasGroupChanged, onCanvasGroupChangeds); - } - - - void OnCanvasGroupChanged() - { - TrySetResult(onCanvasGroupChanged, onCanvasGroupChangeds, AsyncUnit.Default); - } - - - public UniTask OnCanvasGroupChangedAsync(CancellationToken cancellationToken = default(CancellationToken)) - { - return GetOrAddPromise(ref onCanvasGroupChanged, ref onCanvasGroupChangeds, cancellationToken); - } - - - } -} - -#endif - diff --git a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncCanvasGroupChangedTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncCanvasGroupChangedTrigger.cs.meta deleted file mode 100644 index d0ebc56..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncCanvasGroupChangedTrigger.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: eddba832648f83046a320ffcacfc771d -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncCollision2DTrigger.cs b/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncCollision2DTrigger.cs deleted file mode 100644 index a3ae284..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncCollision2DTrigger.cs +++ /dev/null @@ -1,69 +0,0 @@ - -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using System.Collections.Generic; -using System.Threading; -using UnityEngine; -using UnityEngine.EventSystems; - -namespace UniRx.Async.Triggers -{ - [DisallowMultipleComponent] - public class AsyncCollision2DTrigger : AsyncTriggerBase - { - AsyncTriggerPromise onCollisionEnter2D; - AsyncTriggerPromiseDictionary onCollisionEnter2Ds; - AsyncTriggerPromise onCollisionExit2D; - AsyncTriggerPromiseDictionary onCollisionExit2Ds; - AsyncTriggerPromise onCollisionStay2D; - AsyncTriggerPromiseDictionary onCollisionStay2Ds; - - - protected override IEnumerable GetPromises() - { - return Concat(onCollisionEnter2D, onCollisionEnter2Ds, onCollisionExit2D, onCollisionExit2Ds, onCollisionStay2D, onCollisionStay2Ds); - } - - - void OnCollisionEnter2D(Collision2D coll) - { - TrySetResult(onCollisionEnter2D, onCollisionEnter2Ds, coll); - } - - - public UniTask OnCollisionEnter2DAsync(CancellationToken cancellationToken = default(CancellationToken)) - { - return GetOrAddPromise(ref onCollisionEnter2D, ref onCollisionEnter2Ds, cancellationToken); - } - - - void OnCollisionExit2D(Collision2D coll) - { - TrySetResult(onCollisionExit2D, onCollisionExit2Ds, coll); - } - - - public UniTask OnCollisionExit2DAsync(CancellationToken cancellationToken = default(CancellationToken)) - { - return GetOrAddPromise(ref onCollisionExit2D, ref onCollisionExit2Ds, cancellationToken); - } - - - void OnCollisionStay2D(Collision2D coll) - { - TrySetResult(onCollisionStay2D, onCollisionStay2Ds, coll); - } - - - public UniTask OnCollisionStay2DAsync(CancellationToken cancellationToken = default(CancellationToken)) - { - return GetOrAddPromise(ref onCollisionStay2D, ref onCollisionStay2Ds, cancellationToken); - } - - - } -} - -#endif - diff --git a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncCollision2DTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncCollision2DTrigger.cs.meta deleted file mode 100644 index ad81300..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncCollision2DTrigger.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: fbeb63f69bedec44f8003730887f914b -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncCollisionTrigger.cs b/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncCollisionTrigger.cs deleted file mode 100644 index 7121ff5..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncCollisionTrigger.cs +++ /dev/null @@ -1,69 +0,0 @@ - -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using System.Collections.Generic; -using System.Threading; -using UnityEngine; -using UnityEngine.EventSystems; - -namespace UniRx.Async.Triggers -{ - [DisallowMultipleComponent] - public class AsyncCollisionTrigger : AsyncTriggerBase - { - AsyncTriggerPromise onCollisionEnter; - AsyncTriggerPromiseDictionary onCollisionEnters; - AsyncTriggerPromise onCollisionExit; - AsyncTriggerPromiseDictionary onCollisionExits; - AsyncTriggerPromise onCollisionStay; - AsyncTriggerPromiseDictionary onCollisionStays; - - - protected override IEnumerable GetPromises() - { - return Concat(onCollisionEnter, onCollisionEnters, onCollisionExit, onCollisionExits, onCollisionStay, onCollisionStays); - } - - - void OnCollisionEnter(Collision collision) - { - TrySetResult(onCollisionEnter, onCollisionEnters, collision); - } - - - public UniTask OnCollisionEnterAsync(CancellationToken cancellationToken = default(CancellationToken)) - { - return GetOrAddPromise(ref onCollisionEnter, ref onCollisionEnters, cancellationToken); - } - - - void OnCollisionExit(Collision collisionInfo) - { - TrySetResult(onCollisionExit, onCollisionExits, collisionInfo); - } - - - public UniTask OnCollisionExitAsync(CancellationToken cancellationToken = default(CancellationToken)) - { - return GetOrAddPromise(ref onCollisionExit, ref onCollisionExits, cancellationToken); - } - - - void OnCollisionStay(Collision collisionInfo) - { - TrySetResult(onCollisionStay, onCollisionStays, collisionInfo); - } - - - public UniTask OnCollisionStayAsync(CancellationToken cancellationToken = default(CancellationToken)) - { - return GetOrAddPromise(ref onCollisionStay, ref onCollisionStays, cancellationToken); - } - - - } -} - -#endif - diff --git a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncCollisionTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncCollisionTrigger.cs.meta deleted file mode 100644 index ebcc28e..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncCollisionTrigger.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 72db4a683be8f6a428823502599014a9 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncDeselectTrigger.cs b/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncDeselectTrigger.cs deleted file mode 100644 index 3fcef32..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncDeselectTrigger.cs +++ /dev/null @@ -1,41 +0,0 @@ - -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using System.Collections.Generic; -using System.Threading; -using UnityEngine; -using UnityEngine.EventSystems; - -namespace UniRx.Async.Triggers -{ - [DisallowMultipleComponent] - public class AsyncDeselectTrigger : AsyncTriggerBase - { - AsyncTriggerPromise onDeselect; - AsyncTriggerPromiseDictionary onDeselects; - - - protected override IEnumerable GetPromises() - { - return Concat(onDeselect, onDeselects); - } - - - void OnDeselect(BaseEventData eventData) - { - TrySetResult(onDeselect, onDeselects, eventData); - } - - - public UniTask OnDeselectAsync(CancellationToken cancellationToken = default(CancellationToken)) - { - return GetOrAddPromise(ref onDeselect, ref onDeselects, cancellationToken); - } - - - } -} - -#endif - diff --git a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncDeselectTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncDeselectTrigger.cs.meta deleted file mode 100644 index 9509524..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncDeselectTrigger.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 30faa9be5bd883e488bdc52f4825c4da -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncDestroyTrigger.cs b/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncDestroyTrigger.cs deleted file mode 100644 index 0dd843f..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncDestroyTrigger.cs +++ /dev/null @@ -1,93 +0,0 @@ -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using System.Threading; -using UniRx.Async.Internal; -using UnityEngine; - -namespace UniRx.Async.Triggers -{ - [DisallowMultipleComponent] - public class AsyncDestroyTrigger : MonoBehaviour - { - bool called = false; - UniTaskCompletionSource promise; - CancellationTokenSource cancellationTokenSource; // main cancellation - object canellationTokenSourceOrQueue; // external from AddCancellationTriggerOnDestory - - public CancellationToken CancellationToken - { - get - { - if (cancellationTokenSource == null) - { - cancellationTokenSource = new CancellationTokenSource(); - } - return cancellationTokenSource.Token; - } - } - - /// This function is called when the MonoBehaviour will be destroyed. - void OnDestroy() - { - called = true; - promise?.TrySetResult(); - cancellationTokenSource?.Cancel(); - cancellationTokenSource?.Dispose(); - if (canellationTokenSourceOrQueue != null) - { - if (canellationTokenSourceOrQueue is CancellationTokenSource cts) - { - cts.Cancel(); - cts.Dispose(); - } - else - { - var q = (MinimumQueue)canellationTokenSourceOrQueue; - while (q.Count != 0) - { - var c = q.Dequeue(); - c.Cancel(); - c.Dispose(); - } - } - canellationTokenSourceOrQueue = null; - } - } - - /// This function is called when the MonoBehaviour will be destroyed. - public UniTask OnDestroyAsync() - { - if (called) return UniTask.CompletedTask; - return new UniTask(promise ?? (promise = new UniTaskCompletionSource())); - } - - /// Add Cancellation Triggers on destroy - public void AddCancellationTriggerOnDestory(CancellationTokenSource cts) - { - if (called) - { - cts.Cancel(); - cts.Dispose(); - } - - if (canellationTokenSourceOrQueue == null) - { - canellationTokenSourceOrQueue = cts; - } - else if (canellationTokenSourceOrQueue is CancellationTokenSource c) - { - var q = new MinimumQueue(4); - q.Enqueue(c); - q.Enqueue(cts); - canellationTokenSourceOrQueue = q; - } - else - { - ((MinimumQueue)canellationTokenSourceOrQueue).Enqueue(cts); - } - } - } -} - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncDestroyTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncDestroyTrigger.cs.meta deleted file mode 100644 index 6450049..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncDestroyTrigger.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: f4afdcb1cbadf954ba8b1cf465429e17 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncDragTrigger.cs b/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncDragTrigger.cs deleted file mode 100644 index b171a89..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncDragTrigger.cs +++ /dev/null @@ -1,41 +0,0 @@ - -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using System.Collections.Generic; -using System.Threading; -using UnityEngine; -using UnityEngine.EventSystems; - -namespace UniRx.Async.Triggers -{ - [DisallowMultipleComponent] - public class AsyncDragTrigger : AsyncTriggerBase - { - AsyncTriggerPromise onDrag; - AsyncTriggerPromiseDictionary onDrags; - - - protected override IEnumerable GetPromises() - { - return Concat(onDrag, onDrags); - } - - - void OnDrag(PointerEventData eventData) - { - TrySetResult(onDrag, onDrags, eventData); - } - - - public UniTask OnDragAsync(CancellationToken cancellationToken = default(CancellationToken)) - { - return GetOrAddPromise(ref onDrag, ref onDrags, cancellationToken); - } - - - } -} - -#endif - diff --git a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncDragTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncDragTrigger.cs.meta deleted file mode 100644 index d259f40..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncDragTrigger.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 52242547ba60ea74f8a2e3bbab5fcdfa -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncDropTrigger.cs b/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncDropTrigger.cs deleted file mode 100644 index eb139ca..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncDropTrigger.cs +++ /dev/null @@ -1,41 +0,0 @@ - -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using System.Collections.Generic; -using System.Threading; -using UnityEngine; -using UnityEngine.EventSystems; - -namespace UniRx.Async.Triggers -{ - [DisallowMultipleComponent] - public class AsyncDropTrigger : AsyncTriggerBase - { - AsyncTriggerPromise onDrop; - AsyncTriggerPromiseDictionary onDrops; - - - protected override IEnumerable GetPromises() - { - return Concat(onDrop, onDrops); - } - - - void OnDrop(PointerEventData eventData) - { - TrySetResult(onDrop, onDrops, eventData); - } - - - public UniTask OnDropAsync(CancellationToken cancellationToken = default(CancellationToken)) - { - return GetOrAddPromise(ref onDrop, ref onDrops, cancellationToken); - } - - - } -} - -#endif - diff --git a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncDropTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncDropTrigger.cs.meta deleted file mode 100644 index 2a15847..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncDropTrigger.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 42d65fd5e4be25f41a927eca25b0acf7 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncEnableDisableTrigger.cs b/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncEnableDisableTrigger.cs deleted file mode 100644 index 7ae4f78..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncEnableDisableTrigger.cs +++ /dev/null @@ -1,55 +0,0 @@ - -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using System.Collections.Generic; -using System.Threading; -using UnityEngine; -using UnityEngine.EventSystems; - -namespace UniRx.Async.Triggers -{ - [DisallowMultipleComponent] - public class AsyncEnableDisableTrigger : AsyncTriggerBase - { - AsyncTriggerPromise onEnable; - AsyncTriggerPromiseDictionary onEnables; - AsyncTriggerPromise onDisable; - AsyncTriggerPromiseDictionary onDisables; - - - protected override IEnumerable GetPromises() - { - return Concat(onEnable, onEnables, onDisable, onDisables); - } - - - void OnEnable() - { - TrySetResult(onEnable, onEnables, AsyncUnit.Default); - } - - - public UniTask OnEnableAsync(CancellationToken cancellationToken = default(CancellationToken)) - { - return GetOrAddPromise(ref onEnable, ref onEnables, cancellationToken); - } - - - void OnDisable() - { - TrySetResult(onDisable, onDisables, AsyncUnit.Default); - } - - - public UniTask OnDisableAsync(CancellationToken cancellationToken = default(CancellationToken)) - { - return GetOrAddPromise(ref onDisable, ref onDisables, cancellationToken); - } - - - } -} - -#endif - diff --git a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncEnableDisableTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncEnableDisableTrigger.cs.meta deleted file mode 100644 index 1f52b52..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncEnableDisableTrigger.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d0bf9142b63b4cb43b693f0b83b3dbe7 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncEndDragTrigger.cs b/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncEndDragTrigger.cs deleted file mode 100644 index dca0ec5..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncEndDragTrigger.cs +++ /dev/null @@ -1,41 +0,0 @@ - -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using System.Collections.Generic; -using System.Threading; -using UnityEngine; -using UnityEngine.EventSystems; - -namespace UniRx.Async.Triggers -{ - [DisallowMultipleComponent] - public class AsyncEndDragTrigger : AsyncTriggerBase - { - AsyncTriggerPromise onEndDrag; - AsyncTriggerPromiseDictionary onEndDrags; - - - protected override IEnumerable GetPromises() - { - return Concat(onEndDrag, onEndDrags); - } - - - void OnEndDrag(PointerEventData eventData) - { - TrySetResult(onEndDrag, onEndDrags, eventData); - } - - - public UniTask OnEndDragAsync(CancellationToken cancellationToken = default(CancellationToken)) - { - return GetOrAddPromise(ref onEndDrag, ref onEndDrags, cancellationToken); - } - - - } -} - -#endif - diff --git a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncEndDragTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncEndDragTrigger.cs.meta deleted file mode 100644 index 98f67b8..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncEndDragTrigger.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 8298d43de348acc4aa4e7dbf30472dbf -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncEventTrigger.cs b/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncEventTrigger.cs deleted file mode 100644 index 8657cfa..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncEventTrigger.cs +++ /dev/null @@ -1,264 +0,0 @@ - -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using System.Collections.Generic; -using System.Threading; -using UnityEngine; -using UnityEngine.EventSystems; - -namespace UniRx.Async.Triggers -{ - [DisallowMultipleComponent] - public class AsyncEventTrigger : AsyncTriggerBase - { - AsyncTriggerPromise onDeselect; - AsyncTriggerPromiseDictionary onDeselects; - AsyncTriggerPromise onMove; - AsyncTriggerPromiseDictionary onMoves; - AsyncTriggerPromise onPointerDown; - AsyncTriggerPromiseDictionary onPointerDowns; - AsyncTriggerPromise onPointerEnter; - AsyncTriggerPromiseDictionary onPointerEnters; - AsyncTriggerPromise onPointerExit; - AsyncTriggerPromiseDictionary onPointerExits; - AsyncTriggerPromise onPointerUp; - AsyncTriggerPromiseDictionary onPointerUps; - AsyncTriggerPromise onSelect; - AsyncTriggerPromiseDictionary onSelects; - AsyncTriggerPromise onPointerClick; - AsyncTriggerPromiseDictionary onPointerClicks; - AsyncTriggerPromise onSubmit; - AsyncTriggerPromiseDictionary onSubmits; - AsyncTriggerPromise onDrag; - AsyncTriggerPromiseDictionary onDrags; - AsyncTriggerPromise onBeginDrag; - AsyncTriggerPromiseDictionary onBeginDrags; - AsyncTriggerPromise onEndDrag; - AsyncTriggerPromiseDictionary onEndDrags; - AsyncTriggerPromise onDrop; - AsyncTriggerPromiseDictionary onDrops; - AsyncTriggerPromise onUpdateSelected; - AsyncTriggerPromiseDictionary onUpdateSelecteds; - AsyncTriggerPromise onInitializePotentialDrag; - AsyncTriggerPromiseDictionary onInitializePotentialDrags; - AsyncTriggerPromise onCancel; - AsyncTriggerPromiseDictionary onCancels; - AsyncTriggerPromise onScroll; - AsyncTriggerPromiseDictionary onScrolls; - - - protected override IEnumerable GetPromises() - { - return Concat(onDeselect, onDeselects, onMove, onMoves, onPointerDown, onPointerDowns, onPointerEnter, onPointerEnters, onPointerExit, onPointerExits, onPointerUp, onPointerUps, onSelect, onSelects, onPointerClick, onPointerClicks, onSubmit, onSubmits, onDrag, onDrags, onBeginDrag, onBeginDrags, onEndDrag, onEndDrags, onDrop, onDrops, onUpdateSelected, onUpdateSelecteds, onInitializePotentialDrag, onInitializePotentialDrags, onCancel, onCancels, onScroll, onScrolls); - } - - void OnDeselect(BaseEventData eventData) - { - TrySetResult(onDeselect, onDeselects, eventData); - } - - - public UniTask OnDeselectAsync(CancellationToken cancellationToken = default(CancellationToken)) - { - return GetOrAddPromise(ref onDeselect, ref onDeselects, cancellationToken); - } - - - void OnMove(AxisEventData eventData) - { - TrySetResult(onMove, onMoves, eventData); - } - - - public UniTask OnMoveAsync(CancellationToken cancellationToken = default(CancellationToken)) - { - return GetOrAddPromise(ref onMove, ref onMoves, cancellationToken); - } - - - void OnPointerDown(PointerEventData eventData) - { - TrySetResult(onPointerDown, onPointerDowns, eventData); - } - - - public UniTask OnPointerDownAsync(CancellationToken cancellationToken = default(CancellationToken)) - { - return GetOrAddPromise(ref onPointerDown, ref onPointerDowns, cancellationToken); - } - - - void OnPointerEnter(PointerEventData eventData) - { - TrySetResult(onPointerEnter, onPointerEnters, eventData); - } - - - public UniTask OnPointerEnterAsync(CancellationToken cancellationToken = default(CancellationToken)) - { - return GetOrAddPromise(ref onPointerEnter, ref onPointerEnters, cancellationToken); - } - - - void OnPointerExit(PointerEventData eventData) - { - TrySetResult(onPointerExit, onPointerExits, eventData); - } - - - public UniTask OnPointerExitAsync(CancellationToken cancellationToken = default(CancellationToken)) - { - return GetOrAddPromise(ref onPointerExit, ref onPointerExits, cancellationToken); - } - - - void OnPointerUp(PointerEventData eventData) - { - TrySetResult(onPointerUp, onPointerUps, eventData); - } - - - public UniTask OnPointerUpAsync(CancellationToken cancellationToken = default(CancellationToken)) - { - return GetOrAddPromise(ref onPointerUp, ref onPointerUps, cancellationToken); - } - - - void OnSelect(BaseEventData eventData) - { - TrySetResult(onSelect, onSelects, eventData); - } - - - public UniTask OnSelectAsync(CancellationToken cancellationToken = default(CancellationToken)) - { - return GetOrAddPromise(ref onSelect, ref onSelects, cancellationToken); - } - - - void OnPointerClick(PointerEventData eventData) - { - TrySetResult(onPointerClick, onPointerClicks, eventData); - } - - - public UniTask OnPointerClickAsync(CancellationToken cancellationToken = default(CancellationToken)) - { - return GetOrAddPromise(ref onPointerClick, ref onPointerClicks, cancellationToken); - } - - - void OnSubmit(BaseEventData eventData) - { - TrySetResult(onSubmit, onSubmits, eventData); - } - - - public UniTask OnSubmitAsync(CancellationToken cancellationToken = default(CancellationToken)) - { - return GetOrAddPromise(ref onSubmit, ref onSubmits, cancellationToken); - } - - - void OnDrag(PointerEventData eventData) - { - TrySetResult(onDrag, onDrags, eventData); - } - - - public UniTask OnDragAsync(CancellationToken cancellationToken = default(CancellationToken)) - { - return GetOrAddPromise(ref onDrag, ref onDrags, cancellationToken); - } - - - void OnBeginDrag(PointerEventData eventData) - { - TrySetResult(onBeginDrag, onBeginDrags, eventData); - } - - - public UniTask OnBeginDragAsync(CancellationToken cancellationToken = default(CancellationToken)) - { - return GetOrAddPromise(ref onBeginDrag, ref onBeginDrags, cancellationToken); - } - - - void OnEndDrag(PointerEventData eventData) - { - TrySetResult(onEndDrag, onEndDrags, eventData); - } - - - public UniTask OnEndDragAsync(CancellationToken cancellationToken = default(CancellationToken)) - { - return GetOrAddPromise(ref onEndDrag, ref onEndDrags, cancellationToken); - } - - - void OnDrop(PointerEventData eventData) - { - TrySetResult(onDrop, onDrops, eventData); - } - - - public UniTask OnDropAsync(CancellationToken cancellationToken = default(CancellationToken)) - { - return GetOrAddPromise(ref onDrop, ref onDrops, cancellationToken); - } - - - void OnUpdateSelected(BaseEventData eventData) - { - TrySetResult(onUpdateSelected, onUpdateSelecteds, eventData); - } - - - public UniTask OnUpdateSelectedAsync(CancellationToken cancellationToken = default(CancellationToken)) - { - return GetOrAddPromise(ref onUpdateSelected, ref onUpdateSelecteds, cancellationToken); - } - - - void OnInitializePotentialDrag(PointerEventData eventData) - { - TrySetResult(onInitializePotentialDrag, onInitializePotentialDrags, eventData); - } - - - public UniTask OnInitializePotentialDragAsync(CancellationToken cancellationToken = default(CancellationToken)) - { - return GetOrAddPromise(ref onInitializePotentialDrag, ref onInitializePotentialDrags, cancellationToken); - } - - - void OnCancel(BaseEventData eventData) - { - TrySetResult(onCancel, onCancels, eventData); - } - - - public UniTask OnCancelAsync(CancellationToken cancellationToken = default(CancellationToken)) - { - return GetOrAddPromise(ref onCancel, ref onCancels, cancellationToken); - } - - - void OnScroll(PointerEventData eventData) - { - TrySetResult(onScroll, onScrolls, eventData); - } - - - public UniTask OnScrollAsync(CancellationToken cancellationToken = default(CancellationToken)) - { - return GetOrAddPromise(ref onScroll, ref onScrolls, cancellationToken); - } - - - } -} - -#endif - diff --git a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncEventTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncEventTrigger.cs.meta deleted file mode 100644 index 742e723..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncEventTrigger.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 89997820797ad6d43b17971a8bd0d8fe -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncFixedUpdateTrigger.cs b/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncFixedUpdateTrigger.cs deleted file mode 100644 index 21b691c..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncFixedUpdateTrigger.cs +++ /dev/null @@ -1,41 +0,0 @@ - -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using System.Collections.Generic; -using System.Threading; -using UnityEngine; -using UnityEngine.EventSystems; - -namespace UniRx.Async.Triggers -{ - [DisallowMultipleComponent] - public class AsyncFixedUpdateTrigger : AsyncTriggerBase - { - AsyncTriggerPromise fixedUpdate; - AsyncTriggerPromiseDictionary fixedUpdates; - - - protected override IEnumerable GetPromises() - { - return Concat(fixedUpdate, fixedUpdates); - } - - - void FixedUpdate() - { - TrySetResult(fixedUpdate, fixedUpdates, AsyncUnit.Default); - } - - - public UniTask FixedUpdateAsync(CancellationToken cancellationToken = default(CancellationToken)) - { - return GetOrAddPromise(ref fixedUpdate, ref fixedUpdates, cancellationToken); - } - - - } -} - -#endif - diff --git a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncFixedUpdateTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncFixedUpdateTrigger.cs.meta deleted file mode 100644 index 7154af6..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncFixedUpdateTrigger.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: c74b906c4294aaa4e900f6e7f8b36df6 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncInitializePotentialDragTrigger.cs b/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncInitializePotentialDragTrigger.cs deleted file mode 100644 index 7ce8f23..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncInitializePotentialDragTrigger.cs +++ /dev/null @@ -1,41 +0,0 @@ - -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using System.Collections.Generic; -using System.Threading; -using UnityEngine; -using UnityEngine.EventSystems; - -namespace UniRx.Async.Triggers -{ - [DisallowMultipleComponent] - public class AsyncInitializePotentialDragTrigger : AsyncTriggerBase - { - AsyncTriggerPromise onInitializePotentialDrag; - AsyncTriggerPromiseDictionary onInitializePotentialDrags; - - - protected override IEnumerable GetPromises() - { - return Concat(onInitializePotentialDrag, onInitializePotentialDrags); - } - - - void OnInitializePotentialDrag(PointerEventData eventData) - { - TrySetResult(onInitializePotentialDrag, onInitializePotentialDrags, eventData); - } - - - public UniTask OnInitializePotentialDragAsync(CancellationToken cancellationToken = default(CancellationToken)) - { - return GetOrAddPromise(ref onInitializePotentialDrag, ref onInitializePotentialDrags, cancellationToken); - } - - - } -} - -#endif - diff --git a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncInitializePotentialDragTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncInitializePotentialDragTrigger.cs.meta deleted file mode 100644 index 0df8a5b..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncInitializePotentialDragTrigger.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: ae0733adc239a324f8b934ffb119abd8 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncJointTrigger.cs b/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncJointTrigger.cs deleted file mode 100644 index 60b9171..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncJointTrigger.cs +++ /dev/null @@ -1,55 +0,0 @@ - -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using System.Collections.Generic; -using System.Threading; -using UnityEngine; -using UnityEngine.EventSystems; - -namespace UniRx.Async.Triggers -{ - [DisallowMultipleComponent] - public class AsyncJointTrigger : AsyncTriggerBase - { - AsyncTriggerPromise onJointBreak; - AsyncTriggerPromiseDictionary onJointBreaks; - AsyncTriggerPromise onJointBreak2D; - AsyncTriggerPromiseDictionary onJointBreak2Ds; - - - protected override IEnumerable GetPromises() - { - return Concat(onJointBreak, onJointBreaks, onJointBreak2D, onJointBreak2Ds); - } - - - void OnJointBreak(float breakForce) - { - TrySetResult(onJointBreak, onJointBreaks, breakForce); - } - - - public UniTask OnJointBreakAsync(CancellationToken cancellationToken = default(CancellationToken)) - { - return GetOrAddPromise(ref onJointBreak, ref onJointBreaks, cancellationToken); - } - - - void OnJointBreak2D(Joint2D brokenJoint) - { - TrySetResult(onJointBreak2D, onJointBreak2Ds, brokenJoint); - } - - - public UniTask OnJointBreak2DAsync(CancellationToken cancellationToken = default(CancellationToken)) - { - return GetOrAddPromise(ref onJointBreak2D, ref onJointBreak2Ds, cancellationToken); - } - - - } -} - -#endif - diff --git a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncJointTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncJointTrigger.cs.meta deleted file mode 100644 index 8220736..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncJointTrigger.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 04dc74e7b2368094f9153921804a1fb7 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncLateUpdateTrigger.cs b/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncLateUpdateTrigger.cs deleted file mode 100644 index 7d9cd37..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncLateUpdateTrigger.cs +++ /dev/null @@ -1,41 +0,0 @@ - -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using System.Collections.Generic; -using System.Threading; -using UnityEngine; -using UnityEngine.EventSystems; - -namespace UniRx.Async.Triggers -{ - [DisallowMultipleComponent] - public class AsyncLateUpdateTrigger : AsyncTriggerBase - { - AsyncTriggerPromise lateUpdate; - AsyncTriggerPromiseDictionary lateUpdates; - - - protected override IEnumerable GetPromises() - { - return Concat(lateUpdate, lateUpdates); - } - - - void LateUpdate() - { - TrySetResult(lateUpdate, lateUpdates, AsyncUnit.Default); - } - - - public UniTask LateUpdateAsync(CancellationToken cancellationToken = default(CancellationToken)) - { - return GetOrAddPromise(ref lateUpdate, ref lateUpdates, cancellationToken); - } - - - } -} - -#endif - diff --git a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncLateUpdateTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncLateUpdateTrigger.cs.meta deleted file mode 100644 index 391059d..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncLateUpdateTrigger.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: a4fb2b4c09cb4ec4a82b934f2038eb36 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncMouseTrigger.cs b/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncMouseTrigger.cs deleted file mode 100644 index 68a1e5d..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncMouseTrigger.cs +++ /dev/null @@ -1,129 +0,0 @@ - -#if !(UNITY_IPHONE || UNITY_ANDROID || UNITY_METRO) - -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using System.Collections.Generic; -using System.Threading; -using UnityEngine; -using UnityEngine.EventSystems; - -namespace UniRx.Async.Triggers -{ - [DisallowMultipleComponent] - public class AsyncMouseTrigger : AsyncTriggerBase - { - AsyncTriggerPromise onMouseDown; - AsyncTriggerPromiseDictionary onMouseDowns; - AsyncTriggerPromise onMouseDrag; - AsyncTriggerPromiseDictionary onMouseDrags; - AsyncTriggerPromise onMouseEnter; - AsyncTriggerPromiseDictionary onMouseEnters; - AsyncTriggerPromise onMouseExit; - AsyncTriggerPromiseDictionary onMouseExits; - AsyncTriggerPromise onMouseOver; - AsyncTriggerPromiseDictionary onMouseOvers; - AsyncTriggerPromise onMouseUp; - AsyncTriggerPromiseDictionary onMouseUps; - AsyncTriggerPromise onMouseUpAsButton; - AsyncTriggerPromiseDictionary onMouseUpAsButtons; - - - protected override IEnumerable GetPromises() - { - return Concat(onMouseDown, onMouseDowns, onMouseDrag, onMouseDrags, onMouseEnter, onMouseEnters, onMouseExit, onMouseExits, onMouseOver, onMouseOvers, onMouseUp, onMouseUps, onMouseUpAsButton, onMouseUpAsButtons); - } - - - void OnMouseDown() - { - TrySetResult(onMouseDown, onMouseDowns, AsyncUnit.Default); - } - - - public UniTask OnMouseDownAsync(CancellationToken cancellationToken = default(CancellationToken)) - { - return GetOrAddPromise(ref onMouseDown, ref onMouseDowns, cancellationToken); - } - - - void OnMouseDrag() - { - TrySetResult(onMouseDrag, onMouseDrags, AsyncUnit.Default); - } - - - public UniTask OnMouseDragAsync(CancellationToken cancellationToken = default(CancellationToken)) - { - return GetOrAddPromise(ref onMouseDrag, ref onMouseDrags, cancellationToken); - } - - - void OnMouseEnter() - { - TrySetResult(onMouseEnter, onMouseEnters, AsyncUnit.Default); - } - - - public UniTask OnMouseEnterAsync(CancellationToken cancellationToken = default(CancellationToken)) - { - return GetOrAddPromise(ref onMouseEnter, ref onMouseEnters, cancellationToken); - } - - - void OnMouseExit() - { - TrySetResult(onMouseExit, onMouseExits, AsyncUnit.Default); - } - - - public UniTask OnMouseExitAsync(CancellationToken cancellationToken = default(CancellationToken)) - { - return GetOrAddPromise(ref onMouseExit, ref onMouseExits, cancellationToken); - } - - - void OnMouseOver() - { - TrySetResult(onMouseOver, onMouseOvers, AsyncUnit.Default); - } - - - public UniTask OnMouseOverAsync(CancellationToken cancellationToken = default(CancellationToken)) - { - return GetOrAddPromise(ref onMouseOver, ref onMouseOvers, cancellationToken); - } - - - void OnMouseUp() - { - TrySetResult(onMouseUp, onMouseUps, AsyncUnit.Default); - } - - - public UniTask OnMouseUpAsync(CancellationToken cancellationToken = default(CancellationToken)) - { - return GetOrAddPromise(ref onMouseUp, ref onMouseUps, cancellationToken); - } - - - void OnMouseUpAsButton() - { - TrySetResult(onMouseUpAsButton, onMouseUpAsButtons, AsyncUnit.Default); - } - - - public UniTask OnMouseUpAsButtonAsync(CancellationToken cancellationToken = default(CancellationToken)) - { - return GetOrAddPromise(ref onMouseUpAsButton, ref onMouseUpAsButtons, cancellationToken); - } - - - } -} - -#endif - - -#endif diff --git a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncMouseTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncMouseTrigger.cs.meta deleted file mode 100644 index 9e8706f..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncMouseTrigger.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 57ad5120e9c4d424484c963791467272 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncMoveTrigger.cs b/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncMoveTrigger.cs deleted file mode 100644 index f759f36..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncMoveTrigger.cs +++ /dev/null @@ -1,41 +0,0 @@ - -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using System.Collections.Generic; -using System.Threading; -using UnityEngine; -using UnityEngine.EventSystems; - -namespace UniRx.Async.Triggers -{ - [DisallowMultipleComponent] - public class AsyncMoveTrigger : AsyncTriggerBase - { - AsyncTriggerPromise onMove; - AsyncTriggerPromiseDictionary onMoves; - - - protected override IEnumerable GetPromises() - { - return Concat(onMove, onMoves); - } - - - void OnMove(AxisEventData eventData) - { - TrySetResult(onMove, onMoves, eventData); - } - - - public UniTask OnMoveAsync(CancellationToken cancellationToken = default(CancellationToken)) - { - return GetOrAddPromise(ref onMove, ref onMoves, cancellationToken); - } - - - } -} - -#endif - diff --git a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncMoveTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncMoveTrigger.cs.meta deleted file mode 100644 index 2ea01b7..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncMoveTrigger.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 1699926e875c24d4aa34bc8817f96f0e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncParticleTrigger.cs b/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncParticleTrigger.cs deleted file mode 100644 index ad2667b..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncParticleTrigger.cs +++ /dev/null @@ -1,41 +0,0 @@ - -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using System.Collections.Generic; -using System.Threading; -using UnityEngine; -using UnityEngine.EventSystems; - -namespace UniRx.Async.Triggers -{ - [DisallowMultipleComponent] - public class AsyncParticleTrigger : AsyncTriggerBase - { - AsyncTriggerPromise onParticleCollision; - AsyncTriggerPromiseDictionary onParticleCollisions; - - - protected override IEnumerable GetPromises() - { - return Concat(onParticleCollision, onParticleCollisions); - } - - - void OnParticleCollision(GameObject other) - { - TrySetResult(onParticleCollision, onParticleCollisions, other); - } - - - public UniTask OnParticleCollisionAsync(CancellationToken cancellationToken = default(CancellationToken)) - { - return GetOrAddPromise(ref onParticleCollision, ref onParticleCollisions, cancellationToken); - } - - - } -} - -#endif - diff --git a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncParticleTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncParticleTrigger.cs.meta deleted file mode 100644 index 4a162c7..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncParticleTrigger.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 27d3f2efd47fb1d4fb2e9130f97ea8aa -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncPointerClickTrigger.cs b/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncPointerClickTrigger.cs deleted file mode 100644 index 002b47f..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncPointerClickTrigger.cs +++ /dev/null @@ -1,41 +0,0 @@ - -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using System.Collections.Generic; -using System.Threading; -using UnityEngine; -using UnityEngine.EventSystems; - -namespace UniRx.Async.Triggers -{ - [DisallowMultipleComponent] - public class AsyncPointerClickTrigger : AsyncTriggerBase - { - AsyncTriggerPromise onPointerClick; - AsyncTriggerPromiseDictionary onPointerClicks; - - - protected override IEnumerable GetPromises() - { - return Concat(onPointerClick, onPointerClicks); - } - - - void OnPointerClick(PointerEventData eventData) - { - TrySetResult(onPointerClick, onPointerClicks, eventData); - } - - - public UniTask OnPointerClickAsync(CancellationToken cancellationToken = default(CancellationToken)) - { - return GetOrAddPromise(ref onPointerClick, ref onPointerClicks, cancellationToken); - } - - - } -} - -#endif - diff --git a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncPointerClickTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncPointerClickTrigger.cs.meta deleted file mode 100644 index 67447a7..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncPointerClickTrigger.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 9f8865abf2db3d248b3730cdb18bb8b7 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncPointerDownTrigger.cs b/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncPointerDownTrigger.cs deleted file mode 100644 index be16f28..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncPointerDownTrigger.cs +++ /dev/null @@ -1,41 +0,0 @@ - -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using System.Collections.Generic; -using System.Threading; -using UnityEngine; -using UnityEngine.EventSystems; - -namespace UniRx.Async.Triggers -{ - [DisallowMultipleComponent] - public class AsyncPointerDownTrigger : AsyncTriggerBase - { - AsyncTriggerPromise onPointerDown; - AsyncTriggerPromiseDictionary onPointerDowns; - - - protected override IEnumerable GetPromises() - { - return Concat(onPointerDown, onPointerDowns); - } - - - void OnPointerDown(PointerEventData eventData) - { - TrySetResult(onPointerDown, onPointerDowns, eventData); - } - - - public UniTask OnPointerDownAsync(CancellationToken cancellationToken = default(CancellationToken)) - { - return GetOrAddPromise(ref onPointerDown, ref onPointerDowns, cancellationToken); - } - - - } -} - -#endif - diff --git a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncPointerDownTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncPointerDownTrigger.cs.meta deleted file mode 100644 index 851cfe4..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncPointerDownTrigger.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 7c5132395605eaa498a7efedee5acdd7 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncPointerEnterTrigger.cs b/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncPointerEnterTrigger.cs deleted file mode 100644 index d98b9ec..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncPointerEnterTrigger.cs +++ /dev/null @@ -1,41 +0,0 @@ - -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using System.Collections.Generic; -using System.Threading; -using UnityEngine; -using UnityEngine.EventSystems; - -namespace UniRx.Async.Triggers -{ - [DisallowMultipleComponent] - public class AsyncPointerEnterTrigger : AsyncTriggerBase - { - AsyncTriggerPromise onPointerEnter; - AsyncTriggerPromiseDictionary onPointerEnters; - - - protected override IEnumerable GetPromises() - { - return Concat(onPointerEnter, onPointerEnters); - } - - - void OnPointerEnter(PointerEventData eventData) - { - TrySetResult(onPointerEnter, onPointerEnters, eventData); - } - - - public UniTask OnPointerEnterAsync(CancellationToken cancellationToken = default(CancellationToken)) - { - return GetOrAddPromise(ref onPointerEnter, ref onPointerEnters, cancellationToken); - } - - - } -} - -#endif - diff --git a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncPointerEnterTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncPointerEnterTrigger.cs.meta deleted file mode 100644 index 9a01b93..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncPointerEnterTrigger.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 18887d476d48533498efd14224a2f651 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncPointerExitTrigger.cs b/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncPointerExitTrigger.cs deleted file mode 100644 index 919602a..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncPointerExitTrigger.cs +++ /dev/null @@ -1,41 +0,0 @@ - -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using System.Collections.Generic; -using System.Threading; -using UnityEngine; -using UnityEngine.EventSystems; - -namespace UniRx.Async.Triggers -{ - [DisallowMultipleComponent] - public class AsyncPointerExitTrigger : AsyncTriggerBase - { - AsyncTriggerPromise onPointerExit; - AsyncTriggerPromiseDictionary onPointerExits; - - - protected override IEnumerable GetPromises() - { - return Concat(onPointerExit, onPointerExits); - } - - - void OnPointerExit(PointerEventData eventData) - { - TrySetResult(onPointerExit, onPointerExits, eventData); - } - - - public UniTask OnPointerExitAsync(CancellationToken cancellationToken = default(CancellationToken)) - { - return GetOrAddPromise(ref onPointerExit, ref onPointerExits, cancellationToken); - } - - - } -} - -#endif - diff --git a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncPointerExitTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncPointerExitTrigger.cs.meta deleted file mode 100644 index 39ab381..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncPointerExitTrigger.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 9e3ed09876a11a84794795809ebee243 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncPointerUpTrigger.cs b/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncPointerUpTrigger.cs deleted file mode 100644 index 2cee05e..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncPointerUpTrigger.cs +++ /dev/null @@ -1,41 +0,0 @@ - -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using System.Collections.Generic; -using System.Threading; -using UnityEngine; -using UnityEngine.EventSystems; - -namespace UniRx.Async.Triggers -{ - [DisallowMultipleComponent] - public class AsyncPointerUpTrigger : AsyncTriggerBase - { - AsyncTriggerPromise onPointerUp; - AsyncTriggerPromiseDictionary onPointerUps; - - - protected override IEnumerable GetPromises() - { - return Concat(onPointerUp, onPointerUps); - } - - - void OnPointerUp(PointerEventData eventData) - { - TrySetResult(onPointerUp, onPointerUps, eventData); - } - - - public UniTask OnPointerUpAsync(CancellationToken cancellationToken = default(CancellationToken)) - { - return GetOrAddPromise(ref onPointerUp, ref onPointerUps, cancellationToken); - } - - - } -} - -#endif - diff --git a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncPointerUpTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncPointerUpTrigger.cs.meta deleted file mode 100644 index 7be4e27..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncPointerUpTrigger.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 7a0493ea32f81314cbbaf2b635ba3167 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncRectTransformTrigger.cs b/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncRectTransformTrigger.cs deleted file mode 100644 index 96cb767..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncRectTransformTrigger.cs +++ /dev/null @@ -1,55 +0,0 @@ - -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using System.Collections.Generic; -using System.Threading; -using UnityEngine; -using UnityEngine.EventSystems; - -namespace UniRx.Async.Triggers -{ - [DisallowMultipleComponent] - public class AsyncRectTransformTrigger : AsyncTriggerBase - { - AsyncTriggerPromise onRectTransformDimensionsChange; - AsyncTriggerPromiseDictionary onRectTransformDimensionsChanges; - AsyncTriggerPromise onRectTransformRemoved; - AsyncTriggerPromiseDictionary onRectTransformRemoveds; - - - protected override IEnumerable GetPromises() - { - return Concat(onRectTransformDimensionsChange, onRectTransformDimensionsChanges, onRectTransformRemoved, onRectTransformRemoveds); - } - - - void OnRectTransformDimensionsChange() - { - TrySetResult(onRectTransformDimensionsChange, onRectTransformDimensionsChanges, AsyncUnit.Default); - } - - - public UniTask OnRectTransformDimensionsChangeAsync(CancellationToken cancellationToken = default(CancellationToken)) - { - return GetOrAddPromise(ref onRectTransformDimensionsChange, ref onRectTransformDimensionsChanges, cancellationToken); - } - - - void OnRectTransformRemoved() - { - TrySetResult(onRectTransformRemoved, onRectTransformRemoveds, AsyncUnit.Default); - } - - - public UniTask OnRectTransformRemovedAsync(CancellationToken cancellationToken = default(CancellationToken)) - { - return GetOrAddPromise(ref onRectTransformRemoved, ref onRectTransformRemoveds, cancellationToken); - } - - - } -} - -#endif - diff --git a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncRectTransformTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncRectTransformTrigger.cs.meta deleted file mode 100644 index 98c4f70..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncRectTransformTrigger.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: dfe3470221c66c84397c0783c62b24e7 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncScrollTrigger.cs b/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncScrollTrigger.cs deleted file mode 100644 index 492abd1..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncScrollTrigger.cs +++ /dev/null @@ -1,41 +0,0 @@ - -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using System.Collections.Generic; -using System.Threading; -using UnityEngine; -using UnityEngine.EventSystems; - -namespace UniRx.Async.Triggers -{ - [DisallowMultipleComponent] - public class AsyncScrollTrigger : AsyncTriggerBase - { - AsyncTriggerPromise onScroll; - AsyncTriggerPromiseDictionary onScrolls; - - - protected override IEnumerable GetPromises() - { - return Concat(onScroll, onScrolls); - } - - - void OnScroll(PointerEventData eventData) - { - TrySetResult(onScroll, onScrolls, eventData); - } - - - public UniTask OnScrollAsync(CancellationToken cancellationToken = default(CancellationToken)) - { - return GetOrAddPromise(ref onScroll, ref onScrolls, cancellationToken); - } - - - } -} - -#endif - diff --git a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncScrollTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncScrollTrigger.cs.meta deleted file mode 100644 index 541bdbe..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncScrollTrigger.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 7c751e9d3deb97d4d8691a8a583c2afd -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncSelectTrigger.cs b/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncSelectTrigger.cs deleted file mode 100644 index f08bb7b..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncSelectTrigger.cs +++ /dev/null @@ -1,41 +0,0 @@ - -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using System.Collections.Generic; -using System.Threading; -using UnityEngine; -using UnityEngine.EventSystems; - -namespace UniRx.Async.Triggers -{ - [DisallowMultipleComponent] - public class AsyncSelectTrigger : AsyncTriggerBase - { - AsyncTriggerPromise onSelect; - AsyncTriggerPromiseDictionary onSelects; - - - protected override IEnumerable GetPromises() - { - return Concat(onSelect, onSelects); - } - - - void OnSelect(BaseEventData eventData) - { - TrySetResult(onSelect, onSelects, eventData); - } - - - public UniTask OnSelectAsync(CancellationToken cancellationToken = default(CancellationToken)) - { - return GetOrAddPromise(ref onSelect, ref onSelects, cancellationToken); - } - - - } -} - -#endif - diff --git a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncSelectTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncSelectTrigger.cs.meta deleted file mode 100644 index dd4563b..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncSelectTrigger.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: fcc2347251a4fc5498a03f0c17382920 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncStartTrigger.cs b/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncStartTrigger.cs deleted file mode 100644 index fcfc7fb..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncStartTrigger.cs +++ /dev/null @@ -1,64 +0,0 @@ -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using UnityEngine; - -namespace UniRx.Async.Triggers -{ - [DisallowMultipleComponent] - public class AsyncStartTrigger : MonoBehaviour - { - bool awakeCalled = false; - bool called = false; - UniTaskCompletionSource promise; - - void Awake() - { - awakeCalled = true; - } - - void Start() - { - called = true; - promise?.TrySetResult(); - } - - public UniTask StartAsync() - { - if (called) return UniTask.CompletedTask; - if (!awakeCalled) - { - PlayerLoopHelper.AddAction(PlayerLoopTiming.Update, new AwakeMonitor(this)); - } - return new UniTask(promise ?? (promise = new UniTaskCompletionSource())); - } - - private void OnDestroy() - { - promise?.TrySetCanceled(); - } - - class AwakeMonitor : IPlayerLoopItem - { - readonly AsyncStartTrigger trigger; - - public AwakeMonitor(AsyncStartTrigger trigger) - { - this.trigger = trigger; - } - - public bool MoveNext() - { - if (trigger.awakeCalled) return false; - if (trigger == null) - { - trigger.OnDestroy(); - return false; - } - return true; - } - } - } -} - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncStartTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncStartTrigger.cs.meta deleted file mode 100644 index 9ef06e8..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncStartTrigger.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: b4fd0f75e54ec3d4fbcb7fc65b11646b -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncSubmitTrigger.cs b/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncSubmitTrigger.cs deleted file mode 100644 index dc063db..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncSubmitTrigger.cs +++ /dev/null @@ -1,41 +0,0 @@ - -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using System.Collections.Generic; -using System.Threading; -using UnityEngine; -using UnityEngine.EventSystems; - -namespace UniRx.Async.Triggers -{ - [DisallowMultipleComponent] - public class AsyncSubmitTrigger : AsyncTriggerBase - { - AsyncTriggerPromise onSubmit; - AsyncTriggerPromiseDictionary onSubmits; - - - protected override IEnumerable GetPromises() - { - return Concat(onSubmit, onSubmits); - } - - - void OnSubmit(BaseEventData eventData) - { - TrySetResult(onSubmit, onSubmits, eventData); - } - - - public UniTask OnSubmitAsync(CancellationToken cancellationToken = default(CancellationToken)) - { - return GetOrAddPromise(ref onSubmit, ref onSubmits, cancellationToken); - } - - - } -} - -#endif - diff --git a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncSubmitTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncSubmitTrigger.cs.meta deleted file mode 100644 index 16b6b05..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncSubmitTrigger.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 97e85abc2d7ec0c44adfbe5ee971aad3 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncTransformChangedTrigger.cs b/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncTransformChangedTrigger.cs deleted file mode 100644 index d6ca5a3..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncTransformChangedTrigger.cs +++ /dev/null @@ -1,69 +0,0 @@ - -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using System.Collections.Generic; -using System.Threading; -using UnityEngine; -using UnityEngine.EventSystems; - -namespace UniRx.Async.Triggers -{ - [DisallowMultipleComponent] - public class AsyncTransformChangedTrigger : AsyncTriggerBase - { - AsyncTriggerPromise onBeforeTransformParentChanged; - AsyncTriggerPromiseDictionary onBeforeTransformParentChangeds; - AsyncTriggerPromise onTransformParentChanged; - AsyncTriggerPromiseDictionary onTransformParentChangeds; - AsyncTriggerPromise onTransformChildrenChanged; - AsyncTriggerPromiseDictionary onTransformChildrenChangeds; - - - protected override IEnumerable GetPromises() - { - return Concat(onBeforeTransformParentChanged, onBeforeTransformParentChangeds, onTransformParentChanged, onTransformParentChangeds, onTransformChildrenChanged, onTransformChildrenChangeds); - } - - - void OnBeforeTransformParentChanged() - { - TrySetResult(onBeforeTransformParentChanged, onBeforeTransformParentChangeds, AsyncUnit.Default); - } - - - public UniTask OnBeforeTransformParentChangedAsync(CancellationToken cancellationToken = default(CancellationToken)) - { - return GetOrAddPromise(ref onBeforeTransformParentChanged, ref onBeforeTransformParentChangeds, cancellationToken); - } - - - void OnTransformParentChanged() - { - TrySetResult(onTransformParentChanged, onTransformParentChangeds, AsyncUnit.Default); - } - - - public UniTask OnTransformParentChangedAsync(CancellationToken cancellationToken = default(CancellationToken)) - { - return GetOrAddPromise(ref onTransformParentChanged, ref onTransformParentChangeds, cancellationToken); - } - - - void OnTransformChildrenChanged() - { - TrySetResult(onTransformChildrenChanged, onTransformChildrenChangeds, AsyncUnit.Default); - } - - - public UniTask OnTransformChildrenChangedAsync(CancellationToken cancellationToken = default(CancellationToken)) - { - return GetOrAddPromise(ref onTransformChildrenChanged, ref onTransformChildrenChangeds, cancellationToken); - } - - - } -} - -#endif - diff --git a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncTransformChangedTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncTransformChangedTrigger.cs.meta deleted file mode 100644 index 60b6c38..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncTransformChangedTrigger.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 053f983cd760f5e4394be8fd657243c1 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncTrigger2DTrigger.cs b/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncTrigger2DTrigger.cs deleted file mode 100644 index 0a88bb1..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncTrigger2DTrigger.cs +++ /dev/null @@ -1,69 +0,0 @@ - -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using System.Collections.Generic; -using System.Threading; -using UnityEngine; -using UnityEngine.EventSystems; - -namespace UniRx.Async.Triggers -{ - [DisallowMultipleComponent] - public class AsyncTrigger2DTrigger : AsyncTriggerBase - { - AsyncTriggerPromise onTriggerEnter2D; - AsyncTriggerPromiseDictionary onTriggerEnter2Ds; - AsyncTriggerPromise onTriggerExit2D; - AsyncTriggerPromiseDictionary onTriggerExit2Ds; - AsyncTriggerPromise onTriggerStay2D; - AsyncTriggerPromiseDictionary onTriggerStay2Ds; - - - protected override IEnumerable GetPromises() - { - return Concat(onTriggerEnter2D, onTriggerEnter2Ds, onTriggerExit2D, onTriggerExit2Ds, onTriggerStay2D, onTriggerStay2Ds); - } - - - void OnTriggerEnter2D(Collider2D other) - { - TrySetResult(onTriggerEnter2D, onTriggerEnter2Ds, other); - } - - - public UniTask OnTriggerEnter2DAsync(CancellationToken cancellationToken = default(CancellationToken)) - { - return GetOrAddPromise(ref onTriggerEnter2D, ref onTriggerEnter2Ds, cancellationToken); - } - - - void OnTriggerExit2D(Collider2D other) - { - TrySetResult(onTriggerExit2D, onTriggerExit2Ds, other); - } - - - public UniTask OnTriggerExit2DAsync(CancellationToken cancellationToken = default(CancellationToken)) - { - return GetOrAddPromise(ref onTriggerExit2D, ref onTriggerExit2Ds, cancellationToken); - } - - - void OnTriggerStay2D(Collider2D other) - { - TrySetResult(onTriggerStay2D, onTriggerStay2Ds, other); - } - - - public UniTask OnTriggerStay2DAsync(CancellationToken cancellationToken = default(CancellationToken)) - { - return GetOrAddPromise(ref onTriggerStay2D, ref onTriggerStay2Ds, cancellationToken); - } - - - } -} - -#endif - diff --git a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncTrigger2DTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncTrigger2DTrigger.cs.meta deleted file mode 100644 index 8d88bad..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncTrigger2DTrigger.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 102f8eba36bc2a54e878e67aca9686e5 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncTriggerBase.cs b/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncTriggerBase.cs deleted file mode 100644 index 2af3ced..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncTriggerBase.cs +++ /dev/null @@ -1,271 +0,0 @@ -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using System; -using System.Collections.Generic; -using System.Threading; -using UniRx.Async.Internal; -using UnityEngine; - -namespace UniRx.Async.Triggers -{ - public interface ICancelablePromise - { - CancellationToken RegisteredCancellationToken { get; } - bool TrySetCanceled(); - } - - public class AsyncTriggerPromise : ReusablePromise, IPromise, ICancelablePromise - { - public CancellationToken RegisteredCancellationToken { get; private set; } - - public AsyncTriggerPromise() - : this(CancellationToken.None) - { - } - - public AsyncTriggerPromise(CancellationToken cancellationToken) - { - this.RegisteredCancellationToken = cancellationToken; - TaskTracker.TrackActiveTask(this); - } - - public override T GetResult() - { - if (Status == AwaiterStatus.Pending) return RawResult; - return base.GetResult(); - } - - public override bool TrySetResult(T result) - { - if (Status == AwaiterStatus.Pending) - { - // keep status as Pending. - this.ForceSetResult(result); - TryInvokeContinuation(); - return true; - } - return false; - } - - public override bool TrySetCanceled() - { - if (Status == AwaiterStatus.Canceled) return false; - TaskTracker.RemoveTracking(this); - return base.TrySetCanceled(); - } - } - - public interface ICancellationTokenKeyDictionary - { - void Remove(CancellationToken token); - } - - public class AsyncTriggerPromiseDictionary : - Dictionary>, - ICancellationTokenKeyDictionary, - IEnumerable - { - public AsyncTriggerPromiseDictionary() - : base(CancellationTokenEqualityComparer.Default) - { - } - - IEnumerator IEnumerable.GetEnumerator() - { - return Values.GetEnumerator(); - } - - void ICancellationTokenKeyDictionary.Remove(CancellationToken token) - { - this.Remove(token); - } - } - - public abstract class AsyncTriggerBase : MonoBehaviour - { - static readonly Action Callback = CancelCallback; - - bool calledAwake = false; - bool destroyCalled = false; - CancellationTokenRegistration[] registeredCancellations; - int registeredCancellationsCount; - - protected abstract IEnumerable GetPromises(); - - static protected IEnumerable Concat(ICancelablePromise p1, IEnumerable p1s) - { - if (p1 != null) yield return p1; - if (p1s != null) foreach (var item in p1s) yield return item; - } - - static protected IEnumerable Concat( - ICancelablePromise p1, IEnumerable p1s, - ICancelablePromise p2, IEnumerable p2s) - { - if (p1 != null) yield return p1; - if (p1s != null) foreach (var item in p1s) yield return item; - if (p2 != null) yield return p2; - if (p2s != null) foreach (var item in p2s) yield return item; - } - - static protected IEnumerable Concat( - ICancelablePromise p1, IEnumerable p1s, - ICancelablePromise p2, IEnumerable p2s, - ICancelablePromise p3, IEnumerable p3s) - { - if (p1 != null) yield return p1; - if (p1s != null) foreach (var item in p1s) yield return item; - if (p2 != null) yield return p2; - if (p2s != null) foreach (var item in p2s) yield return item; - if (p3 != null) yield return p3; - if (p3s != null) foreach (var item in p3s) yield return item; - } - - static protected IEnumerable Concat( - ICancelablePromise p1, IEnumerable p1s, - ICancelablePromise p2, IEnumerable p2s, - ICancelablePromise p3, IEnumerable p3s, - ICancelablePromise p4, IEnumerable p4s) - { - if (p1 != null) yield return p1; - if (p1s != null) foreach (var item in p1s) yield return item; - if (p2 != null) yield return p2; - if (p2s != null) foreach (var item in p2s) yield return item; - if (p3 != null) yield return p3; - if (p3s != null) foreach (var item in p3s) yield return item; - if (p4 != null) yield return p4; - if (p4s != null) foreach (var item in p4s) yield return item; - } - - // otherwise... - static protected IEnumerable Concat(params object[] promises) - { - foreach (var item in promises) - { - if (item is ICancelablePromise p) - { - yield return p; - } - else if (item is IEnumerable ps) - { - foreach (var p2 in ps) - { - yield return p2; - } - } - } - } - - protected UniTask GetOrAddPromise(ref AsyncTriggerPromise promise, ref AsyncTriggerPromiseDictionary promises, CancellationToken cancellationToken) - { - if (destroyCalled) return UniTask.FromCanceled(); - - if (!cancellationToken.CanBeCanceled) - { - if (promise == null) - { - promise = new AsyncTriggerPromise(); - if (!calledAwake) - { - PlayerLoopHelper.AddAction(PlayerLoopTiming.Update, new AwakeMonitor(this)); - } - } - return promise.Task; - } - - if (promises == null) promises = new AsyncTriggerPromiseDictionary(); - - if (promises.TryGetValue(cancellationToken, out var cancellablePromise)) - { - return cancellablePromise.Task; - } - - cancellablePromise = new AsyncTriggerPromise(); - promises.Add(cancellationToken, cancellablePromise); - if (!calledAwake) - { - PlayerLoopHelper.AddAction(PlayerLoopTiming.Update, new AwakeMonitor(this)); - } - - var registrationToken = cancellationToken.RegisterWithoutCaptureExecutionContext(Callback, Tuple.Create((ICancellationTokenKeyDictionary)promises, (ICancelablePromise)cancellablePromise)); - if (registeredCancellations == null) - { - registeredCancellations = ArrayPool.Shared.Rent(4); - } - ArrayPoolUtil.EnsureCapacity(ref registeredCancellations, registeredCancellationsCount + 1, ArrayPool.Shared); - registeredCancellations[registeredCancellationsCount++] = registrationToken; - - return cancellablePromise.Task; - } - - static void CancelCallback(object state) - { - var tuple = (Tuple)state; - var dict = tuple.Item1; - var promise = tuple.Item2; - - promise.TrySetCanceled(); - dict.Remove(promise.RegisteredCancellationToken); - } - - protected void TrySetResult(ReusablePromise promise, AsyncTriggerPromiseDictionary promises, T value) - { - if (promise != null) - { - promise.TrySetResult(value); - } - if (promises != null) - { - PromiseHelper.TrySetResultAll(promises.Values, value); - } - } - - void Awake() - { - calledAwake = true; - } - - void OnDestroy() - { - if (destroyCalled) return; - destroyCalled = true; - foreach (var item in GetPromises()) - { - item.TrySetCanceled(); - } - if (registeredCancellations != null) - { - for (int i = 0; i < registeredCancellationsCount; i++) - { - registeredCancellations[i].Dispose(); - registeredCancellations[i] = default(CancellationTokenRegistration); - } - ArrayPool.Shared.Return(registeredCancellations); - } - } - - class AwakeMonitor : IPlayerLoopItem - { - readonly AsyncTriggerBase trigger; - - public AwakeMonitor(AsyncTriggerBase trigger) - { - this.trigger = trigger; - } - - public bool MoveNext() - { - if (trigger.calledAwake) return false; - if (trigger == null) - { - trigger.OnDestroy(); - return false; - } - return true; - } - } - } -} - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncTriggerBase.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncTriggerBase.cs.meta deleted file mode 100644 index 9757004..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncTriggerBase.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 2c0c2bcee832c6641b25949c412f020f -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncTriggerExtensions.cs b/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncTriggerExtensions.cs deleted file mode 100644 index e0eddd5..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncTriggerExtensions.cs +++ /dev/null @@ -1,511 +0,0 @@ -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using System.Threading; -using UnityEngine; - -namespace UniRx.Async.Triggers -{ - public static class AsyncTriggerExtensions - { - // Util. - - static T GetOrAddComponent(GameObject gameObject) - where T : Component - { - var component = gameObject.GetComponent(); - if (component == null) - { - component = gameObject.AddComponent(); - } - - return component; - } - - // Special for single operation. - - /// This function is called when the MonoBehaviour will be destroyed. - public static UniTask OnDestroyAsync(this GameObject gameObject) - { - return gameObject.GetAsyncDestroyTrigger().OnDestroyAsync(); - } - - /// This function is called when the MonoBehaviour will be destroyed. - public static UniTask OnDestroyAsync(this Component component) - { - return component.GetAsyncDestroyTrigger().OnDestroyAsync(); - } - - /// This CancellationToken is canceled when the MonoBehaviour will be destroyed. - public static CancellationToken GetCancellationTokenOnDestroy(this GameObject gameObject) - { - return gameObject.GetAsyncDestroyTrigger().CancellationToken; - } - - /// This CancellationToken is canceled when the MonoBehaviour will be destroyed. - public static CancellationToken GetCancellationTokenOnDestroy(this Component component) - { - return component.GetAsyncDestroyTrigger().CancellationToken; - } - - public static UniTask StartAsync(this GameObject gameObject) - { - return gameObject.GetAsyncStartTrigger().StartAsync(); - } - - public static UniTask StartAsync(this Component component) - { - return component.GetAsyncStartTrigger().StartAsync(); - } - - public static UniTask AwakeAsync(this GameObject gameObject) - { - return gameObject.GetAsyncAwakeTrigger().AwakeAsync(); - } - - public static UniTask AwakeAsync(this Component component) - { - return component.GetAsyncAwakeTrigger().AwakeAsync(); - } - - // Get Triggers. - - /// Get for OnAnimatorIKAsync | OnAnimatorMoveAsync. - public static AsyncAnimatorTrigger GetAsyncAnimatorTrigger(this GameObject gameObject) - { - return GetOrAddComponent(gameObject); - } - - /// Get for OnAnimatorIKAsync | OnAnimatorMoveAsync. - public static AsyncAnimatorTrigger GetAsyncAnimatorTrigger(this Component component) - { - return component.gameObject.GetAsyncAnimatorTrigger(); - } - - /// Get for AwakeAsync. - public static AsyncAwakeTrigger GetAsyncAwakeTrigger(this GameObject gameObject) - { - return GetOrAddComponent(gameObject); - } - - /// Get for AwakeAsync. - public static AsyncAwakeTrigger GetAsyncAwakeTrigger(this Component component) - { - return component.gameObject.GetAsyncAwakeTrigger(); - } - - /// Get for OnBeginDragAsync. - public static AsyncBeginDragTrigger GetAsyncBeginDragTrigger(this GameObject gameObject) - { - return GetOrAddComponent(gameObject); - } - - /// Get for OnBeginDragAsync. - public static AsyncBeginDragTrigger GetAsyncBeginDragTrigger(this Component component) - { - return component.gameObject.GetAsyncBeginDragTrigger(); - } - - /// Get for OnCancelAsync. - public static AsyncCancelTrigger GetAsyncCancelTrigger(this GameObject gameObject) - { - return GetOrAddComponent(gameObject); - } - - /// Get for OnCancelAsync. - public static AsyncCancelTrigger GetAsyncCancelTrigger(this Component component) - { - return component.gameObject.GetAsyncCancelTrigger(); - } - - /// Get for OnCanvasGroupChangedAsync. - public static AsyncCanvasGroupChangedTrigger GetAsyncCanvasGroupChangedTrigger(this GameObject gameObject) - { - return GetOrAddComponent(gameObject); - } - - /// Get for OnCanvasGroupChangedAsync. - public static AsyncCanvasGroupChangedTrigger GetAsyncCanvasGroupChangedTrigger(this Component component) - { - return component.gameObject.GetAsyncCanvasGroupChangedTrigger(); - } - - /// Get for OnCollisionEnter2DAsync | OnCollisionExit2DAsync | OnCollisionStay2DAsync. - public static AsyncCollision2DTrigger GetAsyncCollision2DTrigger(this GameObject gameObject) - { - return GetOrAddComponent(gameObject); - } - - /// Get for OnCollisionEnter2DAsync | OnCollisionExit2DAsync | OnCollisionStay2DAsync. - public static AsyncCollision2DTrigger GetAsyncCollision2DTrigger(this Component component) - { - return component.gameObject.GetAsyncCollision2DTrigger(); - } - - /// Get for OnCollisionEnterAsync | OnCollisionExitAsync | OnCollisionStayAsync. - public static AsyncCollisionTrigger GetAsyncCollisionTrigger(this GameObject gameObject) - { - return GetOrAddComponent(gameObject); - } - - /// Get for OnCollisionEnterAsync | OnCollisionExitAsync | OnCollisionStayAsync. - public static AsyncCollisionTrigger GetAsyncCollisionTrigger(this Component component) - { - return component.gameObject.GetAsyncCollisionTrigger(); - } - - /// Get for OnDeselectAsync. - public static AsyncDeselectTrigger GetAsyncDeselectTrigger(this GameObject gameObject) - { - return GetOrAddComponent(gameObject); - } - - /// Get for OnDeselectAsync. - public static AsyncDeselectTrigger GetAsyncDeselectTrigger(this Component component) - { - return component.gameObject.GetAsyncDeselectTrigger(); - } - - /// Get for OnDestroyAsync. - public static AsyncDestroyTrigger GetAsyncDestroyTrigger(this GameObject gameObject) - { - return GetOrAddComponent(gameObject); - } - - /// Get for OnDestroyAsync. - public static AsyncDestroyTrigger GetAsyncDestroyTrigger(this Component component) - { - return component.gameObject.GetAsyncDestroyTrigger(); - } - - /// Get for OnDragAsync. - public static AsyncDragTrigger GetAsyncDragTrigger(this GameObject gameObject) - { - return GetOrAddComponent(gameObject); - } - - /// Get for OnDragAsync. - public static AsyncDragTrigger GetAsyncDragTrigger(this Component component) - { - return component.gameObject.GetAsyncDragTrigger(); - } - - /// Get for OnDropAsync. - public static AsyncDropTrigger GetAsyncDropTrigger(this GameObject gameObject) - { - return GetOrAddComponent(gameObject); - } - - /// Get for OnDropAsync. - public static AsyncDropTrigger GetAsyncDropTrigger(this Component component) - { - return component.gameObject.GetAsyncDropTrigger(); - } - - /// Get for OnEnableAsync | OnDisableAsync. - public static AsyncEnableDisableTrigger GetAsyncEnableDisableTrigger(this GameObject gameObject) - { - return GetOrAddComponent(gameObject); - } - - /// Get for OnEnableAsync | OnDisableAsync. - public static AsyncEnableDisableTrigger GetAsyncEnableDisableTrigger(this Component component) - { - return component.gameObject.GetAsyncEnableDisableTrigger(); - } - - /// Get for OnEndDragAsync. - public static AsyncEndDragTrigger GetAsyncEndDragTrigger(this GameObject gameObject) - { - return GetOrAddComponent(gameObject); - } - - /// Get for OnEndDragAsync. - public static AsyncEndDragTrigger GetAsyncEndDragTrigger(this Component component) - { - return component.gameObject.GetAsyncEndDragTrigger(); - } - - /// Get for FixedUpdateAsync. - public static AsyncFixedUpdateTrigger GetAsyncFixedUpdateTrigger(this GameObject gameObject) - { - return GetOrAddComponent(gameObject); - } - - /// Get for FixedUpdateAsync. - public static AsyncFixedUpdateTrigger GetAsyncFixedUpdateTrigger(this Component component) - { - return component.gameObject.GetAsyncFixedUpdateTrigger(); - } - - /// Get for OnInitializePotentialDragAsync. - public static AsyncInitializePotentialDragTrigger GetAsyncInitializePotentialDragTrigger(this GameObject gameObject) - { - return GetOrAddComponent(gameObject); - } - - /// Get for OnInitializePotentialDragAsync. - public static AsyncInitializePotentialDragTrigger GetAsyncInitializePotentialDragTrigger(this Component component) - { - return component.gameObject.GetAsyncInitializePotentialDragTrigger(); - } - - /// Get for OnJointBreakAsync. - public static AsyncJointTrigger GetAsyncJointTrigger(this GameObject gameObject) - { - return GetOrAddComponent(gameObject); - } - - /// Get for OnJointBreakAsync. - public static AsyncJointTrigger GetAsyncJointTrigger(this Component component) - { - return component.gameObject.GetAsyncJointTrigger(); - } - - /// Get for LateUpdateAsync. - public static AsyncLateUpdateTrigger GetAsyncLateUpdateTrigger(this GameObject gameObject) - { - return GetOrAddComponent(gameObject); - } - - /// Get for LateUpdateAsync. - public static AsyncLateUpdateTrigger GetAsyncLateUpdateTrigger(this Component component) - { - return component.gameObject.GetAsyncLateUpdateTrigger(); - } - -#if !(UNITY_IPHONE || UNITY_ANDROID || UNITY_METRO) - - /// Get for OnMouseDownAsync | OnMouseDragAsync | OnMouseEnterAsync | OnMouseExitAsync | OnMouseOverAsync | OnMouseUpAsync | OnMouseUpAsButtonAsync. - public static AsyncMouseTrigger GetAsyncMouseTrigger(this GameObject gameObject) - { - return GetOrAddComponent(gameObject); - } - - /// Get for OnMouseDownAsync | OnMouseDragAsync | OnMouseEnterAsync | OnMouseExitAsync | OnMouseOverAsync | OnMouseUpAsync | OnMouseUpAsButtonAsync. - public static AsyncMouseTrigger GetAsyncMouseTrigger(this Component component) - { - return component.gameObject.GetAsyncMouseTrigger(); - } - -#endif - - /// Get for OnMoveAsync. - public static AsyncMoveTrigger GetAsyncMoveTrigger(this GameObject gameObject) - { - return GetOrAddComponent(gameObject); - } - - /// Get for OnMoveAsync. - public static AsyncMoveTrigger GetAsyncMoveTrigger(this Component component) - { - return component.gameObject.GetAsyncMoveTrigger(); - } - - /// Get for OnParticleCollisionAsync | OnParticleTriggerAsync. - public static AsyncParticleTrigger GetAsyncParticleTrigger(this GameObject gameObject) - { - return GetOrAddComponent(gameObject); - } - - /// Get for OnParticleCollisionAsync | OnParticleTriggerAsync. - public static AsyncParticleTrigger GetAsyncParticleTrigger(this Component component) - { - return component.gameObject.GetAsyncParticleTrigger(); - } - - /// Get for OnPointerClickAsync. - public static AsyncPointerClickTrigger GetAsyncPointerClickTrigger(this GameObject gameObject) - { - return GetOrAddComponent(gameObject); - } - - /// Get for OnPointerClickAsync. - public static AsyncPointerClickTrigger GetAsyncPointerClickTrigger(this Component component) - { - return component.gameObject.GetAsyncPointerClickTrigger(); - } - - /// Get for OnPointerDownAsync. - public static AsyncPointerDownTrigger GetAsyncPointerDownTrigger(this GameObject gameObject) - { - return GetOrAddComponent(gameObject); - } - - /// Get for OnPointerDownAsync. - public static AsyncPointerDownTrigger GetAsyncPointerDownTrigger(this Component component) - { - return component.gameObject.GetAsyncPointerDownTrigger(); - } - - /// Get for OnPointerEnterAsync. - public static AsyncPointerEnterTrigger GetAsyncPointerEnterTrigger(this GameObject gameObject) - { - return GetOrAddComponent(gameObject); - } - - /// Get for OnPointerEnterAsync. - public static AsyncPointerEnterTrigger GetAsyncPointerEnterTrigger(this Component component) - { - return component.gameObject.GetAsyncPointerEnterTrigger(); - } - - /// Get for OnPointerExitAsync. - public static AsyncPointerExitTrigger GetAsyncPointerExitTrigger(this GameObject gameObject) - { - return GetOrAddComponent(gameObject); - } - - /// Get for OnPointerExitAsync. - public static AsyncPointerExitTrigger GetAsyncPointerExitTrigger(this Component component) - { - return component.gameObject.GetAsyncPointerExitTrigger(); - } - - /// Get for OnPointerUpAsync. - public static AsyncPointerUpTrigger GetAsyncPointerUpTrigger(this GameObject gameObject) - { - return GetOrAddComponent(gameObject); - } - - /// Get for OnPointerUpAsync. - public static AsyncPointerUpTrigger GetAsyncPointerUpTrigger(this Component component) - { - return component.gameObject.GetAsyncPointerUpTrigger(); - } - - /// Get for OnRectTransformDimensionsChange | OnRectTransformDimensionsChangeAsync | OnRectTransformRemoved | OnRectTransformRemovedAsync. - public static AsyncRectTransformTrigger GetAsyncRectTransformTrigger(this GameObject gameObject) - { - return GetOrAddComponent(gameObject); - } - - /// Get for OnRectTransformDimensionsChange | OnRectTransformDimensionsChangeAsync | OnRectTransformRemoved | OnRectTransformRemovedAsync. - public static AsyncRectTransformTrigger GetAsyncRectTransformTrigger(this Component component) - { - return component.gameObject.GetAsyncRectTransformTrigger(); - } - - /// Get for OnScrollAsync. - public static AsyncScrollTrigger GetAsyncScrollTrigger(this GameObject gameObject) - { - return GetOrAddComponent(gameObject); - } - - /// Get for OnScrollAsync. - public static AsyncScrollTrigger GetAsyncScrollTrigger(this Component component) - { - return component.gameObject.GetAsyncScrollTrigger(); - } - - /// Get for OnSelectAsync. - public static AsyncSelectTrigger GetAsyncSelectTrigger(this GameObject gameObject) - { - return GetOrAddComponent(gameObject); - } - - /// Get for OnSelectAsync. - public static AsyncSelectTrigger GetAsyncSelectTrigger(this Component component) - { - return component.gameObject.GetAsyncSelectTrigger(); - } - - /// Get for StartAsync. - public static AsyncStartTrigger GetAsyncStartTrigger(this GameObject gameObject) - { - return GetOrAddComponent(gameObject); - } - - /// Get for StartAsync. - public static AsyncStartTrigger GetAsyncStartTrigger(this Component component) - { - return component.gameObject.GetAsyncStartTrigger(); - } - - /// Get for OnSubmitAsync. - public static AsyncSubmitTrigger GetAsyncSubmitTrigger(this GameObject gameObject) - { - return GetOrAddComponent(gameObject); - } - - /// Get for OnSubmitAsync. - public static AsyncSubmitTrigger GetAsyncSubmitTrigger(this Component component) - { - return component.gameObject.GetAsyncSubmitTrigger(); - } - - /// Get for OnBeforeTransformParentChangedAsync | OnTransformParentChangedAsync | OnTransformChildrenChangedAsync. - public static AsyncTransformChangedTrigger GetAsyncTransformChangedTrigger(this GameObject gameObject) - { - return GetOrAddComponent(gameObject); - } - - /// Get for OnBeforeTransformParentChangedAsync | OnTransformParentChangedAsync | OnTransformChildrenChangedAsync. - public static AsyncTransformChangedTrigger GetAsyncTransformChangedTrigger(this Component component) - { - return component.gameObject.GetAsyncTransformChangedTrigger(); - } - - /// Get for OnTriggerEnter2DAsync | OnTriggerExit2DAsync | OnTriggerStay2DAsync. - public static AsyncTrigger2DTrigger GetAsyncTrigger2DTrigger(this GameObject gameObject) - { - return GetOrAddComponent(gameObject); - } - - /// Get for OnTriggerEnter2DAsync | OnTriggerExit2DAsync | OnTriggerStay2DAsync. - public static AsyncTrigger2DTrigger GetAsyncTrigger2DTrigger(this Component component) - { - return component.gameObject.GetAsyncTrigger2DTrigger(); - } - - /// Get for OnTriggerEnterAsync | OnTriggerExitAsync | OnTriggerStayAsync. - public static AsyncTriggerTrigger GetAsyncTriggerTrigger(this GameObject gameObject) - { - return GetOrAddComponent(gameObject); - } - - /// Get for OnTriggerEnterAsync | OnTriggerExitAsync | OnTriggerStayAsync. - public static AsyncTriggerTrigger GetAsyncTriggerTrigger(this Component component) - { - return component.gameObject.GetAsyncTriggerTrigger(); - } - - /// Get for OnUpdateSelectedAsync. - public static AsyncUpdateSelectedTrigger GetAsyncUpdateSelectedTrigger(this GameObject gameObject) - { - return GetOrAddComponent(gameObject); - } - - /// Get for OnUpdateSelectedAsync. - public static AsyncUpdateSelectedTrigger GetAsyncUpdateSelectedTrigger(this Component component) - { - return component.gameObject.GetAsyncUpdateSelectedTrigger(); - } - - /// Get for UpdateAsync. - public static AsyncUpdateTrigger GetAsyncUpdateTrigger(this GameObject gameObject) - { - return GetOrAddComponent(gameObject); - } - - /// Get for UpdateAsync. - public static AsyncUpdateTrigger GetAsyncUpdateTrigger(this Component component) - { - return component.gameObject.GetAsyncUpdateTrigger(); - } - - /// Get for OnBecameInvisibleAsync | OnBecameVisibleAsync. - public static AsyncVisibleTrigger GetAsyncVisibleTrigger(this GameObject gameObject) - { - return GetOrAddComponent(gameObject); - } - - /// Get for OnBecameInvisibleAsync | OnBecameVisibleAsync. - public static AsyncVisibleTrigger GetAsyncVisibleTrigger(this Component component) - { - return component.gameObject.GetAsyncVisibleTrigger(); - } - } -} - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncTriggerExtensions.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncTriggerExtensions.cs.meta deleted file mode 100644 index 348783d..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncTriggerExtensions.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 59b61dbea1562a84fb7a38ae0a0a0f88 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncTriggerTrigger.cs b/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncTriggerTrigger.cs deleted file mode 100644 index e4716f6..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncTriggerTrigger.cs +++ /dev/null @@ -1,69 +0,0 @@ - -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using System.Collections.Generic; -using System.Threading; -using UnityEngine; -using UnityEngine.EventSystems; - -namespace UniRx.Async.Triggers -{ - [DisallowMultipleComponent] - public class AsyncTriggerTrigger : AsyncTriggerBase - { - AsyncTriggerPromise onTriggerEnter; - AsyncTriggerPromiseDictionary onTriggerEnters; - AsyncTriggerPromise onTriggerExit; - AsyncTriggerPromiseDictionary onTriggerExits; - AsyncTriggerPromise onTriggerStay; - AsyncTriggerPromiseDictionary onTriggerStays; - - - protected override IEnumerable GetPromises() - { - return Concat(onTriggerEnter, onTriggerEnters, onTriggerExit, onTriggerExits, onTriggerStay, onTriggerStays); - } - - - void OnTriggerEnter(Collider other) - { - TrySetResult(onTriggerEnter, onTriggerEnters, other); - } - - - public UniTask OnTriggerEnterAsync(CancellationToken cancellationToken = default(CancellationToken)) - { - return GetOrAddPromise(ref onTriggerEnter, ref onTriggerEnters, cancellationToken); - } - - - void OnTriggerExit(Collider other) - { - TrySetResult(onTriggerExit, onTriggerExits, other); - } - - - public UniTask OnTriggerExitAsync(CancellationToken cancellationToken = default(CancellationToken)) - { - return GetOrAddPromise(ref onTriggerExit, ref onTriggerExits, cancellationToken); - } - - - void OnTriggerStay(Collider other) - { - TrySetResult(onTriggerStay, onTriggerStays, other); - } - - - public UniTask OnTriggerStayAsync(CancellationToken cancellationToken = default(CancellationToken)) - { - return GetOrAddPromise(ref onTriggerStay, ref onTriggerStays, cancellationToken); - } - - - } -} - -#endif - diff --git a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncTriggerTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncTriggerTrigger.cs.meta deleted file mode 100644 index b9f7efb..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncTriggerTrigger.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 46bbbbaa910762c4786906e10b6b7b8e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncUpdateSelectedTrigger.cs b/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncUpdateSelectedTrigger.cs deleted file mode 100644 index 69d73d6..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncUpdateSelectedTrigger.cs +++ /dev/null @@ -1,41 +0,0 @@ - -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using System.Collections.Generic; -using System.Threading; -using UnityEngine; -using UnityEngine.EventSystems; - -namespace UniRx.Async.Triggers -{ - [DisallowMultipleComponent] - public class AsyncUpdateSelectedTrigger : AsyncTriggerBase - { - AsyncTriggerPromise onUpdateSelected; - AsyncTriggerPromiseDictionary onUpdateSelecteds; - - - protected override IEnumerable GetPromises() - { - return Concat(onUpdateSelected, onUpdateSelecteds); - } - - - void OnUpdateSelected(BaseEventData eventData) - { - TrySetResult(onUpdateSelected, onUpdateSelecteds, eventData); - } - - - public UniTask OnUpdateSelectedAsync(CancellationToken cancellationToken = default(CancellationToken)) - { - return GetOrAddPromise(ref onUpdateSelected, ref onUpdateSelecteds, cancellationToken); - } - - - } -} - -#endif - diff --git a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncUpdateSelectedTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncUpdateSelectedTrigger.cs.meta deleted file mode 100644 index 395b43c..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncUpdateSelectedTrigger.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: ba5b0a4234e164e41b85f10b709d72e9 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncUpdateTrigger.cs b/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncUpdateTrigger.cs deleted file mode 100644 index 7e41bba..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncUpdateTrigger.cs +++ /dev/null @@ -1,41 +0,0 @@ - -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using System.Collections.Generic; -using System.Threading; -using UnityEngine; -using UnityEngine.EventSystems; - -namespace UniRx.Async.Triggers -{ - [DisallowMultipleComponent] - public class AsyncUpdateTrigger : AsyncTriggerBase - { - AsyncTriggerPromise update; - AsyncTriggerPromiseDictionary updates; - - - protected override IEnumerable GetPromises() - { - return Concat(update, updates); - } - - - void Update() - { - TrySetResult(update, updates, AsyncUnit.Default); - } - - - public UniTask UpdateAsync(CancellationToken cancellationToken = default(CancellationToken)) - { - return GetOrAddPromise(ref update, ref updates, cancellationToken); - } - - - } -} - -#endif - diff --git a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncUpdateTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncUpdateTrigger.cs.meta deleted file mode 100644 index 14a22ca..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncUpdateTrigger.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: c6053bbe25af0d6439712f7c5fc4afc7 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncVisibleTrigger.cs b/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncVisibleTrigger.cs deleted file mode 100644 index 46fddac..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncVisibleTrigger.cs +++ /dev/null @@ -1,55 +0,0 @@ - -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using System.Collections.Generic; -using System.Threading; -using UnityEngine; -using UnityEngine.EventSystems; - -namespace UniRx.Async.Triggers -{ - [DisallowMultipleComponent] - public class AsyncVisibleTrigger : AsyncTriggerBase - { - AsyncTriggerPromise onBecameInvisible; - AsyncTriggerPromiseDictionary onBecameInvisibles; - AsyncTriggerPromise onBecameVisible; - AsyncTriggerPromiseDictionary onBecameVisibles; - - - protected override IEnumerable GetPromises() - { - return Concat(onBecameInvisible, onBecameInvisibles, onBecameVisible, onBecameVisibles); - } - - - void OnBecameInvisible() - { - TrySetResult(onBecameInvisible, onBecameInvisibles, AsyncUnit.Default); - } - - - public UniTask OnBecameInvisibleAsync(CancellationToken cancellationToken = default(CancellationToken)) - { - return GetOrAddPromise(ref onBecameInvisible, ref onBecameInvisibles, cancellationToken); - } - - - void OnBecameVisible() - { - TrySetResult(onBecameVisible, onBecameVisibles, AsyncUnit.Default); - } - - - public UniTask OnBecameVisibleAsync(CancellationToken cancellationToken = default(CancellationToken)) - { - return GetOrAddPromise(ref onBecameVisible, ref onBecameVisibles, cancellationToken); - } - - - } -} - -#endif - diff --git a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncVisibleTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncVisibleTrigger.cs.meta deleted file mode 100644 index 24b33ec..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/Triggers/AsyncVisibleTrigger.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 57ebfef2a87c49c46ad6454db136f3ef -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/UniRx.Async.asmdef b/Assets/Plugins/UniRx/Scripts/Async/UniRx.Async.asmdef deleted file mode 100644 index c5a7213..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/UniRx.Async.asmdef +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "UniRx.Async", - "references": [], - "optionalUnityReferences": [], - "includePlatforms": [], - "excludePlatforms": [], - "allowUnsafeCode": false -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Async/UniTask.Bridge.cs b/Assets/Plugins/UniRx/Scripts/Async/UniTask.Bridge.cs deleted file mode 100644 index 4eebee2..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/UniTask.Bridge.cs +++ /dev/null @@ -1,20 +0,0 @@ -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using System; -using System.Collections; - -namespace UniRx.Async -{ - // UnityEngine Bridges. - - public partial struct UniTask - { - public static IEnumerator ToCoroutine(Func taskFactory) - { - return taskFactory().ToCoroutine(); - } - } -} - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Async/UniTask.Bridge.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/UniTask.Bridge.cs.meta deleted file mode 100644 index 367671c..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/UniTask.Bridge.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: bd6beac8e0ebd264e9ba246c39429c72 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/UniTask.Delay.cs b/Assets/Plugins/UniRx/Scripts/Async/UniTask.Delay.cs deleted file mode 100644 index 4855f9c..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/UniTask.Delay.cs +++ /dev/null @@ -1,246 +0,0 @@ -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using System; -using System.Runtime.CompilerServices; -using System.Threading; -using UniRx.Async.Internal; -using UnityEngine; - -namespace UniRx.Async -{ - public partial struct UniTask - { - public static YieldAwaitable Yield(PlayerLoopTiming timing = PlayerLoopTiming.Update) - { - // optimized for single continuation - return new YieldAwaitable(timing); - } - - public static UniTask Yield(PlayerLoopTiming timing, CancellationToken cancellationToken) - { - return new UniTask(new YieldPromise(timing, cancellationToken)); - } - - public static UniTask DelayFrame(int delayFrameCount, PlayerLoopTiming delayTiming = PlayerLoopTiming.Update, CancellationToken cancellationToken = default(CancellationToken)) - { - if (delayFrameCount < 0) - { - throw new ArgumentOutOfRangeException("Delay does not allow minus delayFrameCount. delayFrameCount:" + delayFrameCount); - } - - var source = new DelayFramePromise(delayFrameCount, delayTiming, cancellationToken); - return source.Task; - } - - public static UniTask Delay(int millisecondsDelay, bool ignoreTimeScale = false, PlayerLoopTiming delayTiming = PlayerLoopTiming.Update, CancellationToken cancellationToken = default(CancellationToken)) - { - var delayTimeSpan = TimeSpan.FromMilliseconds(millisecondsDelay); - if (delayTimeSpan < TimeSpan.Zero) - { - throw new ArgumentOutOfRangeException("Delay does not allow minus delayFrameCount. delayTimeSpan:" + delayTimeSpan); - } - - return (ignoreTimeScale) - ? new DelayIgnoreTimeScalePromise(delayTimeSpan, delayTiming, cancellationToken).Task - : new DelayPromise(delayTimeSpan, delayTiming, cancellationToken).Task; - } - - public static UniTask Delay(TimeSpan delayTimeSpan, bool ignoreTimeScale = false, PlayerLoopTiming delayTiming = PlayerLoopTiming.Update, CancellationToken cancellationToken = default(CancellationToken)) - { - if (delayTimeSpan < TimeSpan.Zero) - { - throw new ArgumentOutOfRangeException("Delay does not allow minus delayFrameCount. delayTimeSpan:" + delayTimeSpan); - } - - return (ignoreTimeScale) - ? new DelayIgnoreTimeScalePromise(delayTimeSpan, delayTiming, cancellationToken).Task - : new DelayPromise(delayTimeSpan, delayTiming, cancellationToken).Task; - } - - class YieldPromise : PlayerLoopReusablePromiseBase - { - public YieldPromise(PlayerLoopTiming timing, CancellationToken cancellationToken) - : base(timing, cancellationToken, 2) - { - } - - protected override void OnRunningStart() - { - } - - public override bool MoveNext() - { - Complete(); - if (cancellationToken.IsCancellationRequested) - { - TrySetCanceled(); - } - else - { - TrySetResult(); - } - - return false; - } - } - - class DelayFramePromise : PlayerLoopReusablePromiseBase - { - readonly int delayFrameCount; - int currentFrameCount; - - public DelayFramePromise(int delayFrameCount, PlayerLoopTiming timing, CancellationToken cancellationToken) - : base(timing, cancellationToken, 2) - { - this.delayFrameCount = delayFrameCount; - this.currentFrameCount = 0; - } - - protected override void OnRunningStart() - { - currentFrameCount = 0; - } - - public override bool MoveNext() - { - if (cancellationToken.IsCancellationRequested) - { - Complete(); - TrySetCanceled(); - return false; - } - - if (currentFrameCount == delayFrameCount) - { - Complete(); - TrySetResult(currentFrameCount); - return false; - } - - currentFrameCount++; - return true; - } - } - - class DelayPromise : PlayerLoopReusablePromiseBase - { - readonly float delayFrameTimeSpan; - float elapsed; - - public DelayPromise(TimeSpan delayFrameTimeSpan, PlayerLoopTiming timing, CancellationToken cancellationToken) - : base(timing, cancellationToken, 2) - { - this.delayFrameTimeSpan = (float)delayFrameTimeSpan.TotalSeconds; - } - - protected override void OnRunningStart() - { - this.elapsed = 0.0f; - } - - public override bool MoveNext() - { - if (cancellationToken.IsCancellationRequested) - { - Complete(); - TrySetCanceled(); - return false; - } - - elapsed += Time.deltaTime; - if (elapsed >= delayFrameTimeSpan) - { - Complete(); - TrySetResult(); - return false; - } - - return true; - } - } - - class DelayIgnoreTimeScalePromise : PlayerLoopReusablePromiseBase - { - readonly float delayFrameTimeSpan; - float elapsed; - - public DelayIgnoreTimeScalePromise(TimeSpan delayFrameTimeSpan, PlayerLoopTiming timing, CancellationToken cancellationToken) - : base(timing, cancellationToken, 2) - { - this.delayFrameTimeSpan = (float)delayFrameTimeSpan.TotalSeconds; - } - - protected override void OnRunningStart() - { - this.elapsed = 0.0f; - } - - public override bool MoveNext() - { - if (cancellationToken.IsCancellationRequested) - { - Complete(); - TrySetCanceled(); - return false; - } - - elapsed += Time.unscaledDeltaTime; - - if (elapsed >= delayFrameTimeSpan) - { - Complete(); - TrySetResult(); - return false; - } - - return true; - } - } - } - - public struct YieldAwaitable - { - readonly PlayerLoopTiming timing; - - public YieldAwaitable(PlayerLoopTiming timing) - { - this.timing = timing; - } - - public Awaiter GetAwaiter() - { - return new Awaiter(timing); - } - - public UniTask ToUniTask() - { - return UniTask.Yield(timing, CancellationToken.None); - } - - public struct Awaiter : ICriticalNotifyCompletion - { - readonly PlayerLoopTiming timing; - - public Awaiter(PlayerLoopTiming timing) - { - this.timing = timing; - } - - public bool IsCompleted => false; - - public void GetResult() { } - - public void OnCompleted(Action continuation) - { - PlayerLoopHelper.AddContinuation(timing, continuation); - } - - public void UnsafeOnCompleted(Action continuation) - { - PlayerLoopHelper.AddContinuation(timing, continuation); - } - } - } -} -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Async/UniTask.Delay.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/UniTask.Delay.cs.meta deleted file mode 100644 index f78131c..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/UniTask.Delay.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: ecff7972251de0848b2c0fa89bbd3489 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/UniTask.Factory.cs b/Assets/Plugins/UniRx/Scripts/Async/UniTask.Factory.cs deleted file mode 100644 index ebbdf66..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/UniTask.Factory.cs +++ /dev/null @@ -1,121 +0,0 @@ -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using System; -using System.Threading; - -namespace UniRx.Async -{ - public partial struct UniTask - { - static readonly UniTask CanceledUniTask = new Func(() => - { - var promise = new UniTaskCompletionSource(); - promise.TrySetCanceled(); - promise.MarkHandled(); - return new UniTask(promise); - })(); - - public static UniTask CompletedTask - { - get - { - return new UniTask(); - } - } - - public static UniTask FromException(Exception ex) - { - var promise = new UniTaskCompletionSource(); - promise.TrySetException(ex); - promise.MarkHandled(); - return new UniTask(promise); - } - - public static UniTask FromException(Exception ex) - { - var promise = new UniTaskCompletionSource(); - promise.TrySetException(ex); - promise.MarkHandled(); - return new UniTask(promise); - } - - public static UniTask FromResult(T value) - { - return new UniTask(value); - } - - public static UniTask FromCanceled() - { - return CanceledUniTask; - } - - public static UniTask FromCanceled() - { - return CanceledUniTaskCache.Task; - } - - public static UniTask FromCanceled(CancellationToken token) - { - var promise = new UniTaskCompletionSource(); - promise.TrySetException(new OperationCanceledException(token)); - promise.MarkHandled(); - return new UniTask(promise); - } - - public static UniTask FromCanceled(CancellationToken token) - { - var promise = new UniTaskCompletionSource(); - promise.TrySetException(new OperationCanceledException(token)); - promise.MarkHandled(); - return new UniTask(promise); - } - - /// shorthand of new UniTask[T](Func[UniTask[T]] factory) - public static UniTask Lazy(Func> factory) - { - return new UniTask(factory); - } - - /// - /// helper of create add UniTaskVoid to delegate. - /// For example: FooEvent += () => UniTask.Void(async () => { /* */ }) - /// - public static void Void(Func asyncAction) - { - asyncAction().Forget(); - } - - /// - /// helper of create add UniTaskVoid to delegate. - /// For example: FooEvent += (sender, e) => UniTask.Void(async arg => { /* */ }, (sender, e)) - /// - public static void Void(Func asyncAction, T state) - { - asyncAction(state).Forget(); - } - - static class CanceledUniTaskCache - { - public static readonly UniTask Task; - - static CanceledUniTaskCache() - { - var promise = new UniTaskCompletionSource(); - promise.TrySetCanceled(); - promise.MarkHandled(); - Task = new UniTask(promise); - } - } - } - - internal static class CompletedTasks - { - public static readonly UniTask True = UniTask.FromResult(true); - public static readonly UniTask False = UniTask.FromResult(false); - public static readonly UniTask Zero = UniTask.FromResult(0); - public static readonly UniTask MinusOne = UniTask.FromResult(-1); - public static readonly UniTask One = UniTask.FromResult(1); - } -} -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Async/UniTask.Factory.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/UniTask.Factory.cs.meta deleted file mode 100644 index 1245772..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/UniTask.Factory.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 4e12b66d6b9bd7845b04a594cbe386b4 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/UniTask.Run.cs b/Assets/Plugins/UniRx/Scripts/Async/UniTask.Run.cs deleted file mode 100644 index 210fe00..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/UniTask.Run.cs +++ /dev/null @@ -1,58 +0,0 @@ -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using System; - -namespace UniRx.Async -{ - public partial struct UniTask - { - /// Run action on the threadPool and return to main thread if configureAwait = true. - public static async UniTask Run(Action action, bool configureAwait = true) - { - await UniTask.SwitchToThreadPool(); - action(); - if (configureAwait) - { - await UniTask.Yield(); - } - } - - /// Run action on the threadPool and return to main thread if configureAwait = true. - public static async UniTask Run(Action action, object state, bool configureAwait = true) - { - await UniTask.SwitchToThreadPool(); - action(state); - if (configureAwait) - { - await UniTask.Yield(); - } - } - - /// Run action on the threadPool and return to main thread if configureAwait = true. - public static async UniTask Run(Func func, bool configureAwait = true) - { - await UniTask.SwitchToThreadPool(); - var result = func(); - if (configureAwait) - { - await UniTask.Yield(); - } - return result; - } - - /// Run action on the threadPool and return to main thread if configureAwait = true. - public static async UniTask Run(Func func, object state, bool configureAwait = true) - { - await UniTask.SwitchToThreadPool(); - var result = func(state); - if (configureAwait) - { - await UniTask.Yield(); - } - return result; - } - } -} - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Async/UniTask.Run.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/UniTask.Run.cs.meta deleted file mode 100644 index 820cee7..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/UniTask.Run.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 8473162fc285a5f44bcca90f7da073e7 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/UniTask.Threading.cs b/Assets/Plugins/UniRx/Scripts/Async/UniTask.Threading.cs deleted file mode 100644 index dec6697..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/UniTask.Threading.cs +++ /dev/null @@ -1,184 +0,0 @@ -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using System; -using System.Runtime.CompilerServices; -using System.Threading; -using System.Threading.Tasks; -using UniRx.Async.Internal; - -namespace UniRx.Async -{ - public partial struct UniTask - { -#if !UniRxLibrary - - /// - /// If running on mainthread, do nothing. Otherwise, same as UniTask.Yield(PlayerLoopTiming.Update). - /// - public static SwitchToMainThreadAwaitable SwitchToMainThread() - { - return new SwitchToMainThreadAwaitable(); - } - -#endif - - public static SwitchToThreadPoolAwaitable SwitchToThreadPool() - { - return new SwitchToThreadPoolAwaitable(); - } - - public static SwitchToTaskPoolAwaitable SwitchToTaskPool() - { - return new SwitchToTaskPoolAwaitable(); - } - - public static SwitchToSynchronizationContextAwaitable SwitchToSynchronizationContext(SynchronizationContext syncContext) - { - Error.ThrowArgumentNullException(syncContext, nameof(syncContext)); - return new SwitchToSynchronizationContextAwaitable(syncContext); - } - } - -#if !UniRxLibrary - - public struct SwitchToMainThreadAwaitable - { - public Awaiter GetAwaiter() => new Awaiter(); - - public struct Awaiter : ICriticalNotifyCompletion - { - public bool IsCompleted - { - get - { - var currentThreadId = System.Threading.Thread.CurrentThread.ManagedThreadId; - if (PlayerLoopHelper.MainThreadId == currentThreadId) - { - return true; // run immediate. - } - else - { - return false; // register continuation. - } - } - } - - public void GetResult() { } - - public void OnCompleted(Action continuation) - { - PlayerLoopHelper.AddContinuation(PlayerLoopTiming.Update, continuation); - } - - public void UnsafeOnCompleted(Action continuation) - { - PlayerLoopHelper.AddContinuation(PlayerLoopTiming.Update, continuation); - } - } - } - -#endif - - public struct SwitchToThreadPoolAwaitable - { - public Awaiter GetAwaiter() => new Awaiter(); - - public struct Awaiter : ICriticalNotifyCompletion - { - static readonly WaitCallback switchToCallback = Callback; - - public bool IsCompleted => false; - public void GetResult() { } - - public void OnCompleted(Action continuation) - { - ThreadPool.UnsafeQueueUserWorkItem(switchToCallback, continuation); - } - - public void UnsafeOnCompleted(Action continuation) - { - ThreadPool.UnsafeQueueUserWorkItem(switchToCallback, continuation); - } - - static void Callback(object state) - { - var continuation = (Action)state; - continuation(); - } - } - } - - public struct SwitchToTaskPoolAwaitable - { - public Awaiter GetAwaiter() => new Awaiter(); - - public struct Awaiter : ICriticalNotifyCompletion - { - static readonly Action switchToCallback = Callback; - - public bool IsCompleted => false; - public void GetResult() { } - - public void OnCompleted(Action continuation) - { - Task.Factory.StartNew(switchToCallback, continuation, CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default); - } - - public void UnsafeOnCompleted(Action continuation) - { - Task.Factory.StartNew(switchToCallback, continuation, CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default); - } - - static void Callback(object state) - { - var continuation = (Action)state; - continuation(); - } - } - } - - public struct SwitchToSynchronizationContextAwaitable - { - readonly SynchronizationContext synchronizationContext; - - public SwitchToSynchronizationContextAwaitable(SynchronizationContext synchronizationContext) - { - this.synchronizationContext = synchronizationContext; - } - - public Awaiter GetAwaiter() => new Awaiter(synchronizationContext); - - public struct Awaiter : ICriticalNotifyCompletion - { - static readonly SendOrPostCallback switchToCallback = Callback; - readonly SynchronizationContext synchronizationContext; - - public Awaiter(SynchronizationContext synchronizationContext) - { - this.synchronizationContext = synchronizationContext; - } - - public bool IsCompleted => false; - public void GetResult() { } - - public void OnCompleted(Action continuation) - { - synchronizationContext.Post(switchToCallback, continuation); - } - - public void UnsafeOnCompleted(Action continuation) - { - synchronizationContext.Post(switchToCallback, continuation); - } - - static void Callback(object state) - { - var continuation = (Action)state; - continuation(); - } - } - } -} - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Async/UniTask.Threading.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/UniTask.Threading.cs.meta deleted file mode 100644 index fa512b8..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/UniTask.Threading.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 4132ea600454134439fa2c7eb931b5e6 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/UniTask.WaitUntil.cs b/Assets/Plugins/UniRx/Scripts/Async/UniTask.WaitUntil.cs deleted file mode 100644 index 684098a..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/UniTask.WaitUntil.cs +++ /dev/null @@ -1,235 +0,0 @@ -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using System; -using System.Collections.Generic; -using System.Threading; -using UniRx.Async.Internal; - -namespace UniRx.Async -{ - public partial struct UniTask - { - public static UniTask WaitUntil(Func predicate, PlayerLoopTiming timing = PlayerLoopTiming.Update, CancellationToken cancellationToken = default(CancellationToken)) - { - var promise = new WaitUntilPromise(predicate, timing, cancellationToken); - return promise.Task; - } - - public static UniTask WaitWhile(Func predicate, PlayerLoopTiming timing = PlayerLoopTiming.Update, CancellationToken cancellationToken = default(CancellationToken)) - { - var promise = new WaitWhilePromise(predicate, timing, cancellationToken); - return promise.Task; - } - - public static UniTask WaitUntilValueChanged(T target, Func monitorFunction, PlayerLoopTiming monitorTiming = PlayerLoopTiming.Update, IEqualityComparer equalityComparer = null, CancellationToken cancellationToken = default(CancellationToken)) - where T : class - { - var unityObject = target as UnityEngine.Object; - var isUnityObject = !object.ReferenceEquals(target, null); // don't use (unityObject == null) - - return (isUnityObject) - ? new WaitUntilValueChangedUnityObjectPromise(target, monitorFunction, equalityComparer, monitorTiming, cancellationToken).Task - : new WaitUntilValueChangedStandardObjectPromise(target, monitorFunction, equalityComparer, monitorTiming, cancellationToken).Task; - } - - class WaitUntilPromise : PlayerLoopReusablePromiseBase - { - readonly Func predicate; - - public WaitUntilPromise(Func predicate, PlayerLoopTiming timing, CancellationToken cancellationToken) - : base(timing, cancellationToken, 1) - { - this.predicate = predicate; - } - - protected override void OnRunningStart() - { - } - - public override bool MoveNext() - { - if (cancellationToken.IsCancellationRequested) - { - Complete(); - TrySetCanceled(); - return false; - } - - bool result = default(bool); - try - { - result = predicate(); - } - catch (Exception ex) - { - Complete(); - TrySetException(ex); - return false; - } - - if (result) - { - Complete(); - TrySetResult(); - return false; - } - - return true; - } - } - - class WaitWhilePromise : PlayerLoopReusablePromiseBase - { - readonly Func predicate; - - public WaitWhilePromise(Func predicate, PlayerLoopTiming timing, CancellationToken cancellationToken) - : base(timing, cancellationToken, 1) - { - this.predicate = predicate; - } - - protected override void OnRunningStart() - { - } - - public override bool MoveNext() - { - if (cancellationToken.IsCancellationRequested) - { - Complete(); - TrySetCanceled(); - return false; - } - - bool result = default(bool); - try - { - result = predicate(); - } - catch (Exception ex) - { - Complete(); - TrySetException(ex); - return false; - } - - if (!result) - { - Complete(); - TrySetResult(); - return false; - } - - return true; - } - } - - // where T : UnityEngine.Object, can not add constraint - class WaitUntilValueChangedUnityObjectPromise : PlayerLoopReusablePromiseBase - { - readonly T target; - readonly Func monitorFunction; - readonly IEqualityComparer equalityComparer; - U currentValue; - - public WaitUntilValueChangedUnityObjectPromise(T target, Func monitorFunction, IEqualityComparer equalityComparer, PlayerLoopTiming timing, CancellationToken cancellationToken) - : base(timing, cancellationToken, 1) - { - this.target = target; - this.monitorFunction = monitorFunction; - this.equalityComparer = equalityComparer ?? UnityEqualityComparer.GetDefault(); - this.currentValue = monitorFunction(target); - } - - protected override void OnRunningStart() - { - } - - public override bool MoveNext() - { - if (cancellationToken.IsCancellationRequested || target == null) // destroyed = cancel. - { - Complete(); - TrySetCanceled(); - return false; - } - - U nextValue = default(U); - try - { - nextValue = monitorFunction(target); - if (equalityComparer.Equals(currentValue, nextValue)) - { - return true; - } - } - catch (Exception ex) - { - Complete(); - TrySetException(ex); - return false; - } - - Complete(); - currentValue = nextValue; - TrySetResult(nextValue); - return false; - } - } - - class WaitUntilValueChangedStandardObjectPromise : PlayerLoopReusablePromiseBase - where T : class - { - readonly WeakReference target; - readonly Func monitorFunction; - readonly IEqualityComparer equalityComparer; - U currentValue; - - public WaitUntilValueChangedStandardObjectPromise(T target, Func monitorFunction, IEqualityComparer equalityComparer, PlayerLoopTiming timing, CancellationToken cancellationToken) - : base(timing, cancellationToken, 1) - { - this.target = new WeakReference(target, false); // wrap in WeakReference. - this.monitorFunction = monitorFunction; - this.equalityComparer = equalityComparer ?? UnityEqualityComparer.GetDefault(); - this.currentValue = monitorFunction(target); - } - - protected override void OnRunningStart() - { - } - - public override bool MoveNext() - { - if (cancellationToken.IsCancellationRequested || !target.TryGetTarget(out var t)) - { - Complete(); - TrySetCanceled(); - return false; - } - - U nextValue = default(U); - try - { - nextValue = monitorFunction(t); - if (equalityComparer.Equals(currentValue, nextValue)) - { - return true; - } - } - catch (Exception ex) - { - Complete(); - TrySetException(ex); - return false; - } - - Complete(); - currentValue = nextValue; - TrySetResult(nextValue); - return false; - } - } - } -} -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Async/UniTask.WaitUntil.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/UniTask.WaitUntil.cs.meta deleted file mode 100644 index 6e64dc7..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/UniTask.WaitUntil.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 87c9c533491903a4288536b5ac173db8 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/UniTask.WhenAll.Generated.cs b/Assets/Plugins/UniRx/Scripts/Async/UniTask.WhenAll.Generated.cs deleted file mode 100644 index ec95403..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/UniTask.WhenAll.Generated.cs +++ /dev/null @@ -1,1863 +0,0 @@ -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.ExceptionServices; -using System.Threading; - -namespace UniRx.Async -{ - public partial struct UniTask - { - public static async UniTask<(T1 result1, T2 result2)> WhenAll(UniTask task1, UniTask task2) - { - return await new WhenAllPromise(task1, task2); - } - - public static async UniTask<(T1 result1, T2 result2, T3 result3)> WhenAll(UniTask task1, UniTask task2, UniTask task3) - { - return await new WhenAllPromise(task1, task2, task3); - } - - public static async UniTask<(T1 result1, T2 result2, T3 result3, T4 result4)> WhenAll(UniTask task1, UniTask task2, UniTask task3, UniTask task4) - { - return await new WhenAllPromise(task1, task2, task3, task4); - } - - public static async UniTask<(T1 result1, T2 result2, T3 result3, T4 result4, T5 result5)> WhenAll(UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5) - { - return await new WhenAllPromise(task1, task2, task3, task4, task5); - } - - public static async UniTask<(T1 result1, T2 result2, T3 result3, T4 result4, T5 result5, T6 result6)> WhenAll(UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6) - { - return await new WhenAllPromise(task1, task2, task3, task4, task5, task6); - } - - public static async UniTask<(T1 result1, T2 result2, T3 result3, T4 result4, T5 result5, T6 result6, T7 result7)> WhenAll(UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6, UniTask task7) - { - return await new WhenAllPromise(task1, task2, task3, task4, task5, task6, task7); - } - - class WhenAllPromise - { - const int MaxCount = 2; - - T1 result1; - T2 result2; - ExceptionDispatchInfo exception; - int completeCount; - Action whenComplete; - - public WhenAllPromise(UniTask task1, UniTask task2) - { - this.completeCount = 0; - this.whenComplete = null; - this.result1 = default(T1); - this.result2 = default(T2); - this.exception = null; - - RunTask1(task1); - RunTask2(task2); - } - - void TryCallContinuation() - { - var action = Interlocked.Exchange(ref whenComplete, null); - if (action != null) - { - action.Invoke(); - } - } - - void RunTask1(UniTask task) - { - if (task.IsCompleted) - { - try - { - result1 = task.Result; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == MaxCount) - { - TryCallContinuation(); - } - } - else - { - RunTask1Async(task).Forget(); - } - } - - async UniTaskVoid RunTask1Async(UniTask task) - { - try - { - result1 = await task; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == MaxCount) - { - TryCallContinuation(); - } - } - - void RunTask2(UniTask task) - { - if (task.IsCompleted) - { - try - { - result2 = task.Result; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == MaxCount) - { - TryCallContinuation(); - } - } - else - { - RunTask2Async(task).Forget(); - } - } - - async UniTaskVoid RunTask2Async(UniTask task) - { - try - { - result2 = await task; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == MaxCount) - { - TryCallContinuation(); - } - } - - - public Awaiter GetAwaiter() - { - return new Awaiter(this); - } - - public struct Awaiter : ICriticalNotifyCompletion - { - WhenAllPromise parent; - - public Awaiter(WhenAllPromise parent) - { - this.parent = parent; - } - - public bool IsCompleted - { - get - { - return parent.exception != null || parent.completeCount == MaxCount; - } - } - - public (T1, T2) GetResult() - { - if (parent.exception != null) - { - parent.exception.Throw(); - } - - return (parent.result1, parent.result2); - } - - public void OnCompleted(Action continuation) - { - UnsafeOnCompleted(continuation); - } - - public void UnsafeOnCompleted(Action continuation) - { - parent.whenComplete = continuation; - if (IsCompleted) - { - var action = Interlocked.Exchange(ref parent.whenComplete, null); - if (action != null) - { - action(); - } - } - } - } - } - - class WhenAllPromise - { - const int MaxCount = 3; - - T1 result1; - T2 result2; - T3 result3; - ExceptionDispatchInfo exception; - int completeCount; - Action whenComplete; - - public WhenAllPromise(UniTask task1, UniTask task2, UniTask task3) - { - this.completeCount = 0; - this.whenComplete = null; - this.result1 = default(T1); - this.result2 = default(T2); - this.result3 = default(T3); - this.exception = null; - - RunTask1(task1); - RunTask2(task2); - RunTask3(task3); - } - - void TryCallContinuation() - { - var action = Interlocked.Exchange(ref whenComplete, null); - if (action != null) - { - action.Invoke(); - } - } - - void RunTask1(UniTask task) - { - if (task.IsCompleted) - { - try - { - result1 = task.Result; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == MaxCount) - { - TryCallContinuation(); - } - } - else - { - RunTask1Async(task).Forget(); - } - } - - async UniTaskVoid RunTask1Async(UniTask task) - { - try - { - result1 = await task; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == MaxCount) - { - TryCallContinuation(); - } - } - - void RunTask2(UniTask task) - { - if (task.IsCompleted) - { - try - { - result2 = task.Result; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == MaxCount) - { - TryCallContinuation(); - } - } - else - { - RunTask2Async(task).Forget(); - } - } - - async UniTaskVoid RunTask2Async(UniTask task) - { - try - { - result2 = await task; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == MaxCount) - { - TryCallContinuation(); - } - } - - void RunTask3(UniTask task) - { - if (task.IsCompleted) - { - try - { - result3 = task.Result; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == MaxCount) - { - TryCallContinuation(); - } - } - else - { - RunTask3Async(task).Forget(); - } - } - - async UniTaskVoid RunTask3Async(UniTask task) - { - try - { - result3 = await task; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == MaxCount) - { - TryCallContinuation(); - } - } - - - public Awaiter GetAwaiter() - { - return new Awaiter(this); - } - - public struct Awaiter : ICriticalNotifyCompletion - { - WhenAllPromise parent; - - public Awaiter(WhenAllPromise parent) - { - this.parent = parent; - } - - public bool IsCompleted - { - get - { - return parent.exception != null || parent.completeCount == MaxCount; - } - } - - public (T1, T2, T3) GetResult() - { - if (parent.exception != null) - { - parent.exception.Throw(); - } - - return (parent.result1, parent.result2, parent.result3); - } - - public void OnCompleted(Action continuation) - { - UnsafeOnCompleted(continuation); - } - - public void UnsafeOnCompleted(Action continuation) - { - parent.whenComplete = continuation; - if (IsCompleted) - { - var action = Interlocked.Exchange(ref parent.whenComplete, null); - if (action != null) - { - action(); - } - } - } - } - } - - class WhenAllPromise - { - const int MaxCount = 4; - - T1 result1; - T2 result2; - T3 result3; - T4 result4; - ExceptionDispatchInfo exception; - int completeCount; - Action whenComplete; - - public WhenAllPromise(UniTask task1, UniTask task2, UniTask task3, UniTask task4) - { - this.completeCount = 0; - this.whenComplete = null; - this.result1 = default(T1); - this.result2 = default(T2); - this.result3 = default(T3); - this.result4 = default(T4); - this.exception = null; - - RunTask1(task1); - RunTask2(task2); - RunTask3(task3); - RunTask4(task4); - } - - void TryCallContinuation() - { - var action = Interlocked.Exchange(ref whenComplete, null); - if (action != null) - { - action.Invoke(); - } - } - - void RunTask1(UniTask task) - { - if (task.IsCompleted) - { - try - { - result1 = task.Result; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == MaxCount) - { - TryCallContinuation(); - } - } - else - { - RunTask1Async(task).Forget(); - } - } - - async UniTaskVoid RunTask1Async(UniTask task) - { - try - { - result1 = await task; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == MaxCount) - { - TryCallContinuation(); - } - } - - void RunTask2(UniTask task) - { - if (task.IsCompleted) - { - try - { - result2 = task.Result; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == MaxCount) - { - TryCallContinuation(); - } - } - else - { - RunTask2Async(task).Forget(); - } - } - - async UniTaskVoid RunTask2Async(UniTask task) - { - try - { - result2 = await task; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == MaxCount) - { - TryCallContinuation(); - } - } - - void RunTask3(UniTask task) - { - if (task.IsCompleted) - { - try - { - result3 = task.Result; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == MaxCount) - { - TryCallContinuation(); - } - } - else - { - RunTask3Async(task).Forget(); - } - } - - async UniTaskVoid RunTask3Async(UniTask task) - { - try - { - result3 = await task; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == MaxCount) - { - TryCallContinuation(); - } - } - - void RunTask4(UniTask task) - { - if (task.IsCompleted) - { - try - { - result4 = task.Result; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == MaxCount) - { - TryCallContinuation(); - } - } - else - { - RunTask4Async(task).Forget(); - } - } - - async UniTaskVoid RunTask4Async(UniTask task) - { - try - { - result4 = await task; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == MaxCount) - { - TryCallContinuation(); - } - } - - - public Awaiter GetAwaiter() - { - return new Awaiter(this); - } - - public struct Awaiter : ICriticalNotifyCompletion - { - WhenAllPromise parent; - - public Awaiter(WhenAllPromise parent) - { - this.parent = parent; - } - - public bool IsCompleted - { - get - { - return parent.exception != null || parent.completeCount == MaxCount; - } - } - - public (T1, T2, T3, T4) GetResult() - { - if (parent.exception != null) - { - parent.exception.Throw(); - } - - return (parent.result1, parent.result2, parent.result3, parent.result4); - } - - public void OnCompleted(Action continuation) - { - UnsafeOnCompleted(continuation); - } - - public void UnsafeOnCompleted(Action continuation) - { - parent.whenComplete = continuation; - if (IsCompleted) - { - var action = Interlocked.Exchange(ref parent.whenComplete, null); - if (action != null) - { - action(); - } - } - } - } - } - - class WhenAllPromise - { - const int MaxCount = 5; - - T1 result1; - T2 result2; - T3 result3; - T4 result4; - T5 result5; - ExceptionDispatchInfo exception; - int completeCount; - Action whenComplete; - - public WhenAllPromise(UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5) - { - this.completeCount = 0; - this.whenComplete = null; - this.result1 = default(T1); - this.result2 = default(T2); - this.result3 = default(T3); - this.result4 = default(T4); - this.result5 = default(T5); - this.exception = null; - - RunTask1(task1); - RunTask2(task2); - RunTask3(task3); - RunTask4(task4); - RunTask5(task5); - } - - void TryCallContinuation() - { - var action = Interlocked.Exchange(ref whenComplete, null); - if (action != null) - { - action.Invoke(); - } - } - - void RunTask1(UniTask task) - { - if (task.IsCompleted) - { - try - { - result1 = task.Result; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == MaxCount) - { - TryCallContinuation(); - } - } - else - { - RunTask1Async(task).Forget(); - } - } - - async UniTaskVoid RunTask1Async(UniTask task) - { - try - { - result1 = await task; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == MaxCount) - { - TryCallContinuation(); - } - } - - void RunTask2(UniTask task) - { - if (task.IsCompleted) - { - try - { - result2 = task.Result; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == MaxCount) - { - TryCallContinuation(); - } - } - else - { - RunTask2Async(task).Forget(); - } - } - - async UniTaskVoid RunTask2Async(UniTask task) - { - try - { - result2 = await task; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == MaxCount) - { - TryCallContinuation(); - } - } - - void RunTask3(UniTask task) - { - if (task.IsCompleted) - { - try - { - result3 = task.Result; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == MaxCount) - { - TryCallContinuation(); - } - } - else - { - RunTask3Async(task).Forget(); - } - } - - async UniTaskVoid RunTask3Async(UniTask task) - { - try - { - result3 = await task; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == MaxCount) - { - TryCallContinuation(); - } - } - - void RunTask4(UniTask task) - { - if (task.IsCompleted) - { - try - { - result4 = task.Result; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == MaxCount) - { - TryCallContinuation(); - } - } - else - { - RunTask4Async(task).Forget(); - } - } - - async UniTaskVoid RunTask4Async(UniTask task) - { - try - { - result4 = await task; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == MaxCount) - { - TryCallContinuation(); - } - } - - void RunTask5(UniTask task) - { - if (task.IsCompleted) - { - try - { - result5 = task.Result; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == MaxCount) - { - TryCallContinuation(); - } - } - else - { - RunTask5Async(task).Forget(); - } - } - - async UniTaskVoid RunTask5Async(UniTask task) - { - try - { - result5 = await task; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == MaxCount) - { - TryCallContinuation(); - } - } - - - public Awaiter GetAwaiter() - { - return new Awaiter(this); - } - - public struct Awaiter : ICriticalNotifyCompletion - { - WhenAllPromise parent; - - public Awaiter(WhenAllPromise parent) - { - this.parent = parent; - } - - public bool IsCompleted - { - get - { - return parent.exception != null || parent.completeCount == MaxCount; - } - } - - public (T1, T2, T3, T4, T5) GetResult() - { - if (parent.exception != null) - { - parent.exception.Throw(); - } - - return (parent.result1, parent.result2, parent.result3, parent.result4, parent.result5); - } - - public void OnCompleted(Action continuation) - { - UnsafeOnCompleted(continuation); - } - - public void UnsafeOnCompleted(Action continuation) - { - parent.whenComplete = continuation; - if (IsCompleted) - { - var action = Interlocked.Exchange(ref parent.whenComplete, null); - if (action != null) - { - action(); - } - } - } - } - } - - class WhenAllPromise - { - const int MaxCount = 6; - - T1 result1; - T2 result2; - T3 result3; - T4 result4; - T5 result5; - T6 result6; - ExceptionDispatchInfo exception; - int completeCount; - Action whenComplete; - - public WhenAllPromise(UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6) - { - this.completeCount = 0; - this.whenComplete = null; - this.result1 = default(T1); - this.result2 = default(T2); - this.result3 = default(T3); - this.result4 = default(T4); - this.result5 = default(T5); - this.result6 = default(T6); - this.exception = null; - - RunTask1(task1); - RunTask2(task2); - RunTask3(task3); - RunTask4(task4); - RunTask5(task5); - RunTask6(task6); - } - - void TryCallContinuation() - { - var action = Interlocked.Exchange(ref whenComplete, null); - if (action != null) - { - action.Invoke(); - } - } - - void RunTask1(UniTask task) - { - if (task.IsCompleted) - { - try - { - result1 = task.Result; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == MaxCount) - { - TryCallContinuation(); - } - } - else - { - RunTask1Async(task).Forget(); - } - } - - async UniTaskVoid RunTask1Async(UniTask task) - { - try - { - result1 = await task; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == MaxCount) - { - TryCallContinuation(); - } - } - - void RunTask2(UniTask task) - { - if (task.IsCompleted) - { - try - { - result2 = task.Result; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == MaxCount) - { - TryCallContinuation(); - } - } - else - { - RunTask2Async(task).Forget(); - } - } - - async UniTaskVoid RunTask2Async(UniTask task) - { - try - { - result2 = await task; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == MaxCount) - { - TryCallContinuation(); - } - } - - void RunTask3(UniTask task) - { - if (task.IsCompleted) - { - try - { - result3 = task.Result; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == MaxCount) - { - TryCallContinuation(); - } - } - else - { - RunTask3Async(task).Forget(); - } - } - - async UniTaskVoid RunTask3Async(UniTask task) - { - try - { - result3 = await task; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == MaxCount) - { - TryCallContinuation(); - } - } - - void RunTask4(UniTask task) - { - if (task.IsCompleted) - { - try - { - result4 = task.Result; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == MaxCount) - { - TryCallContinuation(); - } - } - else - { - RunTask4Async(task).Forget(); - } - } - - async UniTaskVoid RunTask4Async(UniTask task) - { - try - { - result4 = await task; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == MaxCount) - { - TryCallContinuation(); - } - } - - void RunTask5(UniTask task) - { - if (task.IsCompleted) - { - try - { - result5 = task.Result; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == MaxCount) - { - TryCallContinuation(); - } - } - else - { - RunTask5Async(task).Forget(); - } - } - - async UniTaskVoid RunTask5Async(UniTask task) - { - try - { - result5 = await task; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == MaxCount) - { - TryCallContinuation(); - } - } - - void RunTask6(UniTask task) - { - if (task.IsCompleted) - { - try - { - result6 = task.Result; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == MaxCount) - { - TryCallContinuation(); - } - } - else - { - RunTask6Async(task).Forget(); - } - } - - async UniTaskVoid RunTask6Async(UniTask task) - { - try - { - result6 = await task; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == MaxCount) - { - TryCallContinuation(); - } - } - - - public Awaiter GetAwaiter() - { - return new Awaiter(this); - } - - public struct Awaiter : ICriticalNotifyCompletion - { - WhenAllPromise parent; - - public Awaiter(WhenAllPromise parent) - { - this.parent = parent; - } - - public bool IsCompleted - { - get - { - return parent.exception != null || parent.completeCount == MaxCount; - } - } - - public (T1, T2, T3, T4, T5, T6) GetResult() - { - if (parent.exception != null) - { - parent.exception.Throw(); - } - - return (parent.result1, parent.result2, parent.result3, parent.result4, parent.result5, parent.result6); - } - - public void OnCompleted(Action continuation) - { - UnsafeOnCompleted(continuation); - } - - public void UnsafeOnCompleted(Action continuation) - { - parent.whenComplete = continuation; - if (IsCompleted) - { - var action = Interlocked.Exchange(ref parent.whenComplete, null); - if (action != null) - { - action(); - } - } - } - } - } - - class WhenAllPromise - { - const int MaxCount = 7; - - T1 result1; - T2 result2; - T3 result3; - T4 result4; - T5 result5; - T6 result6; - T7 result7; - ExceptionDispatchInfo exception; - int completeCount; - Action whenComplete; - - public WhenAllPromise(UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6, UniTask task7) - { - this.completeCount = 0; - this.whenComplete = null; - this.result1 = default(T1); - this.result2 = default(T2); - this.result3 = default(T3); - this.result4 = default(T4); - this.result5 = default(T5); - this.result6 = default(T6); - this.result7 = default(T7); - this.exception = null; - - RunTask1(task1); - RunTask2(task2); - RunTask3(task3); - RunTask4(task4); - RunTask5(task5); - RunTask6(task6); - RunTask7(task7); - } - - void TryCallContinuation() - { - var action = Interlocked.Exchange(ref whenComplete, null); - if (action != null) - { - action.Invoke(); - } - } - - void RunTask1(UniTask task) - { - if (task.IsCompleted) - { - try - { - result1 = task.Result; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == MaxCount) - { - TryCallContinuation(); - } - } - else - { - RunTask1Async(task).Forget(); - } - } - - async UniTaskVoid RunTask1Async(UniTask task) - { - try - { - result1 = await task; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == MaxCount) - { - TryCallContinuation(); - } - } - - void RunTask2(UniTask task) - { - if (task.IsCompleted) - { - try - { - result2 = task.Result; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == MaxCount) - { - TryCallContinuation(); - } - } - else - { - RunTask2Async(task).Forget(); - } - } - - async UniTaskVoid RunTask2Async(UniTask task) - { - try - { - result2 = await task; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == MaxCount) - { - TryCallContinuation(); - } - } - - void RunTask3(UniTask task) - { - if (task.IsCompleted) - { - try - { - result3 = task.Result; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == MaxCount) - { - TryCallContinuation(); - } - } - else - { - RunTask3Async(task).Forget(); - } - } - - async UniTaskVoid RunTask3Async(UniTask task) - { - try - { - result3 = await task; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == MaxCount) - { - TryCallContinuation(); - } - } - - void RunTask4(UniTask task) - { - if (task.IsCompleted) - { - try - { - result4 = task.Result; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == MaxCount) - { - TryCallContinuation(); - } - } - else - { - RunTask4Async(task).Forget(); - } - } - - async UniTaskVoid RunTask4Async(UniTask task) - { - try - { - result4 = await task; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == MaxCount) - { - TryCallContinuation(); - } - } - - void RunTask5(UniTask task) - { - if (task.IsCompleted) - { - try - { - result5 = task.Result; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == MaxCount) - { - TryCallContinuation(); - } - } - else - { - RunTask5Async(task).Forget(); - } - } - - async UniTaskVoid RunTask5Async(UniTask task) - { - try - { - result5 = await task; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == MaxCount) - { - TryCallContinuation(); - } - } - - void RunTask6(UniTask task) - { - if (task.IsCompleted) - { - try - { - result6 = task.Result; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == MaxCount) - { - TryCallContinuation(); - } - } - else - { - RunTask6Async(task).Forget(); - } - } - - async UniTaskVoid RunTask6Async(UniTask task) - { - try - { - result6 = await task; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == MaxCount) - { - TryCallContinuation(); - } - } - - void RunTask7(UniTask task) - { - if (task.IsCompleted) - { - try - { - result7 = task.Result; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == MaxCount) - { - TryCallContinuation(); - } - } - else - { - RunTask7Async(task).Forget(); - } - } - - async UniTaskVoid RunTask7Async(UniTask task) - { - try - { - result7 = await task; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == MaxCount) - { - TryCallContinuation(); - } - } - - - public Awaiter GetAwaiter() - { - return new Awaiter(this); - } - - public struct Awaiter : ICriticalNotifyCompletion - { - WhenAllPromise parent; - - public Awaiter(WhenAllPromise parent) - { - this.parent = parent; - } - - public bool IsCompleted - { - get - { - return parent.exception != null || parent.completeCount == MaxCount; - } - } - - public (T1, T2, T3, T4, T5, T6, T7) GetResult() - { - if (parent.exception != null) - { - parent.exception.Throw(); - } - - return (parent.result1, parent.result2, parent.result3, parent.result4, parent.result5, parent.result6, parent.result7); - } - - public void OnCompleted(Action continuation) - { - UnsafeOnCompleted(continuation); - } - - public void UnsafeOnCompleted(Action continuation) - { - parent.whenComplete = continuation; - if (IsCompleted) - { - var action = Interlocked.Exchange(ref parent.whenComplete, null); - if (action != null) - { - action(); - } - } - } - } - } - - } -} -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Async/UniTask.WhenAll.Generated.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/UniTask.WhenAll.Generated.cs.meta deleted file mode 100644 index 9ac5a35..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/UniTask.WhenAll.Generated.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 5110117231c8a6d4095fd0cbd3f4c142 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/UniTask.WhenAll.cs b/Assets/Plugins/UniRx/Scripts/Async/UniTask.WhenAll.cs deleted file mode 100644 index 32e343f..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/UniTask.WhenAll.cs +++ /dev/null @@ -1,298 +0,0 @@ -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using System; -using System.Collections.Generic; -using System.Runtime.CompilerServices; -using System.Runtime.ExceptionServices; -using System.Threading; -using UniRx.Async.Internal; - -namespace UniRx.Async -{ - public partial struct UniTask - { - // UniTask - - public static async UniTask WhenAll(params UniTask[] tasks) - { - return await new WhenAllPromise(tasks, tasks.Length); - } - - public static async UniTask WhenAll(IEnumerable> tasks) - { - WhenAllPromise promise; - using (var span = ArrayPoolUtil.Materialize(tasks)) - { - promise = new WhenAllPromise(span.Array, span.Length); - } - - return await promise; - } - - public static async UniTask WhenAll(params UniTask[] tasks) - { - await new WhenAllPromise(tasks, tasks.Length); - } - - public static async UniTask WhenAll(IEnumerable tasks) - { - WhenAllPromise promise; - using (var span = ArrayPoolUtil.Materialize(tasks)) - { - promise = new WhenAllPromise(span.Array, span.Length); - } - - await promise; - } - - class WhenAllPromise - { - readonly T[] result; - int completeCount; - Action whenComplete; - ExceptionDispatchInfo exception; - - public WhenAllPromise(UniTask[] tasks, int tasksLength) - { - this.completeCount = 0; - this.whenComplete = null; - this.exception = null; - this.result = new T[tasksLength]; - - for (int i = 0; i < tasksLength; i++) - { - if (tasks[i].IsCompleted) - { - T value = default(T); - try - { - value = tasks[i].Result; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - continue; - } - - result[i] = value; - var count = Interlocked.Increment(ref completeCount); - if (count == result.Length) - { - TryCallContinuation(); - } - } - else - { - RunTask(tasks[i], i).Forget(); - } - } - } - - void TryCallContinuation() - { - var action = Interlocked.Exchange(ref whenComplete, null); - if (action != null) - { - action.Invoke(); - } - } - - async UniTaskVoid RunTask(UniTask task, int index) - { - T value = default(T); - try - { - value = await task; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - result[index] = value; - var count = Interlocked.Increment(ref completeCount); - if (count == result.Length) - { - TryCallContinuation(); - } - } - - public Awaiter GetAwaiter() - { - return new Awaiter(this); - } - - public struct Awaiter : ICriticalNotifyCompletion - { - WhenAllPromise parent; - - public Awaiter(WhenAllPromise parent) - { - this.parent = parent; - } - - public bool IsCompleted - { - get - { - return parent.exception != null || parent.result.Length == parent.completeCount; - } - } - - public T[] GetResult() - { - if (parent.exception != null) - { - parent.exception.Throw(); - } - - return parent.result; - } - - public void OnCompleted(Action continuation) - { - UnsafeOnCompleted(continuation); - } - - public void UnsafeOnCompleted(Action continuation) - { - parent.whenComplete = continuation; - if (IsCompleted) - { - var action = Interlocked.Exchange(ref parent.whenComplete, null); - if (action != null) - { - action(); - } - } - } - } - } - - class WhenAllPromise - { - int completeCount; - int resultLength; - Action whenComplete; - ExceptionDispatchInfo exception; - - public WhenAllPromise(UniTask[] tasks, int tasksLength) - { - this.completeCount = 0; - this.whenComplete = null; - this.exception = null; - this.resultLength = tasksLength; - - for (int i = 0; i < tasksLength; i++) - { - if (tasks[i].IsCompleted) - { - try - { - tasks[i].GetResult(); - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - continue; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == resultLength) - { - TryCallContinuation(); - } - } - else - { - RunTask(tasks[i], i).Forget(); - } - } - } - - void TryCallContinuation() - { - var action = Interlocked.Exchange(ref whenComplete, null); - if (action != null) - { - action.Invoke(); - } - } - - async UniTaskVoid RunTask(UniTask task, int index) - { - try - { - await task; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == resultLength) - { - TryCallContinuation(); - } - } - - public Awaiter GetAwaiter() - { - return new Awaiter(this); - } - - public struct Awaiter : ICriticalNotifyCompletion - { - WhenAllPromise parent; - - public Awaiter(WhenAllPromise parent) - { - this.parent = parent; - } - - public bool IsCompleted - { - get - { - return parent.exception != null || parent.resultLength == parent.completeCount; - } - } - - public void GetResult() - { - if (parent.exception != null) - { - parent.exception.Throw(); - } - } - - public void OnCompleted(Action continuation) - { - UnsafeOnCompleted(continuation); - } - - public void UnsafeOnCompleted(Action continuation) - { - parent.whenComplete = continuation; - if (IsCompleted) - { - var action = Interlocked.Exchange(ref parent.whenComplete, null); - if (action != null) - { - action(); - } - } - } - } - } - } -} -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Async/UniTask.WhenAll.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/UniTask.WhenAll.cs.meta deleted file mode 100644 index fe1b5f6..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/UniTask.WhenAll.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 355997a305ba64248822eec34998a1a0 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/UniTask.WhenAny.Generated.cs b/Assets/Plugins/UniRx/Scripts/Async/UniTask.WhenAny.Generated.cs deleted file mode 100644 index 8f3a2ff..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/UniTask.WhenAny.Generated.cs +++ /dev/null @@ -1,1527 +0,0 @@ -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.ExceptionServices; -using System.Threading; - -namespace UniRx.Async -{ - public partial struct UniTask - { - public static async UniTask<(int winArgumentIndex, (bool hasResult, T0 result0), (bool hasResult, T1 result1))> WhenAny(UniTask task0, UniTask task1) - { - return await new WhenAnyPromise(task0, task1); - } - - public static async UniTask<(int winArgumentIndex, (bool hasResult, T0 result0), (bool hasResult, T1 result1), (bool hasResult, T2 result2))> WhenAny(UniTask task0, UniTask task1, UniTask task2) - { - return await new WhenAnyPromise(task0, task1, task2); - } - - public static async UniTask<(int winArgumentIndex, (bool hasResult, T0 result0), (bool hasResult, T1 result1), (bool hasResult, T2 result2), (bool hasResult, T3 result3))> WhenAny(UniTask task0, UniTask task1, UniTask task2, UniTask task3) - { - return await new WhenAnyPromise(task0, task1, task2, task3); - } - - public static async UniTask<(int winArgumentIndex, (bool hasResult, T0 result0), (bool hasResult, T1 result1), (bool hasResult, T2 result2), (bool hasResult, T3 result3), (bool hasResult, T4 result4))> WhenAny(UniTask task0, UniTask task1, UniTask task2, UniTask task3, UniTask task4) - { - return await new WhenAnyPromise(task0, task1, task2, task3, task4); - } - - public static async UniTask<(int winArgumentIndex, (bool hasResult, T0 result0), (bool hasResult, T1 result1), (bool hasResult, T2 result2), (bool hasResult, T3 result3), (bool hasResult, T4 result4), (bool hasResult, T5 result5))> WhenAny(UniTask task0, UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5) - { - return await new WhenAnyPromise(task0, task1, task2, task3, task4, task5); - } - - public static async UniTask<(int winArgumentIndex, (bool hasResult, T0 result0), (bool hasResult, T1 result1), (bool hasResult, T2 result2), (bool hasResult, T3 result3), (bool hasResult, T4 result4), (bool hasResult, T5 result5), (bool hasResult, T6 result6))> WhenAny(UniTask task0, UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6) - { - return await new WhenAnyPromise(task0, task1, task2, task3, task4, task5, task6); - } - - public static async UniTask<(int winArgumentIndex, (bool hasResult, T0 result0), (bool hasResult, T1 result1), (bool hasResult, T2 result2), (bool hasResult, T3 result3), (bool hasResult, T4 result4), (bool hasResult, T5 result5), (bool hasResult, T6 result6), (bool hasResult, T7 result7))> WhenAny(UniTask task0, UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6, UniTask task7) - { - return await new WhenAnyPromise(task0, task1, task2, task3, task4, task5, task6, task7); - } - - class WhenAnyPromise - { - T0 result0; - T1 result1; - ExceptionDispatchInfo exception; - Action whenComplete; - int completeCount; - int winArgumentIndex; - - bool IsCompleted => exception != null || Volatile.Read(ref winArgumentIndex) != -1; - - public WhenAnyPromise(UniTask task0, UniTask task1) - { - this.whenComplete = null; - this.exception = null; - this.completeCount = 0; - this.winArgumentIndex = -1; - this.result0 = default(T0); - this.result1 = default(T1); - - RunTask0(task0).Forget(); - RunTask1(task1).Forget(); - } - - void TryCallContinuation() - { - var action = Interlocked.Exchange(ref whenComplete, null); - if (action != null) - { - action.Invoke(); - } - } - - async UniTaskVoid RunTask0(UniTask task) - { - T0 value; - try - { - value = await task; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == 1) - { - result0 = value; - Volatile.Write(ref winArgumentIndex, 0); - TryCallContinuation(); - } - } - - async UniTaskVoid RunTask1(UniTask task) - { - T1 value; - try - { - value = await task; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == 1) - { - result1 = value; - Volatile.Write(ref winArgumentIndex, 1); - TryCallContinuation(); - } - } - - - public Awaiter GetAwaiter() - { - return new Awaiter(this); - } - - public struct Awaiter : ICriticalNotifyCompletion - { - WhenAnyPromise parent; - - public Awaiter(WhenAnyPromise parent) - { - this.parent = parent; - } - - public bool IsCompleted - { - get - { - return parent.IsCompleted; - } - } - - public (int, (bool, T0), (bool, T1)) GetResult() - { - if (parent.exception != null) - { - parent.exception.Throw(); - } - - var i = parent.winArgumentIndex; - return (i, (i == 0, parent.result0), (i == 1, parent.result1)); - } - - public void OnCompleted(Action continuation) - { - UnsafeOnCompleted(continuation); - } - - public void UnsafeOnCompleted(Action continuation) - { - parent.whenComplete = continuation; - if (IsCompleted) - { - var action = Interlocked.Exchange(ref parent.whenComplete, null); - if (action != null) - { - action(); - } - } - } - } - } - - class WhenAnyPromise - { - T0 result0; - T1 result1; - T2 result2; - ExceptionDispatchInfo exception; - Action whenComplete; - int completeCount; - int winArgumentIndex; - - bool IsCompleted => exception != null || Volatile.Read(ref winArgumentIndex) != -1; - - public WhenAnyPromise(UniTask task0, UniTask task1, UniTask task2) - { - this.whenComplete = null; - this.exception = null; - this.completeCount = 0; - this.winArgumentIndex = -1; - this.result0 = default(T0); - this.result1 = default(T1); - this.result2 = default(T2); - - RunTask0(task0).Forget(); - RunTask1(task1).Forget(); - RunTask2(task2).Forget(); - } - - void TryCallContinuation() - { - var action = Interlocked.Exchange(ref whenComplete, null); - if (action != null) - { - action.Invoke(); - } - } - - async UniTaskVoid RunTask0(UniTask task) - { - T0 value; - try - { - value = await task; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == 1) - { - result0 = value; - Volatile.Write(ref winArgumentIndex, 0); - TryCallContinuation(); - } - } - - async UniTaskVoid RunTask1(UniTask task) - { - T1 value; - try - { - value = await task; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == 1) - { - result1 = value; - Volatile.Write(ref winArgumentIndex, 1); - TryCallContinuation(); - } - } - - async UniTaskVoid RunTask2(UniTask task) - { - T2 value; - try - { - value = await task; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == 1) - { - result2 = value; - Volatile.Write(ref winArgumentIndex, 2); - TryCallContinuation(); - } - } - - - public Awaiter GetAwaiter() - { - return new Awaiter(this); - } - - public struct Awaiter : ICriticalNotifyCompletion - { - WhenAnyPromise parent; - - public Awaiter(WhenAnyPromise parent) - { - this.parent = parent; - } - - public bool IsCompleted - { - get - { - return parent.IsCompleted; - } - } - - public (int, (bool, T0), (bool, T1), (bool, T2)) GetResult() - { - if (parent.exception != null) - { - parent.exception.Throw(); - } - - var i = parent.winArgumentIndex; - return (i, (i == 0, parent.result0), (i == 1, parent.result1), (i == 2, parent.result2)); - } - - public void OnCompleted(Action continuation) - { - UnsafeOnCompleted(continuation); - } - - public void UnsafeOnCompleted(Action continuation) - { - parent.whenComplete = continuation; - if (IsCompleted) - { - var action = Interlocked.Exchange(ref parent.whenComplete, null); - if (action != null) - { - action(); - } - } - } - } - } - - class WhenAnyPromise - { - T0 result0; - T1 result1; - T2 result2; - T3 result3; - ExceptionDispatchInfo exception; - Action whenComplete; - int completeCount; - int winArgumentIndex; - - bool IsCompleted => exception != null || Volatile.Read(ref winArgumentIndex) != -1; - - public WhenAnyPromise(UniTask task0, UniTask task1, UniTask task2, UniTask task3) - { - this.whenComplete = null; - this.exception = null; - this.completeCount = 0; - this.winArgumentIndex = -1; - this.result0 = default(T0); - this.result1 = default(T1); - this.result2 = default(T2); - this.result3 = default(T3); - - RunTask0(task0).Forget(); - RunTask1(task1).Forget(); - RunTask2(task2).Forget(); - RunTask3(task3).Forget(); - } - - void TryCallContinuation() - { - var action = Interlocked.Exchange(ref whenComplete, null); - if (action != null) - { - action.Invoke(); - } - } - - async UniTaskVoid RunTask0(UniTask task) - { - T0 value; - try - { - value = await task; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == 1) - { - result0 = value; - Volatile.Write(ref winArgumentIndex, 0); - TryCallContinuation(); - } - } - - async UniTaskVoid RunTask1(UniTask task) - { - T1 value; - try - { - value = await task; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == 1) - { - result1 = value; - Volatile.Write(ref winArgumentIndex, 1); - TryCallContinuation(); - } - } - - async UniTaskVoid RunTask2(UniTask task) - { - T2 value; - try - { - value = await task; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == 1) - { - result2 = value; - Volatile.Write(ref winArgumentIndex, 2); - TryCallContinuation(); - } - } - - async UniTaskVoid RunTask3(UniTask task) - { - T3 value; - try - { - value = await task; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == 1) - { - result3 = value; - Volatile.Write(ref winArgumentIndex, 3); - TryCallContinuation(); - } - } - - - public Awaiter GetAwaiter() - { - return new Awaiter(this); - } - - public struct Awaiter : ICriticalNotifyCompletion - { - WhenAnyPromise parent; - - public Awaiter(WhenAnyPromise parent) - { - this.parent = parent; - } - - public bool IsCompleted - { - get - { - return parent.IsCompleted; - } - } - - public (int, (bool, T0), (bool, T1), (bool, T2), (bool, T3)) GetResult() - { - if (parent.exception != null) - { - parent.exception.Throw(); - } - - var i = parent.winArgumentIndex; - return (i, (i == 0, parent.result0), (i == 1, parent.result1), (i == 2, parent.result2), (i == 3, parent.result3)); - } - - public void OnCompleted(Action continuation) - { - UnsafeOnCompleted(continuation); - } - - public void UnsafeOnCompleted(Action continuation) - { - parent.whenComplete = continuation; - if (IsCompleted) - { - var action = Interlocked.Exchange(ref parent.whenComplete, null); - if (action != null) - { - action(); - } - } - } - } - } - - class WhenAnyPromise - { - T0 result0; - T1 result1; - T2 result2; - T3 result3; - T4 result4; - ExceptionDispatchInfo exception; - Action whenComplete; - int completeCount; - int winArgumentIndex; - - bool IsCompleted => exception != null || Volatile.Read(ref winArgumentIndex) != -1; - - public WhenAnyPromise(UniTask task0, UniTask task1, UniTask task2, UniTask task3, UniTask task4) - { - this.whenComplete = null; - this.exception = null; - this.completeCount = 0; - this.winArgumentIndex = -1; - this.result0 = default(T0); - this.result1 = default(T1); - this.result2 = default(T2); - this.result3 = default(T3); - this.result4 = default(T4); - - RunTask0(task0).Forget(); - RunTask1(task1).Forget(); - RunTask2(task2).Forget(); - RunTask3(task3).Forget(); - RunTask4(task4).Forget(); - } - - void TryCallContinuation() - { - var action = Interlocked.Exchange(ref whenComplete, null); - if (action != null) - { - action.Invoke(); - } - } - - async UniTaskVoid RunTask0(UniTask task) - { - T0 value; - try - { - value = await task; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == 1) - { - result0 = value; - Volatile.Write(ref winArgumentIndex, 0); - TryCallContinuation(); - } - } - - async UniTaskVoid RunTask1(UniTask task) - { - T1 value; - try - { - value = await task; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == 1) - { - result1 = value; - Volatile.Write(ref winArgumentIndex, 1); - TryCallContinuation(); - } - } - - async UniTaskVoid RunTask2(UniTask task) - { - T2 value; - try - { - value = await task; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == 1) - { - result2 = value; - Volatile.Write(ref winArgumentIndex, 2); - TryCallContinuation(); - } - } - - async UniTaskVoid RunTask3(UniTask task) - { - T3 value; - try - { - value = await task; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == 1) - { - result3 = value; - Volatile.Write(ref winArgumentIndex, 3); - TryCallContinuation(); - } - } - - async UniTaskVoid RunTask4(UniTask task) - { - T4 value; - try - { - value = await task; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == 1) - { - result4 = value; - Volatile.Write(ref winArgumentIndex, 4); - TryCallContinuation(); - } - } - - - public Awaiter GetAwaiter() - { - return new Awaiter(this); - } - - public struct Awaiter : ICriticalNotifyCompletion - { - WhenAnyPromise parent; - - public Awaiter(WhenAnyPromise parent) - { - this.parent = parent; - } - - public bool IsCompleted - { - get - { - return parent.IsCompleted; - } - } - - public (int, (bool, T0), (bool, T1), (bool, T2), (bool, T3), (bool, T4)) GetResult() - { - if (parent.exception != null) - { - parent.exception.Throw(); - } - - var i = parent.winArgumentIndex; - return (i, (i == 0, parent.result0), (i == 1, parent.result1), (i == 2, parent.result2), (i == 3, parent.result3), (i == 4, parent.result4)); - } - - public void OnCompleted(Action continuation) - { - UnsafeOnCompleted(continuation); - } - - public void UnsafeOnCompleted(Action continuation) - { - parent.whenComplete = continuation; - if (IsCompleted) - { - var action = Interlocked.Exchange(ref parent.whenComplete, null); - if (action != null) - { - action(); - } - } - } - } - } - - class WhenAnyPromise - { - T0 result0; - T1 result1; - T2 result2; - T3 result3; - T4 result4; - T5 result5; - ExceptionDispatchInfo exception; - Action whenComplete; - int completeCount; - int winArgumentIndex; - - bool IsCompleted => exception != null || Volatile.Read(ref winArgumentIndex) != -1; - - public WhenAnyPromise(UniTask task0, UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5) - { - this.whenComplete = null; - this.exception = null; - this.completeCount = 0; - this.winArgumentIndex = -1; - this.result0 = default(T0); - this.result1 = default(T1); - this.result2 = default(T2); - this.result3 = default(T3); - this.result4 = default(T4); - this.result5 = default(T5); - - RunTask0(task0).Forget(); - RunTask1(task1).Forget(); - RunTask2(task2).Forget(); - RunTask3(task3).Forget(); - RunTask4(task4).Forget(); - RunTask5(task5).Forget(); - } - - void TryCallContinuation() - { - var action = Interlocked.Exchange(ref whenComplete, null); - if (action != null) - { - action.Invoke(); - } - } - - async UniTaskVoid RunTask0(UniTask task) - { - T0 value; - try - { - value = await task; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == 1) - { - result0 = value; - Volatile.Write(ref winArgumentIndex, 0); - TryCallContinuation(); - } - } - - async UniTaskVoid RunTask1(UniTask task) - { - T1 value; - try - { - value = await task; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == 1) - { - result1 = value; - Volatile.Write(ref winArgumentIndex, 1); - TryCallContinuation(); - } - } - - async UniTaskVoid RunTask2(UniTask task) - { - T2 value; - try - { - value = await task; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == 1) - { - result2 = value; - Volatile.Write(ref winArgumentIndex, 2); - TryCallContinuation(); - } - } - - async UniTaskVoid RunTask3(UniTask task) - { - T3 value; - try - { - value = await task; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == 1) - { - result3 = value; - Volatile.Write(ref winArgumentIndex, 3); - TryCallContinuation(); - } - } - - async UniTaskVoid RunTask4(UniTask task) - { - T4 value; - try - { - value = await task; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == 1) - { - result4 = value; - Volatile.Write(ref winArgumentIndex, 4); - TryCallContinuation(); - } - } - - async UniTaskVoid RunTask5(UniTask task) - { - T5 value; - try - { - value = await task; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == 1) - { - result5 = value; - Volatile.Write(ref winArgumentIndex, 5); - TryCallContinuation(); - } - } - - - public Awaiter GetAwaiter() - { - return new Awaiter(this); - } - - public struct Awaiter : ICriticalNotifyCompletion - { - WhenAnyPromise parent; - - public Awaiter(WhenAnyPromise parent) - { - this.parent = parent; - } - - public bool IsCompleted - { - get - { - return parent.IsCompleted; - } - } - - public (int, (bool, T0), (bool, T1), (bool, T2), (bool, T3), (bool, T4), (bool, T5)) GetResult() - { - if (parent.exception != null) - { - parent.exception.Throw(); - } - - var i = parent.winArgumentIndex; - return (i, (i == 0, parent.result0), (i == 1, parent.result1), (i == 2, parent.result2), (i == 3, parent.result3), (i == 4, parent.result4), (i == 5, parent.result5)); - } - - public void OnCompleted(Action continuation) - { - UnsafeOnCompleted(continuation); - } - - public void UnsafeOnCompleted(Action continuation) - { - parent.whenComplete = continuation; - if (IsCompleted) - { - var action = Interlocked.Exchange(ref parent.whenComplete, null); - if (action != null) - { - action(); - } - } - } - } - } - - class WhenAnyPromise - { - T0 result0; - T1 result1; - T2 result2; - T3 result3; - T4 result4; - T5 result5; - T6 result6; - ExceptionDispatchInfo exception; - Action whenComplete; - int completeCount; - int winArgumentIndex; - - bool IsCompleted => exception != null || Volatile.Read(ref winArgumentIndex) != -1; - - public WhenAnyPromise(UniTask task0, UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6) - { - this.whenComplete = null; - this.exception = null; - this.completeCount = 0; - this.winArgumentIndex = -1; - this.result0 = default(T0); - this.result1 = default(T1); - this.result2 = default(T2); - this.result3 = default(T3); - this.result4 = default(T4); - this.result5 = default(T5); - this.result6 = default(T6); - - RunTask0(task0).Forget(); - RunTask1(task1).Forget(); - RunTask2(task2).Forget(); - RunTask3(task3).Forget(); - RunTask4(task4).Forget(); - RunTask5(task5).Forget(); - RunTask6(task6).Forget(); - } - - void TryCallContinuation() - { - var action = Interlocked.Exchange(ref whenComplete, null); - if (action != null) - { - action.Invoke(); - } - } - - async UniTaskVoid RunTask0(UniTask task) - { - T0 value; - try - { - value = await task; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == 1) - { - result0 = value; - Volatile.Write(ref winArgumentIndex, 0); - TryCallContinuation(); - } - } - - async UniTaskVoid RunTask1(UniTask task) - { - T1 value; - try - { - value = await task; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == 1) - { - result1 = value; - Volatile.Write(ref winArgumentIndex, 1); - TryCallContinuation(); - } - } - - async UniTaskVoid RunTask2(UniTask task) - { - T2 value; - try - { - value = await task; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == 1) - { - result2 = value; - Volatile.Write(ref winArgumentIndex, 2); - TryCallContinuation(); - } - } - - async UniTaskVoid RunTask3(UniTask task) - { - T3 value; - try - { - value = await task; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == 1) - { - result3 = value; - Volatile.Write(ref winArgumentIndex, 3); - TryCallContinuation(); - } - } - - async UniTaskVoid RunTask4(UniTask task) - { - T4 value; - try - { - value = await task; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == 1) - { - result4 = value; - Volatile.Write(ref winArgumentIndex, 4); - TryCallContinuation(); - } - } - - async UniTaskVoid RunTask5(UniTask task) - { - T5 value; - try - { - value = await task; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == 1) - { - result5 = value; - Volatile.Write(ref winArgumentIndex, 5); - TryCallContinuation(); - } - } - - async UniTaskVoid RunTask6(UniTask task) - { - T6 value; - try - { - value = await task; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == 1) - { - result6 = value; - Volatile.Write(ref winArgumentIndex, 6); - TryCallContinuation(); - } - } - - - public Awaiter GetAwaiter() - { - return new Awaiter(this); - } - - public struct Awaiter : ICriticalNotifyCompletion - { - WhenAnyPromise parent; - - public Awaiter(WhenAnyPromise parent) - { - this.parent = parent; - } - - public bool IsCompleted - { - get - { - return parent.IsCompleted; - } - } - - public (int, (bool, T0), (bool, T1), (bool, T2), (bool, T3), (bool, T4), (bool, T5), (bool, T6)) GetResult() - { - if (parent.exception != null) - { - parent.exception.Throw(); - } - - var i = parent.winArgumentIndex; - return (i, (i == 0, parent.result0), (i == 1, parent.result1), (i == 2, parent.result2), (i == 3, parent.result3), (i == 4, parent.result4), (i == 5, parent.result5), (i == 6, parent.result6)); - } - - public void OnCompleted(Action continuation) - { - UnsafeOnCompleted(continuation); - } - - public void UnsafeOnCompleted(Action continuation) - { - parent.whenComplete = continuation; - if (IsCompleted) - { - var action = Interlocked.Exchange(ref parent.whenComplete, null); - if (action != null) - { - action(); - } - } - } - } - } - - class WhenAnyPromise - { - T0 result0; - T1 result1; - T2 result2; - T3 result3; - T4 result4; - T5 result5; - T6 result6; - T7 result7; - ExceptionDispatchInfo exception; - Action whenComplete; - int completeCount; - int winArgumentIndex; - - bool IsCompleted => exception != null || Volatile.Read(ref winArgumentIndex) != -1; - - public WhenAnyPromise(UniTask task0, UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6, UniTask task7) - { - this.whenComplete = null; - this.exception = null; - this.completeCount = 0; - this.winArgumentIndex = -1; - this.result0 = default(T0); - this.result1 = default(T1); - this.result2 = default(T2); - this.result3 = default(T3); - this.result4 = default(T4); - this.result5 = default(T5); - this.result6 = default(T6); - this.result7 = default(T7); - - RunTask0(task0).Forget(); - RunTask1(task1).Forget(); - RunTask2(task2).Forget(); - RunTask3(task3).Forget(); - RunTask4(task4).Forget(); - RunTask5(task5).Forget(); - RunTask6(task6).Forget(); - RunTask7(task7).Forget(); - } - - void TryCallContinuation() - { - var action = Interlocked.Exchange(ref whenComplete, null); - if (action != null) - { - action.Invoke(); - } - } - - async UniTaskVoid RunTask0(UniTask task) - { - T0 value; - try - { - value = await task; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == 1) - { - result0 = value; - Volatile.Write(ref winArgumentIndex, 0); - TryCallContinuation(); - } - } - - async UniTaskVoid RunTask1(UniTask task) - { - T1 value; - try - { - value = await task; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == 1) - { - result1 = value; - Volatile.Write(ref winArgumentIndex, 1); - TryCallContinuation(); - } - } - - async UniTaskVoid RunTask2(UniTask task) - { - T2 value; - try - { - value = await task; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == 1) - { - result2 = value; - Volatile.Write(ref winArgumentIndex, 2); - TryCallContinuation(); - } - } - - async UniTaskVoid RunTask3(UniTask task) - { - T3 value; - try - { - value = await task; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == 1) - { - result3 = value; - Volatile.Write(ref winArgumentIndex, 3); - TryCallContinuation(); - } - } - - async UniTaskVoid RunTask4(UniTask task) - { - T4 value; - try - { - value = await task; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == 1) - { - result4 = value; - Volatile.Write(ref winArgumentIndex, 4); - TryCallContinuation(); - } - } - - async UniTaskVoid RunTask5(UniTask task) - { - T5 value; - try - { - value = await task; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == 1) - { - result5 = value; - Volatile.Write(ref winArgumentIndex, 5); - TryCallContinuation(); - } - } - - async UniTaskVoid RunTask6(UniTask task) - { - T6 value; - try - { - value = await task; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == 1) - { - result6 = value; - Volatile.Write(ref winArgumentIndex, 6); - TryCallContinuation(); - } - } - - async UniTaskVoid RunTask7(UniTask task) - { - T7 value; - try - { - value = await task; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == 1) - { - result7 = value; - Volatile.Write(ref winArgumentIndex, 7); - TryCallContinuation(); - } - } - - - public Awaiter GetAwaiter() - { - return new Awaiter(this); - } - - public struct Awaiter : ICriticalNotifyCompletion - { - WhenAnyPromise parent; - - public Awaiter(WhenAnyPromise parent) - { - this.parent = parent; - } - - public bool IsCompleted - { - get - { - return parent.IsCompleted; - } - } - - public (int, (bool, T0), (bool, T1), (bool, T2), (bool, T3), (bool, T4), (bool, T5), (bool, T6), (bool, T7)) GetResult() - { - if (parent.exception != null) - { - parent.exception.Throw(); - } - - var i = parent.winArgumentIndex; - return (i, (i == 0, parent.result0), (i == 1, parent.result1), (i == 2, parent.result2), (i == 3, parent.result3), (i == 4, parent.result4), (i == 5, parent.result5), (i == 6, parent.result6), (i == 7, parent.result7)); - } - - public void OnCompleted(Action continuation) - { - UnsafeOnCompleted(continuation); - } - - public void UnsafeOnCompleted(Action continuation) - { - parent.whenComplete = continuation; - if (IsCompleted) - { - var action = Interlocked.Exchange(ref parent.whenComplete, null); - if (action != null) - { - action(); - } - } - } - } - } - - } -} -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Async/UniTask.WhenAny.Generated.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/UniTask.WhenAny.Generated.cs.meta deleted file mode 100644 index 3594619..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/UniTask.WhenAny.Generated.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 13d604ac281570c4eac9962429f19ca9 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/UniTask.WhenAny.cs b/Assets/Plugins/UniRx/Scripts/Async/UniTask.WhenAny.cs deleted file mode 100644 index f84a0ff..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/UniTask.WhenAny.cs +++ /dev/null @@ -1,374 +0,0 @@ -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.ExceptionServices; -using System.Threading; - -namespace UniRx.Async -{ - public partial struct UniTask - { - // UniTask - - public static async UniTask<(bool hasResultLeft, T0 result)> WhenAny(UniTask task0, UniTask task1) - { - return await new UnitWhenAnyPromise(task0, task1); - } - - public static async UniTask<(int winArgumentIndex, T result)> WhenAny(params UniTask[] tasks) - { - return await new WhenAnyPromise(tasks); - } - - /// Return value is winArgumentIndex - public static async UniTask WhenAny(params UniTask[] tasks) - { - return await new WhenAnyPromise(tasks); - } - - class UnitWhenAnyPromise - { - T0 result0; - ExceptionDispatchInfo exception; - Action whenComplete; - int completeCount; - int winArgumentIndex; - - bool IsCompleted => exception != null || Volatile.Read(ref winArgumentIndex) != -1; - - public UnitWhenAnyPromise(UniTask task0, UniTask task1) - { - this.whenComplete = null; - this.exception = null; - this.completeCount = 0; - this.winArgumentIndex = -1; - this.result0 = default(T0); - - RunTask0(task0).Forget(); - RunTask1(task1).Forget(); - } - - void TryCallContinuation() - { - var action = Interlocked.Exchange(ref whenComplete, null); - if (action != null) - { - action.Invoke(); - } - } - - async UniTaskVoid RunTask0(UniTask task) - { - T0 value; - try - { - value = await task; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == 1) - { - result0 = value; - Volatile.Write(ref winArgumentIndex, 0); - TryCallContinuation(); - } - } - - async UniTaskVoid RunTask1(UniTask task) - { - try - { - await task; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == 1) - { - Volatile.Write(ref winArgumentIndex, 1); - TryCallContinuation(); - } - } - - - public Awaiter GetAwaiter() - { - return new Awaiter(this); - } - - public struct Awaiter : ICriticalNotifyCompletion - { - UnitWhenAnyPromise parent; - - public Awaiter(UnitWhenAnyPromise parent) - { - this.parent = parent; - } - - public bool IsCompleted - { - get - { - return parent.IsCompleted; - } - } - - public (bool, T0) GetResult() - { - if (parent.exception != null) - { - parent.exception.Throw(); - } - - return (parent.winArgumentIndex == 0, parent.result0); - } - - public void OnCompleted(Action continuation) - { - UnsafeOnCompleted(continuation); - } - - public void UnsafeOnCompleted(Action continuation) - { - parent.whenComplete = continuation; - if (IsCompleted) - { - var action = Interlocked.Exchange(ref parent.whenComplete, null); - if (action != null) - { - action(); - } - } - } - } - } - - - class WhenAnyPromise - { - T result; - int completeCount; - int winArgumentIndex; - Action whenComplete; - ExceptionDispatchInfo exception; - - public bool IsComplete => exception != null || Volatile.Read(ref winArgumentIndex) != -1; - - public WhenAnyPromise(UniTask[] tasks) - { - this.completeCount = 0; - this.winArgumentIndex = -1; - this.whenComplete = null; - this.exception = null; - this.result = default(T); - - for (int i = 0; i < tasks.Length; i++) - { - RunTask(tasks[i], i).Forget(); - } - } - - async UniTaskVoid RunTask(UniTask task, int index) - { - T value; - try - { - value = await task; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == 1) - { - result = value; - Volatile.Write(ref winArgumentIndex, index); - TryCallContinuation(); - } - } - - void TryCallContinuation() - { - var action = Interlocked.Exchange(ref whenComplete, null); - if (action != null) - { - action.Invoke(); - } - } - - public Awaiter GetAwaiter() - { - return new Awaiter(this); - } - - public struct Awaiter : ICriticalNotifyCompletion - { - WhenAnyPromise parent; - - public Awaiter(WhenAnyPromise parent) - { - this.parent = parent; - } - - public bool IsCompleted - { - get - { - return parent.IsComplete; - } - } - - public (int, T) GetResult() - { - if (parent.exception != null) - { - parent.exception.Throw(); - } - - return (parent.winArgumentIndex, parent.result); - } - - public void OnCompleted(Action continuation) - { - UnsafeOnCompleted(continuation); - } - - public void UnsafeOnCompleted(Action continuation) - { - parent.whenComplete = continuation; - if (IsCompleted) - { - var action = Interlocked.Exchange(ref parent.whenComplete, null); - if (action != null) - { - action(); - } - } - } - } - } - - class WhenAnyPromise - { - int completeCount; - int winArgumentIndex; - Action whenComplete; - ExceptionDispatchInfo exception; - - public bool IsComplete => exception != null || Volatile.Read(ref winArgumentIndex) != -1; - - public WhenAnyPromise(UniTask[] tasks) - { - this.completeCount = 0; - this.winArgumentIndex = -1; - this.whenComplete = null; - this.exception = null; - - for (int i = 0; i < tasks.Length; i++) - { - RunTask(tasks[i], i).Forget(); - } - } - - async UniTaskVoid RunTask(UniTask task, int index) - { - try - { - await task; - } - catch (Exception ex) - { - exception = ExceptionDispatchInfo.Capture(ex); - TryCallContinuation(); - return; - } - - var count = Interlocked.Increment(ref completeCount); - if (count == 1) - { - Volatile.Write(ref winArgumentIndex, index); - TryCallContinuation(); - } - } - - void TryCallContinuation() - { - var action = Interlocked.Exchange(ref whenComplete, null); - if (action != null) - { - action.Invoke(); - } - } - - public Awaiter GetAwaiter() - { - return new Awaiter(this); - } - - public struct Awaiter : ICriticalNotifyCompletion - { - WhenAnyPromise parent; - - public Awaiter(WhenAnyPromise parent) - { - this.parent = parent; - } - - public bool IsCompleted - { - get - { - return parent.IsComplete; - } - } - - public int GetResult() - { - if (parent.exception != null) - { - parent.exception.Throw(); - } - - return parent.winArgumentIndex; - } - - public void OnCompleted(Action continuation) - { - UnsafeOnCompleted(continuation); - } - - public void UnsafeOnCompleted(Action continuation) - { - parent.whenComplete = continuation; - if (IsCompleted) - { - var action = Interlocked.Exchange(ref parent.whenComplete, null); - if (action != null) - { - action(); - } - } - } - } - } - } -} - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Async/UniTask.WhenAny.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/UniTask.WhenAny.cs.meta deleted file mode 100644 index a8a410b..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/UniTask.WhenAny.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: c32578978c37eaf41bdd90e1b034637d -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/UniTask.cs b/Assets/Plugins/UniRx/Scripts/Async/UniTask.cs deleted file mode 100644 index 57a008f..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/UniTask.cs +++ /dev/null @@ -1,479 +0,0 @@ -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Runtime.CompilerServices; -using UniRx.Async.CompilerServices; -using UniRx.Async.Internal; - -namespace UniRx.Async -{ - /// - /// Lightweight unity specified task-like object. - /// - [AsyncMethodBuilder(typeof(AsyncUniTaskMethodBuilder))] - public partial struct UniTask : IEquatable - { - static readonly UniTask DefaultAsyncUnitTask = new UniTask(AsyncUnit.Default); - - readonly IAwaiter awaiter; - - [DebuggerHidden] - public UniTask(IAwaiter awaiter) - { - this.awaiter = awaiter; - } - - [DebuggerHidden] - public UniTask(Func factory) - { - this.awaiter = new LazyPromise(factory); - } - - [DebuggerHidden] - public AwaiterStatus Status - { - get - { - return awaiter == null ? AwaiterStatus.Succeeded : awaiter.Status; - } - } - - [DebuggerHidden] - public bool IsCompleted - { - get - { - return awaiter == null ? true : awaiter.IsCompleted; - } - } - - [DebuggerHidden] - public void GetResult() - { - if (awaiter != null) - { - awaiter.GetResult(); - } - } - - [DebuggerHidden] - public Awaiter GetAwaiter() - { - return new Awaiter(this); - } - - /// - /// returns (bool IsCanceled) instead of throws OperationCanceledException. - /// - public UniTask SuppressCancellationThrow() - { - var status = Status; - if (status == AwaiterStatus.Succeeded) return CompletedTasks.False; - if (status == AwaiterStatus.Canceled) return CompletedTasks.True; - return new UniTask(new IsCanceledAwaiter(awaiter)); - } - - public bool Equals(UniTask other) - { - if (this.awaiter == null && other.awaiter == null) - { - return true; - } - else if (this.awaiter != null && other.awaiter != null) - { - return this.awaiter == other.awaiter; - } - else - { - return false; - } - } - - public override int GetHashCode() - { - if (this.awaiter == null) - { - return 0; - } - else - { - return this.awaiter.GetHashCode(); - } - } - - public override string ToString() - { - return (this.awaiter == null) ? "()" - : (this.awaiter.Status == AwaiterStatus.Succeeded) ? "()" - : "(" + this.awaiter.Status + ")"; - } - - public static implicit operator UniTask(UniTask task) - { - if (task.awaiter != null) - { - if (task.awaiter.IsCompleted) - { - return DefaultAsyncUnitTask; - } - else - { - // UniTask -> UniTask is free but UniTask -> UniTask requires wrapping cost. - return new UniTask(new AsyncUnitAwaiter(task.awaiter)); - } - } - else - { - return DefaultAsyncUnitTask; - } - } - - class AsyncUnitAwaiter : IAwaiter - { - readonly IAwaiter awaiter; - - public AsyncUnitAwaiter(IAwaiter awaiter) - { - this.awaiter = awaiter; - } - - public bool IsCompleted => awaiter.IsCompleted; - - public AwaiterStatus Status => awaiter.Status; - - public AsyncUnit GetResult() - { - awaiter.GetResult(); - return AsyncUnit.Default; - } - - public void OnCompleted(Action continuation) - { - awaiter.OnCompleted(continuation); - } - - public void UnsafeOnCompleted(Action continuation) - { - awaiter.UnsafeOnCompleted(continuation); - } - - void IAwaiter.GetResult() - { - awaiter.GetResult(); - } - } - - class IsCanceledAwaiter : IAwaiter - { - readonly IAwaiter awaiter; - - public IsCanceledAwaiter(IAwaiter awaiter) - { - this.awaiter = awaiter; - } - - public bool IsCompleted => awaiter.IsCompleted; - - public AwaiterStatus Status => awaiter.Status; - - public bool GetResult() - { - if (awaiter.Status == AwaiterStatus.Canceled) - { - return true; - } - awaiter.GetResult(); - return false; - } - - public void OnCompleted(Action continuation) - { - awaiter.OnCompleted(continuation); - } - - public void UnsafeOnCompleted(Action continuation) - { - awaiter.UnsafeOnCompleted(continuation); - } - - void IAwaiter.GetResult() - { - awaiter.GetResult(); - } - } - - public struct Awaiter : IAwaiter - { - readonly UniTask task; - - [DebuggerHidden] - public Awaiter(UniTask task) - { - this.task = task; - } - - [DebuggerHidden] - public bool IsCompleted => task.IsCompleted; - - [DebuggerHidden] - public AwaiterStatus Status => task.Status; - - [DebuggerHidden] - public void GetResult() => task.GetResult(); - - [DebuggerHidden] - public void OnCompleted(Action continuation) - { - if (task.awaiter != null) - { - task.awaiter.OnCompleted(continuation); - } - else - { - continuation(); - } - } - - [DebuggerHidden] - public void UnsafeOnCompleted(Action continuation) - { - if (task.awaiter != null) - { - task.awaiter.UnsafeOnCompleted(continuation); - } - else - { - continuation(); - } - } - } - } - - /// - /// Lightweight unity specified task-like object. - /// - [AsyncMethodBuilder(typeof(AsyncUniTaskMethodBuilder<>))] - public struct UniTask : IEquatable> - { - readonly T result; - readonly IAwaiter awaiter; - - [DebuggerHidden] - public UniTask(T result) - { - this.result = result; - this.awaiter = null; - } - - [DebuggerHidden] - public UniTask(IAwaiter awaiter) - { - this.result = default(T); - this.awaiter = awaiter; - } - - [DebuggerHidden] - public UniTask(Func> factory) - { - this.result = default(T); - this.awaiter = new LazyPromise(factory); - } - - [DebuggerHidden] - public AwaiterStatus Status - { - get - { - return awaiter == null ? AwaiterStatus.Succeeded : awaiter.Status; - } - } - - [DebuggerHidden] - public bool IsCompleted - { - get - { - return awaiter == null ? true : awaiter.IsCompleted; - } - } - - [DebuggerHidden] - public T Result - { - get - { - if (awaiter == null) - { - return result; - } - else - { - return awaiter.GetResult(); - } - } - } - - [DebuggerHidden] - public Awaiter GetAwaiter() - { - return new Awaiter(this); - } - - /// - /// returns (bool IsCanceled, T Result) instead of throws OperationCanceledException. - /// - public UniTask<(bool IsCanceled, T Result)> SuppressCancellationThrow() - { - var status = Status; - if (status == AwaiterStatus.Succeeded) - { - return new UniTask<(bool, T)>((false, Result)); - } - else if (status == AwaiterStatus.Canceled) - { - return new UniTask<(bool, T)>((true, default(T))); - } - return new UniTask<(bool, T)>(new IsCanceledAwaiter(awaiter)); - } - - public bool Equals(UniTask other) - { - if (this.awaiter == null && other.awaiter == null) - { - return EqualityComparer.Default.Equals(this.result, other.result); - } - else if (this.awaiter != null && other.awaiter != null) - { - return this.awaiter == other.awaiter; - } - else - { - return false; - } - } - - public override int GetHashCode() - { - if (this.awaiter == null) - { - if (result == null) return 0; - return result.GetHashCode(); - } - else - { - return this.awaiter.GetHashCode(); - } - } - - public override string ToString() - { - return (this.awaiter == null) ? result.ToString() - : (this.awaiter.Status == AwaiterStatus.Succeeded) ? this.awaiter.GetResult().ToString() - : "(" + this.awaiter.Status + ")"; - } - - public static implicit operator UniTask(UniTask task) - { - if (task.awaiter != null) - { - return new UniTask(task.awaiter); - } - else - { - return new UniTask(); - } - } - - class IsCanceledAwaiter : IAwaiter<(bool, T)> - { - readonly IAwaiter awaiter; - - public IsCanceledAwaiter(IAwaiter awaiter) - { - this.awaiter = awaiter; - } - - public bool IsCompleted => awaiter.IsCompleted; - - public AwaiterStatus Status => awaiter.Status; - - public (bool, T) GetResult() - { - if (awaiter.Status == AwaiterStatus.Canceled) - { - return (true, default(T)); - } - return (false, awaiter.GetResult()); - } - - public void OnCompleted(Action continuation) - { - awaiter.OnCompleted(continuation); - } - - public void UnsafeOnCompleted(Action continuation) - { - awaiter.UnsafeOnCompleted(continuation); - } - - void IAwaiter.GetResult() - { - awaiter.GetResult(); - } - } - - public struct Awaiter : IAwaiter - { - readonly UniTask task; - - [DebuggerHidden] - public Awaiter(UniTask task) - { - this.task = task; - } - - [DebuggerHidden] - public bool IsCompleted => task.IsCompleted; - - [DebuggerHidden] - public AwaiterStatus Status => task.Status; - - [DebuggerHidden] - void IAwaiter.GetResult() => GetResult(); - - [DebuggerHidden] - public T GetResult() => task.Result; - - [DebuggerHidden] - public void OnCompleted(Action continuation) - { - if (task.awaiter != null) - { - task.awaiter.OnCompleted(continuation); - } - else - { - continuation(); - } - } - - [DebuggerHidden] - public void UnsafeOnCompleted(Action continuation) - { - if (task.awaiter != null) - { - task.awaiter.UnsafeOnCompleted(continuation); - } - else - { - continuation(); - } - } - } - } -} - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Async/UniTask.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/UniTask.cs.meta deleted file mode 100644 index 0691fe2..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/UniTask.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 8947adf23181ff04db73829df217ca94 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/UniTaskCompletionSource.cs b/Assets/Plugins/UniRx/Scripts/Async/UniTaskCompletionSource.cs deleted file mode 100644 index 002d1fa..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/UniTaskCompletionSource.cs +++ /dev/null @@ -1,413 +0,0 @@ -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Runtime.CompilerServices; -using System.Runtime.ExceptionServices; -using System.Threading; -using UniRx.Async.Internal; - -namespace UniRx.Async -{ - internal class ExceptionHolder - { - ExceptionDispatchInfo exception; - bool calledGet = false; - - public ExceptionHolder(ExceptionDispatchInfo exception) - { - this.exception = exception; - } - - public ExceptionDispatchInfo GetException() - { - if (!calledGet) - { - calledGet = true; - GC.SuppressFinalize(this); - } - return exception; - } - - ~ExceptionHolder() - { - UniTaskScheduler.PublishUnobservedTaskException(exception.SourceException); - } - } - - public interface IResolvePromise - { - bool TrySetResult(); - } - - public interface IResolvePromise - { - bool TrySetResult(T value); - } - - public interface IRejectPromise - { - bool TrySetException(Exception exception); - } - - public interface ICancelPromise - { - bool TrySetCanceled(); - } - - public interface IPromise : IResolvePromise, IRejectPromise, ICancelPromise - { - } - - public interface IPromise : IResolvePromise, IRejectPromise, ICancelPromise - { - } - - public class UniTaskCompletionSource : IAwaiter, IPromise - { - // State(= AwaiterStatus) - const int Pending = 0; - const int Succeeded = 1; - const int Faulted = 2; - const int Canceled = 3; - - int state = 0; - bool handled = false; - ExceptionHolder exception; - object continuation; // action or list - - AwaiterStatus IAwaiter.Status => (AwaiterStatus)state; - - bool IAwaiter.IsCompleted => state != Pending; - - public UniTask Task => new UniTask(this); - - public UniTaskCompletionSource() - { - TaskTracker.TrackActiveTask(this, 2); - } - - [Conditional("UNITY_EDITOR")] - internal void MarkHandled() - { - if (!handled) - { - handled = true; - TaskTracker.RemoveTracking(this); - } - } - - void IAwaiter.GetResult() - { - MarkHandled(); - - if (state == Succeeded) - { - return; - } - else if (state == Faulted) - { - exception.GetException().Throw(); - } - else if (state == Canceled) - { - if (exception != null) - { - exception.GetException().Throw(); // guranteed operation canceled exception. - } - - throw new OperationCanceledException(); - } - else // Pending - { - throw new NotSupportedException("UniTask does not allow call GetResult directly when task not completed. Please use 'await'."); - } - } - - void ICriticalNotifyCompletion.UnsafeOnCompleted(Action action) - { - if (Interlocked.CompareExchange(ref continuation, (object)action, null) == null) - { - if (state != Pending) - { - TryInvokeContinuation(); - } - } - else - { - var c = continuation; - if (c is Action) - { - var list = new List(); - list.Add((Action)c); - list.Add(action); - if (Interlocked.CompareExchange(ref continuation, list, c) == c) - { - goto TRYINVOKE; - } - } - - var l = (List)continuation; - lock (l) - { - l.Add(action); - } - - TRYINVOKE: - if (state != Pending) - { - TryInvokeContinuation(); - } - } - } - - void TryInvokeContinuation() - { - var c = Interlocked.Exchange(ref continuation, null); - if (c != null) - { - if (c is Action) - { - ((Action)c).Invoke(); - } - else - { - var l = (List)c; - var cnt = l.Count; - for (int i = 0; i < cnt; i++) - { - l[i].Invoke(); - } - } - } - } - - public bool TrySetResult() - { - if (Interlocked.CompareExchange(ref state, Succeeded, Pending) == Pending) - { - TryInvokeContinuation(); - return true; - } - return false; - } - - public bool TrySetException(Exception exception) - { - if (Interlocked.CompareExchange(ref state, Faulted, Pending) == Pending) - { - this.exception = new ExceptionHolder(ExceptionDispatchInfo.Capture(exception)); - TryInvokeContinuation(); - return true; - } - return false; - } - - public bool TrySetCanceled() - { - if (Interlocked.CompareExchange(ref state, Canceled, Pending) == Pending) - { - TryInvokeContinuation(); - return true; - } - return false; - } - - public bool TrySetCanceled(OperationCanceledException exception) - { - if (Interlocked.CompareExchange(ref state, Canceled, Pending) == Pending) - { - this.exception = new ExceptionHolder(ExceptionDispatchInfo.Capture(exception)); - TryInvokeContinuation(); - return true; - } - return false; - } - - void INotifyCompletion.OnCompleted(Action continuation) - { - ((ICriticalNotifyCompletion)this).UnsafeOnCompleted(continuation); - } - } - - public class UniTaskCompletionSource : IAwaiter, IPromise - { - // State(= AwaiterStatus) - const int Pending = 0; - const int Succeeded = 1; - const int Faulted = 2; - const int Canceled = 3; - - int state = 0; - T value; - bool handled = false; - ExceptionHolder exception; - object continuation; // action or list - - bool IAwaiter.IsCompleted => state != Pending; - - public UniTask Task => new UniTask(this); - public UniTask UnitTask => new UniTask(this); - - AwaiterStatus IAwaiter.Status => (AwaiterStatus)state; - - public UniTaskCompletionSource() - { - TaskTracker.TrackActiveTask(this, 2); - } - - [Conditional("UNITY_EDITOR")] - internal void MarkHandled() - { - if (!handled) - { - handled = true; - TaskTracker.RemoveTracking(this); - } - } - - T IAwaiter.GetResult() - { - MarkHandled(); - - if (state == Succeeded) - { - return value; - } - else if (state == Faulted) - { - exception.GetException().Throw(); - } - else if (state == Canceled) - { - if (exception != null) - { - exception.GetException().Throw(); // guranteed operation canceled exception. - } - - throw new OperationCanceledException(); - } - else // Pending - { - throw new NotSupportedException("UniTask does not allow call GetResult directly when task not completed. Please use 'await'."); - } - - return default(T); - } - - void ICriticalNotifyCompletion.UnsafeOnCompleted(Action action) - { - if (Interlocked.CompareExchange(ref continuation, (object)action, null) == null) - { - if (state != Pending) - { - TryInvokeContinuation(); - } - } - else - { - var c = continuation; - if (c is Action) - { - var list = new List(); - list.Add((Action)c); - list.Add(action); - if (Interlocked.CompareExchange(ref continuation, list, c) == c) - { - goto TRYINVOKE; - } - } - - var l = (List)continuation; - lock (l) - { - l.Add(action); - } - - TRYINVOKE: - if (state != Pending) - { - TryInvokeContinuation(); - } - } - } - - void TryInvokeContinuation() - { - var c = Interlocked.Exchange(ref continuation, null); - if (c != null) - { - if (c is Action) - { - ((Action)c).Invoke(); - } - else - { - var l = (List)c; - var cnt = l.Count; - for (int i = 0; i < cnt; i++) - { - l[i].Invoke(); - } - } - } - } - - public bool TrySetResult(T value) - { - if (Interlocked.CompareExchange(ref state, Succeeded, Pending) == Pending) - { - this.value = value; - TryInvokeContinuation(); - return true; - } - return false; - } - - public bool TrySetException(Exception exception) - { - if (Interlocked.CompareExchange(ref state, Faulted, Pending) == Pending) - { - this.exception = new ExceptionHolder(ExceptionDispatchInfo.Capture(exception)); - TryInvokeContinuation(); - return true; - } - return false; - } - - public bool TrySetCanceled() - { - if (Interlocked.CompareExchange(ref state, Canceled, Pending) == Pending) - { - TryInvokeContinuation(); - return true; - } - return false; - } - - public bool TrySetCanceled(OperationCanceledException exception) - { - if (Interlocked.CompareExchange(ref state, Canceled, Pending) == Pending) - { - this.exception = new ExceptionHolder(ExceptionDispatchInfo.Capture(exception)); - TryInvokeContinuation(); - return true; - } - return false; - } - - void IAwaiter.GetResult() - { - ((IAwaiter)this).GetResult(); - } - - void INotifyCompletion.OnCompleted(Action continuation) - { - ((ICriticalNotifyCompletion)this).UnsafeOnCompleted(continuation); - } - } -} - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Async/UniTaskCompletionSource.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/UniTaskCompletionSource.cs.meta deleted file mode 100644 index 09e3df3..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/UniTaskCompletionSource.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: ed03524d09e7eb24a9fb9137198feb84 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/UniTaskExtensions.Shorthand.cs b/Assets/Plugins/UniRx/Scripts/Async/UniTaskExtensions.Shorthand.cs deleted file mode 100644 index 5d96007..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/UniTaskExtensions.Shorthand.cs +++ /dev/null @@ -1,53 +0,0 @@ -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using System.Collections.Generic; - -namespace UniRx.Async -{ - public static partial class UniTaskExtensions - { - // shorthand of WhenAll - - public static UniTask.Awaiter GetAwaiter(this IEnumerable tasks) - { - return UniTask.WhenAll(tasks).GetAwaiter(); - } - - public static UniTask.Awaiter GetAwaiter(this IEnumerable> tasks) - { - return UniTask.WhenAll(tasks).GetAwaiter(); - } - - public static UniTask<(T1 result1, T2 result2)>.Awaiter GetAwaiter(this (UniTask task1, UniTask task2) tasks) - { - return UniTask.WhenAll(tasks.task1, tasks.task2).GetAwaiter(); - } - - public static UniTask<(T1 result1, T2 result2, T3 result3)> WhenAll(this (UniTask task1, UniTask task2, UniTask task3) tasks) - { - return UniTask.WhenAll(tasks.task1, tasks.task2, tasks.task3); - } - - public static UniTask<(T1 result1, T2 result2, T3 result3, T4 result4)> WhenAll(this (UniTask task1, UniTask task2, UniTask task3, UniTask task4) tasks) - { - return UniTask.WhenAll(tasks.task1, tasks.task2, tasks.task3, tasks.task4); - } - - public static UniTask<(T1 result1, T2 result2, T3 result3, T4 result4, T5 result5)> WhenAll(this (UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5) tasks) - { - return UniTask.WhenAll(tasks.task1, tasks.task2, tasks.task3, tasks.task4, tasks.task5); - } - - public static UniTask<(T1 result1, T2 result2, T3 result3, T4 result4, T5 result5, T6 result6)> WhenAll(this (UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6) tasks) - { - return UniTask.WhenAll(tasks.task1, tasks.task2, tasks.task3, tasks.task4, tasks.task5, tasks.task6); - } - - public static UniTask<(T1 result1, T2 result2, T3 result3, T4 result4, T5 result5, T6 result6, T7 result7)> WhenAll(this (UniTask task1, UniTask task2, UniTask task3, UniTask task4, UniTask task5, UniTask task6, UniTask task7) tasks) - { - return UniTask.WhenAll(tasks.task1, tasks.task2, tasks.task3, tasks.task4, tasks.task5, tasks.task6, tasks.task7); - } - } -} -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Async/UniTaskExtensions.Shorthand.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/UniTaskExtensions.Shorthand.cs.meta deleted file mode 100644 index 8032c63..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/UniTaskExtensions.Shorthand.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 4b4ff020f73dc6d4b8ebd4760d61fb43 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/UniTaskExtensions.cs b/Assets/Plugins/UniRx/Scripts/Async/UniTaskExtensions.cs deleted file mode 100644 index fe35414..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/UniTaskExtensions.cs +++ /dev/null @@ -1,506 +0,0 @@ -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using System; -using System.Collections; -using System.Runtime.ExceptionServices; -using System.Threading; -using System.Threading.Tasks; -using UniRx.Async.Internal; - -namespace UniRx.Async -{ - public static partial class UniTaskExtensions - { - /// - /// Convert UniTask -> UniTask[AsyncUnit]. - /// - public static UniTask AsAsyncUnitUniTask(this UniTask task) - { - // use implicit conversion - return task; - } - - /// - /// Convert Task[T] -> UniTask[T]. - /// - public static UniTask AsUniTask(this Task task, bool useCurrentSynchronizationContext = true) - { - var promise = new UniTaskCompletionSource(); - - task.ContinueWith((x, state) => - { - var p = (UniTaskCompletionSource)state; - - switch (x.Status) - { - case TaskStatus.Canceled: - p.TrySetCanceled(); - break; - case TaskStatus.Faulted: - p.TrySetException(x.Exception); - break; - case TaskStatus.RanToCompletion: - p.TrySetResult(x.Result); - break; - default: - throw new NotSupportedException(); - } - }, promise, useCurrentSynchronizationContext ? TaskScheduler.FromCurrentSynchronizationContext() : TaskScheduler.Current); - - return new UniTask(promise); - } - - /// - /// Convert Task -> UniTask. - /// - public static UniTask AsUniTask(this Task task, bool useCurrentSynchronizationContext = true) - { - var promise = new UniTaskCompletionSource(); - - task.ContinueWith((x, state) => - { - var p = (UniTaskCompletionSource)state; - - switch (x.Status) - { - case TaskStatus.Canceled: - p.TrySetCanceled(); - break; - case TaskStatus.Faulted: - p.TrySetException(x.Exception); - break; - case TaskStatus.RanToCompletion: - p.TrySetResult(default(AsyncUnit)); - break; - default: - throw new NotSupportedException(); - } - }, promise, useCurrentSynchronizationContext ? TaskScheduler.FromCurrentSynchronizationContext() : TaskScheduler.Current); - - return new UniTask(promise); - } - - public static IEnumerator ToCoroutine(this UniTask task, Action resultHandler = null, Action exceptionHandler = null) - { - return new ToCoroutineEnumerator(task, resultHandler, exceptionHandler); - } - - public static IEnumerator ToCoroutine(this UniTask task, Action exceptionHandler = null) - { - return new ToCoroutineEnumerator(task, exceptionHandler); - } - -#if !UniRxLibrary - - public static UniTask Timeout(this UniTask task, TimeSpan timeout, bool ignoreTimeScale = true, PlayerLoopTiming timeoutCheckTiming = PlayerLoopTiming.Update, CancellationTokenSource taskCancellationTokenSource = null) - { - return Timeout(task.AsAsyncUnitUniTask(), timeout, ignoreTimeScale, timeoutCheckTiming, taskCancellationTokenSource); - } - - public static async UniTask Timeout(this UniTask task, TimeSpan timeout, bool ignoreTimeScale = true, PlayerLoopTiming timeoutCheckTiming = PlayerLoopTiming.Update, CancellationTokenSource taskCancellationTokenSource = null) - { - // left, right both suppress operation canceled exception. - - var delayCancellationTokenSource = new CancellationTokenSource(); - var timeoutTask = (UniTask)UniTask.Delay(timeout, ignoreTimeScale, timeoutCheckTiming).SuppressCancellationThrow(); - - var (hasValue, value) = await UniTask.WhenAny(task.SuppressCancellationThrow(), timeoutTask); - - if (!hasValue) - { - if (taskCancellationTokenSource != null) - { - taskCancellationTokenSource.Cancel(); - taskCancellationTokenSource.Dispose(); - } - - throw new TimeoutException("Exceed Timeout:" + timeout); - } - else - { - delayCancellationTokenSource.Cancel(); - delayCancellationTokenSource.Dispose(); - } - - if (value.IsCanceled) - { - Error.ThrowOperationCanceledException(); - } - - return value.Result; - } - - /// - /// Timeout with suppress OperationCanceledException. Returns (bool, IsCacneled). - /// - public static async UniTask TimeoutWithoutException(this UniTask task, TimeSpan timeout, bool ignoreTimeScale = true, PlayerLoopTiming timeoutCheckTiming = PlayerLoopTiming.Update, CancellationTokenSource taskCancellationTokenSource = null) - { - var v = await TimeoutWithoutException(task.AsAsyncUnitUniTask(), timeout, ignoreTimeScale, timeoutCheckTiming, taskCancellationTokenSource); - return v.IsTimeout; - } - - - /// - /// Timeout with suppress OperationCanceledException. Returns (bool IsTimeout, T Result). - /// - public static async UniTask<(bool IsTimeout, T Result)> TimeoutWithoutException(this UniTask task, TimeSpan timeout, bool ignoreTimeScale = true, PlayerLoopTiming timeoutCheckTiming = PlayerLoopTiming.Update, CancellationTokenSource taskCancellationTokenSource = null) - { - // left, right both suppress operation canceled exception. - - var delayCancellationTokenSource = new CancellationTokenSource(); - var timeoutTask = (UniTask)UniTask.Delay(timeout, ignoreTimeScale, timeoutCheckTiming).SuppressCancellationThrow(); - - var (hasValue, value) = await UniTask.WhenAny(task.SuppressCancellationThrow(), timeoutTask); - - if (!hasValue) - { - if (taskCancellationTokenSource != null) - { - taskCancellationTokenSource.Cancel(); - taskCancellationTokenSource.Dispose(); - } - - return (true, default(T)); - } - else - { - delayCancellationTokenSource.Cancel(); - delayCancellationTokenSource.Dispose(); - } - - if (value.IsCanceled) - { - Error.ThrowOperationCanceledException(); - } - - return (false, value.Result); - } - -#endif - - public static void Forget(this UniTask task) - { - ForgetCore(task).Forget(); - } - - public static void Forget(this UniTask task, Action exceptionHandler, bool handleExceptionOnMainThread = true) - { - if (exceptionHandler == null) - { - ForgetCore(task).Forget(); - } - else - { - ForgetCoreWithCatch(task, exceptionHandler, handleExceptionOnMainThread).Forget(); - } - } - - // UniTask to UniTaskVoid - static async UniTaskVoid ForgetCore(UniTask task) - { - await task; - } - - static async UniTaskVoid ForgetCoreWithCatch(UniTask task, Action exceptionHandler, bool handleExceptionOnMainThread) - { - try - { - await task; - } - catch (Exception ex) - { - try - { -#if !UniRxLibrary - if (handleExceptionOnMainThread) - { - await UniTask.SwitchToMainThread(); - } -#endif - exceptionHandler(ex); - } - catch (Exception ex2) - { - UniTaskScheduler.PublishUnobservedTaskException(ex2); - } - } - } - - public static void Forget(this UniTask task) - { - ForgetCore(task).Forget(); - } - - public static void Forget(this UniTask task, Action exceptionHandler, bool handleExceptionOnMainThread = true) - { - if (exceptionHandler == null) - { - ForgetCore(task).Forget(); - } - else - { - ForgetCoreWithCatch(task, exceptionHandler, handleExceptionOnMainThread).Forget(); - } - } - - // UniTask to UniTaskVoid - static async UniTaskVoid ForgetCore(UniTask task) - { - await task; - } - - static async UniTaskVoid ForgetCoreWithCatch(UniTask task, Action exceptionHandler, bool handleExceptionOnMainThread) - { - try - { - await task; - } - catch (Exception ex) - { - try - { -#if !UniRxLibrary - if (handleExceptionOnMainThread) - { - await UniTask.SwitchToMainThread(); - } -#endif - exceptionHandler(ex); - } - catch (Exception ex2) - { - UniTaskScheduler.PublishUnobservedTaskException(ex2); - } - } - } - - public static async UniTask ContinueWith(this UniTask task, Action continuationFunction) - { - continuationFunction(await task); - } - - public static async UniTask ContinueWith(this UniTask task, Func continuationFunction) - { - await continuationFunction(await task); - } - - public static async UniTask ContinueWith(this UniTask task, Func continuationFunction) - { - return continuationFunction(await task); - } - - public static async UniTask ContinueWith(this UniTask task, Func> continuationFunction) - { - return await continuationFunction(await task); - } - - public static async UniTask ContinueWith(this UniTask task, Action continuationFunction) - { - await task; - continuationFunction(); - } - - public static async UniTask ContinueWith(this UniTask task, Func continuationFunction) - { - await task; - await continuationFunction(); - } - - public static async UniTask ContinueWith(this UniTask task, Func continuationFunction) - { - await task; - return continuationFunction(); - } - - public static async UniTask ContinueWith(this UniTask task, Func> continuationFunction) - { - await task; - return await continuationFunction(); - } - -#if !UniRxLibrary - - public static async UniTask ConfigureAwait(this Task task, PlayerLoopTiming timing) - { - await task.ConfigureAwait(false); - await UniTask.Yield(timing); - } - - public static async UniTask ConfigureAwait(this Task task, PlayerLoopTiming timing) - { - var v = await task.ConfigureAwait(false); - await UniTask.Yield(timing); - return v; - } - - public static async UniTask ConfigureAwait(this UniTask task, PlayerLoopTiming timing) - { - await task; - await UniTask.Yield(timing); - } - - public static async UniTask ConfigureAwait(this UniTask task, PlayerLoopTiming timing) - { - var v = await task; - await UniTask.Yield(timing); - return v; - } - -#endif - - public static async UniTask Unwrap(this UniTask> task) - { - return await await task; - } - - public static async UniTask Unwrap(this UniTask task) - { - await await task; - } - - class ToCoroutineEnumerator : IEnumerator - { - bool completed; - UniTask task; - Action exceptionHandler = null; - bool isStarted = false; - ExceptionDispatchInfo exception; - - public ToCoroutineEnumerator(UniTask task, Action exceptionHandler) - { - completed = false; - this.exceptionHandler = exceptionHandler; - this.task = task; - } - - async UniTaskVoid RunTask(UniTask task) - { - try - { - await task; - } - catch (Exception ex) - { - if (exceptionHandler != null) - { - exceptionHandler(ex); - } - else - { - this.exception = ExceptionDispatchInfo.Capture(ex); - } - } - finally - { - completed = true; - } - } - - public object Current => null; - - public bool MoveNext() - { - if (!isStarted) - { - isStarted = true; - RunTask(task).Forget(); - } - - if (exception != null) - { - // throw exception on iterator (main)thread. - // unfortunately unity test-runner can not handle throw exception on hand-write IEnumerator.MoveNext. -#if !UniRxLibrary - UnityEngine.Debug.LogException(exception.SourceException); -#else - exception.Throw(); -#endif - } - - return !completed; - } - - public void Reset() - { - } - } - - class ToCoroutineEnumerator : IEnumerator - { - bool completed; - Action resultHandler = null; - Action exceptionHandler = null; - bool isStarted = false; - UniTask task; - object current = null; - ExceptionDispatchInfo exception; - - public ToCoroutineEnumerator(UniTask task, Action resultHandler, Action exceptionHandler) - { - completed = false; - this.task = task; - this.resultHandler = resultHandler; - this.exceptionHandler = exceptionHandler; - } - - async UniTaskVoid RunTask(UniTask task) - { - try - { - var value = await task; - current = value; - if (resultHandler != null) - { - resultHandler(value); - } - } - catch (Exception ex) - { - if (exceptionHandler != null) - { - exceptionHandler(ex); - } - else - { - this.exception = ExceptionDispatchInfo.Capture(ex); - } - } - finally - { - completed = true; - } - } - - public object Current => current; - - public bool MoveNext() - { - if (isStarted) - { - isStarted = true; - RunTask(task).Forget(); - } - - if (exception != null) - { - // throw exception on iterator (main)thread. - // unfortunately unity test-runner can not handle throw exception on hand-write IEnumerator.MoveNext. -#if !UniRxLibrary - UnityEngine.Debug.LogException(exception.SourceException); -#else - exception.Throw(); -#endif - } - - return !completed; - } - - public void Reset() - { - } - } - } -} - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Async/UniTaskExtensions.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/UniTaskExtensions.cs.meta deleted file mode 100644 index a507e96..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/UniTaskExtensions.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 05460c617dae1e440861a7438535389f -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/UniTaskScheduler.cs b/Assets/Plugins/UniRx/Scripts/Async/UniTaskScheduler.cs deleted file mode 100644 index a3c2e59..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/UniTaskScheduler.cs +++ /dev/null @@ -1,106 +0,0 @@ -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using System; -using System.Threading; - -namespace UniRx.Async -{ - // UniTask has no scheduler like TaskScheduler. - // Only handle unobserved exception. - - public static class UniTaskScheduler - { - public static event Action UnobservedTaskException; - - /// - /// Propagate OperationCanceledException to UnobservedTaskException when true. Default is false. - /// - public static bool PropagateOperationCanceledException = false; - -#if !UniRxLibrary - - /// - /// Write log type when catch unobserved exception and not registered UnobservedTaskException. Default is Warning. - /// - public static UnityEngine.LogType UnobservedExceptionWriteLogType = UnityEngine.LogType.Warning; - -#endif - - /// - /// Dispatch exception event to Unity MainThread. - /// - public static bool DispatchUnityMainThread = true; - - // cache delegate. - static readonly SendOrPostCallback handleExceptionInvoke = InvokeUnobservedTaskException; - - internal static void PublishUnobservedTaskException(Exception ex) - { - if (ex != null) - { - if (!PropagateOperationCanceledException && ex is OperationCanceledException) - { - return; - } - - if (UnobservedTaskException != null) - { -#if !UniRxLibrary - if (Thread.CurrentThread.ManagedThreadId == PlayerLoopHelper.MainThreadId) - { - // allows inlining call. - UnobservedTaskException.Invoke(ex); - } - else - { - // Post to MainThread. - PlayerLoopHelper.UnitySynchronizationContext.Post(handleExceptionInvoke, ex); - } -#else - UnobservedTaskException.Invoke(ex); -#endif - } - else - { -#if !UniRxLibrary - string msg = null; - if (UnobservedExceptionWriteLogType != UnityEngine.LogType.Exception) - { - msg = "UnobservedTaskException:" + ex.ToString(); - } - switch (UnobservedExceptionWriteLogType) - { - case UnityEngine.LogType.Error: - UnityEngine.Debug.LogError(msg); - break; - case UnityEngine.LogType.Assert: - UnityEngine.Debug.LogAssertion(msg); - break; - case UnityEngine.LogType.Warning: - UnityEngine.Debug.LogWarning(msg); - break; - case UnityEngine.LogType.Log: - UnityEngine.Debug.Log(msg); - break; - case UnityEngine.LogType.Exception: - UnityEngine.Debug.LogException(ex); - break; - default: - break; - } -#else - Console.WriteLine("UnobservedTaskException:" + ex.ToString()); -#endif - } - } - } - - static void InvokeUnobservedTaskException(object state) - { - UnobservedTaskException((Exception)state); - } - } -} - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Async/UniTaskScheduler.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/UniTaskScheduler.cs.meta deleted file mode 100644 index 1fd1940..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/UniTaskScheduler.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d6cad69921702d5488d96b5ef30df1b0 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/UniTaskVoid.cs b/Assets/Plugins/UniRx/Scripts/Async/UniTaskVoid.cs deleted file mode 100644 index c5fc87b..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/UniTaskVoid.cs +++ /dev/null @@ -1,52 +0,0 @@ -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 - -using System; -using System.Diagnostics; -using System.Runtime.CompilerServices; -using UniRx.Async.CompilerServices; - -namespace UniRx.Async -{ - [AsyncMethodBuilder(typeof(AsyncUniTaskVoidMethodBuilder))] - public struct UniTaskVoid - { - public void Forget() - { - } - - [DebuggerHidden] - public Awaiter GetAwaiter() - { - return new Awaiter(); - } - - public struct Awaiter : ICriticalNotifyCompletion - { - [DebuggerHidden] - public bool IsCompleted => true; - - [DebuggerHidden] - public void GetResult() - { -#if !UniRxLibrary - UnityEngine.Debug.LogWarning("UniTaskVoid can't await, always fire-and-forget. use Forget instead of await."); -#else - Console.WriteLine("UniTask can't await, always fire-and-forget. use Forget instead of await."); -#endif - } - - [DebuggerHidden] - public void OnCompleted(Action continuation) - { - } - - [DebuggerHidden] - public void UnsafeOnCompleted(Action continuation) - { - } - } - } -} - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Async/UniTaskVoid.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/UniTaskVoid.cs.meta deleted file mode 100644 index d91b5cb..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/UniTaskVoid.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: e9f28cd922179634d863011548f89ae7 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/UnityAsyncExtensions.Jobs.cs b/Assets/Plugins/UniRx/Scripts/Async/UnityAsyncExtensions.Jobs.cs deleted file mode 100644 index dc4363b..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/UnityAsyncExtensions.Jobs.cs +++ /dev/null @@ -1,140 +0,0 @@ -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) && ENABLE_MANAGED_JOBS -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using System; -using System.Threading; -using UniRx.Async.Internal; -using Unity.Jobs; - -namespace UniRx.Async -{ - public static partial class UnityAsyncExtensions - { - public static IAwaiter GetAwaiter(this JobHandle jobHandle) - { - var awaiter = new JobHandleAwaiter(jobHandle, CancellationToken.None); - if (!awaiter.IsCompleted) - { - PlayerLoopHelper.AddAction(PlayerLoopTiming.EarlyUpdate, awaiter); - PlayerLoopHelper.AddAction(PlayerLoopTiming.PreUpdate, awaiter); - PlayerLoopHelper.AddAction(PlayerLoopTiming.Update, awaiter); - PlayerLoopHelper.AddAction(PlayerLoopTiming.PreLateUpdate, awaiter); - PlayerLoopHelper.AddAction(PlayerLoopTiming.PostLateUpdate, awaiter); - } - return awaiter; - } - - public static UniTask ToUniTask(this JobHandle jobHandle, CancellationToken cancellation = default(CancellationToken)) - { - var awaiter = new JobHandleAwaiter(jobHandle, cancellation); - if (!awaiter.IsCompleted) - { - PlayerLoopHelper.AddAction(PlayerLoopTiming.EarlyUpdate, awaiter); - PlayerLoopHelper.AddAction(PlayerLoopTiming.PreUpdate, awaiter); - PlayerLoopHelper.AddAction(PlayerLoopTiming.Update, awaiter); - PlayerLoopHelper.AddAction(PlayerLoopTiming.PreLateUpdate, awaiter); - PlayerLoopHelper.AddAction(PlayerLoopTiming.PostLateUpdate, awaiter); - } - return new UniTask(awaiter); - } - - public static UniTask ConfigureAwait(this JobHandle jobHandle, PlayerLoopTiming waitTiming, CancellationToken cancellation = default(CancellationToken)) - { - var awaiter = new JobHandleAwaiter(jobHandle, cancellation); - if (!awaiter.IsCompleted) - { - PlayerLoopHelper.AddAction(waitTiming, awaiter); - } - return new UniTask(awaiter); - } - - class JobHandleAwaiter : IAwaiter, IPlayerLoopItem - { - JobHandle jobHandle; - CancellationToken cancellationToken; - AwaiterStatus status; - Action continuation; - - public JobHandleAwaiter(JobHandle jobHandle, CancellationToken cancellationToken, int skipFrame = 2) - { - this.status = cancellationToken.IsCancellationRequested ? AwaiterStatus.Canceled - : jobHandle.IsCompleted ? AwaiterStatus.Succeeded - : AwaiterStatus.Pending; - - if (this.status.IsCompleted()) return; - - this.jobHandle = jobHandle; - this.cancellationToken = cancellationToken; - this.status = AwaiterStatus.Pending; - this.continuation = null; - - TaskTracker.TrackActiveTask(this, skipFrame); - } - - public bool IsCompleted => status.IsCompleted(); - - public AwaiterStatus Status => status; - - public void GetResult() - { - if (status == AwaiterStatus.Succeeded) - { - return; - } - else if (status == AwaiterStatus.Canceled) - { - Error.ThrowOperationCanceledException(); - } - - Error.ThrowNotYetCompleted(); - } - - public bool MoveNext() - { - if (cancellationToken.IsCancellationRequested) - { - // Call jobHandle.Complete after finished. - PlayerLoopHelper.AddAction(PlayerLoopTiming.EarlyUpdate, new JobHandleAwaiter(jobHandle, CancellationToken.None, 1)); - InvokeContinuation(AwaiterStatus.Canceled); - return false; - } - - if (jobHandle.IsCompleted) - { - jobHandle.Complete(); - InvokeContinuation(AwaiterStatus.Succeeded); - return false; - } - - return true; - } - - void InvokeContinuation(AwaiterStatus status) - { - this.status = status; - var cont = this.continuation; - - // cleanup - TaskTracker.RemoveTracking(this); - this.continuation = null; - this.cancellationToken = CancellationToken.None; - this.jobHandle = default(JobHandle); - - if (cont != null) cont.Invoke(); - } - - public void OnCompleted(Action continuation) - { - UnsafeOnCompleted(continuation); - } - - public void UnsafeOnCompleted(Action continuation) - { - Error.ThrowWhenContinuationIsAlreadyRegistered(this.continuation); - this.continuation = continuation; - } - } - } -} - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Async/UnityAsyncExtensions.Jobs.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/UnityAsyncExtensions.Jobs.cs.meta deleted file mode 100644 index c07df0b..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/UnityAsyncExtensions.Jobs.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 30979a768fbd4b94f8694eee8a305c99 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/UnityAsyncExtensions.cs b/Assets/Plugins/UniRx/Scripts/Async/UnityAsyncExtensions.cs deleted file mode 100644 index f7aef0e..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/UnityAsyncExtensions.cs +++ /dev/null @@ -1,702 +0,0 @@ -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using System; -using System.Threading; -using UniRx.Async.Internal; -using UnityEngine; -using UnityEngine.Networking; - -namespace UniRx.Async -{ - public static partial class UnityAsyncExtensions - { - public static AsyncOperationAwaiter GetAwaiter(this AsyncOperation asyncOperation) - { - Error.ThrowArgumentNullException(asyncOperation, nameof(asyncOperation)); - return new AsyncOperationAwaiter(asyncOperation); - } - - public static UniTask ToUniTask(this AsyncOperation asyncOperation) - { - Error.ThrowArgumentNullException(asyncOperation, nameof(asyncOperation)); - return new UniTask(new AsyncOperationAwaiter(asyncOperation)); - } - - public static UniTask ConfigureAwait(this AsyncOperation asyncOperation, IProgress progress = null, PlayerLoopTiming timing = PlayerLoopTiming.Update, CancellationToken cancellation = default(CancellationToken)) - { - Error.ThrowArgumentNullException(asyncOperation, nameof(asyncOperation)); - - var awaiter = new AsyncOperationConfiguredAwaiter(asyncOperation, progress, cancellation); - if (!awaiter.IsCompleted) - { - PlayerLoopHelper.AddAction(timing, awaiter); - } - return new UniTask(awaiter); - } - - public static ResourceRequestAwaiter GetAwaiter(this ResourceRequest resourceRequest) - { - Error.ThrowArgumentNullException(resourceRequest, nameof(resourceRequest)); - return new ResourceRequestAwaiter(resourceRequest); - } - - public static UniTask ToUniTask(this ResourceRequest resourceRequest) - { - Error.ThrowArgumentNullException(resourceRequest, nameof(resourceRequest)); - return new UniTask(new ResourceRequestAwaiter(resourceRequest)); - } - - public static UniTask ConfigureAwait(this ResourceRequest resourceRequest, IProgress progress = null, PlayerLoopTiming timing = PlayerLoopTiming.Update, CancellationToken cancellation = default(CancellationToken)) - { - Error.ThrowArgumentNullException(resourceRequest, nameof(resourceRequest)); - - var awaiter = new ResourceRequestConfiguredAwaiter(resourceRequest, progress, cancellation); - if (!awaiter.IsCompleted) - { - PlayerLoopHelper.AddAction(timing, awaiter); - } - return new UniTask(awaiter); - } - -#if ENABLE_WWW - -#if UNITY_2018_3_OR_NEWER -#pragma warning disable CS0618 -#endif - - public static IAwaiter GetAwaiter(this WWW www) - { - Error.ThrowArgumentNullException(www, nameof(www)); - - var awaiter = new WWWConfiguredAwaiter(www, null, CancellationToken.None); - if (!awaiter.IsCompleted) - { - PlayerLoopHelper.AddAction(PlayerLoopTiming.Update, awaiter); - } - return awaiter; - } - - public static UniTask ToUniTask(this WWW www) - { - Error.ThrowArgumentNullException(www, nameof(www)); - - var awaiter = new WWWConfiguredAwaiter(www, null, CancellationToken.None); - if (!awaiter.IsCompleted) - { - PlayerLoopHelper.AddAction(PlayerLoopTiming.Update, awaiter); - } - return new UniTask(awaiter); - } - - public static UniTask ConfigureAwait(this WWW www, IProgress progress = null, PlayerLoopTiming timing = PlayerLoopTiming.Update, CancellationToken cancellation = default(CancellationToken)) - { - Error.ThrowArgumentNullException(www, nameof(www)); - - var awaiter = new WWWConfiguredAwaiter(www, progress, cancellation); - if (!awaiter.IsCompleted) - { - PlayerLoopHelper.AddAction(timing, awaiter); - } - return new UniTask(awaiter); - } - -#if UNITY_2018_3_OR_NEWER -#pragma warning restore CS0618 -#endif - -#endif - -#if ENABLE_UNITYWEBREQUEST - - public static UnityWebRequestAsyncOperationAwaiter GetAwaiter(this UnityWebRequestAsyncOperation asyncOperation) - { - Error.ThrowArgumentNullException(asyncOperation, nameof(asyncOperation)); - return new UnityWebRequestAsyncOperationAwaiter(asyncOperation); - } - - public static UniTask ToUniTask(this UnityWebRequestAsyncOperation asyncOperation) - { - Error.ThrowArgumentNullException(asyncOperation, nameof(asyncOperation)); - return new UniTask(new UnityWebRequestAsyncOperationAwaiter(asyncOperation)); - } - - public static UniTask ConfigureAwait(this UnityWebRequestAsyncOperation asyncOperation, IProgress progress = null, PlayerLoopTiming timing = PlayerLoopTiming.Update, CancellationToken cancellation = default(CancellationToken)) - { - Error.ThrowArgumentNullException(asyncOperation, nameof(asyncOperation)); - - var awaiter = new UnityWebRequestAsyncOperationConfiguredAwaiter(asyncOperation, progress, cancellation); - if (!awaiter.IsCompleted) - { - PlayerLoopHelper.AddAction(timing, awaiter); - } - return new UniTask(awaiter); - } - -#endif - - public struct AsyncOperationAwaiter : IAwaiter - { - AsyncOperation asyncOperation; - Action continuationAction; - AwaiterStatus status; - - public AsyncOperationAwaiter(AsyncOperation asyncOperation) - { - this.status = asyncOperation.isDone ? AwaiterStatus.Succeeded : AwaiterStatus.Pending; - this.asyncOperation = (this.status.IsCompleted()) ? null : asyncOperation; - this.continuationAction = null; - } - - public bool IsCompleted => status.IsCompleted(); - public AwaiterStatus Status => status; - - public void GetResult() - { - if (status == AwaiterStatus.Succeeded) return; - - if (status == AwaiterStatus.Pending) - { - // first timing of call - if (asyncOperation.isDone) - { - status = AwaiterStatus.Succeeded; - } - else - { - Error.ThrowNotYetCompleted(); - } - } - - asyncOperation = null; // remove reference. - - if (continuationAction != null) - { - asyncOperation.completed -= continuationAction; - continuationAction = null; - } - } - - public void OnCompleted(Action continuation) - { - UnsafeOnCompleted(continuation); - } - - public void UnsafeOnCompleted(Action continuation) - { - Error.ThrowWhenContinuationIsAlreadyRegistered(continuationAction); - continuationAction = continuation.AsFuncOfT(); - asyncOperation.completed += continuationAction; - } - } - - class AsyncOperationConfiguredAwaiter : IAwaiter, IPlayerLoopItem - { - AsyncOperation asyncOperation; - IProgress progress; - CancellationToken cancellationToken; - AwaiterStatus status; - Action continuation; - - public AsyncOperationConfiguredAwaiter(AsyncOperation asyncOperation, IProgress progress, CancellationToken cancellationToken) - { - this.status = cancellationToken.IsCancellationRequested ? AwaiterStatus.Canceled - : asyncOperation.isDone ? AwaiterStatus.Succeeded - : AwaiterStatus.Pending; - - if (this.status.IsCompleted()) return; - - this.asyncOperation = asyncOperation; - this.progress = progress; - this.cancellationToken = cancellationToken; - this.continuation = null; - - TaskTracker.TrackActiveTask(this, 2); - } - - public bool IsCompleted => status.IsCompleted(); - public AwaiterStatus Status => status; - - public void GetResult() - { - if (status == AwaiterStatus.Succeeded) - { - return; - } - else if (status == AwaiterStatus.Canceled) - { - Error.ThrowOperationCanceledException(); - } - - Error.ThrowNotYetCompleted(); - } - - public bool MoveNext() - { - if (cancellationToken.IsCancellationRequested) - { - InvokeContinuation(AwaiterStatus.Canceled); - return false; - } - - if (progress != null) - { - progress.Report(asyncOperation.progress); - } - - if (asyncOperation.isDone) - { - InvokeContinuation(AwaiterStatus.Succeeded); - return false; - } - - return true; - } - - void InvokeContinuation(AwaiterStatus status) - { - this.status = status; - var cont = this.continuation; - - // cleanup - TaskTracker.RemoveTracking(this); - this.continuation = null; - this.cancellationToken = CancellationToken.None; - this.progress = null; - this.asyncOperation = null; - - if (cont != null) cont.Invoke(); - } - - public void OnCompleted(Action continuation) - { - UnsafeOnCompleted(continuation); - } - - public void UnsafeOnCompleted(Action continuation) - { - Error.ThrowWhenContinuationIsAlreadyRegistered(this.continuation); - this.continuation = continuation; - } - } - - public struct ResourceRequestAwaiter : IAwaiter - { - ResourceRequest asyncOperation; - Action continuationAction; - AwaiterStatus status; - UnityEngine.Object result; - - public ResourceRequestAwaiter(ResourceRequest asyncOperation) - { - this.status = asyncOperation.isDone ? AwaiterStatus.Succeeded : AwaiterStatus.Pending; - this.asyncOperation = (this.status.IsCompleted()) ? null : asyncOperation; - this.result = (this.status.IsCompletedSuccessfully()) ? asyncOperation.asset : null; - this.continuationAction = null; - } - - public bool IsCompleted => status.IsCompleted(); - public AwaiterStatus Status => status; - - public UnityEngine.Object GetResult() - { - if (status == AwaiterStatus.Succeeded) return this.result; - - if (status == AwaiterStatus.Pending) - { - // first timing of call - if (asyncOperation.isDone) - { - status = AwaiterStatus.Succeeded; - } - else - { - Error.ThrowNotYetCompleted(); - } - } - - this.result = asyncOperation.asset; - asyncOperation = null; // remove reference. - - if (continuationAction != null) - { - asyncOperation.completed -= continuationAction; - continuationAction = null; - } - - return this.result; - } - - void IAwaiter.GetResult() => GetResult(); - - public void OnCompleted(Action continuation) - { - UnsafeOnCompleted(continuation); - } - - public void UnsafeOnCompleted(Action continuation) - { - Error.ThrowWhenContinuationIsAlreadyRegistered(continuationAction); - continuationAction = continuation.AsFuncOfT(); - asyncOperation.completed += continuationAction; - } - } - - class ResourceRequestConfiguredAwaiter : IAwaiter, IPlayerLoopItem - { - ResourceRequest asyncOperation; - IProgress progress; - CancellationToken cancellationToken; - AwaiterStatus status; - Action continuation; - UnityEngine.Object result; - - public ResourceRequestConfiguredAwaiter(ResourceRequest asyncOperation, IProgress progress, CancellationToken cancellationToken) - { - this.status = cancellationToken.IsCancellationRequested ? AwaiterStatus.Canceled - : asyncOperation.isDone ? AwaiterStatus.Succeeded - : AwaiterStatus.Pending; - - if (this.status.IsCompletedSuccessfully()) this.result = asyncOperation.asset; - if (this.status.IsCompleted()) return; - - this.asyncOperation = asyncOperation; - this.progress = progress; - this.cancellationToken = cancellationToken; - this.continuation = null; - this.result = null; - - TaskTracker.TrackActiveTask(this, 2); - } - - public bool IsCompleted => status.IsCompleted(); - public AwaiterStatus Status => status; - void IAwaiter.GetResult() => GetResult(); - - public UnityEngine.Object GetResult() - { - if (status == AwaiterStatus.Succeeded) return this.result; - - if (status == AwaiterStatus.Canceled) - { - Error.ThrowOperationCanceledException(); - } - - return Error.ThrowNotYetCompleted(); - } - - public bool MoveNext() - { - if (cancellationToken.IsCancellationRequested) - { - InvokeContinuation(AwaiterStatus.Canceled); - return false; - } - - if (progress != null) - { - progress.Report(asyncOperation.progress); - } - - if (asyncOperation.isDone) - { - this.result = asyncOperation.asset; - InvokeContinuation(AwaiterStatus.Succeeded); - return false; - } - - return true; - } - - void InvokeContinuation(AwaiterStatus status) - { - this.status = status; - var cont = this.continuation; - - // cleanup - TaskTracker.RemoveTracking(this); - this.continuation = null; - this.cancellationToken = CancellationToken.None; - this.progress = null; - this.asyncOperation = null; - - if (cont != null) cont.Invoke(); - } - - public void OnCompleted(Action continuation) - { - Error.ThrowWhenContinuationIsAlreadyRegistered(this.continuation); - this.continuation = continuation; - } - - public void UnsafeOnCompleted(Action continuation) - { - Error.ThrowWhenContinuationIsAlreadyRegistered(this.continuation); - this.continuation = continuation; - } - } - -#if ENABLE_WWW - -#if UNITY_2018_3_OR_NEWER -#pragma warning disable CS0618 -#endif - - class WWWConfiguredAwaiter : IAwaiter, IPlayerLoopItem - { - WWW asyncOperation; - IProgress progress; - CancellationToken cancellationToken; - AwaiterStatus status; - Action continuation; - - public WWWConfiguredAwaiter(WWW asyncOperation, IProgress progress, CancellationToken cancellationToken) - { - this.status = cancellationToken.IsCancellationRequested ? AwaiterStatus.Canceled - : asyncOperation.isDone ? AwaiterStatus.Succeeded - : AwaiterStatus.Pending; - - if (this.status.IsCompleted()) return; - - this.asyncOperation = asyncOperation; - this.progress = progress; - this.cancellationToken = cancellationToken; - this.continuation = null; - - TaskTracker.TrackActiveTask(this, 2); - } - - public bool IsCompleted => status.IsCompleted(); - public AwaiterStatus Status => status; - - public void GetResult() - { - if (status == AwaiterStatus.Succeeded) - { - return; - } - else if (status == AwaiterStatus.Canceled) - { - Error.ThrowOperationCanceledException(); - } - - Error.ThrowNotYetCompleted(); - } - - public bool MoveNext() - { - if (cancellationToken.IsCancellationRequested) - { - InvokeContinuation(AwaiterStatus.Canceled); - return false; - } - - if (progress != null) - { - progress.Report(asyncOperation.progress); - } - - if (asyncOperation.isDone) - { - InvokeContinuation(AwaiterStatus.Succeeded); - return false; - } - - return true; - } - - void InvokeContinuation(AwaiterStatus status) - { - this.status = status; - var cont = this.continuation; - - // cleanup - TaskTracker.RemoveTracking(this); - this.continuation = null; - this.cancellationToken = CancellationToken.None; - this.progress = null; - this.asyncOperation = null; - - if (cont != null) cont.Invoke(); - } - - public void OnCompleted(Action continuation) - { - UnsafeOnCompleted(continuation); - } - - public void UnsafeOnCompleted(Action continuation) - { - Error.ThrowWhenContinuationIsAlreadyRegistered(this.continuation); - this.continuation = continuation; - } - } - -#if UNITY_2018_3_OR_NEWER -#pragma warning restore CS0618 -#endif - -#endif - -#if ENABLE_UNITYWEBREQUEST - - public struct UnityWebRequestAsyncOperationAwaiter : IAwaiter - { - UnityWebRequestAsyncOperation asyncOperation; - Action continuationAction; - AwaiterStatus status; - UnityWebRequest result; - - public UnityWebRequestAsyncOperationAwaiter(UnityWebRequestAsyncOperation asyncOperation) - { - this.status = asyncOperation.isDone ? AwaiterStatus.Succeeded : AwaiterStatus.Pending; - this.asyncOperation = (this.status.IsCompleted()) ? null : asyncOperation; - this.result = (this.status.IsCompletedSuccessfully()) ? asyncOperation.webRequest : null; - this.continuationAction = null; - } - - public bool IsCompleted => status.IsCompleted(); - public AwaiterStatus Status => status; - - public UnityWebRequest GetResult() - { - if (status == AwaiterStatus.Succeeded) return this.result; - - if (status == AwaiterStatus.Pending) - { - // first timing of call - if (asyncOperation.isDone) - { - status = AwaiterStatus.Succeeded; - } - else - { - Error.ThrowNotYetCompleted(); - } - } - - this.result = asyncOperation.webRequest; - asyncOperation = null; // remove reference. - - if (continuationAction != null) - { - asyncOperation.completed -= continuationAction; - continuationAction = null; - } - - return this.result; - } - - void IAwaiter.GetResult() => GetResult(); - - public void OnCompleted(Action continuation) - { - UnsafeOnCompleted(continuation); - } - - public void UnsafeOnCompleted(Action continuation) - { - Error.ThrowWhenContinuationIsAlreadyRegistered(continuationAction); - continuationAction = continuation.AsFuncOfT(); - asyncOperation.completed += continuationAction; - } - } - - class UnityWebRequestAsyncOperationConfiguredAwaiter : IAwaiter, IPlayerLoopItem - { - UnityWebRequestAsyncOperation asyncOperation; - IProgress progress; - CancellationToken cancellationToken; - AwaiterStatus status; - Action continuation; - UnityWebRequest result; - - public UnityWebRequestAsyncOperationConfiguredAwaiter(UnityWebRequestAsyncOperation asyncOperation, IProgress progress, CancellationToken cancellationToken) - { - this.status = cancellationToken.IsCancellationRequested ? AwaiterStatus.Canceled - : asyncOperation.isDone ? AwaiterStatus.Succeeded - : AwaiterStatus.Pending; - - if (this.status.IsCompletedSuccessfully()) this.result = asyncOperation.webRequest; - if (this.status.IsCompleted()) return; - - this.asyncOperation = asyncOperation; - this.progress = progress; - this.cancellationToken = cancellationToken; - this.continuation = null; - this.result = null; - - TaskTracker.TrackActiveTask(this, 2); - } - - public bool IsCompleted => status.IsCompleted(); - public AwaiterStatus Status => status; - void IAwaiter.GetResult() => GetResult(); - - public UnityWebRequest GetResult() - { - if (status == AwaiterStatus.Succeeded) return this.result; - - if (status == AwaiterStatus.Canceled) - { - Error.ThrowOperationCanceledException(); - } - - return Error.ThrowNotYetCompleted(); - } - - public bool MoveNext() - { - if (cancellationToken.IsCancellationRequested) - { - InvokeContinuation(AwaiterStatus.Canceled); - return false; - } - - if (progress != null) - { - progress.Report(asyncOperation.progress); - } - - if (asyncOperation.isDone) - { - this.result = asyncOperation.webRequest; - InvokeContinuation(AwaiterStatus.Succeeded); - return false; - } - - return true; - } - - void InvokeContinuation(AwaiterStatus status) - { - this.status = status; - var cont = this.continuation; - - // cleanup - TaskTracker.RemoveTracking(this); - this.continuation = null; - this.cancellationToken = CancellationToken.None; - this.progress = null; - this.asyncOperation = null; - - if (cont != null) cont.Invoke(); - } - - public void OnCompleted(Action continuation) - { - Error.ThrowWhenContinuationIsAlreadyRegistered(this.continuation); - this.continuation = continuation; - } - - public void UnsafeOnCompleted(Action continuation) - { - Error.ThrowWhenContinuationIsAlreadyRegistered(this.continuation); - this.continuation = continuation; - } - } - -#endif - } -} -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Async/UnityAsyncExtensions.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/UnityAsyncExtensions.cs.meta deleted file mode 100644 index 2af5af5..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/UnityAsyncExtensions.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 8cc7fd65dd1433e419be4764aeb51391 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/UnityAsyncExtensions.uGUI.cs b/Assets/Plugins/UniRx/Scripts/Async/UnityAsyncExtensions.uGUI.cs deleted file mode 100644 index ba1aac2..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/UnityAsyncExtensions.uGUI.cs +++ /dev/null @@ -1,434 +0,0 @@ -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using System; -using System.Runtime.CompilerServices; -using System.Threading; -using UniRx.Async.Internal; -using UnityEngine; -using UnityEngine.Events; -using UnityEngine.UI; -using UniRx.Async.Triggers; - -namespace UniRx.Async -{ - public static partial class UnityAsyncExtensions - { - public static AsyncUnityEventHandler GetAsyncEventHandler(this UnityEvent unityEvent, CancellationToken cancellationToken) - { - return new AsyncUnityEventHandler(unityEvent, cancellationToken, false); - } - - public static UniTask OnInvokeAsync(this UnityEvent unityEvent, CancellationToken cancellationToken) - { - return new AsyncUnityEventHandler(unityEvent, cancellationToken, true).OnInvokeAsync(); - } - - public static IAsyncClickEventHandler GetAsyncClickEventHandler(this Button button) - { - return new AsyncUnityEventHandler(button.onClick, button.GetCancellationTokenOnDestroy(), false); - } - - public static IAsyncClickEventHandler GetAsyncClickEventHandler(this Button button, CancellationToken cancellationToken) - { - return new AsyncUnityEventHandler(button.onClick, cancellationToken, false); - } - - public static UniTask OnClickAsync(this Button button) - { - return new AsyncUnityEventHandler(button.onClick, button.GetCancellationTokenOnDestroy(), true).OnInvokeAsync(); - } - - public static UniTask OnClickAsync(this Button button, CancellationToken cancellationToken) - { - return new AsyncUnityEventHandler(button.onClick, cancellationToken, true).OnInvokeAsync(); - } - - public static IAsyncValueChangedEventHandler GetAsyncValueChangedEventHandler(this Toggle toggle) - { - return new AsyncUnityEventHandler(toggle.onValueChanged, toggle.GetCancellationTokenOnDestroy(), false); - } - - public static IAsyncValueChangedEventHandler GetAsyncValueChangedEventHandler(this Toggle toggle, CancellationToken cancellationToken) - { - return new AsyncUnityEventHandler(toggle.onValueChanged, cancellationToken, false); - } - - public static UniTask OnValueChangedAsync(this Toggle toggle) - { - return new AsyncUnityEventHandler(toggle.onValueChanged, toggle.GetCancellationTokenOnDestroy(), true).OnInvokeAsync(); - } - - public static UniTask OnValueChangedAsync(this Toggle toggle, CancellationToken cancellationToken) - { - return new AsyncUnityEventHandler(toggle.onValueChanged, cancellationToken, true).OnInvokeAsync(); - } - - public static IAsyncValueChangedEventHandler GetAsyncValueChangedEventHandler(this Scrollbar scrollbar) - { - return new AsyncUnityEventHandler(scrollbar.onValueChanged, scrollbar.GetCancellationTokenOnDestroy(), false); - } - - public static IAsyncValueChangedEventHandler GetAsyncValueChangedEventHandler(this Scrollbar scrollbar, CancellationToken cancellationToken) - { - return new AsyncUnityEventHandler(scrollbar.onValueChanged, cancellationToken, false); - } - - public static UniTask OnValueChangedAsync(this Scrollbar scrollbar) - { - return new AsyncUnityEventHandler(scrollbar.onValueChanged, scrollbar.GetCancellationTokenOnDestroy(), true).OnInvokeAsync(); - } - - public static UniTask OnValueChangedAsync(this Scrollbar scrollbar, CancellationToken cancellationToken) - { - return new AsyncUnityEventHandler(scrollbar.onValueChanged, cancellationToken, true).OnInvokeAsync(); - } - - public static IAsyncValueChangedEventHandler GetAsyncValueChangedEventHandler(this ScrollRect scrollRect) - { - return new AsyncUnityEventHandler(scrollRect.onValueChanged, scrollRect.GetCancellationTokenOnDestroy(), false); - } - - public static IAsyncValueChangedEventHandler GetAsyncValueChangedEventHandler(this ScrollRect scrollRect, CancellationToken cancellationToken) - { - return new AsyncUnityEventHandler(scrollRect.onValueChanged, cancellationToken, false); - } - - public static UniTask OnValueChangedAsync(this ScrollRect scrollRect) - { - return new AsyncUnityEventHandler(scrollRect.onValueChanged, scrollRect.GetCancellationTokenOnDestroy(), true).OnInvokeAsync(); - } - - public static UniTask OnValueChangedAsync(this ScrollRect scrollRect, CancellationToken cancellationToken) - { - return new AsyncUnityEventHandler(scrollRect.onValueChanged, cancellationToken, true).OnInvokeAsync(); - } - - public static IAsyncValueChangedEventHandler GetAsyncValueChangedEventHandler(this Slider slider) - { - return new AsyncUnityEventHandler(slider.onValueChanged, slider.GetCancellationTokenOnDestroy(), false); - } - - public static IAsyncValueChangedEventHandler GetAsyncValueChangedEventHandler(this Slider slider, CancellationToken cancellationToken) - { - return new AsyncUnityEventHandler(slider.onValueChanged, cancellationToken, false); - } - - public static UniTask OnValueChangedAsync(this Slider slider) - { - return new AsyncUnityEventHandler(slider.onValueChanged, slider.GetCancellationTokenOnDestroy(), true).OnInvokeAsync(); - } - - public static UniTask OnValueChangedAsync(this Slider slider, CancellationToken cancellationToken) - { - return new AsyncUnityEventHandler(slider.onValueChanged, cancellationToken, true).OnInvokeAsync(); - } - - public static IAsyncEndEditEventHandler GetAsyncEndEditEventHandler(this InputField inputField) - { - return new AsyncUnityEventHandler(inputField.onEndEdit, inputField.GetCancellationTokenOnDestroy(), false); - } - - public static IAsyncEndEditEventHandler GetAsyncEndEditEventHandler(this InputField inputField, CancellationToken cancellationToken) - { - return new AsyncUnityEventHandler(inputField.onEndEdit, cancellationToken, false); - } - - public static UniTask OnEndEditAsync(this InputField inputField) - { - return new AsyncUnityEventHandler(inputField.onEndEdit, inputField.GetCancellationTokenOnDestroy(), true).OnInvokeAsync(); - } - - public static UniTask OnEndEditAsync(this InputField inputField, CancellationToken cancellationToken) - { - return new AsyncUnityEventHandler(inputField.onEndEdit, cancellationToken, true).OnInvokeAsync(); - } - - public static IAsyncValueChangedEventHandler GetAsyncValueChangedEventHandler(this Dropdown dropdown) - { - return new AsyncUnityEventHandler(dropdown.onValueChanged, dropdown.GetCancellationTokenOnDestroy(), false); - } - - public static IAsyncValueChangedEventHandler GetAsyncValueChangedEventHandler(this Dropdown dropdown, CancellationToken cancellationToken) - { - return new AsyncUnityEventHandler(dropdown.onValueChanged, cancellationToken, false); - } - - public static UniTask OnValueChanged(this Dropdown dropdown) - { - return new AsyncUnityEventHandler(dropdown.onValueChanged, dropdown.GetCancellationTokenOnDestroy(), true).OnInvokeAsync(); - } - - public static UniTask OnValueChanged(this Dropdown dropdown, CancellationToken cancellationToken) - { - return new AsyncUnityEventHandler(dropdown.onValueChanged, cancellationToken, true).OnInvokeAsync(); - } - } - - public interface IAsyncClickEventHandler : IDisposable - { - UniTask OnClickAsync(); - UniTask OnClickAsyncSuppressCancellationThrow(); - } - - public interface IAsyncValueChangedEventHandler : IDisposable - { - UniTask OnValueChangedAsync(); - UniTask<(bool IsCanceled, T Result)> OnValueChangedAsyncSuppressCancellationThrow(); - } - - public interface IAsyncEndEditEventHandler : IDisposable - { - UniTask OnEndEditAsync(); - UniTask<(bool IsCanceled, T Result)> OnEndEditAsyncSuppressCancellationThrow(); - } - - // event handler is reusable when callOnce = false. - public class AsyncUnityEventHandler : IAwaiter, IDisposable, IAsyncClickEventHandler - { - static Action cancellationCallback = CancellationCallback; - - readonly UnityAction action; - readonly UnityEvent unityEvent; - Action continuation; - CancellationTokenRegistration registration; - bool isDisposed; - bool callOnce; - UniTask? suppressCancellationThrowTask; - - public AsyncUnityEventHandler(UnityEvent unityEvent, CancellationToken cancellationToken, bool callOnce) - { - this.callOnce = callOnce; - - if (cancellationToken.IsCancellationRequested) - { - isDisposed = true; - return; - } - - action = Invoke; - unityEvent.AddListener(action); - this.unityEvent = unityEvent; - - if (cancellationToken.CanBeCanceled) - { - registration = cancellationToken.RegisterWithoutCaptureExecutionContext(cancellationCallback, this); - } - - TaskTracker.TrackActiveTask(this, 3); - } - - public UniTask OnInvokeAsync() - { - // zero allocation wait handler. - return new UniTask(this); - } - - public UniTask OnInvokeAsyncSuppressCancellationThrow() - { - if (suppressCancellationThrowTask == null) - { - suppressCancellationThrowTask = OnInvokeAsync().SuppressCancellationThrow(); - } - return suppressCancellationThrowTask.Value; - } - - void Invoke() - { - var c = continuation; - continuation = null; - if (c != null) - { - c.Invoke(); - } - } - - static void CancellationCallback(object state) - { - var self = (AsyncUnityEventHandler)state; - self.Dispose(); - self.Invoke(); // call continuation if exists yet(GetResult -> throw OperationCanceledException). - } - - public void Dispose() - { - if (!isDisposed) - { - isDisposed = true; - TaskTracker.RemoveTracking(this); - registration.Dispose(); - if (unityEvent != null) - { - unityEvent.RemoveListener(action); - } - } - } - - bool IAwaiter.IsCompleted => isDisposed ? true : false; - AwaiterStatus IAwaiter.Status => isDisposed ? AwaiterStatus.Canceled : AwaiterStatus.Pending; - void IAwaiter.GetResult() - { - if (isDisposed) throw new OperationCanceledException(); - if (callOnce) Dispose(); - } - - void INotifyCompletion.OnCompleted(Action action) - { - ((ICriticalNotifyCompletion)this).UnsafeOnCompleted(action); - } - - void ICriticalNotifyCompletion.UnsafeOnCompleted(Action action) - { - Error.ThrowWhenContinuationIsAlreadyRegistered(this.continuation); - this.continuation = action; - } - - // Interface events. - - UniTask IAsyncClickEventHandler.OnClickAsync() - { - return OnInvokeAsync(); - } - - UniTask IAsyncClickEventHandler.OnClickAsyncSuppressCancellationThrow() - { - return OnInvokeAsyncSuppressCancellationThrow(); - } - } - - // event handler is reusable when callOnce = false. - public class AsyncUnityEventHandler : IAwaiter, IDisposable, IAsyncValueChangedEventHandler, IAsyncEndEditEventHandler - { - static Action cancellationCallback = CancellationCallback; - - readonly UnityAction action; - readonly UnityEvent unityEvent; - Action continuation; - CancellationTokenRegistration registration; - bool isDisposed; - T eventValue; - bool callOnce; - UniTask<(bool, T)>? suppressCancellationThrowTask; - - public AsyncUnityEventHandler(UnityEvent unityEvent, CancellationToken cancellationToken, bool callOnce) - { - this.callOnce = callOnce; - - if (cancellationToken.IsCancellationRequested) - { - isDisposed = true; - return; - } - - action = Invoke; - unityEvent.AddListener(action); - this.unityEvent = unityEvent; - - if (cancellationToken.CanBeCanceled) - { - registration = cancellationToken.RegisterWithoutCaptureExecutionContext(cancellationCallback, this); - } - - TaskTracker.TrackActiveTask(this, 3); - } - - public UniTask OnInvokeAsync() - { - // zero allocation wait handler. - return new UniTask(this); - } - - public UniTask<(bool IsCanceled, T Result)> OnInvokeAsyncSuppressCancellationThrow() - { - if (suppressCancellationThrowTask == null) - { - suppressCancellationThrowTask = OnInvokeAsync().SuppressCancellationThrow(); - } - return suppressCancellationThrowTask.Value; - } - - void Invoke(T value) - { - this.eventValue = value; - - var c = continuation; - continuation = null; - if (c != null) - { - c.Invoke(); - } - } - - static void CancellationCallback(object state) - { - var self = (AsyncUnityEventHandler)state; - self.Dispose(); - self.Invoke(default(T)); // call continuation if exists yet(GetResult -> throw OperationCanceledException). - } - - public void Dispose() - { - if (!isDisposed) - { - isDisposed = true; - TaskTracker.RemoveTracking(this); - registration.Dispose(); - if (unityEvent != null) - { - unityEvent.RemoveListener(action); - } - } - } - - bool IAwaiter.IsCompleted => isDisposed ? true : false; - AwaiterStatus IAwaiter.Status => isDisposed ? AwaiterStatus.Canceled : AwaiterStatus.Pending; - - T IAwaiter.GetResult() - { - if (isDisposed) throw new OperationCanceledException(); - if (callOnce) Dispose(); - return eventValue; - } - - void IAwaiter.GetResult() - { - if (isDisposed) throw new OperationCanceledException(); - if (callOnce) Dispose(); - } - - void INotifyCompletion.OnCompleted(Action action) - { - ((ICriticalNotifyCompletion)this).UnsafeOnCompleted(action); - } - - void ICriticalNotifyCompletion.UnsafeOnCompleted(Action action) - { - Error.ThrowWhenContinuationIsAlreadyRegistered(this.continuation); - this.continuation = action; - } - - // Interface events. - - UniTask IAsyncValueChangedEventHandler.OnValueChangedAsync() - { - return OnInvokeAsync(); - } - - UniTask<(bool IsCanceled, T Result)> IAsyncValueChangedEventHandler.OnValueChangedAsyncSuppressCancellationThrow() - { - return OnInvokeAsyncSuppressCancellationThrow(); - } - - UniTask IAsyncEndEditEventHandler.OnEndEditAsync() - { - return OnInvokeAsync(); - } - - UniTask<(bool IsCanceled, T Result)> IAsyncEndEditEventHandler.OnEndEditAsyncSuppressCancellationThrow() - { - return OnInvokeAsyncSuppressCancellationThrow(); - } - } -} - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Async/UnityAsyncExtensions.uGUI.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/UnityAsyncExtensions.uGUI.cs.meta deleted file mode 100644 index 90c5d51..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/UnityAsyncExtensions.uGUI.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 6804799fba2376d4099561d176101aff -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Async/UnityEqualityComparer.cs b/Assets/Plugins/UniRx/Scripts/Async/UnityEqualityComparer.cs deleted file mode 100644 index 62221e8..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/UnityEqualityComparer.cs +++ /dev/null @@ -1,283 +0,0 @@ -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member -#endif - -using System; -using System.Collections.Generic; -#if !UniRxLibrary -using UnityEngine; -#endif - -// share between UniRx and UniRx.Async - -namespace UniRx -{ - public static class UnityEqualityComparer - { -#if !UniRxLibrary - public static readonly IEqualityComparer Vector2 = new Vector2EqualityComparer(); - public static readonly IEqualityComparer Vector3 = new Vector3EqualityComparer(); - public static readonly IEqualityComparer Vector4 = new Vector4EqualityComparer(); - public static readonly IEqualityComparer Color = new ColorEqualityComparer(); - public static readonly IEqualityComparer Color32 = new Color32EqualityComparer(); - public static readonly IEqualityComparer Rect = new RectEqualityComparer(); - public static readonly IEqualityComparer Bounds = new BoundsEqualityComparer(); - public static readonly IEqualityComparer Quaternion = new QuaternionEqualityComparer(); - - static readonly RuntimeTypeHandle vector2Type = typeof(Vector2).TypeHandle; - static readonly RuntimeTypeHandle vector3Type = typeof(Vector3).TypeHandle; - static readonly RuntimeTypeHandle vector4Type = typeof(Vector4).TypeHandle; - static readonly RuntimeTypeHandle colorType = typeof(Color).TypeHandle; - static readonly RuntimeTypeHandle color32Type = typeof(Color32).TypeHandle; - static readonly RuntimeTypeHandle rectType = typeof(Rect).TypeHandle; - static readonly RuntimeTypeHandle boundsType = typeof(Bounds).TypeHandle; - static readonly RuntimeTypeHandle quaternionType = typeof(Quaternion).TypeHandle; -#endif - -#if UNITY_2017_2_OR_NEWER - - public static readonly IEqualityComparer Vector2Int = new Vector2IntEqualityComparer(); - public static readonly IEqualityComparer Vector3Int = new Vector3IntEqualityComparer(); - public static readonly IEqualityComparer RangeInt = new RangeIntEqualityComparer(); - public static readonly IEqualityComparer RectInt = new RectIntEqualityComparer(); - public static readonly IEqualityComparer BoundsInt = new BoundsIntEqualityComparer(); - - static readonly RuntimeTypeHandle vector2IntType = typeof(Vector2Int).TypeHandle; - static readonly RuntimeTypeHandle vector3IntType = typeof(Vector3Int).TypeHandle; - static readonly RuntimeTypeHandle rangeIntType = typeof(RangeInt).TypeHandle; - static readonly RuntimeTypeHandle rectIntType = typeof(RectInt).TypeHandle; - static readonly RuntimeTypeHandle boundsIntType = typeof(BoundsInt).TypeHandle; - -#endif - - static class Cache - { - public static readonly IEqualityComparer Comparer; - - static Cache() - { - var comparer = GetDefaultHelper(typeof(T)); - if (comparer == null) - { - Comparer = EqualityComparer.Default; - } - else - { - Comparer = (IEqualityComparer)comparer; - } - } - } - - public static IEqualityComparer GetDefault() - { - return Cache.Comparer; - } - - static object GetDefaultHelper(Type type) - { - var t = type.TypeHandle; - -#if !UniRxLibrary - if (t.Equals(vector2Type)) return (object)UnityEqualityComparer.Vector2; - if (t.Equals(vector3Type)) return (object)UnityEqualityComparer.Vector3; - if (t.Equals(vector4Type)) return (object)UnityEqualityComparer.Vector4; - if (t.Equals(colorType)) return (object)UnityEqualityComparer.Color; - if (t.Equals(color32Type)) return (object)UnityEqualityComparer.Color32; - if (t.Equals(rectType)) return (object)UnityEqualityComparer.Rect; - if (t.Equals(boundsType)) return (object)UnityEqualityComparer.Bounds; - if (t.Equals(quaternionType)) return (object)UnityEqualityComparer.Quaternion; -#endif - -#if UNITY_2017_2_OR_NEWER - - if (t.Equals(vector2IntType)) return (object)UnityEqualityComparer.Vector2Int; - if (t.Equals(vector3IntType)) return (object)UnityEqualityComparer.Vector3Int; - if (t.Equals(rangeIntType)) return (object)UnityEqualityComparer.RangeInt; - if (t.Equals(rectIntType)) return (object)UnityEqualityComparer.RectInt; - if (t.Equals(boundsIntType)) return (object)UnityEqualityComparer.BoundsInt; -#endif - - return null; - } - - #if !UniRxLibrary - - sealed class Vector2EqualityComparer : IEqualityComparer - { - public bool Equals(Vector2 self, Vector2 vector) - { - return self.x.Equals(vector.x) && self.y.Equals(vector.y); - } - - public int GetHashCode(Vector2 obj) - { - return obj.x.GetHashCode() ^ obj.y.GetHashCode() << 2; - } - } - - sealed class Vector3EqualityComparer : IEqualityComparer - { - public bool Equals(Vector3 self, Vector3 vector) - { - return self.x.Equals(vector.x) && self.y.Equals(vector.y) && self.z.Equals(vector.z); - } - - public int GetHashCode(Vector3 obj) - { - return obj.x.GetHashCode() ^ obj.y.GetHashCode() << 2 ^ obj.z.GetHashCode() >> 2; - } - } - - sealed class Vector4EqualityComparer : IEqualityComparer - { - public bool Equals(Vector4 self, Vector4 vector) - { - return self.x.Equals(vector.x) && self.y.Equals(vector.y) && self.z.Equals(vector.z) && self.w.Equals(vector.w); - } - - public int GetHashCode(Vector4 obj) - { - return obj.x.GetHashCode() ^ obj.y.GetHashCode() << 2 ^ obj.z.GetHashCode() >> 2 ^ obj.w.GetHashCode() >> 1; - } - } - - sealed class ColorEqualityComparer : IEqualityComparer - { - public bool Equals(Color self, Color other) - { - return self.r.Equals(other.r) && self.g.Equals(other.g) && self.b.Equals(other.b) && self.a.Equals(other.a); - } - - public int GetHashCode(Color obj) - { - return obj.r.GetHashCode() ^ obj.g.GetHashCode() << 2 ^ obj.b.GetHashCode() >> 2 ^ obj.a.GetHashCode() >> 1; - } - } - - sealed class RectEqualityComparer : IEqualityComparer - { - public bool Equals(Rect self, Rect other) - { - return self.x.Equals(other.x) && self.width.Equals(other.width) && self.y.Equals(other.y) && self.height.Equals(other.height); - } - - public int GetHashCode(Rect obj) - { - return obj.x.GetHashCode() ^ obj.width.GetHashCode() << 2 ^ obj.y.GetHashCode() >> 2 ^ obj.height.GetHashCode() >> 1; - } - } - - sealed class BoundsEqualityComparer : IEqualityComparer - { - public bool Equals(Bounds self, Bounds vector) - { - return self.center.Equals(vector.center) && self.extents.Equals(vector.extents); - } - - public int GetHashCode(Bounds obj) - { - return obj.center.GetHashCode() ^ obj.extents.GetHashCode() << 2; - } - } - - sealed class QuaternionEqualityComparer : IEqualityComparer - { - public bool Equals(Quaternion self, Quaternion vector) - { - return self.x.Equals(vector.x) && self.y.Equals(vector.y) && self.z.Equals(vector.z) && self.w.Equals(vector.w); - } - - public int GetHashCode(Quaternion obj) - { - return obj.x.GetHashCode() ^ obj.y.GetHashCode() << 2 ^ obj.z.GetHashCode() >> 2 ^ obj.w.GetHashCode() >> 1; - } - } - - sealed class Color32EqualityComparer : IEqualityComparer - { - public bool Equals(Color32 self, Color32 vector) - { - return self.a.Equals(vector.a) && self.r.Equals(vector.r) && self.g.Equals(vector.g) && self.b.Equals(vector.b); - } - - public int GetHashCode(Color32 obj) - { - return obj.a.GetHashCode() ^ obj.r.GetHashCode() << 2 ^ obj.g.GetHashCode() >> 2 ^ obj.b.GetHashCode() >> 1; - } - } - -#endif - -#if UNITY_2017_2_OR_NEWER - - sealed class Vector2IntEqualityComparer : IEqualityComparer - { - public bool Equals(Vector2Int self, Vector2Int vector) - { - return self.x.Equals(vector.x) && self.y.Equals(vector.y); - } - - public int GetHashCode(Vector2Int obj) - { - return obj.x.GetHashCode() ^ obj.y.GetHashCode() << 2; - } - } - - sealed class Vector3IntEqualityComparer : IEqualityComparer - { - public static readonly Vector3IntEqualityComparer Default = new Vector3IntEqualityComparer(); - - public bool Equals(Vector3Int self, Vector3Int vector) - { - return self.x.Equals(vector.x) && self.y.Equals(vector.y) && self.z.Equals(vector.z); - } - - public int GetHashCode(Vector3Int obj) - { - return obj.x.GetHashCode() ^ obj.y.GetHashCode() << 2 ^ obj.z.GetHashCode() >> 2; - } - } - - sealed class RangeIntEqualityComparer : IEqualityComparer - { - public bool Equals(RangeInt self, RangeInt vector) - { - return self.start.Equals(vector.start) && self.length.Equals(vector.length); - } - - public int GetHashCode(RangeInt obj) - { - return obj.start.GetHashCode() ^ obj.length.GetHashCode() << 2; - } - } - - sealed class RectIntEqualityComparer : IEqualityComparer - { - public bool Equals(RectInt self, RectInt other) - { - return self.x.Equals(other.x) && self.width.Equals(other.width) && self.y.Equals(other.y) && self.height.Equals(other.height); - } - - public int GetHashCode(RectInt obj) - { - return obj.x.GetHashCode() ^ obj.width.GetHashCode() << 2 ^ obj.y.GetHashCode() >> 2 ^ obj.height.GetHashCode() >> 1; - } - } - - sealed class BoundsIntEqualityComparer : IEqualityComparer - { - public bool Equals(BoundsInt self, BoundsInt vector) - { - return Vector3IntEqualityComparer.Default.Equals(self.position, vector.position) - && Vector3IntEqualityComparer.Default.Equals(self.size, vector.size); - } - - public int GetHashCode(BoundsInt obj) - { - return Vector3IntEqualityComparer.Default.GetHashCode(obj.position) ^ Vector3IntEqualityComparer.Default.GetHashCode(obj.size) << 2; - } - } - -#endif - } -} diff --git a/Assets/Plugins/UniRx/Scripts/Async/UnityEqualityComparer.cs.meta b/Assets/Plugins/UniRx/Scripts/Async/UnityEqualityComparer.cs.meta deleted file mode 100644 index 056596b..0000000 --- a/Assets/Plugins/UniRx/Scripts/Async/UnityEqualityComparer.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 5fa41dc096a805641ae7f58112ddb3cf -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Asynchronous.meta b/Assets/Plugins/UniRx/Scripts/Asynchronous.meta deleted file mode 100644 index 0acac42..0000000 --- a/Assets/Plugins/UniRx/Scripts/Asynchronous.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 892224ee172a204488b0694467dd03aa -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Asynchronous/WebRequestExtensions.cs b/Assets/Plugins/UniRx/Scripts/Asynchronous/WebRequestExtensions.cs deleted file mode 100644 index e5bba8c..0000000 --- a/Assets/Plugins/UniRx/Scripts/Asynchronous/WebRequestExtensions.cs +++ /dev/null @@ -1,61 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Net; -using System.Text; -using System.Threading; - -namespace UniRx -{ - public static class WebRequestExtensions - { - static IObservable AbortableDeferredAsyncRequest(Func begin, Func end, WebRequest request) - { - var result = Observable.Create(observer => - { - var isCompleted = -1; - var subscription = Observable.FromAsyncPattern(begin, - ar => - { - try - { - Interlocked.Increment(ref isCompleted); - return end(ar); - } - catch (WebException ex) - { - if (ex.Status == WebExceptionStatus.RequestCanceled) return default(TResult); - throw; - } - })() - .Subscribe(observer); - return Disposable.Create(() => - { - if (Interlocked.Increment(ref isCompleted) == 0) - { - subscription.Dispose(); - request.Abort(); - } - }); - }); - - return result; - } - - public static IObservable GetResponseAsObservable(this WebRequest request) - { - return AbortableDeferredAsyncRequest(request.BeginGetResponse, request.EndGetResponse, request); - } - - public static IObservable GetResponseAsObservable(this HttpWebRequest request) - { - return AbortableDeferredAsyncRequest(request.BeginGetResponse, ar => (HttpWebResponse)request.EndGetResponse(ar), request); - } - - public static IObservable GetRequestStreamAsObservable(this WebRequest request) - { - return AbortableDeferredAsyncRequest(request.BeginGetRequestStream, request.EndGetRequestStream, request); - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Asynchronous/WebRequestExtensions.cs.meta b/Assets/Plugins/UniRx/Scripts/Asynchronous/WebRequestExtensions.cs.meta deleted file mode 100644 index 5be850f..0000000 --- a/Assets/Plugins/UniRx/Scripts/Asynchronous/WebRequestExtensions.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 457f0007b2c70e34e9929ec8f0e2c4e6 -timeCreated: 1455373898 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Disposables.meta b/Assets/Plugins/UniRx/Scripts/Disposables.meta deleted file mode 100644 index 7eb2f90..0000000 --- a/Assets/Plugins/UniRx/Scripts/Disposables.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: d48cef95cc48e8443bc69c0d9f915c44 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Disposables/BooleanDisposable.cs b/Assets/Plugins/UniRx/Scripts/Disposables/BooleanDisposable.cs deleted file mode 100644 index db54b8e..0000000 --- a/Assets/Plugins/UniRx/Scripts/Disposables/BooleanDisposable.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System; -using System.Collections; - -namespace UniRx -{ - public sealed class BooleanDisposable : IDisposable, ICancelable - { - public bool IsDisposed { get; private set; } - - public BooleanDisposable() - { - - } - - internal BooleanDisposable(bool isDisposed) - { - IsDisposed = isDisposed; - } - - public void Dispose() - { - if (!IsDisposed) IsDisposed = true; - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Disposables/BooleanDisposable.cs.meta b/Assets/Plugins/UniRx/Scripts/Disposables/BooleanDisposable.cs.meta deleted file mode 100644 index 4fe8917..0000000 --- a/Assets/Plugins/UniRx/Scripts/Disposables/BooleanDisposable.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 4ff95c6eb380ca248984d8c27c1244d0 -timeCreated: 1455373899 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Disposables/CancellationDisposable.cs b/Assets/Plugins/UniRx/Scripts/Disposables/CancellationDisposable.cs deleted file mode 100644 index 435215f..0000000 --- a/Assets/Plugins/UniRx/Scripts/Disposables/CancellationDisposable.cs +++ /dev/null @@ -1,67 +0,0 @@ -// original code from GitHub Reactive-Extensions/Rx.NET -// some modified. - -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. - -#if (NETFX_CORE || NET_4_6 || NET_STANDARD_2_0 || UNITY_WSA_10_0) - -using System; -using System.Threading; - -namespace UniRx -{ - /// - /// Represents a disposable resource that has an associated that will be set to the cancellation requested state upon disposal. - /// - public sealed class CancellationDisposable : ICancelable - { - private readonly CancellationTokenSource _cts; - - /// - /// Initializes a new instance of the class that uses an existing . - /// - /// used for cancellation. - /// is null. - public CancellationDisposable(CancellationTokenSource cts) - { - if (cts == null) - throw new ArgumentNullException("cts"); - - _cts = cts; - } - - /// - /// Initializes a new instance of the class that uses a new . - /// - public CancellationDisposable() - : this(new CancellationTokenSource()) - { - } - - /// - /// Gets the used by this CancellationDisposable. - /// - public CancellationToken Token - { - get { return _cts.Token; } - } - - /// - /// Cancels the underlying . - /// - public void Dispose() - { - _cts.Cancel(); - } - - /// - /// Gets a value that indicates whether the object is disposed. - /// - public bool IsDisposed - { - get { return _cts.IsCancellationRequested; } - } - } -} - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Disposables/CancellationDisposable.cs.meta b/Assets/Plugins/UniRx/Scripts/Disposables/CancellationDisposable.cs.meta deleted file mode 100644 index b6084b0..0000000 --- a/Assets/Plugins/UniRx/Scripts/Disposables/CancellationDisposable.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 6c675907554bfa24d8bd411f386e410d -timeCreated: 1475137543 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Disposables/CompositeDisposable.cs b/Assets/Plugins/UniRx/Scripts/Disposables/CompositeDisposable.cs deleted file mode 100644 index a1735d5..0000000 --- a/Assets/Plugins/UniRx/Scripts/Disposables/CompositeDisposable.cs +++ /dev/null @@ -1,283 +0,0 @@ -using System; -using System.Collections.Generic; -// using System.Linq; do not use LINQ -using System.Text; - -namespace UniRx -{ - // copy, modified from Rx Official - - public sealed class CompositeDisposable : ICollection, IDisposable, ICancelable - { - private readonly object _gate = new object(); - - private bool _disposed; - private List _disposables; - private int _count; - private const int SHRINK_THRESHOLD = 64; - - /// - /// Initializes a new instance of the class with no disposables contained by it initially. - /// - public CompositeDisposable() - { - _disposables = new List(); - } - - /// - /// Initializes a new instance of the class with the specified number of disposables. - /// - /// The number of disposables that the new CompositeDisposable can initially store. - /// is less than zero. - public CompositeDisposable(int capacity) - { - if (capacity < 0) - throw new ArgumentOutOfRangeException("capacity"); - - _disposables = new List(capacity); - } - - /// - /// Initializes a new instance of the class from a group of disposables. - /// - /// Disposables that will be disposed together. - /// is null. - public CompositeDisposable(params IDisposable[] disposables) - { - if (disposables == null) - throw new ArgumentNullException("disposables"); - - _disposables = new List(disposables); - _count = _disposables.Count; - } - - /// - /// Initializes a new instance of the class from a group of disposables. - /// - /// Disposables that will be disposed together. - /// is null. - public CompositeDisposable(IEnumerable disposables) - { - if (disposables == null) - throw new ArgumentNullException("disposables"); - - _disposables = new List(disposables); - _count = _disposables.Count; - } - - /// - /// Gets the number of disposables contained in the CompositeDisposable. - /// - public int Count - { - get - { - return _count; - } - } - - /// - /// Adds a disposable to the CompositeDisposable or disposes the disposable if the CompositeDisposable is disposed. - /// - /// Disposable to add. - /// is null. - public void Add(IDisposable item) - { - if (item == null) - throw new ArgumentNullException("item"); - - var shouldDispose = false; - lock (_gate) - { - shouldDispose = _disposed; - if (!_disposed) - { - _disposables.Add(item); - _count++; - } - } - if (shouldDispose) - item.Dispose(); - } - - /// - /// Removes and disposes the first occurrence of a disposable from the CompositeDisposable. - /// - /// Disposable to remove. - /// true if found; false otherwise. - /// is null. - public bool Remove(IDisposable item) - { - if (item == null) - throw new ArgumentNullException("item"); - - var shouldDispose = false; - - lock (_gate) - { - if (!_disposed) - { - // - // List doesn't shrink the size of the underlying array but does collapse the array - // by copying the tail one position to the left of the removal index. We don't need - // index-based lookup but only ordering for sequential disposal. So, instead of spending - // cycles on the Array.Copy imposed by Remove, we use a null sentinel value. We also - // do manual Swiss cheese detection to shrink the list if there's a lot of holes in it. - // - var i = _disposables.IndexOf(item); - if (i >= 0) - { - shouldDispose = true; - _disposables[i] = null; - _count--; - - if (_disposables.Capacity > SHRINK_THRESHOLD && _count < _disposables.Capacity / 2) - { - var old = _disposables; - _disposables = new List(_disposables.Capacity / 2); - - foreach (var d in old) - if (d != null) - _disposables.Add(d); - } - } - } - } - - if (shouldDispose) - item.Dispose(); - - return shouldDispose; - } - - /// - /// Disposes all disposables in the group and removes them from the group. - /// - public void Dispose() - { - var currentDisposables = default(IDisposable[]); - lock (_gate) - { - if (!_disposed) - { - _disposed = true; - currentDisposables = _disposables.ToArray(); - _disposables.Clear(); - _count = 0; - } - } - - if (currentDisposables != null) - { - foreach (var d in currentDisposables) - if (d != null) - d.Dispose(); - } - } - - /// - /// Removes and disposes all disposables from the CompositeDisposable, but does not dispose the CompositeDisposable. - /// - public void Clear() - { - var currentDisposables = default(IDisposable[]); - lock (_gate) - { - currentDisposables = _disposables.ToArray(); - _disposables.Clear(); - _count = 0; - } - - foreach (var d in currentDisposables) - if (d != null) - d.Dispose(); - } - - /// - /// Determines whether the CompositeDisposable contains a specific disposable. - /// - /// Disposable to search for. - /// true if the disposable was found; otherwise, false. - /// is null. - public bool Contains(IDisposable item) - { - if (item == null) - throw new ArgumentNullException("item"); - - lock (_gate) - { - return _disposables.Contains(item); - } - } - - /// - /// Copies the disposables contained in the CompositeDisposable to an array, starting at a particular array index. - /// - /// Array to copy the contained disposables to. - /// Target index at which to copy the first disposable of the group. - /// is null. - /// is less than zero. -or - is larger than or equal to the array length. - public void CopyTo(IDisposable[] array, int arrayIndex) - { - if (array == null) - throw new ArgumentNullException("array"); - if (arrayIndex < 0 || arrayIndex >= array.Length) - throw new ArgumentOutOfRangeException("arrayIndex"); - - lock (_gate) - { - var disArray = new List(); - foreach (var item in _disposables) - { - if (item != null) disArray.Add(item); - } - - Array.Copy(disArray.ToArray(), 0, array, arrayIndex, array.Length - arrayIndex); - } - } - - /// - /// Always returns false. - /// - public bool IsReadOnly - { - get { return false; } - } - - /// - /// Returns an enumerator that iterates through the CompositeDisposable. - /// - /// An enumerator to iterate over the disposables. - public IEnumerator GetEnumerator() - { - var res = new List(); - - lock (_gate) - { - foreach (var d in _disposables) - { - if (d != null) res.Add(d); - } - } - - return res.GetEnumerator(); - } - - /// - /// Returns an enumerator that iterates through the CompositeDisposable. - /// - /// An enumerator to iterate over the disposables. - System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() - { - return GetEnumerator(); - } - - /// - /// Gets a value that indicates whether the object is disposed. - /// - public bool IsDisposed - { - get { return _disposed; } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Disposables/CompositeDisposable.cs.meta b/Assets/Plugins/UniRx/Scripts/Disposables/CompositeDisposable.cs.meta deleted file mode 100644 index 33e695a..0000000 --- a/Assets/Plugins/UniRx/Scripts/Disposables/CompositeDisposable.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: a0f9d923bd5f4cd47b39bdd83125de27 -timeCreated: 1455373900 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Disposables/DictionaryDisposable.cs b/Assets/Plugins/UniRx/Scripts/Disposables/DictionaryDisposable.cs deleted file mode 100644 index fe42783..0000000 --- a/Assets/Plugins/UniRx/Scripts/Disposables/DictionaryDisposable.cs +++ /dev/null @@ -1,255 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace UniRx -{ - public sealed class DictionaryDisposable : IDisposable, IDictionary - where TValue : IDisposable - { - bool isDisposed = false; - readonly Dictionary inner; - - public DictionaryDisposable() - { - inner = new Dictionary(); - } - - public DictionaryDisposable(IEqualityComparer comparer) - { - inner = new Dictionary(comparer); - } - - public TValue this[TKey key] - { - get - { - lock (inner) - { - return inner[key]; - } - } - - set - { - lock (inner) - { - if (isDisposed) value.Dispose(); - - TValue oldValue; - if (TryGetValue(key, out oldValue)) - { - oldValue.Dispose(); - inner[key] = value; - } - else - { - inner[key] = value; - } - } - } - } - - public int Count - { - get - { - lock (inner) - { - return inner.Count; - } - } - } - - public Dictionary.KeyCollection Keys - { - get - { - throw new NotSupportedException("please use .Select(x => x.Key).ToArray()"); - } - } - - public Dictionary.ValueCollection Values - { - get - { - throw new NotSupportedException("please use .Select(x => x.Value).ToArray()"); - } - } - - public void Add(TKey key, TValue value) - { - lock (inner) - { - if (isDisposed) - { - value.Dispose(); - return; - } - - inner.Add(key, value); - } - } - - public void Clear() - { - lock (inner) - { - foreach (var item in inner) - { - item.Value.Dispose(); - } - inner.Clear(); - } - } - - public bool Remove(TKey key) - { - lock (inner) - { - TValue oldValue; - if (inner.TryGetValue(key, out oldValue)) - { - var isSuccessRemove = inner.Remove(key); - if (isSuccessRemove) - { - oldValue.Dispose(); - } - return isSuccessRemove; - } - else - { - return false; - } - } - } - - public bool ContainsKey(TKey key) - { - lock (inner) - { - return inner.ContainsKey(key); - } - } - - public bool TryGetValue(TKey key, out TValue value) - { - lock (inner) - { - return inner.TryGetValue(key, out value); - } - } - - public Dictionary.Enumerator GetEnumerator() - { - lock (inner) - { - return new Dictionary(inner).GetEnumerator(); - } - } - - bool ICollection>.IsReadOnly - { - get - { - return ((ICollection>)inner).IsReadOnly; - } - } - - ICollection IDictionary.Keys - { - get - { - lock (inner) - { - return new List(inner.Keys); - } - } - } - - ICollection IDictionary.Values - { - get - { - lock (inner) - { - return new List(inner.Values); - } - } - } - - -#if !UNITY_METRO - - public void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) - { - lock (inner) - { - ((System.Runtime.Serialization.ISerializable)inner).GetObjectData(info, context); - } - } - - public void OnDeserialization(object sender) - { - lock (inner) - { - ((System.Runtime.Serialization.IDeserializationCallback)inner).OnDeserialization(sender); - } - } - -#endif - - void ICollection>.Add(KeyValuePair item) - { - Add((TKey)item.Key, (TValue)item.Value); - } - - bool ICollection>.Contains(KeyValuePair item) - { - lock (inner) - { - return ((ICollection>)inner).Contains(item); - } - } - - void ICollection>.CopyTo(KeyValuePair[] array, int arrayIndex) - { - lock (inner) - { - ((ICollection>)inner).CopyTo(array, arrayIndex); - } - } - - IEnumerator> IEnumerable>.GetEnumerator() - { - lock (inner) - { - return new List>((ICollection>)inner).GetEnumerator(); - } - } - - System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() - { - return GetEnumerator(); - } - - bool ICollection>.Remove(KeyValuePair item) - { - throw new NotSupportedException(); - } - - public void Dispose() - { - lock (inner) - { - if (isDisposed) return; - isDisposed = true; - - foreach (var item in inner) - { - item.Value.Dispose(); - } - inner.Clear(); - } - } - } -} diff --git a/Assets/Plugins/UniRx/Scripts/Disposables/DictionaryDisposable.cs.meta b/Assets/Plugins/UniRx/Scripts/Disposables/DictionaryDisposable.cs.meta deleted file mode 100644 index 67adf14..0000000 --- a/Assets/Plugins/UniRx/Scripts/Disposables/DictionaryDisposable.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 702939929fc84d544b12076b76aa73b5 -timeCreated: 1455373899 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Disposables/Disposable.cs b/Assets/Plugins/UniRx/Scripts/Disposables/Disposable.cs deleted file mode 100644 index 9ffd103..0000000 --- a/Assets/Plugins/UniRx/Scripts/Disposables/Disposable.cs +++ /dev/null @@ -1,76 +0,0 @@ -using System; -using System.Collections; - -namespace UniRx -{ - public static class Disposable - { - public static readonly IDisposable Empty = EmptyDisposable.Singleton; - - public static IDisposable Create(Action disposeAction) - { - return new AnonymousDisposable(disposeAction); - } - - public static IDisposable CreateWithState(TState state, Action disposeAction) - { - return new AnonymousDisposable(state, disposeAction); - } - - class EmptyDisposable : IDisposable - { - public static EmptyDisposable Singleton = new EmptyDisposable(); - - private EmptyDisposable() - { - - } - - public void Dispose() - { - } - } - - class AnonymousDisposable : IDisposable - { - bool isDisposed = false; - readonly Action dispose; - - public AnonymousDisposable(Action dispose) - { - this.dispose = dispose; - } - - public void Dispose() - { - if (!isDisposed) - { - isDisposed = true; - dispose(); - } - } - } - - class AnonymousDisposable : IDisposable - { - bool isDisposed = false; - readonly T state; - readonly Action dispose; - - public AnonymousDisposable(T state, Action dispose) - { - this.state = state; - this.dispose = dispose; - } - - public void Dispose() - { - if (!isDisposed) - { - isDisposed = true; - dispose(state); - } - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Disposables/Disposable.cs.meta b/Assets/Plugins/UniRx/Scripts/Disposables/Disposable.cs.meta deleted file mode 100644 index 219760e..0000000 --- a/Assets/Plugins/UniRx/Scripts/Disposables/Disposable.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 958f291bb8f434740a6d2c08ad5182a0 -timeCreated: 1455373900 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Disposables/DisposableExtensions.cs b/Assets/Plugins/UniRx/Scripts/Disposables/DisposableExtensions.cs deleted file mode 100644 index f32f7c2..0000000 --- a/Assets/Plugins/UniRx/Scripts/Disposables/DisposableExtensions.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace UniRx -{ - public static partial class DisposableExtensions - { - /// Add disposable(self) to CompositeDisposable(or other ICollection). Return value is self disposable. - public static T AddTo(this T disposable, ICollection container) - where T : IDisposable - { - if (disposable == null) throw new ArgumentNullException("disposable"); - if (container == null) throw new ArgumentNullException("container"); - - container.Add(disposable); - - return disposable; - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Disposables/DisposableExtensions.cs.meta b/Assets/Plugins/UniRx/Scripts/Disposables/DisposableExtensions.cs.meta deleted file mode 100644 index b584f6b..0000000 --- a/Assets/Plugins/UniRx/Scripts/Disposables/DisposableExtensions.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 9c4757265ae105441bae71007cbd0184 -timeCreated: 1455373900 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Disposables/ICancelable.cs b/Assets/Plugins/UniRx/Scripts/Disposables/ICancelable.cs deleted file mode 100644 index 6d489ae..0000000 --- a/Assets/Plugins/UniRx/Scripts/Disposables/ICancelable.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace UniRx -{ - public interface ICancelable : IDisposable - { - bool IsDisposed { get; } - } -} diff --git a/Assets/Plugins/UniRx/Scripts/Disposables/ICancelable.cs.meta b/Assets/Plugins/UniRx/Scripts/Disposables/ICancelable.cs.meta deleted file mode 100644 index 6af4cb2..0000000 --- a/Assets/Plugins/UniRx/Scripts/Disposables/ICancelable.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: b5cd5b0b304c78345a49757b1f6f8ba8 -timeCreated: 1455373900 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Disposables/MultipleAssignmentDisposable.cs b/Assets/Plugins/UniRx/Scripts/Disposables/MultipleAssignmentDisposable.cs deleted file mode 100644 index 78e78d6..0000000 --- a/Assets/Plugins/UniRx/Scripts/Disposables/MultipleAssignmentDisposable.cs +++ /dev/null @@ -1,69 +0,0 @@ -using System; -using System.Collections; - -namespace UniRx -{ - public sealed class MultipleAssignmentDisposable : IDisposable, ICancelable - { - static readonly BooleanDisposable True = new BooleanDisposable(true); - - object gate = new object(); - IDisposable current; - - public bool IsDisposed - { - get - { - lock (gate) - { - return current == True; - } - } - } - - public IDisposable Disposable - { - get - { - lock (gate) - { - return (current == True) - ? UniRx.Disposable.Empty - : current; - } - } - set - { - var shouldDispose = false; - lock (gate) - { - shouldDispose = (current == True); - if (!shouldDispose) - { - current = value; - } - } - if (shouldDispose && value != null) - { - value.Dispose(); - } - } - } - - public void Dispose() - { - IDisposable old = null; - - lock (gate) - { - if (current != True) - { - old = current; - current = True; - } - } - - if (old != null) old.Dispose(); - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Disposables/MultipleAssignmentDisposable.cs.meta b/Assets/Plugins/UniRx/Scripts/Disposables/MultipleAssignmentDisposable.cs.meta deleted file mode 100644 index 40947a9..0000000 --- a/Assets/Plugins/UniRx/Scripts/Disposables/MultipleAssignmentDisposable.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: bb959083576ace749afd55c1e54b02d9 -timeCreated: 1455373901 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Disposables/RefCountDisposable.cs b/Assets/Plugins/UniRx/Scripts/Disposables/RefCountDisposable.cs deleted file mode 100644 index 05374a1..0000000 --- a/Assets/Plugins/UniRx/Scripts/Disposables/RefCountDisposable.cs +++ /dev/null @@ -1,152 +0,0 @@ -// This code is borrwed from Rx Official and some modified. - -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. - -using System; -using System.Collections.Generic; -using System.Text; -using System.Threading; - -namespace UniRx -{ - /// - /// Represents a disposable resource that only disposes its underlying disposable resource when all dependent disposable objects have been disposed. - /// - public sealed class RefCountDisposable : ICancelable - { - private readonly object _gate = new object(); - private IDisposable _disposable; - private bool _isPrimaryDisposed; - private int _count; - - /// - /// Initializes a new instance of the class with the specified disposable. - /// - /// Underlying disposable. - /// is null. - public RefCountDisposable(IDisposable disposable) - { - if (disposable == null) - throw new ArgumentNullException("disposable"); - - _disposable = disposable; - _isPrimaryDisposed = false; - _count = 0; - } - - /// - /// Gets a value that indicates whether the object is disposed. - /// - public bool IsDisposed - { - get { return _disposable == null; } - } - - /// - /// Returns a dependent disposable that when disposed decreases the refcount on the underlying disposable. - /// - /// A dependent disposable contributing to the reference count that manages the underlying disposable's lifetime. - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate", Justification = "Backward compat + non-trivial work for a property getter.")] - public IDisposable GetDisposable() - { - lock (_gate) - { - if (_disposable == null) - { - return Disposable.Empty; - } - else - { - _count++; - return new InnerDisposable(this); - } - } - } - - /// - /// Disposes the underlying disposable only when all dependent disposables have been disposed. - /// - public void Dispose() - { - var disposable = default(IDisposable); - lock (_gate) - { - if (_disposable != null) - { - if (!_isPrimaryDisposed) - { - _isPrimaryDisposed = true; - - if (_count == 0) - { - disposable = _disposable; - _disposable = null; - } - } - } - } - - if (disposable != null) - disposable.Dispose(); - } - - private void Release() - { - var disposable = default(IDisposable); - lock (_gate) - { - if (_disposable != null) - { - _count--; - - if (_isPrimaryDisposed) - { - if (_count == 0) - { - disposable = _disposable; - _disposable = null; - } - } - } - } - - if (disposable != null) - disposable.Dispose(); - } - - sealed class InnerDisposable : IDisposable - { - private RefCountDisposable _parent; - object parentLock = new object(); - - public InnerDisposable(RefCountDisposable parent) - { - _parent = parent; - } - - public void Dispose() - { - RefCountDisposable parent; - lock (parentLock) - { - parent = _parent; - _parent = null; - } - if (parent != null) - parent.Release(); - } - } - } - - public partial class Observable - { - static IObservable AddRef(IObservable xs, RefCountDisposable r) - { - return Observable.Create((IObserver observer) => new CompositeDisposable(new IDisposable[] - { - r.GetDisposable(), - xs.Subscribe(observer) - })); - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Disposables/RefCountDisposable.cs.meta b/Assets/Plugins/UniRx/Scripts/Disposables/RefCountDisposable.cs.meta deleted file mode 100644 index 1dd30f6..0000000 --- a/Assets/Plugins/UniRx/Scripts/Disposables/RefCountDisposable.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 2fb5a2cdb138579498eb20d8b7818ad8 -timeCreated: 1455373898 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Disposables/ScheduledDisposable.cs b/Assets/Plugins/UniRx/Scripts/Disposables/ScheduledDisposable.cs deleted file mode 100644 index 22aa194..0000000 --- a/Assets/Plugins/UniRx/Scripts/Disposables/ScheduledDisposable.cs +++ /dev/null @@ -1,46 +0,0 @@ -using System; -using System.Threading; - -namespace UniRx -{ - public sealed class ScheduledDisposable : ICancelable - { - private readonly IScheduler scheduler; - private volatile IDisposable disposable; - private int isDisposed = 0; - - public ScheduledDisposable(IScheduler scheduler, IDisposable disposable) - { - this.scheduler = scheduler; - this.disposable = disposable; - } - - public IScheduler Scheduler - { - get { return scheduler; } - } - - public IDisposable Disposable - { - get { return disposable; } - } - - public bool IsDisposed - { - get { return isDisposed != 0; } - } - - public void Dispose() - { - Scheduler.Schedule(DisposeInner); - } - - private void DisposeInner() - { - if (Interlocked.Increment(ref isDisposed) == 1) - { - disposable.Dispose(); - } - } - } -} diff --git a/Assets/Plugins/UniRx/Scripts/Disposables/ScheduledDisposable.cs.meta b/Assets/Plugins/UniRx/Scripts/Disposables/ScheduledDisposable.cs.meta deleted file mode 100644 index 6e70e61..0000000 --- a/Assets/Plugins/UniRx/Scripts/Disposables/ScheduledDisposable.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: db98ce742e859bd4e81db434c3ca3663 -timeCreated: 1455373901 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Disposables/SerialDisposable.cs b/Assets/Plugins/UniRx/Scripts/Disposables/SerialDisposable.cs deleted file mode 100644 index f00eca8..0000000 --- a/Assets/Plugins/UniRx/Scripts/Disposables/SerialDisposable.cs +++ /dev/null @@ -1,64 +0,0 @@ -using System; -using System.Collections; - -namespace UniRx -{ - public sealed class SerialDisposable : IDisposable, ICancelable - { - readonly object gate = new object(); - IDisposable current; - bool disposed; - - public bool IsDisposed { get { lock (gate) { return disposed; } } } - - public IDisposable Disposable - { - get - { - return current; - } - set - { - var shouldDispose = false; - var old = default(IDisposable); - lock (gate) - { - shouldDispose = disposed; - if (!shouldDispose) - { - old = current; - current = value; - } - } - if (old != null) - { - old.Dispose(); - } - if (shouldDispose && value != null) - { - value.Dispose(); - } - } - } - - public void Dispose() - { - var old = default(IDisposable); - - lock (gate) - { - if (!disposed) - { - disposed = true; - old = current; - current = null; - } - } - - if (old != null) - { - old.Dispose(); - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Disposables/SerialDisposable.cs.meta b/Assets/Plugins/UniRx/Scripts/Disposables/SerialDisposable.cs.meta deleted file mode 100644 index e9a07a8..0000000 --- a/Assets/Plugins/UniRx/Scripts/Disposables/SerialDisposable.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 06fb064ad9e4d354ab15ff89f6343243 -timeCreated: 1455373897 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Disposables/SingleAssignmentDisposable.cs b/Assets/Plugins/UniRx/Scripts/Disposables/SingleAssignmentDisposable.cs deleted file mode 100644 index 6f3f10e..0000000 --- a/Assets/Plugins/UniRx/Scripts/Disposables/SingleAssignmentDisposable.cs +++ /dev/null @@ -1,68 +0,0 @@ -using System; -using System.Collections; - -namespace UniRx -{ - // should be use Interlocked.CompareExchange for Threadsafe? - // but CompareExchange cause ExecutionEngineException on iOS. - // AOT... - // use lock instead - - public sealed class SingleAssignmentDisposable : IDisposable, ICancelable - { - readonly object gate = new object(); - IDisposable current; - bool disposed; - - public bool IsDisposed { get { lock (gate) { return disposed; } } } - - public IDisposable Disposable - { - get - { - return current; - } - set - { - var old = default(IDisposable); - bool alreadyDisposed; - lock (gate) - { - alreadyDisposed = disposed; - old = current; - if (!alreadyDisposed) - { - if (value == null) return; - current = value; - } - } - - if (alreadyDisposed && value != null) - { - value.Dispose(); - return; - } - - if (old != null) throw new InvalidOperationException("Disposable is already set"); - } - } - - - public void Dispose() - { - IDisposable old = null; - - lock (gate) - { - if (!disposed) - { - disposed = true; - old = current; - current = null; - } - } - - if (old != null) old.Dispose(); - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Disposables/SingleAssignmentDisposable.cs.meta b/Assets/Plugins/UniRx/Scripts/Disposables/SingleAssignmentDisposable.cs.meta deleted file mode 100644 index 6fddafa..0000000 --- a/Assets/Plugins/UniRx/Scripts/Disposables/SingleAssignmentDisposable.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 7ec869f7548c62748ad57a5c86b2f6ba -timeCreated: 1455373899 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Disposables/StableCompositeDisposable.cs b/Assets/Plugins/UniRx/Scripts/Disposables/StableCompositeDisposable.cs deleted file mode 100644 index 49baed0..0000000 --- a/Assets/Plugins/UniRx/Scripts/Disposables/StableCompositeDisposable.cs +++ /dev/null @@ -1,277 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Threading; - -namespace UniRx -{ - /// - /// Represents a group of disposable resources that are disposed together. - /// - public abstract class StableCompositeDisposable : ICancelable - { - /// - /// Creates a new group containing two disposable resources that are disposed together. - /// - /// The first disposable resoruce to add to the group. - /// The second disposable resoruce to add to the group. - /// Group of disposable resources that are disposed together. - public static ICancelable Create(IDisposable disposable1, IDisposable disposable2) - { - if (disposable1 == null) throw new ArgumentNullException("disposable1"); - if (disposable2 == null) throw new ArgumentNullException("disposable2"); - - return new Binary(disposable1, disposable2); - } - - /// - /// Creates a new group containing three disposable resources that are disposed together. - /// - /// The first disposable resoruce to add to the group. - /// The second disposable resoruce to add to the group. - /// The third disposable resoruce to add to the group. - /// Group of disposable resources that are disposed together. - public static ICancelable Create(IDisposable disposable1, IDisposable disposable2, IDisposable disposable3) - { - if (disposable1 == null) throw new ArgumentNullException("disposable1"); - if (disposable2 == null) throw new ArgumentNullException("disposable2"); - if (disposable3 == null) throw new ArgumentNullException("disposable3"); - - return new Trinary(disposable1, disposable2, disposable3); - } - - /// - /// Creates a new group containing four disposable resources that are disposed together. - /// - /// The first disposable resoruce to add to the group. - /// The second disposable resoruce to add to the group. - /// The three disposable resoruce to add to the group. - /// The four disposable resoruce to add to the group. - /// Group of disposable resources that are disposed together. - public static ICancelable Create(IDisposable disposable1, IDisposable disposable2, IDisposable disposable3, IDisposable disposable4) - { - if (disposable1 == null) throw new ArgumentNullException("disposable1"); - if (disposable2 == null) throw new ArgumentNullException("disposable2"); - if (disposable3 == null) throw new ArgumentNullException("disposable3"); - if (disposable4 == null) throw new ArgumentNullException("disposable4"); - - return new Quaternary(disposable1, disposable2, disposable3, disposable4); - } - - /// - /// Creates a new group of disposable resources that are disposed together. - /// - /// Disposable resources to add to the group. - /// Group of disposable resources that are disposed together. - public static ICancelable Create(params IDisposable[] disposables) - { - if (disposables == null) throw new ArgumentNullException("disposables"); - - return new NAry(disposables); - } - - /// - /// Creates a new group of disposable resources that are disposed together. Array is not copied, it's unsafe but optimized. - /// - /// Disposable resources to add to the group. - /// Group of disposable resources that are disposed together. - public static ICancelable CreateUnsafe(IDisposable[] disposables) - { - return new NAryUnsafe(disposables); - } - - /// - /// Creates a new group of disposable resources that are disposed together. - /// - /// Disposable resources to add to the group. - /// Group of disposable resources that are disposed together. - public static ICancelable Create(IEnumerable disposables) - { - if (disposables == null) throw new ArgumentNullException("disposables"); - - return new NAry(disposables); - } - - /// - /// Disposes all disposables in the group. - /// - public abstract void Dispose(); - - /// - /// Gets a value that indicates whether the object is disposed. - /// - public abstract bool IsDisposed - { - get; - } - - class Binary : StableCompositeDisposable - { - int disposedCallCount = -1; - private volatile IDisposable _disposable1; - private volatile IDisposable _disposable2; - - public Binary(IDisposable disposable1, IDisposable disposable2) - { - _disposable1 = disposable1; - _disposable2 = disposable2; - } - - public override bool IsDisposed - { - get - { - return disposedCallCount != -1; - } - } - - public override void Dispose() - { - if (Interlocked.Increment(ref disposedCallCount) == 0) - { - _disposable1.Dispose(); - _disposable2.Dispose(); - } - } - } - - class Trinary : StableCompositeDisposable - { - int disposedCallCount = -1; - private volatile IDisposable _disposable1; - private volatile IDisposable _disposable2; - private volatile IDisposable _disposable3; - - public Trinary(IDisposable disposable1, IDisposable disposable2, IDisposable disposable3) - { - _disposable1 = disposable1; - _disposable2 = disposable2; - _disposable3 = disposable3; - } - - public override bool IsDisposed - { - get - { - return disposedCallCount != -1; - } - } - - public override void Dispose() - { - if (Interlocked.Increment(ref disposedCallCount) == 0) - { - _disposable1.Dispose(); - _disposable2.Dispose(); - _disposable3.Dispose(); - } - } - } - - class Quaternary : StableCompositeDisposable - { - int disposedCallCount = -1; - private volatile IDisposable _disposable1; - private volatile IDisposable _disposable2; - private volatile IDisposable _disposable3; - private volatile IDisposable _disposable4; - - public Quaternary(IDisposable disposable1, IDisposable disposable2, IDisposable disposable3, IDisposable disposable4) - { - _disposable1 = disposable1; - _disposable2 = disposable2; - _disposable3 = disposable3; - _disposable4 = disposable4; - } - - public override bool IsDisposed - { - get - { - return disposedCallCount != -1; - } - } - - public override void Dispose() - { - if (Interlocked.Increment(ref disposedCallCount) == 0) - { - _disposable1.Dispose(); - _disposable2.Dispose(); - _disposable3.Dispose(); - _disposable4.Dispose(); - } - } - } - - class NAry : StableCompositeDisposable - { - int disposedCallCount = -1; - private volatile List _disposables; - - public NAry(IDisposable[] disposables) - : this((IEnumerable)disposables) - { - } - - public NAry(IEnumerable disposables) - { - _disposables = new List(disposables); - - // - // Doing this on the list to avoid duplicate enumeration of disposables. - // - if (_disposables.Contains(null)) throw new ArgumentException("Disposables can't contains null", "disposables"); - } - - public override bool IsDisposed - { - get - { - return disposedCallCount != -1; - } - } - - public override void Dispose() - { - if (Interlocked.Increment(ref disposedCallCount) == 0) - { - foreach (var d in _disposables) - { - d.Dispose(); - } - } - } - } - - class NAryUnsafe : StableCompositeDisposable - { - int disposedCallCount = -1; - private volatile IDisposable[] _disposables; - - public NAryUnsafe(IDisposable[] disposables) - { - _disposables = disposables; - } - - public override bool IsDisposed - { - get - { - return disposedCallCount != -1; - } - } - - public override void Dispose() - { - if (Interlocked.Increment(ref disposedCallCount) == 0) - { - var len = _disposables.Length; - for (int i = 0; i < len; i++) - { - _disposables[i].Dispose(); - } - } - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Disposables/StableCompositeDisposable.cs.meta b/Assets/Plugins/UniRx/Scripts/Disposables/StableCompositeDisposable.cs.meta deleted file mode 100644 index 85c914f..0000000 --- a/Assets/Plugins/UniRx/Scripts/Disposables/StableCompositeDisposable.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 3a9cd9fa22bc6a5439484581f5049cf8 -timeCreated: 1455373898 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/EventPattern.cs b/Assets/Plugins/UniRx/Scripts/EventPattern.cs deleted file mode 100644 index 48a9a85..0000000 --- a/Assets/Plugins/UniRx/Scripts/EventPattern.cs +++ /dev/null @@ -1,140 +0,0 @@ -// original code from rx.codeplex.com -// some modified. - -/* ------------------ */ - -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. - -using System; -using System.Collections.Generic; - -namespace UniRx -{ - /// - /// Represents a .NET event invocation consisting of the strongly typed object that raised the event and the data that was generated by the event. - /// - /// - /// The type of the sender that raised the event. - /// This type parameter is covariant. That is, you can use either the type you specified or any type that is more derived. For more information about covariance and contravariance, see Covariance and Contravariance in Generics. - /// - /// - /// The type of the event data generated by the event. - /// This type parameter is covariant. That is, you can use either the type you specified or any type that is more derived. For more information about covariance and contravariance, see Covariance and Contravariance in Generics. - /// - public interface IEventPattern - { - /// - /// Gets the sender object that raised the event. - /// - TSender Sender { get; } - - /// - /// Gets the event data that was generated by the event. - /// - TEventArgs EventArgs { get; } - } - - /// - /// Represents a .NET event invocation consisting of the weakly typed object that raised the event and the data that was generated by the event. - /// - /// The type of the event data generated by the event. - public class EventPattern : EventPattern - { - /// - /// Creates a new data representation instance of a .NET event invocation with the given sender and event data. - /// - /// The sender object that raised the event. - /// The event data that was generated by the event. - public EventPattern(object sender, TEventArgs e) - : base(sender, e) - { - } - } - - /// - /// Represents a .NET event invocation consisting of the strongly typed object that raised the event and the data that was generated by the event. - /// - /// The type of the sender that raised the event. - /// The type of the event data generated by the event. - public class EventPattern : IEquatable>, IEventPattern - { - /// - /// Creates a new data representation instance of a .NET event invocation with the given sender and event data. - /// - /// The sender object that raised the event. - /// The event data that was generated by the event. - public EventPattern(TSender sender, TEventArgs e) - { - Sender = sender; - EventArgs = e; - } - - /// - /// Gets the sender object that raised the event. - /// - public TSender Sender { get; private set; } - - /// - /// Gets the event data that was generated by the event. - /// - public TEventArgs EventArgs { get; private set; } - - /// - /// Determines whether the current EventPattern<TSender, TEventArgs> object represents the same event as a specified EventPattern<TSender, TEventArgs> object. - /// - /// An object to compare to the current EventPattern<TSender, TEventArgs> object. - /// true if both EventPattern<TSender, TEventArgs> objects represent the same event; otherwise, false. - public bool Equals(EventPattern other) - { - if (object.ReferenceEquals(null, other)) - return false; - if (object.ReferenceEquals(this, other)) - return true; - - return EqualityComparer.Default.Equals(Sender, other.Sender) && EqualityComparer.Default.Equals(EventArgs, other.EventArgs); - } - - /// - /// Determines whether the specified System.Object is equal to the current EventPattern<TSender, TEventArgs>. - /// - /// The System.Object to compare with the current EventPattern<TSender, TEventArgs>. - /// true if the specified System.Object is equal to the current EventPattern<TSender, TEventArgs>; otherwise, false. - public override bool Equals(object obj) - { - return Equals(obj as EventPattern); - } - - /// - /// Returns the hash code for the current EventPattern<TSender, TEventArgs> instance. - /// - /// A hash code for the current EventPattern<TSender, TEventArgs> instance. - public override int GetHashCode() - { - var x = EqualityComparer.Default.GetHashCode(Sender); - var y = EqualityComparer.Default.GetHashCode(EventArgs); - return (x << 5) + (x ^ y); - } - - /// - /// Determines whether two specified EventPattern<TSender, TEventArgs> objects represent the same event. - /// - /// The first EventPattern<TSender, TEventArgs> to compare, or null. - /// The second EventPattern<TSender, TEventArgs> to compare, or null. - /// true if both EventPattern<TSender, TEventArgs> objects represent the same event; otherwise, false. - public static bool operator ==(EventPattern first, EventPattern second) - { - return object.Equals(first, second); - } - - /// - /// Determines whether two specified EventPattern<TSender, TEventArgs> objects represent a different event. - /// - /// The first EventPattern<TSender, TEventArgs> to compare, or null. - /// The second EventPattern<TSender, TEventArgs> to compare, or null. - /// true if both EventPattern<TSender, TEventArgs> objects don't represent the same event; otherwise, false. - public static bool operator !=(EventPattern first, EventPattern second) - { - return !object.Equals(first, second); - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/EventPattern.cs.meta b/Assets/Plugins/UniRx/Scripts/EventPattern.cs.meta deleted file mode 100644 index ad6fa9a..0000000 --- a/Assets/Plugins/UniRx/Scripts/EventPattern.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: e4b797bfea1999a499309068b7d7a97e -timeCreated: 1455373901 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/InternalUtil.meta b/Assets/Plugins/UniRx/Scripts/InternalUtil.meta deleted file mode 100644 index 4a68780..0000000 --- a/Assets/Plugins/UniRx/Scripts/InternalUtil.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 6eb25930e4e299d44970a333202727dd -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/InternalUtil/AscynLock.cs b/Assets/Plugins/UniRx/Scripts/InternalUtil/AscynLock.cs deleted file mode 100644 index 39f0565..0000000 --- a/Assets/Plugins/UniRx/Scripts/InternalUtil/AscynLock.cs +++ /dev/null @@ -1,85 +0,0 @@ -// this code is borrowed from RxOfficial(rx.codeplex.com) and modified - -using System; -using System.Collections.Generic; - -namespace UniRx.InternalUtil -{ - /// - /// Asynchronous lock. - /// - internal sealed class AsyncLock : IDisposable - { - private readonly Queue queue = new Queue(); - private bool isAcquired = false; - private bool hasFaulted = false; - - /// - /// Queues the action for execution. If the caller acquires the lock and becomes the owner, - /// the queue is processed. If the lock is already owned, the action is queued and will get - /// processed by the owner. - /// - /// Action to queue for execution. - /// is null. - public void Wait(Action action) - { - if (action == null) - throw new ArgumentNullException("action"); - - var isOwner = false; - lock (queue) - { - if (!hasFaulted) - { - queue.Enqueue(action); - isOwner = !isAcquired; - isAcquired = true; - } - } - - if (isOwner) - { - while (true) - { - var work = default(Action); - lock (queue) - { - if (queue.Count > 0) - work = queue.Dequeue(); - else - { - isAcquired = false; - break; - } - } - - try - { - work(); - } - catch - { - lock (queue) - { - queue.Clear(); - hasFaulted = true; - } - throw; - } - } - } - } - - /// - /// Clears the work items in the queue and drops further work being queued. - /// - public void Dispose() - { - lock (queue) - { - queue.Clear(); - hasFaulted = true; - } - } - } -} diff --git a/Assets/Plugins/UniRx/Scripts/InternalUtil/AscynLock.cs.meta b/Assets/Plugins/UniRx/Scripts/InternalUtil/AscynLock.cs.meta deleted file mode 100644 index 11fcee4..0000000 --- a/Assets/Plugins/UniRx/Scripts/InternalUtil/AscynLock.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 23dbd656cfe9c5e47b02c3c263e476aa -timeCreated: 1455373897 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/InternalUtil/ExceptionExtensions.cs b/Assets/Plugins/UniRx/Scripts/InternalUtil/ExceptionExtensions.cs deleted file mode 100644 index 1a93773..0000000 --- a/Assets/Plugins/UniRx/Scripts/InternalUtil/ExceptionExtensions.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace UniRx.InternalUtil -{ - using System; - - internal static class ExceptionExtensions - { - public static void Throw(this Exception exception) - { -#if (NET_4_6 || NET_STANDARD_2_0) - System.Runtime.ExceptionServices.ExceptionDispatchInfo.Capture(exception).Throw(); -#endif - throw exception; - } - } -} diff --git a/Assets/Plugins/UniRx/Scripts/InternalUtil/ExceptionExtensions.cs.meta b/Assets/Plugins/UniRx/Scripts/InternalUtil/ExceptionExtensions.cs.meta deleted file mode 100644 index b5c26fa..0000000 --- a/Assets/Plugins/UniRx/Scripts/InternalUtil/ExceptionExtensions.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 94d5d10805124b34c8b488ebf3f893eb -timeCreated: 1509016318 -licenseType: Free -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/InternalUtil/ImmutableList.cs b/Assets/Plugins/UniRx/Scripts/InternalUtil/ImmutableList.cs deleted file mode 100644 index 65d7b2d..0000000 --- a/Assets/Plugins/UniRx/Scripts/InternalUtil/ImmutableList.cs +++ /dev/null @@ -1,61 +0,0 @@ -using System; - -namespace UniRx.InternalUtil -{ - // ImmutableList is sometimes useful, use for public. - public class ImmutableList - { - public static readonly ImmutableList Empty = new ImmutableList(); - - T[] data; - - public T[] Data - { - get { return data; } - } - - ImmutableList() - { - data = new T[0]; - } - - public ImmutableList(T[] data) - { - this.data = data; - } - - public ImmutableList Add(T value) - { - var newData = new T[data.Length + 1]; - Array.Copy(data, newData, data.Length); - newData[data.Length] = value; - return new ImmutableList(newData); - } - - public ImmutableList Remove(T value) - { - var i = IndexOf(value); - if (i < 0) return this; - - var length = data.Length; - if (length == 1) return Empty; - - var newData = new T[length - 1]; - - Array.Copy(data, 0, newData, 0, i); - Array.Copy(data, i + 1, newData, i, length - i - 1); - - return new ImmutableList(newData); - } - - public int IndexOf(T value) - { - for (var i = 0; i < data.Length; ++i) - { - // ImmutableList only use for IObserver(no worry for boxed) - if (object.Equals(data[i], value)) return i; - } - return -1; - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/InternalUtil/ImmutableList.cs.meta b/Assets/Plugins/UniRx/Scripts/InternalUtil/ImmutableList.cs.meta deleted file mode 100644 index bb4d1e9..0000000 --- a/Assets/Plugins/UniRx/Scripts/InternalUtil/ImmutableList.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: dbafd8a41f556ec40b4bbd46fca2e85c -timeCreated: 1455373901 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/InternalUtil/ListObserver.cs b/Assets/Plugins/UniRx/Scripts/InternalUtil/ListObserver.cs deleted file mode 100644 index 4e560b6..0000000 --- a/Assets/Plugins/UniRx/Scripts/InternalUtil/ListObserver.cs +++ /dev/null @@ -1,134 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace UniRx.InternalUtil -{ - public class ListObserver : IObserver - { - private readonly ImmutableList> _observers; - - public ListObserver(ImmutableList> observers) - { - _observers = observers; - } - - public void OnCompleted() - { - var targetObservers = _observers.Data; - for (int i = 0; i < targetObservers.Length; i++) - { - targetObservers[i].OnCompleted(); - } - } - - public void OnError(Exception error) - { - var targetObservers = _observers.Data; - for (int i = 0; i < targetObservers.Length; i++) - { - targetObservers[i].OnError(error); - } - } - - public void OnNext(T value) - { - var targetObservers = _observers.Data; - for (int i = 0; i < targetObservers.Length; i++) - { - targetObservers[i].OnNext(value); - } - } - - internal IObserver Add(IObserver observer) - { - return new ListObserver(_observers.Add(observer)); - } - - internal IObserver Remove(IObserver observer) - { - var i = Array.IndexOf(_observers.Data, observer); - if (i < 0) - return this; - - if (_observers.Data.Length == 2) - { - return _observers.Data[1 - i]; - } - else - { - return new ListObserver(_observers.Remove(observer)); - } - } - } - - public class EmptyObserver : IObserver - { - public static readonly EmptyObserver Instance = new EmptyObserver(); - - EmptyObserver() - { - - } - - public void OnCompleted() - { - } - - public void OnError(Exception error) - { - } - - public void OnNext(T value) - { - } - } - - public class ThrowObserver : IObserver - { - public static readonly ThrowObserver Instance = new ThrowObserver(); - - ThrowObserver() - { - - } - - public void OnCompleted() - { - } - - public void OnError(Exception error) - { - error.Throw(); - } - - public void OnNext(T value) - { - } - } - - public class DisposedObserver : IObserver - { - public static readonly DisposedObserver Instance = new DisposedObserver(); - - DisposedObserver() - { - - } - - public void OnCompleted() - { - throw new ObjectDisposedException(""); - } - - public void OnError(Exception error) - { - throw new ObjectDisposedException(""); - } - - public void OnNext(T value) - { - throw new ObjectDisposedException(""); - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/InternalUtil/ListObserver.cs.meta b/Assets/Plugins/UniRx/Scripts/InternalUtil/ListObserver.cs.meta deleted file mode 100644 index f73a979..0000000 --- a/Assets/Plugins/UniRx/Scripts/InternalUtil/ListObserver.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 889dc2f3c5f44d24a98a2c25510b4346 -timeCreated: 1455373900 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/InternalUtil/MicroCoroutine.cs b/Assets/Plugins/UniRx/Scripts/InternalUtil/MicroCoroutine.cs deleted file mode 100644 index ed49f82..0000000 --- a/Assets/Plugins/UniRx/Scripts/InternalUtil/MicroCoroutine.cs +++ /dev/null @@ -1,170 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; - -namespace UniRx.InternalUtil -{ - /// - /// Simple supports(only yield return null) lightweight, threadsafe coroutine dispatcher. - /// - public class MicroCoroutine - { - const int InitialSize = 16; - - readonly object runningAndQueueLock = new object(); - readonly object arrayLock = new object(); - readonly Action unhandledExceptionCallback; - - int tail = 0; - bool running = false; - IEnumerator[] coroutines = new IEnumerator[InitialSize]; - Queue waitQueue = new Queue(); - - public MicroCoroutine(Action unhandledExceptionCallback) - { - this.unhandledExceptionCallback = unhandledExceptionCallback; - } - - public void AddCoroutine(IEnumerator enumerator) - { - lock (runningAndQueueLock) - { - if (running) - { - waitQueue.Enqueue(enumerator); - return; - } - } - - // worst case at multi threading, wait lock until finish Run() but it is super rarely. - lock (arrayLock) - { - // Ensure Capacity - if (coroutines.Length == tail) - { - Array.Resize(ref coroutines, checked(tail * 2)); - } - coroutines[tail++] = enumerator; - } - } - - public void Run() - { - lock (runningAndQueueLock) - { - running = true; - } - - lock (arrayLock) - { - var j = tail - 1; - - // eliminate array-bound check for i - for (int i = 0; i < coroutines.Length; i++) - { - var coroutine = coroutines[i]; - if (coroutine != null) - { - try - { - if (!coroutine.MoveNext()) - { - coroutines[i] = null; - } - else - { -#if UNITY_EDITOR - // validation only on Editor. - if (coroutine.Current != null) - { - UnityEngine.Debug.LogWarning("MicroCoroutine supports only yield return null. return value = " + coroutine.Current); - } -#endif - - continue; // next i - } - } - catch (Exception ex) - { - coroutines[i] = null; - try - { - unhandledExceptionCallback(ex); - } - catch { } - } - } - - // find null, loop from tail - while (i < j) - { - var fromTail = coroutines[j]; - if (fromTail != null) - { - try - { - if (!fromTail.MoveNext()) - { - coroutines[j] = null; - j--; - continue; // next j - } - else - { -#if UNITY_EDITOR - // validation only on Editor. - if (fromTail.Current != null) - { - UnityEngine.Debug.LogWarning("MicroCoroutine supports only yield return null. return value = " + coroutine.Current); - } -#endif - - // swap - coroutines[i] = fromTail; - coroutines[j] = null; - j--; - goto NEXT_LOOP; // next i - } - } - catch (Exception ex) - { - coroutines[j] = null; - j--; - try - { - unhandledExceptionCallback(ex); - } - catch { } - continue; // next j - } - } - else - { - j--; - } - } - - tail = i; // loop end - break; // LOOP END - - NEXT_LOOP: - continue; - } - - - lock (runningAndQueueLock) - { - running = false; - while (waitQueue.Count != 0) - { - if (coroutines.Length == tail) - { - Array.Resize(ref coroutines, checked(tail * 2)); - } - coroutines[tail++] = waitQueue.Dequeue(); - } - } - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/InternalUtil/MicroCoroutine.cs.meta b/Assets/Plugins/UniRx/Scripts/InternalUtil/MicroCoroutine.cs.meta deleted file mode 100644 index e1f9e44..0000000 --- a/Assets/Plugins/UniRx/Scripts/InternalUtil/MicroCoroutine.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 108be6d634275c94a95eeb2a39de0792 -timeCreated: 1462599042 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/InternalUtil/PriorityQueue.cs b/Assets/Plugins/UniRx/Scripts/InternalUtil/PriorityQueue.cs deleted file mode 100644 index 73b6ca5..0000000 --- a/Assets/Plugins/UniRx/Scripts/InternalUtil/PriorityQueue.cs +++ /dev/null @@ -1,149 +0,0 @@ -// this code is borrowed from RxOfficial(rx.codeplex.com) and modified - -using System; -using System.Collections.Generic; -using System.Text; -using System.Threading; - -namespace UniRx.InternalUtil -{ - internal class PriorityQueue where T : IComparable - { - private static long _count = long.MinValue; - - private IndexedItem[] _items; - private int _size; - - public PriorityQueue() - : this(16) - { - } - - public PriorityQueue(int capacity) - { - _items = new IndexedItem[capacity]; - _size = 0; - } - - private bool IsHigherPriority(int left, int right) - { - return _items[left].CompareTo(_items[right]) < 0; - } - - private void Percolate(int index) - { - if (index >= _size || index < 0) - return; - var parent = (index - 1) / 2; - if (parent < 0 || parent == index) - return; - - if (IsHigherPriority(index, parent)) - { - var temp = _items[index]; - _items[index] = _items[parent]; - _items[parent] = temp; - Percolate(parent); - } - } - - private void Heapify() - { - Heapify(0); - } - - private void Heapify(int index) - { - if (index >= _size || index < 0) - return; - - var left = 2 * index + 1; - var right = 2 * index + 2; - var first = index; - - if (left < _size && IsHigherPriority(left, first)) - first = left; - if (right < _size && IsHigherPriority(right, first)) - first = right; - if (first != index) - { - var temp = _items[index]; - _items[index] = _items[first]; - _items[first] = temp; - Heapify(first); - } - } - - public int Count { get { return _size; } } - - public T Peek() - { - if (_size == 0) - throw new InvalidOperationException("HEAP is Empty"); - - return _items[0].Value; - } - - private void RemoveAt(int index) - { - _items[index] = _items[--_size]; - _items[_size] = default(IndexedItem); - Heapify(); - if (_size < _items.Length / 4) - { - var temp = _items; - _items = new IndexedItem[_items.Length / 2]; - Array.Copy(temp, 0, _items, 0, _size); - } - } - - public T Dequeue() - { - var result = Peek(); - RemoveAt(0); - return result; - } - - public void Enqueue(T item) - { - if (_size >= _items.Length) - { - var temp = _items; - _items = new IndexedItem[_items.Length * 2]; - Array.Copy(temp, _items, temp.Length); - } - - var index = _size++; - _items[index] = new IndexedItem { Value = item, Id = Interlocked.Increment(ref _count) }; - Percolate(index); - } - - public bool Remove(T item) - { - for (var i = 0; i < _size; ++i) - { - if (EqualityComparer.Default.Equals(_items[i].Value, item)) - { - RemoveAt(i); - return true; - } - } - - return false; - } - - struct IndexedItem : IComparable - { - public T Value; - public long Id; - - public int CompareTo(IndexedItem other) - { - var c = Value.CompareTo(other.Value); - if (c == 0) - c = Id.CompareTo(other.Id); - return c; - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/InternalUtil/PriorityQueue.cs.meta b/Assets/Plugins/UniRx/Scripts/InternalUtil/PriorityQueue.cs.meta deleted file mode 100644 index 142c4fb..0000000 --- a/Assets/Plugins/UniRx/Scripts/InternalUtil/PriorityQueue.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 7956b408e24dc5a4884fe4f5a3d7c858 -timeCreated: 1455373899 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/InternalUtil/ScheduledItem.cs b/Assets/Plugins/UniRx/Scripts/InternalUtil/ScheduledItem.cs deleted file mode 100644 index 6f75d51..0000000 --- a/Assets/Plugins/UniRx/Scripts/InternalUtil/ScheduledItem.cs +++ /dev/null @@ -1,257 +0,0 @@ -// this code is borrowed from RxOfficial(rx.codeplex.com) and modified - -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. - -using System; -using System.Collections.Generic; - -namespace UniRx.InternalUtil -{ - /// - /// Abstract base class for scheduled work items. - /// - internal class ScheduledItem : IComparable - { - private readonly BooleanDisposable _disposable = new BooleanDisposable(); - private readonly TimeSpan _dueTime; - private readonly Action _action; - - /// - /// Creates a new scheduled work item to run at the specified time. - /// - /// Absolute time at which the work item has to be executed. - public ScheduledItem(Action action, TimeSpan dueTime) - { - _dueTime = dueTime; - _action = action; - } - - /// - /// Gets the absolute time at which the item is due for invocation. - /// - public TimeSpan DueTime - { - get { return _dueTime; } - } - - /// - /// Invokes the work item. - /// - public void Invoke() - { - if (!_disposable.IsDisposed) - { - _action(); - } - } - - #region Inequality - - /// - /// Compares the work item with another work item based on absolute time values. - /// - /// Work item to compare the current work item to. - /// Relative ordering between this and the specified work item. - /// The inequality operators are overloaded to provide results consistent with the IComparable implementation. Equality operators implement traditional reference equality semantics. - public int CompareTo(ScheduledItem other) - { - // MSDN: By definition, any object compares greater than null, and two null references compare equal to each other. - if (object.ReferenceEquals(other, null)) - return 1; - - return DueTime.CompareTo(other.DueTime); - } - - /// - /// Determines whether one specified ScheduledItem<TAbsolute> object is due before a second specified ScheduledItem<TAbsolute> object. - /// - /// The first object to compare. - /// The second object to compare. - /// true if the DueTime value of left is earlier than the DueTime value of right; otherwise, false. - /// This operator provides results consistent with the IComparable implementation. - public static bool operator <(ScheduledItem left, ScheduledItem right) - { - return left.CompareTo(right) < 0; - } - - /// - /// Determines whether one specified ScheduledItem<TAbsolute> object is due before or at the same of a second specified ScheduledItem<TAbsolute> object. - /// - /// The first object to compare. - /// The second object to compare. - /// true if the DueTime value of left is earlier than or simultaneous with the DueTime value of right; otherwise, false. - /// This operator provides results consistent with the IComparable implementation. - public static bool operator <=(ScheduledItem left, ScheduledItem right) - { - return left.CompareTo(right) <= 0; - } - - /// - /// Determines whether one specified ScheduledItem<TAbsolute> object is due after a second specified ScheduledItem<TAbsolute> object. - /// - /// The first object to compare. - /// The second object to compare. - /// true if the DueTime value of left is later than the DueTime value of right; otherwise, false. - /// This operator provides results consistent with the IComparable implementation. - public static bool operator >(ScheduledItem left, ScheduledItem right) - { - return left.CompareTo(right) > 0; - } - - /// - /// Determines whether one specified ScheduledItem<TAbsolute> object is due after or at the same time of a second specified ScheduledItem<TAbsolute> object. - /// - /// The first object to compare. - /// The second object to compare. - /// true if the DueTime value of left is later than or simultaneous with the DueTime value of right; otherwise, false. - /// This operator provides results consistent with the IComparable implementation. - public static bool operator >=(ScheduledItem left, ScheduledItem right) - { - return left.CompareTo(right) >= 0; - } - - #endregion - - #region Equality - - /// - /// Determines whether two specified ScheduledItem<TAbsolute, TValue> objects are equal. - /// - /// The first object to compare. - /// The second object to compare. - /// true if both ScheduledItem<TAbsolute, TValue> are equal; otherwise, false. - /// This operator does not provide results consistent with the IComparable implementation. Instead, it implements reference equality. - public static bool operator ==(ScheduledItem left, ScheduledItem right) - { - return object.ReferenceEquals(left, right); - } - - /// - /// Determines whether two specified ScheduledItem<TAbsolute, TValue> objects are inequal. - /// - /// The first object to compare. - /// The second object to compare. - /// true if both ScheduledItem<TAbsolute, TValue> are inequal; otherwise, false. - /// This operator does not provide results consistent with the IComparable implementation. Instead, it implements reference equality. - public static bool operator !=(ScheduledItem left, ScheduledItem right) - { - return !(left == right); - } - - /// - /// Determines whether a ScheduledItem<TAbsolute> object is equal to the specified object. - /// - /// The object to compare to the current ScheduledItem<TAbsolute> object. - /// true if the obj parameter is a ScheduledItem<TAbsolute> object and is equal to the current ScheduledItem<TAbsolute> object; otherwise, false. - public override bool Equals(object obj) - { - return object.ReferenceEquals(this, obj); - } - - /// - /// Returns the hash code for the current ScheduledItem<TAbsolute> object. - /// - /// A 32-bit signed integer hash code. - public override int GetHashCode() - { - return base.GetHashCode(); - } - - #endregion - - public IDisposable Cancellation - { - get - { - return _disposable; - } - } - - /// - /// Gets whether the work item has received a cancellation request. - /// - public bool IsCanceled - { - get { return _disposable.IsDisposed; } - } - } - - /// - /// Efficient scheduler queue that maintains scheduled items sorted by absolute time. - /// - /// This type is not thread safe; users should ensure proper synchronization. - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1711:IdentifiersShouldNotHaveIncorrectSuffix", Justification = "But it *is* a queue!")] - internal class SchedulerQueue - { - private readonly PriorityQueue _queue; - - /// - /// Creates a new scheduler queue with a default initial capacity. - /// - public SchedulerQueue() - : this(1024) - { - } - - /// - /// Creats a new scheduler queue with the specified initial capacity. - /// - /// Initial capacity of the scheduler queue. - /// is less than zero. - public SchedulerQueue(int capacity) - { - if (capacity < 0) - throw new ArgumentOutOfRangeException("capacity"); - - _queue = new PriorityQueue(capacity); - } - - /// - /// Gets the number of scheduled items in the scheduler queue. - /// - public int Count - { - get - { - return _queue.Count; - } - } - - /// - /// Enqueues the specified work item to be scheduled. - /// - /// Work item to be scheduled. - public void Enqueue(ScheduledItem scheduledItem) - { - _queue.Enqueue(scheduledItem); - } - - /// - /// Removes the specified work item from the scheduler queue. - /// - /// Work item to be removed from the scheduler queue. - /// true if the item was found; false otherwise. - public bool Remove(ScheduledItem scheduledItem) - { - return _queue.Remove(scheduledItem); - } - - /// - /// Dequeues the next work item from the scheduler queue. - /// - /// Next work item in the scheduler queue (removed). - public ScheduledItem Dequeue() - { - return _queue.Dequeue(); - } - - /// - /// Peeks the next work item in the scheduler queue. - /// - /// Next work item in the scheduler queue (not removed). - public ScheduledItem Peek() - { - return _queue.Peek(); - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/InternalUtil/ScheduledItem.cs.meta b/Assets/Plugins/UniRx/Scripts/InternalUtil/ScheduledItem.cs.meta deleted file mode 100644 index 91514e6..0000000 --- a/Assets/Plugins/UniRx/Scripts/InternalUtil/ScheduledItem.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 45457ee4a77967347828238b7a52b851 -timeCreated: 1455373898 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/InternalUtil/ThreadSafeQueueWorker.cs b/Assets/Plugins/UniRx/Scripts/InternalUtil/ThreadSafeQueueWorker.cs deleted file mode 100644 index 6829326..0000000 --- a/Assets/Plugins/UniRx/Scripts/InternalUtil/ThreadSafeQueueWorker.cs +++ /dev/null @@ -1,112 +0,0 @@ -using System; - -namespace UniRx.InternalUtil -{ - public class ThreadSafeQueueWorker - { - const int MaxArrayLength = 0X7FEFFFFF; - const int InitialSize = 16; - - object gate = new object(); - bool dequing = false; - - int actionListCount = 0; - Action[] actionList = new Action[InitialSize]; - object[] actionStates = new object[InitialSize]; - - int waitingListCount = 0; - Action[] waitingList = new Action[InitialSize]; - object[] waitingStates = new object[InitialSize]; - - public void Enqueue(Action action, object state) - { - lock (gate) - { - if (dequing) - { - // Ensure Capacity - if (waitingList.Length == waitingListCount) - { - var newLength = waitingListCount * 2; - if ((uint)newLength > MaxArrayLength) newLength = MaxArrayLength; - - var newArray = new Action[newLength]; - var newArrayState = new object[newLength]; - Array.Copy(waitingList, newArray, waitingListCount); - Array.Copy(waitingStates, newArrayState, waitingListCount); - waitingList = newArray; - waitingStates = newArrayState; - } - waitingList[waitingListCount] = action; - waitingStates[waitingListCount] = state; - waitingListCount++; - } - else - { - // Ensure Capacity - if (actionList.Length == actionListCount) - { - var newLength = actionListCount * 2; - if ((uint)newLength > MaxArrayLength) newLength = MaxArrayLength; - - var newArray = new Action[newLength]; - var newArrayState = new object[newLength]; - Array.Copy(actionList, newArray, actionListCount); - Array.Copy(actionStates, newArrayState, actionListCount); - actionList = newArray; - actionStates = newArrayState; - } - actionList[actionListCount] = action; - actionStates[actionListCount] = state; - actionListCount++; - } - } - } - - public void ExecuteAll(Action unhandledExceptionCallback) - { - lock (gate) - { - if (actionListCount == 0) return; - - dequing = true; - } - - for (int i = 0; i < actionListCount; i++) - { - var action = actionList[i]; - var state = actionStates[i]; - try - { - action(state); - } - catch (Exception ex) - { - unhandledExceptionCallback(ex); - } - finally - { - // Clear - actionList[i] = null; - actionStates[i] = null; - } - } - - lock (gate) - { - dequing = false; - - var swapTempActionList = actionList; - var swapTempActionStates = actionStates; - - actionListCount = waitingListCount; - actionList = waitingList; - actionStates = waitingStates; - - waitingListCount = 0; - waitingList = swapTempActionList; - waitingStates = swapTempActionStates; - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/InternalUtil/ThreadSafeQueueWorker.cs.meta b/Assets/Plugins/UniRx/Scripts/InternalUtil/ThreadSafeQueueWorker.cs.meta deleted file mode 100644 index a1b4b1e..0000000 --- a/Assets/Plugins/UniRx/Scripts/InternalUtil/ThreadSafeQueueWorker.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 768cbfcbe2a8e704a8953eea28cd33df -timeCreated: 1455373899 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Notification.cs b/Assets/Plugins/UniRx/Scripts/Notification.cs deleted file mode 100644 index a044162..0000000 --- a/Assets/Plugins/UniRx/Scripts/Notification.cs +++ /dev/null @@ -1,678 +0,0 @@ -// original code from rx.codeplex.com -// some modified. - -/* ------------------ */ - -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. - -using System.Diagnostics; -using System.Globalization; -using System.Collections.Generic; -using System; -using UniRx.InternalUtil; - -#pragma warning disable 0659 -#pragma warning disable 0661 - -namespace UniRx -{ - /// - /// Provides a mechanism for receiving push-based notifications and returning a response. - /// - /// - /// The type of the elements received by the observer. - /// This type parameter is contravariant. That is, you can use either the type you specified or any type that is less derived. For more information about covariance and contravariance, see Covariance and Contravariance in Generics. - /// - /// - /// The type of the result returned from the observer's notification handlers. - /// This type parameter is covariant. That is, you can use either the type you specified or any type that is more derived. For more information about covariance and contravariance, see Covariance and Contravariance in Generics. - /// - public interface IObserver - { - /// - /// Notifies the observer of a new element in the sequence. - /// - /// The new element in the sequence. - /// Result returned upon observation of a new element. - TResult OnNext(TValue value); - - /// - /// Notifies the observer that an exception has occurred. - /// - /// The exception that occurred. - /// Result returned upon observation of an error. - TResult OnError(Exception exception); - - /// - /// Notifies the observer of the end of the sequence. - /// - /// Result returned upon observation of the sequence completion. - TResult OnCompleted(); - } - - /// - /// Indicates the type of a notification. - /// - public enum NotificationKind - { - /// - /// Represents an OnNext notification. - /// - OnNext, - - /// - /// Represents an OnError notification. - /// - OnError, - - /// - /// Represents an OnCompleted notification. - /// - OnCompleted - } - - /// - /// Represents a notification to an observer. - /// - /// The type of the elements received by the observer. - [Serializable] - public abstract class Notification : IEquatable> - { - /// - /// Default constructor used by derived types. - /// - protected internal Notification() - { - } - - /// - /// Returns the value of an OnNext notification or throws an exception. - /// - public abstract T Value - { - get; - } - - /// - /// Returns a value that indicates whether the notification has a value. - /// - public abstract bool HasValue - { - get; - } - - /// - /// Returns the exception of an OnError notification or returns null. - /// - public abstract Exception Exception - { - get; - } - - /// - /// Gets the kind of notification that is represented. - /// - public abstract NotificationKind Kind - { - get; - } - - /// - /// Represents an OnNext notification to an observer. - /// - [DebuggerDisplay("OnNext({Value})")] - [Serializable] - internal sealed class OnNextNotification : Notification - { - T value; - - /// - /// Constructs a notification of a new value. - /// - public OnNextNotification(T value) - { - this.value = value; - } - - /// - /// Returns the value of an OnNext notification. - /// - public override T Value { get { return value; } } - - /// - /// Returns null. - /// - public override Exception Exception { get { return null; } } - - /// - /// Returns true. - /// - public override bool HasValue { get { return true; } } - - /// - /// Returns NotificationKind.OnNext. - /// - public override NotificationKind Kind { get { return NotificationKind.OnNext; } } - - /// - /// Returns the hash code for this instance. - /// - public override int GetHashCode() - { - return EqualityComparer.Default.GetHashCode(Value); - } - - /// - /// Indicates whether this instance and a specified object are equal. - /// - public override bool Equals(Notification other) - { - if (Object.ReferenceEquals(this, other)) - return true; - if (Object.ReferenceEquals(other, null)) - return false; - if (other.Kind != NotificationKind.OnNext) - return false; - return EqualityComparer.Default.Equals(Value, other.Value); - } - - /// - /// Returns a string representation of this instance. - /// - public override string ToString() - { - return String.Format(CultureInfo.CurrentCulture, "OnNext({0})", Value); - } - - /// - /// Invokes the observer's method corresponding to the notification. - /// - /// Observer to invoke the notification on. - public override void Accept(IObserver observer) - { - if (observer == null) - throw new ArgumentNullException("observer"); - - observer.OnNext(Value); - } - - /// - /// Invokes the observer's method corresponding to the notification and returns the produced result. - /// - /// Observer to invoke the notification on. - /// Result produced by the observation. - public override TResult Accept(IObserver observer) - { - if (observer == null) - throw new ArgumentNullException("observer"); - - return observer.OnNext(Value); - } - - /// - /// Invokes the delegate corresponding to the notification. - /// - /// Delegate to invoke for an OnNext notification. - /// Delegate to invoke for an OnError notification. - /// Delegate to invoke for an OnCompleted notification. - public override void Accept(Action onNext, Action onError, Action onCompleted) - { - if (onNext == null) - throw new ArgumentNullException("onNext"); - if (onError == null) - throw new ArgumentNullException("onError"); - if (onCompleted == null) - throw new ArgumentNullException("onCompleted"); - - onNext(Value); - } - - /// - /// Invokes the delegate corresponding to the notification and returns the produced result. - /// - /// Delegate to invoke for an OnNext notification. - /// Delegate to invoke for an OnError notification. - /// Delegate to invoke for an OnCompleted notification. - /// Result produced by the observation. - public override TResult Accept(Func onNext, Func onError, Func onCompleted) - { - if (onNext == null) - throw new ArgumentNullException("onNext"); - if (onError == null) - throw new ArgumentNullException("onError"); - if (onCompleted == null) - throw new ArgumentNullException("onCompleted"); - - return onNext(Value); - } - } - - /// - /// Represents an OnError notification to an observer. - /// -#if !NO_DEBUGGER_ATTRIBUTES - [DebuggerDisplay("OnError({Exception})")] -#endif -#if !NO_SERIALIZABLE - [Serializable] -#endif - internal sealed class OnErrorNotification : Notification - { - Exception exception; - - /// - /// Constructs a notification of an exception. - /// - public OnErrorNotification(Exception exception) - { - this.exception = exception; - } - - /// - /// Throws the exception. - /// - public override T Value { get { exception.Throw(); throw exception; } } - - /// - /// Returns the exception. - /// - public override Exception Exception { get { return exception; } } - - /// - /// Returns false. - /// - public override bool HasValue { get { return false; } } - - /// - /// Returns NotificationKind.OnError. - /// - public override NotificationKind Kind { get { return NotificationKind.OnError; } } - - /// - /// Returns the hash code for this instance. - /// - public override int GetHashCode() - { - return Exception.GetHashCode(); - } - - /// - /// Indicates whether this instance and other are equal. - /// - public override bool Equals(Notification other) - { - if (Object.ReferenceEquals(this, other)) - return true; - if (Object.ReferenceEquals(other, null)) - return false; - if (other.Kind != NotificationKind.OnError) - return false; - return Object.Equals(Exception, other.Exception); - } - - /// - /// Returns a string representation of this instance. - /// - public override string ToString() - { - return String.Format(CultureInfo.CurrentCulture, "OnError({0})", Exception.GetType().FullName); - } - - /// - /// Invokes the observer's method corresponding to the notification. - /// - /// Observer to invoke the notification on. - public override void Accept(IObserver observer) - { - if (observer == null) - throw new ArgumentNullException("observer"); - - observer.OnError(Exception); - } - - /// - /// Invokes the observer's method corresponding to the notification and returns the produced result. - /// - /// Observer to invoke the notification on. - /// Result produced by the observation. - public override TResult Accept(IObserver observer) - { - if (observer == null) - throw new ArgumentNullException("observer"); - - return observer.OnError(Exception); - } - - /// - /// Invokes the delegate corresponding to the notification. - /// - /// Delegate to invoke for an OnNext notification. - /// Delegate to invoke for an OnError notification. - /// Delegate to invoke for an OnCompleted notification. - public override void Accept(Action onNext, Action onError, Action onCompleted) - { - if (onNext == null) - throw new ArgumentNullException("onNext"); - if (onError == null) - throw new ArgumentNullException("onError"); - if (onCompleted == null) - throw new ArgumentNullException("onCompleted"); - - onError(Exception); - } - - /// - /// Invokes the delegate corresponding to the notification and returns the produced result. - /// - /// Delegate to invoke for an OnNext notification. - /// Delegate to invoke for an OnError notification. - /// Delegate to invoke for an OnCompleted notification. - /// Result produced by the observation. - public override TResult Accept(Func onNext, Func onError, Func onCompleted) - { - if (onNext == null) - throw new ArgumentNullException("onNext"); - if (onError == null) - throw new ArgumentNullException("onError"); - if (onCompleted == null) - throw new ArgumentNullException("onCompleted"); - - return onError(Exception); - } - } - - /// - /// Represents an OnCompleted notification to an observer. - /// - [DebuggerDisplay("OnCompleted()")] - [Serializable] - internal sealed class OnCompletedNotification : Notification - { - /// - /// Constructs a notification of the end of a sequence. - /// - public OnCompletedNotification() - { - } - - /// - /// Throws an InvalidOperationException. - /// - public override T Value { get { throw new InvalidOperationException("No Value"); } } - - /// - /// Returns null. - /// - public override Exception Exception { get { return null; } } - - /// - /// Returns false. - /// - public override bool HasValue { get { return false; } } - - /// - /// Returns NotificationKind.OnCompleted. - /// - public override NotificationKind Kind { get { return NotificationKind.OnCompleted; } } - - /// - /// Returns the hash code for this instance. - /// - public override int GetHashCode() - { - return typeof(T).GetHashCode() ^ 8510; - } - - /// - /// Indicates whether this instance and other are equal. - /// - public override bool Equals(Notification other) - { - if (Object.ReferenceEquals(this, other)) - return true; - if (Object.ReferenceEquals(other, null)) - return false; - return other.Kind == NotificationKind.OnCompleted; - } - - /// - /// Returns a string representation of this instance. - /// - public override string ToString() - { - return "OnCompleted()"; - } - - /// - /// Invokes the observer's method corresponding to the notification. - /// - /// Observer to invoke the notification on. - public override void Accept(IObserver observer) - { - if (observer == null) - throw new ArgumentNullException("observer"); - - observer.OnCompleted(); - } - - /// - /// Invokes the observer's method corresponding to the notification and returns the produced result. - /// - /// Observer to invoke the notification on. - /// Result produced by the observation. - public override TResult Accept(IObserver observer) - { - if (observer == null) - throw new ArgumentNullException("observer"); - - return observer.OnCompleted(); - } - - /// - /// Invokes the delegate corresponding to the notification. - /// - /// Delegate to invoke for an OnNext notification. - /// Delegate to invoke for an OnError notification. - /// Delegate to invoke for an OnCompleted notification. - public override void Accept(Action onNext, Action onError, Action onCompleted) - { - if (onNext == null) - throw new ArgumentNullException("onNext"); - if (onError == null) - throw new ArgumentNullException("onError"); - if (onCompleted == null) - throw new ArgumentNullException("onCompleted"); - - onCompleted(); - } - - /// - /// Invokes the delegate corresponding to the notification and returns the produced result. - /// - /// Delegate to invoke for an OnNext notification. - /// Delegate to invoke for an OnError notification. - /// Delegate to invoke for an OnCompleted notification. - /// Result produced by the observation. - public override TResult Accept(Func onNext, Func onError, Func onCompleted) - { - if (onNext == null) - throw new ArgumentNullException("onNext"); - if (onError == null) - throw new ArgumentNullException("onError"); - if (onCompleted == null) - throw new ArgumentNullException("onCompleted"); - - return onCompleted(); - } - } - - /// - /// Determines whether the current Notification<T> object has the same observer message payload as a specified Notification<T> value. - /// - /// An object to compare to the current Notification<T> object. - /// true if both Notification<T> objects have the same observer message payload; otherwise, false. - /// - /// Equality of Notification<T> objects is based on the equality of the observer message payload they represent, including the notification Kind and the Value or Exception (if any). - /// This means two Notification<T> objects can be equal even though they don't represent the same observer method call, but have the same Kind and have equal parameters passed to the observer method. - /// In case one wants to determine whether two Notification<T> objects represent the same observer method call, use Object.ReferenceEquals identity equality instead. - /// - public abstract bool Equals(Notification other); - - /// - /// Determines whether the two specified Notification<T> objects have the same observer message payload. - /// - /// The first Notification<T> to compare, or null. - /// The second Notification<T> to compare, or null. - /// true if the first Notification<T> value has the same observer message payload as the second Notification<T> value; otherwise, false. - /// - /// Equality of Notification<T> objects is based on the equality of the observer message payload they represent, including the notification Kind and the Value or Exception (if any). - /// This means two Notification<T> objects can be equal even though they don't represent the same observer method call, but have the same Kind and have equal parameters passed to the observer method. - /// In case one wants to determine whether two Notification<T> objects represent the same observer method call, use Object.ReferenceEquals identity equality instead. - /// - public static bool operator ==(Notification left, Notification right) - { - if (object.ReferenceEquals(left, right)) - return true; - - if ((object)left == null || (object)right == null) - return false; - - return left.Equals(right); - } - - /// - /// Determines whether the two specified Notification<T> objects have a different observer message payload. - /// - /// The first Notification<T> to compare, or null. - /// The second Notification<T> to compare, or null. - /// true if the first Notification<T> value has a different observer message payload as the second Notification<T> value; otherwise, false. - /// - /// Equality of Notification<T> objects is based on the equality of the observer message payload they represent, including the notification Kind and the Value or Exception (if any). - /// This means two Notification<T> objects can be equal even though they don't represent the same observer method call, but have the same Kind and have equal parameters passed to the observer method. - /// In case one wants to determine whether two Notification<T> objects represent a different observer method call, use Object.ReferenceEquals identity equality instead. - /// - public static bool operator !=(Notification left, Notification right) - { - return !(left == right); - } - - /// - /// Determines whether the specified System.Object is equal to the current Notification<T>. - /// - /// The System.Object to compare with the current Notification<T>. - /// true if the specified System.Object is equal to the current Notification<T>; otherwise, false. - /// - /// Equality of Notification<T> objects is based on the equality of the observer message payload they represent, including the notification Kind and the Value or Exception (if any). - /// This means two Notification<T> objects can be equal even though they don't represent the same observer method call, but have the same Kind and have equal parameters passed to the observer method. - /// In case one wants to determine whether two Notification<T> objects represent the same observer method call, use Object.ReferenceEquals identity equality instead. - /// - public override bool Equals(object obj) - { - return Equals(obj as Notification); - } - - /// - /// Invokes the observer's method corresponding to the notification. - /// - /// Observer to invoke the notification on. - public abstract void Accept(IObserver observer); - - /// - /// Invokes the observer's method corresponding to the notification and returns the produced result. - /// - /// The type of the result returned from the observer's notification handlers. - /// Observer to invoke the notification on. - /// Result produced by the observation. - public abstract TResult Accept(IObserver observer); - - /// - /// Invokes the delegate corresponding to the notification. - /// - /// Delegate to invoke for an OnNext notification. - /// Delegate to invoke for an OnError notification. - /// Delegate to invoke for an OnCompleted notification. - public abstract void Accept(Action onNext, Action onError, Action onCompleted); - - /// - /// Invokes the delegate corresponding to the notification and returns the produced result. - /// - /// The type of the result returned from the notification handler delegates. - /// Delegate to invoke for an OnNext notification. - /// Delegate to invoke for an OnError notification. - /// Delegate to invoke for an OnCompleted notification. - /// Result produced by the observation. - public abstract TResult Accept(Func onNext, Func onError, Func onCompleted); - - /// - /// Returns an observable sequence with a single notification, using the immediate scheduler. - /// - /// The observable sequence that surfaces the behavior of the notification upon subscription. - public IObservable ToObservable() - { - return this.ToObservable(Scheduler.Immediate); - } - - /// - /// Returns an observable sequence with a single notification. - /// - /// Scheduler to send out the notification calls on. - /// The observable sequence that surfaces the behavior of the notification upon subscription. - public IObservable ToObservable(IScheduler scheduler) - { - if (scheduler == null) - throw new ArgumentNullException("scheduler"); - - return Observable.Create(observer => scheduler.Schedule(() => - { - this.Accept(observer); - if (this.Kind == NotificationKind.OnNext) - observer.OnCompleted(); - })); - } - } - - /// - /// Provides a set of static methods for constructing notifications. - /// - public static class Notification - { - /// - /// Creates an object that represents an OnNext notification to an observer. - /// - /// The type of the elements received by the observer. Upon dematerialization of the notifications into an observable sequence, this type is used as the element type for the sequence. - /// The value contained in the notification. - /// The OnNext notification containing the value. - public static Notification CreateOnNext(T value) - { - return new Notification.OnNextNotification(value); - } - - /// - /// Creates an object that represents an OnError notification to an observer. - /// - /// The type of the elements received by the observer. Upon dematerialization of the notifications into an observable sequence, this type is used as the element type for the sequence. - /// The exception contained in the notification. - /// The OnError notification containing the exception. - /// is null. - public static Notification CreateOnError(Exception error) - { - if (error == null) - throw new ArgumentNullException("error"); - - return new Notification.OnErrorNotification(error); - } - - /// - /// Creates an object that represents an OnCompleted notification to an observer. - /// - /// The type of the elements received by the observer. Upon dematerialization of the notifications into an observable sequence, this type is used as the element type for the sequence. - /// The OnCompleted notification. - public static Notification CreateOnCompleted() - { - return new Notification.OnCompletedNotification(); - } - } -} - -#pragma warning restore 0659 -#pragma warning restore 0661 \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Notification.cs.meta b/Assets/Plugins/UniRx/Scripts/Notification.cs.meta deleted file mode 100644 index 75ed5fa..0000000 --- a/Assets/Plugins/UniRx/Scripts/Notification.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 169d02559aa6b3e459fbae10f2acecd8 -timeCreated: 1455373897 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Notifiers.meta b/Assets/Plugins/UniRx/Scripts/Notifiers.meta deleted file mode 100644 index 87b5dc4..0000000 --- a/Assets/Plugins/UniRx/Scripts/Notifiers.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 9f4ecb58b8ce9a0468d541bbe9718dcb -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Notifiers/BooleanNotifier.cs b/Assets/Plugins/UniRx/Scripts/Notifiers/BooleanNotifier.cs deleted file mode 100644 index 77c98ea..0000000 --- a/Assets/Plugins/UniRx/Scripts/Notifiers/BooleanNotifier.cs +++ /dev/null @@ -1,73 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace UniRx -{ - /// - /// Notify boolean flag. - /// - public class BooleanNotifier : IObservable - { - readonly Subject boolTrigger = new Subject(); - - bool boolValue; - /// Current flag value - public bool Value - { - get { return boolValue; } - set - { - boolValue = value; - boolTrigger.OnNext(value); - } - } - - /// - /// Setup initial flag. - /// - public BooleanNotifier(bool initialValue = false) - { - this.Value = initialValue; - } - - /// - /// Set and raise true if current value isn't true. - /// - public void TurnOn() - { - if (Value != true) - { - Value = true; - } - } - - /// - /// Set and raise false if current value isn't false. - /// - public void TurnOff() - { - if (Value != false) - { - Value = false; - } - } - - /// - /// Set and raise reverse value. - /// - public void SwitchValue() - { - Value = !Value; - } - - - /// - /// Subscribe observer. - /// - public IDisposable Subscribe(IObserver observer) - { - return boolTrigger.Subscribe(observer); - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Notifiers/BooleanNotifier.cs.meta b/Assets/Plugins/UniRx/Scripts/Notifiers/BooleanNotifier.cs.meta deleted file mode 100644 index b2064e0..0000000 --- a/Assets/Plugins/UniRx/Scripts/Notifiers/BooleanNotifier.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 5ee30c0abdddd7241acbe24df0637678 -timeCreated: 1455373899 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Notifiers/CountNotifier.cs b/Assets/Plugins/UniRx/Scripts/Notifiers/CountNotifier.cs deleted file mode 100644 index 9047b96..0000000 --- a/Assets/Plugins/UniRx/Scripts/Notifiers/CountNotifier.cs +++ /dev/null @@ -1,97 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace UniRx -{ - /// Event kind of CountNotifier. - public enum CountChangedStatus - { - /// Count incremented. - Increment, - /// Count decremented. - Decrement, - /// Count is zero. - Empty, - /// Count arrived max. - Max - } - - /// - /// Notify event of count flag. - /// - public class CountNotifier : IObservable - { - readonly object lockObject = new object(); - readonly Subject statusChanged = new Subject(); - readonly int max; - - public int Max { get { return max; } } - public int Count { get; private set; } - - /// - /// Setup max count of signal. - /// - public CountNotifier(int max = int.MaxValue) - { - if (max <= 0) - { - throw new ArgumentException("max"); - } - - this.max = max; - } - - /// - /// Increment count and notify status. - /// - public IDisposable Increment(int incrementCount = 1) - { - if (incrementCount < 0) - { - throw new ArgumentException("incrementCount"); - } - - lock (lockObject) - { - if (Count == Max) return Disposable.Empty; - else if (incrementCount + Count > Max) Count = Max; - else Count += incrementCount; - - statusChanged.OnNext(CountChangedStatus.Increment); - if (Count == Max) statusChanged.OnNext(CountChangedStatus.Max); - - return Disposable.Create(() => this.Decrement(incrementCount)); - } - } - - /// - /// Decrement count and notify status. - /// - public void Decrement(int decrementCount = 1) - { - if (decrementCount < 0) - { - throw new ArgumentException("decrementCount"); - } - - lock (lockObject) - { - if (Count == 0) return; - else if (Count - decrementCount < 0) Count = 0; - else Count -= decrementCount; - - statusChanged.OnNext(CountChangedStatus.Decrement); - if (Count == 0) statusChanged.OnNext(CountChangedStatus.Empty); - } - } - - /// - /// Subscribe observer. - /// - public IDisposable Subscribe(IObserver observer) - { - return statusChanged.Subscribe(observer); - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Notifiers/CountNotifier.cs.meta b/Assets/Plugins/UniRx/Scripts/Notifiers/CountNotifier.cs.meta deleted file mode 100644 index 706bb83..0000000 --- a/Assets/Plugins/UniRx/Scripts/Notifiers/CountNotifier.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 503af1c1dc279164e83011be5110633e -timeCreated: 1455373899 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Notifiers/MessageBroker.cs b/Assets/Plugins/UniRx/Scripts/Notifiers/MessageBroker.cs deleted file mode 100644 index 69a4186..0000000 --- a/Assets/Plugins/UniRx/Scripts/Notifiers/MessageBroker.cs +++ /dev/null @@ -1,209 +0,0 @@ -using System; -using System.Collections.Generic; -using UniRx.InternalUtil; - -namespace UniRx -{ - public interface IMessagePublisher - { - /// - /// Send Message to all receiver. - /// - void Publish(T message); - } - - public interface IMessageReceiver - { - /// - /// Subscribe typed message. - /// - IObservable Receive(); - } - - public interface IMessageBroker : IMessagePublisher, IMessageReceiver - { - } - - public interface IAsyncMessagePublisher - { - /// - /// Send Message to all receiver and await complete. - /// - IObservable PublishAsync(T message); - } - - public interface IAsyncMessageReceiver - { - /// - /// Subscribe typed message. - /// - IDisposable Subscribe(Func> asyncMessageReceiver); - } - - public interface IAsyncMessageBroker : IAsyncMessagePublisher, IAsyncMessageReceiver - { - } - - /// - /// In-Memory PubSub filtered by Type. - /// - public class MessageBroker : IMessageBroker, IDisposable - { - /// - /// MessageBroker in Global scope. - /// - public static readonly IMessageBroker Default = new MessageBroker(); - - bool isDisposed = false; - readonly Dictionary notifiers = new Dictionary(); - - public void Publish(T message) - { - object notifier; - lock (notifiers) - { - if (isDisposed) return; - - if (!notifiers.TryGetValue(typeof(T), out notifier)) - { - return; - } - } - ((ISubject)notifier).OnNext(message); - } - - public IObservable Receive() - { - object notifier; - lock (notifiers) - { - if (isDisposed) throw new ObjectDisposedException("MessageBroker"); - - if (!notifiers.TryGetValue(typeof(T), out notifier)) - { - ISubject n = new Subject().Synchronize(); - notifier = n; - notifiers.Add(typeof(T), notifier); - } - } - - return ((IObservable)notifier).AsObservable(); - } - - public void Dispose() - { - lock (notifiers) - { - if (!isDisposed) - { - isDisposed = true; - notifiers.Clear(); - } - } - } - } - - /// - /// In-Memory PubSub filtered by Type. - /// - public class AsyncMessageBroker : IAsyncMessageBroker, IDisposable - { - /// - /// AsyncMessageBroker in Global scope. - /// - public static readonly IAsyncMessageBroker Default = new AsyncMessageBroker(); - - bool isDisposed = false; - readonly Dictionary notifiers = new Dictionary(); - - public IObservable PublishAsync(T message) - { - UniRx.InternalUtil.ImmutableList>> notifier; - lock (notifiers) - { - if (isDisposed) throw new ObjectDisposedException("AsyncMessageBroker"); - - object _notifier; - if (notifiers.TryGetValue(typeof(T), out _notifier)) - { - notifier = (UniRx.InternalUtil.ImmutableList>>)_notifier; - } - else - { - return Observable.ReturnUnit(); - } - } - - var data = notifier.Data; - var awaiter = new IObservable[data.Length]; - for (int i = 0; i < data.Length; i++) - { - awaiter[i] = data[i].Invoke(message); - } - return Observable.WhenAll(awaiter); - } - - public IDisposable Subscribe(Func> asyncMessageReceiver) - { - lock (notifiers) - { - if (isDisposed) throw new ObjectDisposedException("AsyncMessageBroker"); - - object _notifier; - if (!notifiers.TryGetValue(typeof(T), out _notifier)) - { - var notifier = UniRx.InternalUtil.ImmutableList>>.Empty; - notifier = notifier.Add(asyncMessageReceiver); - notifiers.Add(typeof(T), notifier); - } - else - { - var notifier = (ImmutableList>>)_notifier; - notifier = notifier.Add(asyncMessageReceiver); - notifiers[typeof(T)] = notifier; - } - } - - return new Subscription(this, asyncMessageReceiver); - } - - public void Dispose() - { - lock (notifiers) - { - if (!isDisposed) - { - isDisposed = true; - notifiers.Clear(); - } - } - } - - class Subscription : IDisposable - { - readonly AsyncMessageBroker parent; - readonly Func> asyncMessageReceiver; - - public Subscription(AsyncMessageBroker parent, Func> asyncMessageReceiver) - { - this.parent = parent; - this.asyncMessageReceiver = asyncMessageReceiver; - } - - public void Dispose() - { - lock (parent.notifiers) - { - object _notifier; - if (parent.notifiers.TryGetValue(typeof(T), out _notifier)) - { - var notifier = (ImmutableList>>)_notifier; - notifier = notifier.Remove(asyncMessageReceiver); - - parent.notifiers[typeof(T)] = notifier; - } - } - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Notifiers/MessageBroker.cs.meta b/Assets/Plugins/UniRx/Scripts/Notifiers/MessageBroker.cs.meta deleted file mode 100644 index a678ef5..0000000 --- a/Assets/Plugins/UniRx/Scripts/Notifiers/MessageBroker.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 9dc5e3c48d083d4418ab67287f050267 -timeCreated: 1455373900 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Notifiers/ScheduledNotifier.cs b/Assets/Plugins/UniRx/Scripts/Notifiers/ScheduledNotifier.cs deleted file mode 100644 index c110837..0000000 --- a/Assets/Plugins/UniRx/Scripts/Notifiers/ScheduledNotifier.cs +++ /dev/null @@ -1,72 +0,0 @@ -using System; - -namespace UniRx -{ - /// - /// Notify value on setuped scheduler. - /// - public class ScheduledNotifier : IObservable, IProgress - { - readonly IScheduler scheduler; - readonly Subject trigger = new Subject(); - - /// - /// Use scheduler is Scheduler.DefaultSchedulers.ConstantTimeOperations. - /// - public ScheduledNotifier() - { - this.scheduler = Scheduler.DefaultSchedulers.ConstantTimeOperations; - } - /// - /// Use scheduler is argument's scheduler. - /// - public ScheduledNotifier(IScheduler scheduler) - { - if (scheduler == null) - { - throw new ArgumentNullException("scheduler"); - } - - this.scheduler = scheduler; - } - - /// - /// Push value to subscribers on setuped scheduler. - /// - public void Report(T value) - { - scheduler.Schedule(() => trigger.OnNext(value)); - } - - /// - /// Push value to subscribers on setuped scheduler. - /// - public IDisposable Report(T value, TimeSpan dueTime) - { - var cancel = scheduler.Schedule(dueTime, () => trigger.OnNext(value)); - return cancel; - } - - /// - /// Push value to subscribers on setuped scheduler. - /// - public IDisposable Report(T value, DateTimeOffset dueTime) - { - var cancel = scheduler.Schedule(dueTime, () => trigger.OnNext(value)); - return cancel; - } - - /// - /// Subscribe observer. - /// - public IDisposable Subscribe(IObserver observer) - { - if (observer == null) - { - throw new ArgumentNullException("observer"); - } - - return trigger.Subscribe(observer); - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Notifiers/ScheduledNotifier.cs.meta b/Assets/Plugins/UniRx/Scripts/Notifiers/ScheduledNotifier.cs.meta deleted file mode 100644 index 00a3217..0000000 --- a/Assets/Plugins/UniRx/Scripts/Notifiers/ScheduledNotifier.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: e6f53242e655cbe4e889538216dc9e17 -timeCreated: 1455373901 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Observable.Aggregate.cs b/Assets/Plugins/UniRx/Scripts/Observable.Aggregate.cs deleted file mode 100644 index cb115ff..0000000 --- a/Assets/Plugins/UniRx/Scripts/Observable.Aggregate.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using UniRx.Operators; - -namespace UniRx -{ - public static partial class Observable - { - public static IObservable Scan(this IObservable source, Func accumulator) - { - return new ScanObservable(source, accumulator); - } - - public static IObservable Scan(this IObservable source, TAccumulate seed, Func accumulator) - { - return new ScanObservable(source, seed, accumulator); - } - - public static IObservable Aggregate(this IObservable source, Func accumulator) - { - return new AggregateObservable(source, accumulator); - } - - public static IObservable Aggregate(this IObservable source, TAccumulate seed, Func accumulator) - { - return new AggregateObservable(source, seed, accumulator); - } - - public static IObservable Aggregate(this IObservable source, TAccumulate seed, Func accumulator, Func resultSelector) - { - return new AggregateObservable(source, seed, accumulator, resultSelector); - } - } -} diff --git a/Assets/Plugins/UniRx/Scripts/Observable.Aggregate.cs.meta b/Assets/Plugins/UniRx/Scripts/Observable.Aggregate.cs.meta deleted file mode 100644 index a314e4a..0000000 --- a/Assets/Plugins/UniRx/Scripts/Observable.Aggregate.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 82339dddb2a9f944785f1555b83d667c -timeCreated: 1455373899 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Observable.Awaiter.cs b/Assets/Plugins/UniRx/Scripts/Observable.Awaiter.cs deleted file mode 100644 index 26dd07a..0000000 --- a/Assets/Plugins/UniRx/Scripts/Observable.Awaiter.cs +++ /dev/null @@ -1,133 +0,0 @@ -#if (NET_4_6 || NET_STANDARD_2_0) - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading; -using System.Threading.Tasks; - -namespace UniRx -{ - public static partial class Observable - { - /// - /// Gets an awaiter that returns the last value of the observable sequence or throws an exception if the sequence is empty. - /// This operation subscribes to the observable sequence, making it hot. - /// - /// Source sequence to await. - public static AsyncSubject GetAwaiter(this IObservable source) - { - if (source == null) throw new ArgumentNullException("source"); - - return RunAsync(source, CancellationToken.None); - } - - /// - /// Gets an awaiter that returns the last value of the observable sequence or throws an exception if the sequence is empty. - /// This operation subscribes to the observable sequence, making it hot. - /// - /// Source sequence to await. - public static AsyncSubject GetAwaiter(this IConnectableObservable source) - { - if (source == null) throw new ArgumentNullException("source"); - - return RunAsync(source, CancellationToken.None); - } - - /// - /// Gets an awaiter that returns the last value of the observable sequence or throws an exception if the sequence is empty. - /// This operation subscribes to the observable sequence, making it hot. - /// - /// Source sequence to await. - /// Cancellation token. - public static AsyncSubject GetAwaiter(this IObservable source, CancellationToken cancellationToken) - { - if (source == null) throw new ArgumentNullException("source"); - - return RunAsync(source, cancellationToken); - } - - /// - /// Gets an awaiter that returns the last value of the observable sequence or throws an exception if the sequence is empty. - /// This operation subscribes to the observable sequence, making it hot. - /// - /// Source sequence to await. - /// Cancellation token. - public static AsyncSubject GetAwaiter(this IConnectableObservable source, CancellationToken cancellationToken) - { - if (source == null) throw new ArgumentNullException("source"); - - return RunAsync(source, cancellationToken); - } - - static AsyncSubject RunAsync(IObservable source, CancellationToken cancellationToken) - { - var s = new AsyncSubject(); - - if (cancellationToken.IsCancellationRequested) - { - return Cancel(s, cancellationToken); - } - - var d = source.Subscribe(s); - - if (cancellationToken.CanBeCanceled) - { - RegisterCancelation(s, d, cancellationToken); - } - - return s; - } - - static AsyncSubject RunAsync(IConnectableObservable source, CancellationToken cancellationToken) - { - var s = new AsyncSubject(); - - if (cancellationToken.IsCancellationRequested) - { - return Cancel(s, cancellationToken); - } - - var d = source.Subscribe(s); - var c = source.Connect(); - - if (cancellationToken.CanBeCanceled) - { - RegisterCancelation(s, StableCompositeDisposable.Create(d, c), cancellationToken); - } - - return s; - } - - static AsyncSubject Cancel(AsyncSubject subject, CancellationToken cancellationToken) - { - subject.OnError(new OperationCanceledException(cancellationToken)); - return subject; - } - - static void RegisterCancelation(AsyncSubject subject, IDisposable subscription, CancellationToken token) - { - // - // Separate method used to avoid heap allocation of closure when no cancellation is needed, - // e.g. when CancellationToken.None is provided to the RunAsync overloads. - // - - var ctr = token.Register(() => - { - subscription.Dispose(); - Cancel(subject, token); - }); - - // - // No null-check for ctr is needed: - // - // - CancellationTokenRegistration is a struct - // - Registration will succeed 99% of the time, no warranting an attempt to avoid spurious Subscribe calls - // - subject.Subscribe(Stubs.Ignore, _ => ctr.Dispose(), ctr.Dispose); - } - } -} - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Observable.Awaiter.cs.meta b/Assets/Plugins/UniRx/Scripts/Observable.Awaiter.cs.meta deleted file mode 100644 index 5c5dc21..0000000 --- a/Assets/Plugins/UniRx/Scripts/Observable.Awaiter.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: ec3ea3f22d061964c8f06eb9ea78ec42 -timeCreated: 1475137543 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Observable.Binding.cs b/Assets/Plugins/UniRx/Scripts/Observable.Binding.cs deleted file mode 100644 index 56fcdc6..0000000 --- a/Assets/Plugins/UniRx/Scripts/Observable.Binding.cs +++ /dev/null @@ -1,76 +0,0 @@ -using System; -using UniRx.Operators; - -namespace UniRx -{ - public static partial class Observable - { - public static IConnectableObservable Multicast(this IObservable source, ISubject subject) - { - return new ConnectableObservable(source, subject); - } - - public static IConnectableObservable Publish(this IObservable source) - { - return source.Multicast(new Subject()); - } - - public static IConnectableObservable Publish(this IObservable source, T initialValue) - { - return source.Multicast(new BehaviorSubject(initialValue)); - } - - public static IConnectableObservable PublishLast(this IObservable source) - { - return source.Multicast(new AsyncSubject()); - } - - public static IConnectableObservable Replay(this IObservable source) - { - return source.Multicast(new ReplaySubject()); - } - - public static IConnectableObservable Replay(this IObservable source, IScheduler scheduler) - { - return source.Multicast(new ReplaySubject(scheduler)); - } - - public static IConnectableObservable Replay(this IObservable source, int bufferSize) - { - return source.Multicast(new ReplaySubject(bufferSize)); - } - - public static IConnectableObservable Replay(this IObservable source, int bufferSize, IScheduler scheduler) - { - return source.Multicast(new ReplaySubject(bufferSize, scheduler)); - } - - public static IConnectableObservable Replay(this IObservable source, TimeSpan window) - { - return source.Multicast(new ReplaySubject(window)); - } - - public static IConnectableObservable Replay(this IObservable source, TimeSpan window, IScheduler scheduler) - { - return source.Multicast(new ReplaySubject(window, scheduler)); - } - - public static IConnectableObservable Replay(this IObservable source, int bufferSize, TimeSpan window, IScheduler scheduler) - { - return source.Multicast(new ReplaySubject(bufferSize, window, scheduler)); - } - - public static IObservable RefCount(this IConnectableObservable source) - { - return new RefCountObservable(source); - } - - /// - /// same as Publish().RefCount() - /// - public static IObservable Share(this IObservable source) - { - return source.Publish().RefCount(); - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Observable.Binding.cs.meta b/Assets/Plugins/UniRx/Scripts/Observable.Binding.cs.meta deleted file mode 100644 index b1e96a3..0000000 --- a/Assets/Plugins/UniRx/Scripts/Observable.Binding.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: bb11a562e64264645b76ad3a8d15d966 -timeCreated: 1455373900 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Observable.Blocking.cs b/Assets/Plugins/UniRx/Scripts/Observable.Blocking.cs deleted file mode 100644 index 1f203a0..0000000 --- a/Assets/Plugins/UniRx/Scripts/Observable.Blocking.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; - -namespace UniRx -{ - public static partial class Observable - { - public static T Wait(this IObservable source) - { - return new UniRx.Operators.Wait(source, InfiniteTimeSpan).Run(); - } - - public static T Wait(this IObservable source, TimeSpan timeout) - { - return new UniRx.Operators.Wait(source, timeout).Run(); - } - } -} diff --git a/Assets/Plugins/UniRx/Scripts/Observable.Blocking.cs.meta b/Assets/Plugins/UniRx/Scripts/Observable.Blocking.cs.meta deleted file mode 100644 index 7851640..0000000 --- a/Assets/Plugins/UniRx/Scripts/Observable.Blocking.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 4a05ec8aabbdba24388b7b2ae6c4a474 -timeCreated: 1455373898 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Observable.Concatenate.cs b/Assets/Plugins/UniRx/Scripts/Observable.Concatenate.cs deleted file mode 100644 index 5aff4da..0000000 --- a/Assets/Plugins/UniRx/Scripts/Observable.Concatenate.cs +++ /dev/null @@ -1,320 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using System.Linq; -using UniRx.Operators; - -namespace UniRx -{ - // concatenate multiple observable - // merge, concat, zip... - public static partial class Observable - { - static IEnumerable> CombineSources(IObservable first, IObservable[] seconds) - { - yield return first; - for (int i = 0; i < seconds.Length; i++) - { - yield return seconds[i]; - } - } - - public static IObservable Concat(params IObservable[] sources) - { - if (sources == null) throw new ArgumentNullException("sources"); - - return new ConcatObservable(sources); - } - - public static IObservable Concat(this IEnumerable> sources) - { - if (sources == null) throw new ArgumentNullException("sources"); - - return new ConcatObservable(sources); - } - - public static IObservable Concat(this IObservable> sources) - { - return sources.Merge(maxConcurrent: 1); - } - - public static IObservable Concat(this IObservable first, params IObservable[] seconds) - { - if (first == null) throw new ArgumentNullException("first"); - if (seconds == null) throw new ArgumentNullException("seconds"); - - var concat = first as ConcatObservable; - if (concat != null) - { - return concat.Combine(seconds); - } - - return Concat(CombineSources(first, seconds)); - } - - public static IObservable Merge(this IEnumerable> sources) - { - return Merge(sources, Scheduler.DefaultSchedulers.ConstantTimeOperations); - } - - public static IObservable Merge(this IEnumerable> sources, IScheduler scheduler) - { - return new MergeObservable(sources.ToObservable(scheduler), scheduler == Scheduler.CurrentThread); - } - - public static IObservable Merge(this IEnumerable> sources, int maxConcurrent) - { - return Merge(sources, maxConcurrent, Scheduler.DefaultSchedulers.ConstantTimeOperations); - } - - public static IObservable Merge(this IEnumerable> sources, int maxConcurrent, IScheduler scheduler) - { - return new MergeObservable(sources.ToObservable(scheduler), maxConcurrent, scheduler == Scheduler.CurrentThread); - } - - public static IObservable Merge(params IObservable[] sources) - { - return Merge(Scheduler.DefaultSchedulers.ConstantTimeOperations, sources); - } - - public static IObservable Merge(IScheduler scheduler, params IObservable[] sources) - { - return new MergeObservable(sources.ToObservable(scheduler), scheduler == Scheduler.CurrentThread); - } - - public static IObservable Merge(this IObservable first, params IObservable[] seconds) - { - return Merge(CombineSources(first, seconds)); - } - - public static IObservable Merge(this IObservable first, IObservable second, IScheduler scheduler) - { - return Merge(scheduler, new[] { first, second }); - } - - public static IObservable Merge(this IObservable> sources) - { - return new MergeObservable(sources, false); - } - - public static IObservable Merge(this IObservable> sources, int maxConcurrent) - { - return new MergeObservable(sources, maxConcurrent, false); - } - - public static IObservable Zip(this IObservable left, IObservable right, Func selector) - { - return new ZipObservable(left, right, selector); - } - - public static IObservable> Zip(this IEnumerable> sources) - { - return Zip(sources.ToArray()); - } - - public static IObservable> Zip(params IObservable[] sources) - { - return new ZipObservable(sources); - } - - public static IObservable Zip(this IObservable source1, IObservable source2, IObservable source3, ZipFunc resultSelector) - { - return new ZipObservable(source1, source2, source3, resultSelector); - } - - public static IObservable Zip(this IObservable source1, IObservable source2, IObservable source3, IObservable source4, ZipFunc resultSelector) - { - return new ZipObservable(source1, source2, source3, source4, resultSelector); - } - - public static IObservable Zip(this IObservable source1, IObservable source2, IObservable source3, IObservable source4, IObservable source5, ZipFunc resultSelector) - { - return new ZipObservable(source1, source2, source3, source4, source5, resultSelector); - } - - public static IObservable Zip(this IObservable source1, IObservable source2, IObservable source3, IObservable source4, IObservable source5, IObservable source6, ZipFunc resultSelector) - { - return new ZipObservable(source1, source2, source3, source4, source5, source6, resultSelector); - } - - public static IObservable Zip(this IObservable source1, IObservable source2, IObservable source3, IObservable source4, IObservable source5, IObservable source6, IObservable source7, ZipFunc resultSelector) - { - return new ZipObservable(source1, source2, source3, source4, source5, source6, source7, resultSelector); - } - - public static IObservable CombineLatest(this IObservable left, IObservable right, Func selector) - { - return new CombineLatestObservable(left, right, selector); - } - - public static IObservable> CombineLatest(this IEnumerable> sources) - { - return CombineLatest(sources.ToArray()); - } - - public static IObservable> CombineLatest(params IObservable[] sources) - { - return new CombineLatestObservable(sources); - } - - public static IObservable CombineLatest(this IObservable source1, IObservable source2, IObservable source3, CombineLatestFunc resultSelector) - { - return new CombineLatestObservable(source1, source2, source3, resultSelector); - } - - public static IObservable CombineLatest(this IObservable source1, IObservable source2, IObservable source3, IObservable source4, CombineLatestFunc resultSelector) - { - return new CombineLatestObservable(source1, source2, source3, source4, resultSelector); - } - - public static IObservable CombineLatest(this IObservable source1, IObservable source2, IObservable source3, IObservable source4, IObservable source5, CombineLatestFunc resultSelector) - { - return new CombineLatestObservable(source1, source2, source3, source4, source5, resultSelector); - } - - public static IObservable CombineLatest(this IObservable source1, IObservable source2, IObservable source3, IObservable source4, IObservable source5, IObservable source6, CombineLatestFunc resultSelector) - { - return new CombineLatestObservable(source1, source2, source3, source4, source5, source6, resultSelector); - } - - public static IObservable CombineLatest(this IObservable source1, IObservable source2, IObservable source3, IObservable source4, IObservable source5, IObservable source6, IObservable source7, CombineLatestFunc resultSelector) - { - return new CombineLatestObservable(source1, source2, source3, source4, source5, source6, source7, resultSelector); - } - - public static IObservable ZipLatest(this IObservable left, IObservable right, Func selector) - { - return new ZipLatestObservable(left, right, selector); - } - - public static IObservable> ZipLatest(this IEnumerable> sources) - { - return ZipLatest(sources.ToArray()); - } - - public static IObservable> ZipLatest(params IObservable[] sources) - { - return new ZipLatestObservable(sources); - } - - public static IObservable ZipLatest(this IObservable source1, IObservable source2, IObservable source3, ZipLatestFunc resultSelector) - { - return new ZipLatestObservable(source1, source2, source3, resultSelector); - } - - public static IObservable ZipLatest(this IObservable source1, IObservable source2, IObservable source3, IObservable source4, ZipLatestFunc resultSelector) - { - return new ZipLatestObservable(source1, source2, source3, source4, resultSelector); - } - - public static IObservable ZipLatest(this IObservable source1, IObservable source2, IObservable source3, IObservable source4, IObservable source5, ZipLatestFunc resultSelector) - { - return new ZipLatestObservable(source1, source2, source3, source4, source5, resultSelector); - } - - public static IObservable ZipLatest(this IObservable source1, IObservable source2, IObservable source3, IObservable source4, IObservable source5, IObservable source6, ZipLatestFunc resultSelector) - { - return new ZipLatestObservable(source1, source2, source3, source4, source5, source6, resultSelector); - } - - public static IObservable ZipLatest(this IObservable source1, IObservable source2, IObservable source3, IObservable source4, IObservable source5, IObservable source6, IObservable source7, ZipLatestFunc resultSelector) - { - return new ZipLatestObservable(source1, source2, source3, source4, source5, source6, source7, resultSelector); - } - - public static IObservable Switch(this IObservable> sources) - { - return new SwitchObservable(sources); - } - - public static IObservable WithLatestFrom(this IObservable left, IObservable right, Func selector) - { - return new WithLatestFromObservable(left, right, selector); - } - - /// - /// Specialized for single async operations like Task.WhenAll, Zip.Take(1). - /// If sequence is empty, return T[0] array. - /// - public static IObservable WhenAll(params IObservable[] sources) - { - if (sources.Length == 0) return Observable.Return(new T[0]); - - return new WhenAllObservable(sources); - } - - /// - /// Specialized for single async operations like Task.WhenAll, Zip.Take(1). - /// - public static IObservable WhenAll(params IObservable[] sources) - { - if (sources.Length == 0) return Observable.ReturnUnit(); - - return new WhenAllObservable(sources); - } - - /// - /// Specialized for single async operations like Task.WhenAll, Zip.Take(1). - /// If sequence is empty, return T[0] array. - /// - public static IObservable WhenAll(this IEnumerable> sources) - { - var array = sources as IObservable[]; - if (array != null) return WhenAll(array); - - return new WhenAllObservable(sources); - } - - /// - /// Specialized for single async operations like Task.WhenAll, Zip.Take(1). - /// - public static IObservable WhenAll(this IEnumerable> sources) - { - var array = sources as IObservable[]; - if (array != null) return WhenAll(array); - - return new WhenAllObservable(sources); - } - - public static IObservable StartWith(this IObservable source, T value) - { - return new StartWithObservable(source, value); - } - - public static IObservable StartWith(this IObservable source, Func valueFactory) - { - return new StartWithObservable(source, valueFactory); - } - - public static IObservable StartWith(this IObservable source, params T[] values) - { - return StartWith(source, Scheduler.DefaultSchedulers.ConstantTimeOperations, values); - } - - public static IObservable StartWith(this IObservable source, IEnumerable values) - { - return StartWith(source, Scheduler.DefaultSchedulers.ConstantTimeOperations, values); - } - - public static IObservable StartWith(this IObservable source, IScheduler scheduler, T value) - { - return Observable.Return(value, scheduler).Concat(source); - } - - public static IObservable StartWith(this IObservable source, IScheduler scheduler, IEnumerable values) - { - var array = values as T[]; - if (array == null) - { - array = values.ToArray(); - } - - return StartWith(source, scheduler, array); - } - - public static IObservable StartWith(this IObservable source, IScheduler scheduler, params T[] values) - { - return values.ToObservable(scheduler).Concat(source); - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Observable.Concatenate.cs.meta b/Assets/Plugins/UniRx/Scripts/Observable.Concatenate.cs.meta deleted file mode 100644 index bc8b9d2..0000000 --- a/Assets/Plugins/UniRx/Scripts/Observable.Concatenate.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 18c56bbfaaeedf445874f4246d42b509 -timeCreated: 1455373897 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Observable.Concurrency.cs b/Assets/Plugins/UniRx/Scripts/Observable.Concurrency.cs deleted file mode 100644 index 6519c13..0000000 --- a/Assets/Plugins/UniRx/Scripts/Observable.Concurrency.cs +++ /dev/null @@ -1,71 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using UniRx.Operators; - -namespace UniRx -{ - public static partial class Observable - { - public static IObservable Synchronize(this IObservable source) - { - return new SynchronizeObservable(source, new object()); - } - - public static IObservable Synchronize(this IObservable source, object gate) - { - return new SynchronizeObservable(source, gate); - } - - public static IObservable ObserveOn(this IObservable source, IScheduler scheduler) - { - return new ObserveOnObservable(source, scheduler); - } - - public static IObservable SubscribeOn(this IObservable source, IScheduler scheduler) - { - return new SubscribeOnObservable(source, scheduler); - } - - public static IObservable DelaySubscription(this IObservable source, TimeSpan dueTime) - { - return new DelaySubscriptionObservable(source, dueTime, Scheduler.DefaultSchedulers.TimeBasedOperations); - } - - public static IObservable DelaySubscription(this IObservable source, TimeSpan dueTime, IScheduler scheduler) - { - return new DelaySubscriptionObservable(source, dueTime, scheduler); - } - - public static IObservable DelaySubscription(this IObservable source, DateTimeOffset dueTime) - { - return new DelaySubscriptionObservable(source, dueTime, Scheduler.DefaultSchedulers.TimeBasedOperations); - } - - public static IObservable DelaySubscription(this IObservable source, DateTimeOffset dueTime, IScheduler scheduler) - { - return new DelaySubscriptionObservable(source, dueTime, scheduler); - } - - public static IObservable Amb(params IObservable[] sources) - { - return Amb((IEnumerable>)sources); - } - - public static IObservable Amb(IEnumerable> sources) - { - var result = Observable.Never(); - foreach (var item in sources) - { - var second = item; - result = result.Amb(second); - } - return result; - } - - public static IObservable Amb(this IObservable source, IObservable second) - { - return new AmbObservable(source, second); - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Observable.Concurrency.cs.meta b/Assets/Plugins/UniRx/Scripts/Observable.Concurrency.cs.meta deleted file mode 100644 index 06cdb26..0000000 --- a/Assets/Plugins/UniRx/Scripts/Observable.Concurrency.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: a31d38ad13dc4644180647afc28c6045 -timeCreated: 1455373900 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Observable.Conversions.cs b/Assets/Plugins/UniRx/Scripts/Observable.Conversions.cs deleted file mode 100644 index 1bd8a07..0000000 --- a/Assets/Plugins/UniRx/Scripts/Observable.Conversions.cs +++ /dev/null @@ -1,74 +0,0 @@ -using System; -using System.Collections.Generic; -using UniRx.Operators; - -namespace UniRx -{ - public static partial class Observable - { - public static IObservable AsObservable(this IObservable source) - { - if (source == null) throw new ArgumentNullException("source"); - - // optimize, don't double wrap - if (source is UniRx.Operators.AsObservableObservable) - { - return source; - } - - return new AsObservableObservable(source); - } - - public static IObservable ToObservable(this IEnumerable source) - { - return ToObservable(source, Scheduler.DefaultSchedulers.Iteration); - } - - public static IObservable ToObservable(this IEnumerable source, IScheduler scheduler) - { - return new ToObservableObservable(source, scheduler); - } - - public static IObservable Cast(this IObservable source) - { - return new CastObservable(source); - } - - /// - /// witness is for type inference. - /// - public static IObservable Cast(this IObservable source, TResult witness) - { - return new CastObservable(source); - } - - public static IObservable OfType(this IObservable source) - { - return new OfTypeObservable(source); - } - - /// - /// witness is for type inference. - /// - public static IObservable OfType(this IObservable source, TResult witness) - { - return new OfTypeObservable(source); - } - - /// - /// Converting .Select(_ => Unit.Default) sequence. - /// - public static IObservable AsUnitObservable(this IObservable source) - { - return new AsUnitObservableObservable(source); - } - - /// - /// Same as LastOrDefault().AsUnitObservable(). - /// - public static IObservable AsSingleUnitObservable(this IObservable source) - { - return new AsSingleUnitObservableObservable(source); - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Observable.Conversions.cs.meta b/Assets/Plugins/UniRx/Scripts/Observable.Conversions.cs.meta deleted file mode 100644 index e3ef7b7..0000000 --- a/Assets/Plugins/UniRx/Scripts/Observable.Conversions.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: e32bd7bbf28014b4ab2873cc8de3dea9 -timeCreated: 1455373901 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Observable.Creation.cs b/Assets/Plugins/UniRx/Scripts/Observable.Creation.cs deleted file mode 100644 index b4973cb..0000000 --- a/Assets/Plugins/UniRx/Scripts/Observable.Creation.cs +++ /dev/null @@ -1,375 +0,0 @@ -using System; -using System.Collections.Generic; -using UniRx.Operators; - -namespace UniRx -{ - public static partial class Observable - { - /// - /// Create anonymous observable. Observer has exception durability. This is recommended for make operator and event like generator. - /// - public static IObservable Create(Func, IDisposable> subscribe) - { - if (subscribe == null) throw new ArgumentNullException("subscribe"); - - return new CreateObservable(subscribe); - } - - /// - /// Create anonymous observable. Observer has exception durability. This is recommended for make operator and event like generator(HotObservable). - /// - public static IObservable Create(Func, IDisposable> subscribe, bool isRequiredSubscribeOnCurrentThread) - { - if (subscribe == null) throw new ArgumentNullException("subscribe"); - - return new CreateObservable(subscribe, isRequiredSubscribeOnCurrentThread); - } - - /// - /// Create anonymous observable. Observer has exception durability. This is recommended for make operator and event like generator. - /// - public static IObservable CreateWithState(TState state, Func, IDisposable> subscribe) - { - if (subscribe == null) throw new ArgumentNullException("subscribe"); - - return new CreateObservable(state, subscribe); - } - - /// - /// Create anonymous observable. Observer has exception durability. This is recommended for make operator and event like generator(HotObservable). - /// - public static IObservable CreateWithState(TState state, Func, IDisposable> subscribe, bool isRequiredSubscribeOnCurrentThread) - { - if (subscribe == null) throw new ArgumentNullException("subscribe"); - - return new CreateObservable(state, subscribe, isRequiredSubscribeOnCurrentThread); - } - - /// - /// Create anonymous observable. Safe means auto detach when error raised in onNext pipeline. This is recommended for make generator (ColdObservable). - /// - public static IObservable CreateSafe(Func, IDisposable> subscribe) - { - if (subscribe == null) throw new ArgumentNullException("subscribe"); - - return new CreateSafeObservable(subscribe); - } - - /// - /// Create anonymous observable. Safe means auto detach when error raised in onNext pipeline. This is recommended for make generator (ColdObservable). - /// - public static IObservable CreateSafe(Func, IDisposable> subscribe, bool isRequiredSubscribeOnCurrentThread) - { - if (subscribe == null) throw new ArgumentNullException("subscribe"); - - return new CreateSafeObservable(subscribe, isRequiredSubscribeOnCurrentThread); - } - - /// - /// Empty Observable. Returns only OnCompleted. - /// - public static IObservable Empty() - { - return Empty(Scheduler.DefaultSchedulers.ConstantTimeOperations); - } - - /// - /// Empty Observable. Returns only OnCompleted on specified scheduler. - /// - public static IObservable Empty(IScheduler scheduler) - { - if (scheduler == Scheduler.Immediate) - { - return ImmutableEmptyObservable.Instance; - } - else - { - return new EmptyObservable(scheduler); - } - } - - /// - /// Empty Observable. Returns only OnCompleted. witness is for type inference. - /// - public static IObservable Empty(T witness) - { - return Empty(Scheduler.DefaultSchedulers.ConstantTimeOperations); - } - - /// - /// Empty Observable. Returns only OnCompleted on specified scheduler. witness is for type inference. - /// - public static IObservable Empty(IScheduler scheduler, T witness) - { - return Empty(scheduler); - } - - /// - /// Non-Terminating Observable. It's no returns, never finish. - /// - public static IObservable Never() - { - return ImmutableNeverObservable.Instance; - } - - /// - /// Non-Terminating Observable. It's no returns, never finish. witness is for type inference. - /// - public static IObservable Never(T witness) - { - return ImmutableNeverObservable.Instance; - } - - /// - /// Return single sequence Immediately. - /// - public static IObservable Return(T value) - { - return Return(value, Scheduler.DefaultSchedulers.ConstantTimeOperations); - } - - /// - /// Return single sequence on specified scheduler. - /// - public static IObservable Return(T value, IScheduler scheduler) - { - if (scheduler == Scheduler.Immediate) - { - return new ImmediateReturnObservable(value); - } - else - { - return new ReturnObservable(value, scheduler); - } - } - - /// - /// Return single sequence Immediately, optimized for Unit(no allocate memory). - /// - public static IObservable Return(Unit value) - { - return ImmutableReturnUnitObservable.Instance; - } - - /// - /// Return single sequence Immediately, optimized for Boolean(no allocate memory). - /// - public static IObservable Return(bool value) - { - return (value == true) - ? (IObservable)ImmutableReturnTrueObservable.Instance - : (IObservable)ImmutableReturnFalseObservable.Instance; - } - - /// - /// Return single sequence Immediately, optimized for Int32. - /// - public static IObservable Return(int value) - { - return ImmutableReturnInt32Observable.GetInt32Observable(value); - } - - /// - /// Same as Observable.Return(Unit.Default); but no allocate memory. - /// - public static IObservable ReturnUnit() - { - return ImmutableReturnUnitObservable.Instance; - } - - /// - /// Empty Observable. Returns only onError. - /// - public static IObservable Throw(Exception error) - { - return Throw(error, Scheduler.DefaultSchedulers.ConstantTimeOperations); - } - - /// - /// Empty Observable. Returns only onError. witness if for Type inference. - /// - public static IObservable Throw(Exception error, T witness) - { - return Throw(error, Scheduler.DefaultSchedulers.ConstantTimeOperations); - } - - /// - /// Empty Observable. Returns only onError on specified scheduler. - /// - public static IObservable Throw(Exception error, IScheduler scheduler) - { - return new ThrowObservable(error, scheduler); - } - - /// - /// Empty Observable. Returns only onError on specified scheduler. witness if for Type inference. - /// - public static IObservable Throw(Exception error, IScheduler scheduler, T witness) - { - return Throw(error, scheduler); - } - - public static IObservable Range(int start, int count) - { - return Range(start, count, Scheduler.DefaultSchedulers.Iteration); - } - - public static IObservable Range(int start, int count, IScheduler scheduler) - { - return new RangeObservable(start, count, scheduler); - } - - public static IObservable Repeat(T value) - { - return Repeat(value, Scheduler.DefaultSchedulers.Iteration); - } - - public static IObservable Repeat(T value, IScheduler scheduler) - { - if (scheduler == null) throw new ArgumentNullException("scheduler"); - - return new RepeatObservable(value, null, scheduler); - } - - public static IObservable Repeat(T value, int repeatCount) - { - return Repeat(value, repeatCount, Scheduler.DefaultSchedulers.Iteration); - } - - public static IObservable Repeat(T value, int repeatCount, IScheduler scheduler) - { - if (repeatCount < 0) throw new ArgumentOutOfRangeException("repeatCount"); - if (scheduler == null) throw new ArgumentNullException("scheduler"); - - return new RepeatObservable(value, repeatCount, scheduler); - } - - public static IObservable Repeat(this IObservable source) - { - return RepeatInfinite(source).Concat(); - } - - static IEnumerable> RepeatInfinite(IObservable source) - { - while (true) - { - yield return source; - } - } - - /// - /// Same as Repeat() but if arriving contiguous "OnComplete" Repeat stops. - /// - public static IObservable RepeatSafe(this IObservable source) - { - return new RepeatSafeObservable(RepeatInfinite(source), source.IsRequiredSubscribeOnCurrentThread()); - } - - public static IObservable Defer(Func> observableFactory) - { - return new DeferObservable(observableFactory); - } - - public static IObservable Start(Func function) - { - return new StartObservable(function, null, Scheduler.DefaultSchedulers.AsyncConversions); - } - - public static IObservable Start(Func function, TimeSpan timeSpan) - { - return new StartObservable(function, timeSpan, Scheduler.DefaultSchedulers.AsyncConversions); - } - - public static IObservable Start(Func function, IScheduler scheduler) - { - return new StartObservable(function, null, scheduler); - } - - public static IObservable Start(Func function, TimeSpan timeSpan, IScheduler scheduler) - { - return new StartObservable(function, timeSpan, scheduler); - } - - public static IObservable Start(Action action) - { - return new StartObservable(action, null, Scheduler.DefaultSchedulers.AsyncConversions); - } - - public static IObservable Start(Action action, TimeSpan timeSpan) - { - return new StartObservable(action, timeSpan, Scheduler.DefaultSchedulers.AsyncConversions); - } - - public static IObservable Start(Action action, IScheduler scheduler) - { - return new StartObservable(action, null, scheduler); - } - - public static IObservable Start(Action action, TimeSpan timeSpan, IScheduler scheduler) - { - return new StartObservable(action, timeSpan, scheduler); - } - - public static Func> ToAsync(Func function) - { - return ToAsync(function, Scheduler.DefaultSchedulers.AsyncConversions); - } - - public static Func> ToAsync(Func function, IScheduler scheduler) - { - return () => - { - var subject = new AsyncSubject(); - - scheduler.Schedule(() => - { - var result = default(T); - try - { - result = function(); - } - catch (Exception exception) - { - subject.OnError(exception); - return; - } - subject.OnNext(result); - subject.OnCompleted(); - }); - - return subject.AsObservable(); - }; - } - - public static Func> ToAsync(Action action) - { - return ToAsync(action, Scheduler.DefaultSchedulers.AsyncConversions); - } - - public static Func> ToAsync(Action action, IScheduler scheduler) - { - return () => - { - var subject = new AsyncSubject(); - - scheduler.Schedule(() => - { - try - { - action(); - } - catch (Exception exception) - { - subject.OnError(exception); - return; - } - subject.OnNext(Unit.Default); - subject.OnCompleted(); - }); - - return subject.AsObservable(); - }; - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Observable.Creation.cs.meta b/Assets/Plugins/UniRx/Scripts/Observable.Creation.cs.meta deleted file mode 100644 index d8ffc64..0000000 --- a/Assets/Plugins/UniRx/Scripts/Observable.Creation.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: e63036d2dba75f64382beed512fd086c -timeCreated: 1455373901 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Observable.ErrorHandling.cs b/Assets/Plugins/UniRx/Scripts/Observable.ErrorHandling.cs deleted file mode 100644 index 4e77cb1..0000000 --- a/Assets/Plugins/UniRx/Scripts/Observable.ErrorHandling.cs +++ /dev/null @@ -1,134 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using UniRx.Operators; - -namespace UniRx -{ - public static partial class Observable - { - public static IObservable Finally(this IObservable source, Action finallyAction) - { - return new FinallyObservable(source, finallyAction); - } - - public static IObservable Catch(this IObservable source, Func> errorHandler) - where TException : Exception - { - return new CatchObservable(source, errorHandler); - } - - public static IObservable Catch(this IEnumerable> sources) - { - return new CatchObservable(sources); - } - - /// Catch exception and return Observable.Empty. - public static IObservable CatchIgnore(this IObservable source) - { - return source.Catch(Stubs.CatchIgnore); - } - - /// Catch exception and return Observable.Empty. - public static IObservable CatchIgnore(this IObservable source, Action errorAction) - where TException : Exception - { - var result = source.Catch((TException ex) => - { - errorAction(ex); - return Observable.Empty(); - }); - return result; - } - - public static IObservable Retry(this IObservable source) - { - return RepeatInfinite(source).Catch(); - } - - public static IObservable Retry(this IObservable source, int retryCount) - { - return System.Linq.Enumerable.Repeat(source, retryCount).Catch(); - } - - /// - /// Repeats the source observable sequence until it successfully terminates. - /// This is same as Retry(). - /// - public static IObservable OnErrorRetry( - this IObservable source) - { - var result = source.Retry(); - return result; - } - - /// - /// When catched exception, do onError action and repeat observable sequence. - /// - public static IObservable OnErrorRetry( - this IObservable source, Action onError) - where TException : Exception - { - return source.OnErrorRetry(onError, TimeSpan.Zero); - } - - /// - /// When catched exception, do onError action and repeat observable sequence after delay time. - /// - public static IObservable OnErrorRetry( - this IObservable source, Action onError, TimeSpan delay) - where TException : Exception - { - return source.OnErrorRetry(onError, int.MaxValue, delay); - } - - /// - /// When catched exception, do onError action and repeat observable sequence during within retryCount. - /// - public static IObservable OnErrorRetry( - this IObservable source, Action onError, int retryCount) - where TException : Exception - { - return source.OnErrorRetry(onError, retryCount, TimeSpan.Zero); - } - - /// - /// When catched exception, do onError action and repeat observable sequence after delay time during within retryCount. - /// - public static IObservable OnErrorRetry( - this IObservable source, Action onError, int retryCount, TimeSpan delay) - where TException : Exception - { - return source.OnErrorRetry(onError, retryCount, delay, Scheduler.DefaultSchedulers.TimeBasedOperations); - } - - /// - /// When catched exception, do onError action and repeat observable sequence after delay time(work on delayScheduler) during within retryCount. - /// - public static IObservable OnErrorRetry( - this IObservable source, Action onError, int retryCount, TimeSpan delay, IScheduler delayScheduler) - where TException : Exception - { - var result = Observable.Defer(() => - { - var dueTime = (delay.Ticks < 0) ? TimeSpan.Zero : delay; - var count = 0; - - IObservable self = null; - self = source.Catch((TException ex) => - { - onError(ex); - - return (++count < retryCount) - ? (dueTime == TimeSpan.Zero) - ? self.SubscribeOn(Scheduler.CurrentThread) - : self.DelaySubscription(dueTime, delayScheduler).SubscribeOn(Scheduler.CurrentThread) - : Observable.Throw(ex); - }); - return self; - }); - - return result; - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Observable.ErrorHandling.cs.meta b/Assets/Plugins/UniRx/Scripts/Observable.ErrorHandling.cs.meta deleted file mode 100644 index f78d001..0000000 --- a/Assets/Plugins/UniRx/Scripts/Observable.ErrorHandling.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: f40cab35efe24e6448ac8455bc7a4eb9 -timeCreated: 1455373902 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Observable.Events.cs b/Assets/Plugins/UniRx/Scripts/Observable.Events.cs deleted file mode 100644 index dc33918..0000000 --- a/Assets/Plugins/UniRx/Scripts/Observable.Events.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System; -using UniRx.Operators; - -namespace UniRx -{ - public static partial class Observable - { - public static IObservable> FromEventPattern(Func, TDelegate> conversion, Action addHandler, Action removeHandler) - where TEventArgs : EventArgs - { - return new FromEventPatternObservable(conversion, addHandler, removeHandler); - } - - public static IObservable FromEvent(Func conversion, Action addHandler, Action removeHandler) - { - return new FromEventObservable(conversion, addHandler, removeHandler); - } - - public static IObservable FromEvent(Func, TDelegate> conversion, Action addHandler, Action removeHandler) - { - return new FromEventObservable(conversion, addHandler, removeHandler); - } - - public static IObservable FromEvent(Action addHandler, Action removeHandler) - { - return new FromEventObservable(addHandler, removeHandler); - } - - public static IObservable FromEvent(Action> addHandler, Action> removeHandler) - { - return new FromEventObservable_(addHandler, removeHandler); - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Observable.Events.cs.meta b/Assets/Plugins/UniRx/Scripts/Observable.Events.cs.meta deleted file mode 100644 index 396fc27..0000000 --- a/Assets/Plugins/UniRx/Scripts/Observable.Events.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: e591aafff0492c94590cf9702f6c408f -timeCreated: 1455373901 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Observable.FromAsync.cs b/Assets/Plugins/UniRx/Scripts/Observable.FromAsync.cs deleted file mode 100644 index 303387b..0000000 --- a/Assets/Plugins/UniRx/Scripts/Observable.FromAsync.cs +++ /dev/null @@ -1,127 +0,0 @@ -using System; - -namespace UniRx -{ - public static partial class Observable - { - public static Func> FromAsyncPattern(Func begin, Func end) - { - return () => - { - var subject = new AsyncSubject(); - try - { - begin(iar => - { - TResult result; - try - { - result = end(iar); - } - catch (Exception exception) - { - subject.OnError(exception); - return; - } - subject.OnNext(result); - subject.OnCompleted(); - }, null); - } - catch (Exception exception) - { - return Observable.Throw(exception, Scheduler.DefaultSchedulers.AsyncConversions); - } - return subject.AsObservable(); - }; - } - - public static Func> FromAsyncPattern(Func begin, Func end) - { - return x => - { - var subject = new AsyncSubject(); - try - { - begin(x, iar => - { - TResult result; - try - { - result = end(iar); - } - catch (Exception exception) - { - subject.OnError(exception); - return; - } - subject.OnNext(result); - subject.OnCompleted(); - }, null); - } - catch (Exception exception) - { - return Observable.Throw(exception, Scheduler.DefaultSchedulers.AsyncConversions); - } - return subject.AsObservable(); - }; - } - - public static Func> FromAsyncPattern(Func begin, Func end) - { - return (x, y) => - { - var subject = new AsyncSubject(); - try - { - begin(x, y, iar => - { - TResult result; - try - { - result = end(iar); - } - catch (Exception exception) - { - subject.OnError(exception); - return; - } - subject.OnNext(result); - subject.OnCompleted(); - }, null); - } - catch (Exception exception) - { - return Observable.Throw(exception, Scheduler.DefaultSchedulers.AsyncConversions); - } - return subject.AsObservable(); - }; - } - - public static Func> FromAsyncPattern(Func begin, Action end) - { - return FromAsyncPattern(begin, iar => - { - end(iar); - return Unit.Default; - }); - } - - public static Func> FromAsyncPattern(Func begin, Action end) - { - return FromAsyncPattern(begin, iar => - { - end(iar); - return Unit.Default; - }); - } - - public static Func> FromAsyncPattern(Func begin, Action end) - { - return FromAsyncPattern(begin, iar => - { - end(iar); - return Unit.Default; - }); - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Observable.FromAsync.cs.meta b/Assets/Plugins/UniRx/Scripts/Observable.FromAsync.cs.meta deleted file mode 100644 index e40ab88..0000000 --- a/Assets/Plugins/UniRx/Scripts/Observable.FromAsync.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 601f5bb7bb302a14cb46df717729b8c7 -timeCreated: 1455373899 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Observable.Joins.cs b/Assets/Plugins/UniRx/Scripts/Observable.Joins.cs deleted file mode 100644 index ad4c6d8..0000000 --- a/Assets/Plugins/UniRx/Scripts/Observable.Joins.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace UniRx -{ - public static partial class Observable - { - } -} diff --git a/Assets/Plugins/UniRx/Scripts/Observable.Joins.cs.meta b/Assets/Plugins/UniRx/Scripts/Observable.Joins.cs.meta deleted file mode 100644 index 561c3c0..0000000 --- a/Assets/Plugins/UniRx/Scripts/Observable.Joins.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: dd92425c6c6dec24e9e52677cbc36aa0 -timeCreated: 1455373901 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Observable.Paging.cs b/Assets/Plugins/UniRx/Scripts/Observable.Paging.cs deleted file mode 100644 index af53b31..0000000 --- a/Assets/Plugins/UniRx/Scripts/Observable.Paging.cs +++ /dev/null @@ -1,326 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using UniRx.Operators; - -namespace UniRx -{ - // Take, Skip, etc.. - public static partial class Observable - { - public static IObservable Take(this IObservable source, int count) - { - if (source == null) throw new ArgumentNullException("source"); - if (count < 0) throw new ArgumentOutOfRangeException("count"); - - if (count == 0) return Empty(); - - // optimize .Take(count).Take(count) - var take = source as TakeObservable; - if (take != null && take.scheduler == null) - { - return take.Combine(count); - } - - return new TakeObservable(source, count); - } - - public static IObservable Take(this IObservable source, TimeSpan duration) - { - return Take(source, duration, Scheduler.DefaultSchedulers.TimeBasedOperations); - } - - public static IObservable Take(this IObservable source, TimeSpan duration, IScheduler scheduler) - { - if (source == null) throw new ArgumentNullException("source"); - if (scheduler == null) throw new ArgumentNullException("scheduler"); - - // optimize .Take(duration).Take(duration) - var take = source as TakeObservable; - if (take != null && take.scheduler == scheduler) - { - return take.Combine(duration); - } - - return new TakeObservable(source, duration, scheduler); - } - - public static IObservable TakeWhile(this IObservable source, Func predicate) - { - return new TakeWhileObservable(source, predicate); - } - - public static IObservable TakeWhile(this IObservable source, Func predicate) - { - if (source == null) throw new ArgumentNullException("source"); - if (predicate == null) throw new ArgumentNullException("predicate"); - - return new TakeWhileObservable(source, predicate); - } - - public static IObservable TakeUntil(this IObservable source, IObservable other) - { - if (source == null) throw new ArgumentNullException("source"); - if (other == null) throw new ArgumentNullException("other"); - - return new TakeUntilObservable(source, other); - } - - public static IObservable TakeLast(this IObservable source, int count) - { - if (source == null) throw new ArgumentNullException("source"); - if (count < 0) throw new ArgumentOutOfRangeException("count"); - - return new TakeLastObservable(source, count); - } - - public static IObservable TakeLast(this IObservable source, TimeSpan duration) - { - return TakeLast(source, duration, Scheduler.DefaultSchedulers.TimeBasedOperations); - } - - public static IObservable TakeLast(this IObservable source, TimeSpan duration, IScheduler scheduler) - { - if (source == null) throw new ArgumentNullException("source"); - - return new TakeLastObservable(source, duration, scheduler); - } - - public static IObservable Skip(this IObservable source, int count) - { - if (source == null) throw new ArgumentNullException("source"); - if (count < 0) throw new ArgumentOutOfRangeException("count"); - - // optimize .Skip(count).Skip(count) - var skip = source as SkipObservable; - if (skip != null && skip.scheduler == null) - { - return skip.Combine(count); - } - - return new SkipObservable(source, count); - } - - public static IObservable Skip(this IObservable source, TimeSpan duration) - { - return Skip(source, duration, Scheduler.DefaultSchedulers.TimeBasedOperations); - } - - public static IObservable Skip(this IObservable source, TimeSpan duration, IScheduler scheduler) - { - if (source == null) throw new ArgumentNullException("source"); - if (scheduler == null) throw new ArgumentNullException("scheduler"); - - // optimize .Skip(duration).Skip(duration) - var skip = source as SkipObservable; - if (skip != null && skip.scheduler == scheduler) - { - return skip.Combine(duration); - } - - return new SkipObservable(source, duration, scheduler); - } - - public static IObservable SkipWhile(this IObservable source, Func predicate) - { - return new SkipWhileObservable(source, predicate); - } - - public static IObservable SkipWhile(this IObservable source, Func predicate) - { - if (source == null) throw new ArgumentNullException("source"); - if (predicate == null) throw new ArgumentNullException("predicate"); - - return new SkipWhileObservable(source, predicate); - } - - public static IObservable SkipUntil(this IObservable source, IObservable other) - { - return new SkipUntilObservable(source, other); - } - - public static IObservable> Buffer(this IObservable source, int count) - { - if (source == null) throw new ArgumentNullException("source"); - if (count <= 0) throw new ArgumentOutOfRangeException("count <= 0"); - - return new BufferObservable(source, count, 0); - } - - public static IObservable> Buffer(this IObservable source, int count, int skip) - { - if (source == null) throw new ArgumentNullException("source"); - if (count <= 0) throw new ArgumentOutOfRangeException("count <= 0"); - if (skip <= 0) throw new ArgumentOutOfRangeException("skip <= 0"); - - return new BufferObservable(source, count, skip); - } - - public static IObservable> Buffer(this IObservable source, TimeSpan timeSpan) - { - return Buffer(source, timeSpan, Scheduler.DefaultSchedulers.TimeBasedOperations); - } - - public static IObservable> Buffer(this IObservable source, TimeSpan timeSpan, IScheduler scheduler) - { - if (source == null) throw new ArgumentNullException("source"); - - return new BufferObservable(source, timeSpan, timeSpan, scheduler); - } - - public static IObservable> Buffer(this IObservable source, TimeSpan timeSpan, int count) - { - return Buffer(source, timeSpan, count, Scheduler.DefaultSchedulers.TimeBasedOperations); - } - - public static IObservable> Buffer(this IObservable source, TimeSpan timeSpan, int count, IScheduler scheduler) - { - if (source == null) throw new ArgumentNullException("source"); - if (count <= 0) throw new ArgumentOutOfRangeException("count <= 0"); - - return new BufferObservable(source, timeSpan, count, scheduler); - } - - public static IObservable> Buffer(this IObservable source, TimeSpan timeSpan, TimeSpan timeShift) - { - return new BufferObservable(source, timeSpan, timeShift, Scheduler.DefaultSchedulers.TimeBasedOperations); - } - - public static IObservable> Buffer(this IObservable source, TimeSpan timeSpan, TimeSpan timeShift, IScheduler scheduler) - { - if (source == null) throw new ArgumentNullException("source"); - - return new BufferObservable(source, timeSpan, timeShift, scheduler); - } - - public static IObservable> Buffer(this IObservable source, IObservable windowBoundaries) - { - return new BufferObservable(source, windowBoundaries); - } - - /// Projects old and new element of a sequence into a new form. - public static IObservable> Pairwise(this IObservable source) - { - return new PairwiseObservable(source); - } - - /// Projects old and new element of a sequence into a new form. - public static IObservable Pairwise(this IObservable source, Func selector) - { - return new PairwiseObservable(source, selector); - } - - // first, last, single - - public static IObservable Last(this IObservable source) - { - return new LastObservable(source, false); - } - public static IObservable Last(this IObservable source, Func predicate) - { - return new LastObservable(source, predicate, false); - } - - public static IObservable LastOrDefault(this IObservable source) - { - return new LastObservable(source, true); - } - - public static IObservable LastOrDefault(this IObservable source, Func predicate) - { - return new LastObservable(source, predicate, true); - } - - public static IObservable First(this IObservable source) - { - return new FirstObservable(source, false); - } - public static IObservable First(this IObservable source, Func predicate) - { - return new FirstObservable(source, predicate, false); - } - - public static IObservable FirstOrDefault(this IObservable source) - { - return new FirstObservable(source, true); - } - - public static IObservable FirstOrDefault(this IObservable source, Func predicate) - { - return new FirstObservable(source, predicate, true); - } - - public static IObservable Single(this IObservable source) - { - return new SingleObservable(source, false); - } - public static IObservable Single(this IObservable source, Func predicate) - { - return new SingleObservable(source, predicate, false); - } - - public static IObservable SingleOrDefault(this IObservable source) - { - return new SingleObservable(source, true); - } - - public static IObservable SingleOrDefault(this IObservable source, Func predicate) - { - return new SingleObservable(source, predicate, true); - } - - // Grouping - - public static IObservable> GroupBy(this IObservable source, Func keySelector) - { - return GroupBy(source, keySelector, Stubs.Identity); - } - - public static IObservable> GroupBy(this IObservable source, Func keySelector, IEqualityComparer comparer) - { - return GroupBy(source, keySelector, Stubs.Identity, comparer); - } - - public static IObservable> GroupBy(this IObservable source, Func keySelector, Func elementSelector) - { -#if !UniRxLibrary - var comparer = UnityEqualityComparer.GetDefault(); -#else - var comparer = EqualityComparer.Default; -#endif - - return GroupBy(source, keySelector, elementSelector, comparer); - } - - public static IObservable> GroupBy(this IObservable source, Func keySelector, Func elementSelector, IEqualityComparer comparer) - { - return new GroupByObservable(source, keySelector, elementSelector, null, comparer); - } - - public static IObservable> GroupBy(this IObservable source, Func keySelector, int capacity) - { - return GroupBy(source, keySelector, Stubs.Identity, capacity); - } - - public static IObservable> GroupBy(this IObservable source, Func keySelector, int capacity, IEqualityComparer comparer) - { - return GroupBy(source, keySelector, Stubs.Identity, capacity, comparer); - } - - public static IObservable> GroupBy(this IObservable source, Func keySelector, Func elementSelector, int capacity) - { -#if !UniRxLibrary - var comparer = UnityEqualityComparer.GetDefault(); -#else - var comparer = EqualityComparer.Default; -#endif - - return GroupBy(source, keySelector, elementSelector, capacity, comparer); - } - - public static IObservable> GroupBy(this IObservable source, Func keySelector, Func elementSelector, int capacity, IEqualityComparer comparer) - { - return new GroupByObservable(source, keySelector, elementSelector, capacity, comparer); - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Observable.Paging.cs.meta b/Assets/Plugins/UniRx/Scripts/Observable.Paging.cs.meta deleted file mode 100644 index 6017170..0000000 --- a/Assets/Plugins/UniRx/Scripts/Observable.Paging.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: f4c9428bf00006d408fcfe4c514ee798 -timeCreated: 1455373902 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Observable.Time.cs b/Assets/Plugins/UniRx/Scripts/Observable.Time.cs deleted file mode 100644 index 24e58ed..0000000 --- a/Assets/Plugins/UniRx/Scripts/Observable.Time.cs +++ /dev/null @@ -1,140 +0,0 @@ -using System; -using System.Collections.Generic; -using UniRx.Operators; - -namespace UniRx -{ - // Timer, Interval, etc... - public static partial class Observable - { - public static IObservable Interval(TimeSpan period) - { - return new TimerObservable(period, period, Scheduler.DefaultSchedulers.TimeBasedOperations); - } - - public static IObservable Interval(TimeSpan period, IScheduler scheduler) - { - return new TimerObservable(period, period, scheduler); - } - - public static IObservable Timer(TimeSpan dueTime) - { - return new TimerObservable(dueTime, null, Scheduler.DefaultSchedulers.TimeBasedOperations); - } - - public static IObservable Timer(DateTimeOffset dueTime) - { - return new TimerObservable(dueTime, null, Scheduler.DefaultSchedulers.TimeBasedOperations); - } - - public static IObservable Timer(TimeSpan dueTime, TimeSpan period) - { - return new TimerObservable(dueTime, period, Scheduler.DefaultSchedulers.TimeBasedOperations); - } - - public static IObservable Timer(DateTimeOffset dueTime, TimeSpan period) - { - return new TimerObservable(dueTime, period, Scheduler.DefaultSchedulers.TimeBasedOperations); - } - - public static IObservable Timer(TimeSpan dueTime, IScheduler scheduler) - { - return new TimerObservable(dueTime, null, scheduler); - } - - public static IObservable Timer(DateTimeOffset dueTime, IScheduler scheduler) - { - return new TimerObservable(dueTime, null, scheduler); - } - - public static IObservable Timer(TimeSpan dueTime, TimeSpan period, IScheduler scheduler) - { - return new TimerObservable(dueTime, period, scheduler); - } - - public static IObservable Timer(DateTimeOffset dueTime, TimeSpan period, IScheduler scheduler) - { - return new TimerObservable(dueTime, period, scheduler); - } - - public static IObservable> Timestamp(this IObservable source) - { - return Timestamp(source, Scheduler.DefaultSchedulers.TimeBasedOperations); - } - - public static IObservable> Timestamp(this IObservable source, IScheduler scheduler) - { - return new TimestampObservable(source, scheduler); - } - - public static IObservable> TimeInterval(this IObservable source) - { - return TimeInterval(source, Scheduler.DefaultSchedulers.TimeBasedOperations); - } - - public static IObservable> TimeInterval(this IObservable source, IScheduler scheduler) - { - return new UniRx.Operators.TimeIntervalObservable(source, scheduler); - } - - public static IObservable Delay(this IObservable source, TimeSpan dueTime) - { - return source.Delay(dueTime, Scheduler.DefaultSchedulers.TimeBasedOperations); - } - - public static IObservable Delay(this IObservable source, TimeSpan dueTime, IScheduler scheduler) - { - return new DelayObservable(source, dueTime, scheduler); - } - - public static IObservable Sample(this IObservable source, TimeSpan interval) - { - return source.Sample(interval, Scheduler.DefaultSchedulers.TimeBasedOperations); - } - - public static IObservable Sample(this IObservable source, TimeSpan interval, IScheduler scheduler) - { - return new SampleObservable(source, interval, scheduler); - } - - public static IObservable Throttle(this IObservable source, TimeSpan dueTime) - { - return source.Throttle(dueTime, Scheduler.DefaultSchedulers.TimeBasedOperations); - } - - public static IObservable Throttle(this IObservable source, TimeSpan dueTime, IScheduler scheduler) - { - return new ThrottleObservable(source, dueTime, scheduler); - } - - public static IObservable ThrottleFirst(this IObservable source, TimeSpan dueTime) - { - return source.ThrottleFirst(dueTime, Scheduler.DefaultSchedulers.TimeBasedOperations); - } - - public static IObservable ThrottleFirst(this IObservable source, TimeSpan dueTime, IScheduler scheduler) - { - return new ThrottleFirstObservable(source, dueTime, scheduler); - } - - public static IObservable Timeout(this IObservable source, TimeSpan dueTime) - { - return source.Timeout(dueTime, Scheduler.DefaultSchedulers.TimeBasedOperations); - } - - public static IObservable Timeout(this IObservable source, TimeSpan dueTime, IScheduler scheduler) - { - return new TimeoutObservable(source, dueTime, scheduler); - } - - public static IObservable Timeout(this IObservable source, DateTimeOffset dueTime) - { - return source.Timeout(dueTime, Scheduler.DefaultSchedulers.TimeBasedOperations); - } - - public static IObservable Timeout(this IObservable source, DateTimeOffset dueTime, IScheduler scheduler) - { - return new TimeoutObservable(source, dueTime, scheduler); - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Observable.Time.cs.meta b/Assets/Plugins/UniRx/Scripts/Observable.Time.cs.meta deleted file mode 100644 index a0484a3..0000000 --- a/Assets/Plugins/UniRx/Scripts/Observable.Time.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 7da89fcf95f5c364ca62bbb874005d32 -timeCreated: 1455373899 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Observable.cs b/Assets/Plugins/UniRx/Scripts/Observable.cs deleted file mode 100644 index f81bc05..0000000 --- a/Assets/Plugins/UniRx/Scripts/Observable.cs +++ /dev/null @@ -1,291 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Threading; -using UniRx.Operators; - -namespace UniRx -{ - // Standard Query Operators - - // onNext implementation guide. enclose otherFunc but onNext is not catch. - // try{ otherFunc(); } catch { onError() } - // onNext(); - - public static partial class Observable - { - static readonly TimeSpan InfiniteTimeSpan = new TimeSpan(0, 0, 0, 0, -1); // from .NET 4.5 - - public static IObservable Select(this IObservable source, Func selector) - { - // sometimes cause "which no ahead of time (AOT) code was generated." on IL2CPP... - - //var select = source as ISelect; - //if (select != null) - //{ - // return select.CombineSelector(selector); - //} - - // optimized path - var whereObservable = source as UniRx.Operators.WhereObservable; - if (whereObservable != null) - { - return whereObservable.CombineSelector(selector); - } - - return new SelectObservable(source, selector); - } - - public static IObservable Select(this IObservable source, Func selector) - { - return new SelectObservable(source, selector); - } - - public static IObservable Where(this IObservable source, Func predicate) - { - // optimized path - var whereObservable = source as UniRx.Operators.WhereObservable; - if (whereObservable != null) - { - return whereObservable.CombinePredicate(predicate); - } - - var selectObservable = source as UniRx.Operators.ISelect; - if (selectObservable != null) - { - return selectObservable.CombinePredicate(predicate); - } - - return new WhereObservable(source, predicate); - } - - public static IObservable Where(this IObservable source, Func predicate) - { - return new WhereObservable(source, predicate); - } - - /// - /// Lightweight SelectMany for Single Async Operation. - /// - public static IObservable ContinueWith(this IObservable source, IObservable other) - { - return ContinueWith(source, _ => other); - } - - /// - /// Lightweight SelectMany for Single Async Operation. - /// - public static IObservable ContinueWith(this IObservable source, Func> selector) - { - return new ContinueWithObservable(source, selector); - } - - public static IObservable SelectMany(this IObservable source, IObservable other) - { - return SelectMany(source, _ => other); - } - - public static IObservable SelectMany(this IObservable source, Func> selector) - { - return new SelectManyObservable(source, selector); - } - - public static IObservable SelectMany(this IObservable source, Func> selector) - { - return new SelectManyObservable(source, selector); - } - - public static IObservable SelectMany(this IObservable source, Func> collectionSelector, Func resultSelector) - { - return new SelectManyObservable(source, collectionSelector, resultSelector); - } - - public static IObservable SelectMany(this IObservable source, Func> collectionSelector, Func resultSelector) - { - return new SelectManyObservable(source, collectionSelector, resultSelector); - } - - public static IObservable SelectMany(this IObservable source, Func> selector) - { - return new SelectManyObservable(source, selector); - } - - public static IObservable SelectMany(this IObservable source, Func> selector) - { - return new SelectManyObservable(source, selector); - } - - public static IObservable SelectMany(this IObservable source, Func> collectionSelector, Func resultSelector) - { - return new SelectManyObservable(source, collectionSelector, resultSelector); - } - - public static IObservable SelectMany(this IObservable source, Func> collectionSelector, Func resultSelector) - { - return new SelectManyObservable(source, collectionSelector, resultSelector); - } - - public static IObservable ToArray(this IObservable source) - { - return new ToArrayObservable(source); - } - - public static IObservable> ToList(this IObservable source) - { - return new ToListObservable(source); - } - - public static IObservable Do(this IObservable source, IObserver observer) - { - return new DoObserverObservable(source, observer); - } - - public static IObservable Do(this IObservable source, Action onNext) - { - return new DoObservable(source, onNext, Stubs.Throw, Stubs.Nop); - } - - public static IObservable Do(this IObservable source, Action onNext, Action onError) - { - return new DoObservable(source, onNext, onError, Stubs.Nop); - } - - public static IObservable Do(this IObservable source, Action onNext, Action onCompleted) - { - return new DoObservable(source, onNext, Stubs.Throw, onCompleted); - } - - public static IObservable Do(this IObservable source, Action onNext, Action onError, Action onCompleted) - { - return new DoObservable(source, onNext, onError, onCompleted); - } - - public static IObservable DoOnError(this IObservable source, Action onError) - { - return new DoOnErrorObservable(source, onError); - } - - public static IObservable DoOnCompleted(this IObservable source, Action onCompleted) - { - return new DoOnCompletedObservable(source, onCompleted); - } - - public static IObservable DoOnTerminate(this IObservable source, Action onTerminate) - { - return new DoOnTerminateObservable(source, onTerminate); - } - - public static IObservable DoOnSubscribe(this IObservable source, Action onSubscribe) - { - return new DoOnSubscribeObservable(source, onSubscribe); - } - - public static IObservable DoOnCancel(this IObservable source, Action onCancel) - { - return new DoOnCancelObservable(source, onCancel); - } - - public static IObservable> Materialize(this IObservable source) - { - return new MaterializeObservable(source); - } - - public static IObservable Dematerialize(this IObservable> source) - { - return new DematerializeObservable(source); - } - - public static IObservable DefaultIfEmpty(this IObservable source) - { - return new DefaultIfEmptyObservable(source, default(T)); - } - - public static IObservable DefaultIfEmpty(this IObservable source, T defaultValue) - { - return new DefaultIfEmptyObservable(source, defaultValue); - } - - public static IObservable Distinct(this IObservable source) - { -#if !UniRxLibrary - var comparer = UnityEqualityComparer.GetDefault(); -#else - var comparer = EqualityComparer.Default; -#endif - - return new DistinctObservable(source, comparer); - } - - public static IObservable Distinct(this IObservable source, IEqualityComparer comparer) - { - return new DistinctObservable(source, comparer); - } - - public static IObservable Distinct(this IObservable source, Func keySelector) - { -#if !UniRxLibrary - var comparer = UnityEqualityComparer.GetDefault(); -#else - var comparer = EqualityComparer.Default; -#endif - - return new DistinctObservable(source, keySelector, comparer); - } - - public static IObservable Distinct(this IObservable source, Func keySelector, IEqualityComparer comparer) - { - return new DistinctObservable(source, keySelector, comparer); - } - - public static IObservable DistinctUntilChanged(this IObservable source) - { -#if !UniRxLibrary - var comparer = UnityEqualityComparer.GetDefault(); -#else - var comparer = EqualityComparer.Default; -#endif - - return new DistinctUntilChangedObservable(source, comparer); - } - - public static IObservable DistinctUntilChanged(this IObservable source, IEqualityComparer comparer) - { - if (source == null) throw new ArgumentNullException("source"); - - return new DistinctUntilChangedObservable(source, comparer); - } - - public static IObservable DistinctUntilChanged(this IObservable source, Func keySelector) - { -#if !UniRxLibrary - var comparer = UnityEqualityComparer.GetDefault(); -#else - var comparer = EqualityComparer.Default; -#endif - - return new DistinctUntilChangedObservable(source, keySelector, comparer); - } - - public static IObservable DistinctUntilChanged(this IObservable source, Func keySelector, IEqualityComparer comparer) - { - if (source == null) throw new ArgumentNullException("source"); - - return new DistinctUntilChangedObservable(source, keySelector, comparer); - } - - public static IObservable IgnoreElements(this IObservable source) - { - return new IgnoreElementsObservable(source); - } - - public static IObservable ForEachAsync(this IObservable source, Action onNext) - { - return new ForEachAsyncObservable(source, onNext); - } - - public static IObservable ForEachAsync(this IObservable source, Action onNext) - { - return new ForEachAsyncObservable(source, onNext); - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Observable.cs.meta b/Assets/Plugins/UniRx/Scripts/Observable.cs.meta deleted file mode 100644 index 50ff0a6..0000000 --- a/Assets/Plugins/UniRx/Scripts/Observable.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: a2dd1c80d4559fd4ca9ef62f20d031ab -timeCreated: 1455373900 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Observer.cs b/Assets/Plugins/UniRx/Scripts/Observer.cs deleted file mode 100644 index e12daec..0000000 --- a/Assets/Plugins/UniRx/Scripts/Observer.cs +++ /dev/null @@ -1,524 +0,0 @@ -using System; -using System.Threading; -using UniRx.InternalUtil; - -namespace UniRx -{ - public static class Observer - { - internal static IObserver CreateSubscribeObserver(Action onNext, Action onError, Action onCompleted) - { - // need compare for avoid iOS AOT - if (onNext == Stubs.Ignore) - { - return new Subscribe_(onError, onCompleted); - } - else - { - return new Subscribe(onNext, onError, onCompleted); - } - } - - internal static IObserver CreateSubscribeWithStateObserver(TState state, Action onNext, Action onError, Action onCompleted) - { - return new Subscribe(state, onNext, onError, onCompleted); - } - - internal static IObserver CreateSubscribeWithState2Observer(TState1 state1, TState2 state2, Action onNext, Action onError, Action onCompleted) - { - return new Subscribe(state1, state2, onNext, onError, onCompleted); - } - - internal static IObserver CreateSubscribeWithState3Observer(TState1 state1, TState2 state2, TState3 state3, Action onNext, Action onError, Action onCompleted) - { - return new Subscribe(state1, state2, state3, onNext, onError, onCompleted); - } - - public static IObserver Create(Action onNext) - { - return Create(onNext, UniRx.Stubs.Throw, UniRx.Stubs.Nop); - } - - public static IObserver Create(Action onNext, Action onError) - { - return Create(onNext, onError, UniRx.Stubs.Nop); - } - - public static IObserver Create(Action onNext, Action onCompleted) - { - return Create(onNext, UniRx.Stubs.Throw, onCompleted); - } - - public static IObserver Create(Action onNext, Action onError, Action onCompleted) - { - // need compare for avoid iOS AOT - if (onNext == Stubs.Ignore) - { - return new EmptyOnNextAnonymousObserver(onError, onCompleted); - } - else - { - return new AnonymousObserver(onNext, onError, onCompleted); - } - } - - public static IObserver CreateAutoDetachObserver(IObserver observer, IDisposable disposable) - { - return new AutoDetachObserver(observer, disposable); - } - - class AnonymousObserver : IObserver - { - readonly Action onNext; - readonly Action onError; - readonly Action onCompleted; - - int isStopped = 0; - - public AnonymousObserver(Action onNext, Action onError, Action onCompleted) - { - this.onNext = onNext; - this.onError = onError; - this.onCompleted = onCompleted; - } - - public void OnNext(T value) - { - if (isStopped == 0) - { - onNext(value); - } - } - - public void OnError(Exception error) - { - if (Interlocked.Increment(ref isStopped) == 1) - { - onError(error); - } - } - - - public void OnCompleted() - { - if (Interlocked.Increment(ref isStopped) == 1) - { - onCompleted(); - } - } - } - - class EmptyOnNextAnonymousObserver : IObserver - { - readonly Action onError; - readonly Action onCompleted; - - int isStopped = 0; - - public EmptyOnNextAnonymousObserver(Action onError, Action onCompleted) - { - this.onError = onError; - this.onCompleted = onCompleted; - } - - public void OnNext(T value) - { - } - - public void OnError(Exception error) - { - if (Interlocked.Increment(ref isStopped) == 1) - { - onError(error); - } - } - - public void OnCompleted() - { - if (Interlocked.Increment(ref isStopped) == 1) - { - onCompleted(); - } - } - } - - // same as AnonymousObserver... - class Subscribe : IObserver - { - readonly Action onNext; - readonly Action onError; - readonly Action onCompleted; - - int isStopped = 0; - - public Subscribe(Action onNext, Action onError, Action onCompleted) - { - this.onNext = onNext; - this.onError = onError; - this.onCompleted = onCompleted; - } - - public void OnNext(T value) - { - if (isStopped == 0) - { - onNext(value); - } - } - - public void OnError(Exception error) - { - if (Interlocked.Increment(ref isStopped) == 1) - { - onError(error); - } - } - - - public void OnCompleted() - { - if (Interlocked.Increment(ref isStopped) == 1) - { - onCompleted(); - } - } - } - - // same as EmptyOnNextAnonymousObserver... - class Subscribe_ : IObserver - { - readonly Action onError; - readonly Action onCompleted; - - int isStopped = 0; - - public Subscribe_(Action onError, Action onCompleted) - { - this.onError = onError; - this.onCompleted = onCompleted; - } - - public void OnNext(T value) - { - } - - public void OnError(Exception error) - { - if (Interlocked.Increment(ref isStopped) == 1) - { - onError(error); - } - } - - public void OnCompleted() - { - if (Interlocked.Increment(ref isStopped) == 1) - { - onCompleted(); - } - } - } - - // with state - class Subscribe : IObserver - { - readonly TState state; - readonly Action onNext; - readonly Action onError; - readonly Action onCompleted; - - int isStopped = 0; - - public Subscribe(TState state, Action onNext, Action onError, Action onCompleted) - { - this.state = state; - this.onNext = onNext; - this.onError = onError; - this.onCompleted = onCompleted; - } - - public void OnNext(T value) - { - if (isStopped == 0) - { - onNext(value, state); - } - } - - public void OnError(Exception error) - { - if (Interlocked.Increment(ref isStopped) == 1) - { - onError(error, state); - } - } - - - public void OnCompleted() - { - if (Interlocked.Increment(ref isStopped) == 1) - { - onCompleted(state); - } - } - } - - class Subscribe : IObserver - { - readonly TState1 state1; - readonly TState2 state2; - readonly Action onNext; - readonly Action onError; - readonly Action onCompleted; - - int isStopped = 0; - - public Subscribe(TState1 state1, TState2 state2, Action onNext, Action onError, Action onCompleted) - { - this.state1 = state1; - this.state2 = state2; - this.onNext = onNext; - this.onError = onError; - this.onCompleted = onCompleted; - } - - public void OnNext(T value) - { - if (isStopped == 0) - { - onNext(value, state1, state2); - } - } - - public void OnError(Exception error) - { - if (Interlocked.Increment(ref isStopped) == 1) - { - onError(error, state1, state2); - } - } - - public void OnCompleted() - { - if (Interlocked.Increment(ref isStopped) == 1) - { - onCompleted(state1, state2); - } - } - } - - class Subscribe : IObserver - { - readonly TState1 state1; - readonly TState2 state2; - readonly TState3 state3; - readonly Action onNext; - readonly Action onError; - readonly Action onCompleted; - - int isStopped = 0; - - public Subscribe(TState1 state1, TState2 state2, TState3 state3, Action onNext, Action onError, Action onCompleted) - { - this.state1 = state1; - this.state2 = state2; - this.state3 = state3; - this.onNext = onNext; - this.onError = onError; - this.onCompleted = onCompleted; - } - - public void OnNext(T value) - { - if (isStopped == 0) - { - onNext(value, state1, state2, state3); - } - } - - public void OnError(Exception error) - { - if (Interlocked.Increment(ref isStopped) == 1) - { - onError(error, state1, state2, state3); - } - } - - - public void OnCompleted() - { - if (Interlocked.Increment(ref isStopped) == 1) - { - onCompleted(state1, state2, state3); - } - } - } - - class AutoDetachObserver : UniRx.Operators.OperatorObserverBase - { - public AutoDetachObserver(IObserver observer, IDisposable cancel) - : base(observer, cancel) - { - - } - - public override void OnNext(T value) - { - try - { - base.observer.OnNext(value); - } - catch - { - Dispose(); - throw; - } - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } - finally { Dispose(); } - } - - public override void OnCompleted() - { - try { observer.OnCompleted(); } - finally { Dispose(); } - } - } - } - - public static partial class ObserverExtensions - { - public static IObserver Synchronize(this IObserver observer) - { - return new UniRx.Operators.SynchronizedObserver(observer, new object()); - } - - public static IObserver Synchronize(this IObserver observer, object gate) - { - return new UniRx.Operators.SynchronizedObserver(observer, gate); - } - } - - public static partial class ObservableExtensions - { - public static IDisposable Subscribe(this IObservable source) - { - return source.Subscribe(UniRx.InternalUtil.ThrowObserver.Instance); - } - - public static IDisposable Subscribe(this IObservable source, Action onNext) - { - return source.Subscribe(Observer.CreateSubscribeObserver(onNext, Stubs.Throw, Stubs.Nop)); - } - - public static IDisposable Subscribe(this IObservable source, Action onNext, Action onError) - { - return source.Subscribe(Observer.CreateSubscribeObserver(onNext, onError, Stubs.Nop)); - } - - public static IDisposable Subscribe(this IObservable source, Action onNext, Action onCompleted) - { - return source.Subscribe(Observer.CreateSubscribeObserver(onNext, Stubs.Throw, onCompleted)); - } - - public static IDisposable Subscribe(this IObservable source, Action onNext, Action onError, Action onCompleted) - { - return source.Subscribe(Observer.CreateSubscribeObserver(onNext, onError, onCompleted)); - } - - public static IDisposable SubscribeWithState(this IObservable source, TState state, Action onNext) - { - return source.Subscribe(Observer.CreateSubscribeWithStateObserver(state, onNext, Stubs.Throw, Stubs.Ignore)); - } - - public static IDisposable SubscribeWithState(this IObservable source, TState state, Action onNext, Action onError) - { - return source.Subscribe(Observer.CreateSubscribeWithStateObserver(state, onNext, onError, Stubs.Ignore)); - } - - public static IDisposable SubscribeWithState(this IObservable source, TState state, Action onNext, Action onCompleted) - { - return source.Subscribe(Observer.CreateSubscribeWithStateObserver(state, onNext, Stubs.Throw, onCompleted)); - } - - public static IDisposable SubscribeWithState(this IObservable source, TState state, Action onNext, Action onError, Action onCompleted) - { - return source.Subscribe(Observer.CreateSubscribeWithStateObserver(state, onNext, onError, onCompleted)); - } - - public static IDisposable SubscribeWithState2(this IObservable source, TState1 state1, TState2 state2, Action onNext) - { - return source.Subscribe(Observer.CreateSubscribeWithState2Observer(state1, state2, onNext, Stubs.Throw, Stubs.Ignore)); - } - - public static IDisposable SubscribeWithState2(this IObservable source, TState1 state1, TState2 state2, Action onNext, Action onError) - { - return source.Subscribe(Observer.CreateSubscribeWithState2Observer(state1, state2, onNext, onError, Stubs.Ignore)); - } - - public static IDisposable SubscribeWithState2(this IObservable source, TState1 state1, TState2 state2, Action onNext, Action onCompleted) - { - return source.Subscribe(Observer.CreateSubscribeWithState2Observer(state1, state2, onNext, Stubs.Throw, onCompleted)); - } - - public static IDisposable SubscribeWithState2(this IObservable source, TState1 state1, TState2 state2, Action onNext, Action onError, Action onCompleted) - { - return source.Subscribe(Observer.CreateSubscribeWithState2Observer(state1, state2, onNext, onError, onCompleted)); - } - - public static IDisposable SubscribeWithState3(this IObservable source, TState1 state1, TState2 state2, TState3 state3, Action onNext) - { - return source.Subscribe(Observer.CreateSubscribeWithState3Observer(state1, state2, state3, onNext, Stubs.Throw, Stubs.Ignore)); - } - - public static IDisposable SubscribeWithState3(this IObservable source, TState1 state1, TState2 state2, TState3 state3, Action onNext, Action onError) - { - return source.Subscribe(Observer.CreateSubscribeWithState3Observer(state1, state2, state3, onNext, onError, Stubs.Ignore)); - } - - public static IDisposable SubscribeWithState3(this IObservable source, TState1 state1, TState2 state2, TState3 state3, Action onNext, Action onCompleted) - { - return source.Subscribe(Observer.CreateSubscribeWithState3Observer(state1, state2, state3, onNext, Stubs.Throw, onCompleted)); - } - - public static IDisposable SubscribeWithState3(this IObservable source, TState1 state1, TState2 state2, TState3 state3, Action onNext, Action onError, Action onCompleted) - { - return source.Subscribe(Observer.CreateSubscribeWithState3Observer(state1, state2, state3, onNext, onError, onCompleted)); - } - } - - internal static class Stubs - { - public static readonly Action Nop = () => { }; - public static readonly Action Throw = ex => { ex.Throw(); }; - - // marker for CatchIgnore and Catch avoid iOS AOT problem. - public static IObservable CatchIgnore(Exception ex) - { - return Observable.Empty(); - } - } - - internal static class Stubs - { - public static readonly Action Ignore = (T t) => { }; - public static readonly Func Identity = (T t) => t; - public static readonly Action Throw = (ex, _) => { ex.Throw(); }; - } - - internal static class Stubs - { - public static readonly Action Ignore = (x, y) => { }; - public static readonly Action Throw = (ex, _, __) => { ex.Throw(); }; - } - - - internal static class Stubs - { - public static readonly Action Ignore = (x, y, z) => { }; - public static readonly Action Throw = (ex, _, __, ___) => { ex.Throw(); }; - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Observer.cs.meta b/Assets/Plugins/UniRx/Scripts/Observer.cs.meta deleted file mode 100644 index efe223b..0000000 --- a/Assets/Plugins/UniRx/Scripts/Observer.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 57d25c3f6fa1d334e89c384393252b8a -timeCreated: 1455373899 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators.meta b/Assets/Plugins/UniRx/Scripts/Operators.meta deleted file mode 100644 index 7153238..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 6d7e0fa941b5ce4489664ff7a6fc5c6b -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Aggregate.cs b/Assets/Plugins/UniRx/Scripts/Operators/Aggregate.cs deleted file mode 100644 index ae4c404..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/Aggregate.cs +++ /dev/null @@ -1,207 +0,0 @@ -using System; -using UniRx.Operators; - -namespace UniRx.Operators -{ - internal class AggregateObservable : OperatorObservableBase - { - readonly IObservable source; - readonly Func accumulator; - - public AggregateObservable(IObservable source, Func accumulator) - : base(source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.accumulator = accumulator; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - return source.Subscribe(new Aggregate(this, observer, cancel)); - } - - class Aggregate : OperatorObserverBase - { - readonly AggregateObservable parent; - TSource accumulation; - bool seenValue; - - public Aggregate(AggregateObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) - { - this.parent = parent; - this.seenValue = false; - } - - public override void OnNext(TSource value) - { - if (!seenValue) - { - seenValue = true; - accumulation = value; - } - else - { - try - { - accumulation = parent.accumulator(accumulation, value); - } - catch (Exception ex) - { - try { observer.OnError(ex); } - finally { Dispose(); } - return; - } - } - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } - finally { Dispose(); } - } - - public override void OnCompleted() - { - if (!seenValue) - { - throw new InvalidOperationException("Sequence contains no elements."); - } - - observer.OnNext(accumulation); - try { observer.OnCompleted(); } - finally { Dispose(); } - } - } - } - - internal class AggregateObservable : OperatorObservableBase - { - readonly IObservable source; - readonly TAccumulate seed; - readonly Func accumulator; - - public AggregateObservable(IObservable source, TAccumulate seed, Func accumulator) - : base(source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.seed = seed; - this.accumulator = accumulator; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - return source.Subscribe(new Aggregate(this, observer, cancel)); - } - - class Aggregate : OperatorObserverBase - { - readonly AggregateObservable parent; - TAccumulate accumulation; - - public Aggregate(AggregateObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) - { - this.parent = parent; - this.accumulation = parent.seed; - } - - public override void OnNext(TSource value) - { - try - { - accumulation = parent.accumulator(accumulation, value); - } - catch (Exception ex) - { - try { observer.OnError(ex); } - finally { Dispose(); } - return; - } - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } - finally { Dispose(); } - } - - public override void OnCompleted() - { - observer.OnNext(accumulation); - try { observer.OnCompleted(); } - finally { Dispose(); } - } - } - } - - internal class AggregateObservable : OperatorObservableBase - { - readonly IObservable source; - readonly TAccumulate seed; - readonly Func accumulator; - readonly Func resultSelector; - - public AggregateObservable(IObservable source, TAccumulate seed, Func accumulator, Func resultSelector) - : base(source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.seed = seed; - this.accumulator = accumulator; - this.resultSelector = resultSelector; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - return source.Subscribe(new Aggregate(this, observer, cancel)); - } - - class Aggregate : OperatorObserverBase - { - readonly AggregateObservable parent; - TAccumulate accumulation; - - public Aggregate(AggregateObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) - { - this.parent = parent; - this.accumulation = parent.seed; - } - - public override void OnNext(TSource value) - { - try - { - accumulation = parent.accumulator(accumulation, value); - } - catch (Exception ex) - { - try { observer.OnError(ex); } - finally { Dispose(); } - return; - } - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } - finally { Dispose(); } - } - - public override void OnCompleted() - { - TResult result; - try - { - result = parent.resultSelector(accumulation); - } - catch (Exception ex) - { - OnError(ex); - return; - } - - observer.OnNext(result); - try { observer.OnCompleted(); } - finally { Dispose(); } - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Aggregate.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/Aggregate.cs.meta deleted file mode 100644 index 1f2cf37..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/Aggregate.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: f777fc54ecf275349a3f007e760705b3 -timeCreated: 1455373902 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Amb.cs b/Assets/Plugins/UniRx/Scripts/Operators/Amb.cs deleted file mode 100644 index 198ef91..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/Amb.cs +++ /dev/null @@ -1,182 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace UniRx.Operators -{ - internal class AmbObservable : OperatorObservableBase - { - readonly IObservable source; - readonly IObservable second; - - public AmbObservable(IObservable source, IObservable second) - : base(source.IsRequiredSubscribeOnCurrentThread() || second.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.second = second; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - return new AmbOuterObserver(this, observer, cancel).Run(); - } - - class AmbOuterObserver : OperatorObserverBase - { - enum AmbState - { - Left, Right, Neither - } - - readonly AmbObservable parent; - readonly object gate = new object(); - SingleAssignmentDisposable leftSubscription; - SingleAssignmentDisposable rightSubscription; - AmbState choice = AmbState.Neither; - - public AmbOuterObserver(AmbObservable parent, IObserver observer, IDisposable cancel) - : base(observer, cancel) - { - this.parent = parent; - } - - public IDisposable Run() - { - leftSubscription = new SingleAssignmentDisposable(); - rightSubscription = new SingleAssignmentDisposable(); - var d = StableCompositeDisposable.Create(leftSubscription, rightSubscription); - - var left = new Amb(); - left.targetDisposable = d; - left.targetObserver = new AmbDecisionObserver(this, AmbState.Left, rightSubscription, left); - - var right = new Amb(); - right.targetDisposable = d; - right.targetObserver = new AmbDecisionObserver(this, AmbState.Right, leftSubscription, right); - - leftSubscription.Disposable = parent.source.Subscribe(left); - rightSubscription.Disposable = parent.second.Subscribe(right); - - return d; - } - - public override void OnNext(T value) - { - // no use - } - - public override void OnError(Exception error) - { - // no use - } - - public override void OnCompleted() - { - // no use - } - - class Amb : IObserver - { - public IObserver targetObserver; - public IDisposable targetDisposable; - - public void OnNext(T value) - { - targetObserver.OnNext(value); - } - - public void OnError(Exception error) - { - try - { - targetObserver.OnError(error); - } - finally - { - targetObserver = UniRx.InternalUtil.EmptyObserver.Instance; - targetDisposable.Dispose(); - } - } - - public void OnCompleted() - { - try - { - targetObserver.OnCompleted(); - } - finally - { - targetObserver = UniRx.InternalUtil.EmptyObserver.Instance; - targetDisposable.Dispose(); - } - } - } - - class AmbDecisionObserver : IObserver - { - readonly AmbOuterObserver parent; - readonly AmbState me; - readonly IDisposable otherSubscription; - readonly Amb self; - - public AmbDecisionObserver(AmbOuterObserver parent, AmbState me, IDisposable otherSubscription, Amb self) - { - this.parent = parent; - this.me = me; - this.otherSubscription = otherSubscription; - this.self = self; - } - - public void OnNext(T value) - { - lock (parent.gate) - { - if (parent.choice == AmbState.Neither) - { - parent.choice = me; - otherSubscription.Dispose(); - self.targetObserver = parent.observer; - } - - if (parent.choice == me) self.targetObserver.OnNext(value); - } - } - - public void OnError(Exception error) - { - lock (parent.gate) - { - if (parent.choice == AmbState.Neither) - { - parent.choice = me; - otherSubscription.Dispose(); - self.targetObserver = parent.observer; - } - - if (parent.choice == me) - { - self.targetObserver.OnError(error); - } - } - } - - public void OnCompleted() - { - lock (parent.gate) - { - if (parent.choice == AmbState.Neither) - { - parent.choice = me; - otherSubscription.Dispose(); - self.targetObserver = parent.observer; - } - - if (parent.choice == me) - { - self.targetObserver.OnCompleted(); - } - } - } - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Amb.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/Amb.cs.meta deleted file mode 100644 index 62e2c86..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/Amb.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: ad1a22922a735ee479baf0e179648532 -timeCreated: 1455373900 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/AsObservable.cs b/Assets/Plugins/UniRx/Scripts/Operators/AsObservable.cs deleted file mode 100644 index 2265a1c..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/AsObservable.cs +++ /dev/null @@ -1,45 +0,0 @@ -using System; -using UniRx.Operators; - -namespace UniRx.Operators -{ - internal class AsObservableObservable : OperatorObservableBase - { - readonly IObservable source; - - public AsObservableObservable(IObservable source) - : base(source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - return source.Subscribe(new AsObservable(observer, cancel)); - } - - class AsObservable : OperatorObserverBase - { - public AsObservable(IObserver observer, IDisposable cancel) : base(observer, cancel) - { - } - - public override void OnNext(T value) - { - base.observer.OnNext(value); - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } - finally { Dispose(); } - } - - public override void OnCompleted() - { - try { observer.OnCompleted(); } - finally { Dispose(); } - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/AsObservable.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/AsObservable.cs.meta deleted file mode 100644 index 409ea15..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/AsObservable.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 9e4851fd48b2b42469d71b311254877b -timeCreated: 1455373900 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/AsSingleUnitObservable.cs b/Assets/Plugins/UniRx/Scripts/Operators/AsSingleUnitObservable.cs deleted file mode 100644 index 396e18f..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/AsSingleUnitObservable.cs +++ /dev/null @@ -1,46 +0,0 @@ -using System; -using UniRx.Operators; - -namespace UniRx.Operators -{ - internal class AsSingleUnitObservableObservable : OperatorObservableBase - { - readonly IObservable source; - - public AsSingleUnitObservableObservable(IObservable source) - : base(source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - return source.Subscribe(new AsSingleUnitObservable(observer, cancel)); - } - - class AsSingleUnitObservable : OperatorObserverBase - { - public AsSingleUnitObservable(IObserver observer, IDisposable cancel) : base(observer, cancel) - { - } - - public override void OnNext(T value) - { - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } - finally { Dispose(); } - } - - public override void OnCompleted() - { - observer.OnNext(Unit.Default); - - try { observer.OnCompleted(); } - finally { Dispose(); } - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/AsSingleUnitObservable.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/AsSingleUnitObservable.cs.meta deleted file mode 100644 index 5d981eb..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/AsSingleUnitObservable.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 3b5e05dba2d3aca4e9c3a6312bef8690 -timeCreated: 1462636004 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/AsUnitObservable.cs b/Assets/Plugins/UniRx/Scripts/Operators/AsUnitObservable.cs deleted file mode 100644 index 82cba6e..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/AsUnitObservable.cs +++ /dev/null @@ -1,45 +0,0 @@ -using System; - -namespace UniRx.Operators -{ - internal class AsUnitObservableObservable : OperatorObservableBase - { - readonly IObservable source; - - public AsUnitObservableObservable(IObservable source) - : base(source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - return source.Subscribe(new AsUnitObservable(observer, cancel)); - } - - class AsUnitObservable : OperatorObserverBase - { - public AsUnitObservable(IObserver observer, IDisposable cancel) - : base(observer, cancel) - { - } - - public override void OnNext(T value) - { - base.observer.OnNext(Unit.Default); - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } - finally { Dispose(); } - } - - public override void OnCompleted() - { - try { observer.OnCompleted(); } - finally { Dispose(); } - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/AsUnitObservable.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/AsUnitObservable.cs.meta deleted file mode 100644 index 14ea875..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/AsUnitObservable.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 236f5f407bf92c949844fcaf450af450 -timeCreated: 1455373897 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Buffer.cs b/Assets/Plugins/UniRx/Scripts/Operators/Buffer.cs deleted file mode 100644 index f12b0ea..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/Buffer.cs +++ /dev/null @@ -1,624 +0,0 @@ -using System; -using System.Collections.Generic; -using UniRx.Operators; - -namespace UniRx.Operators -{ - internal class BufferObservable : OperatorObservableBase> - { - readonly IObservable source; - readonly int count; - readonly int skip; - - readonly TimeSpan timeSpan; - readonly TimeSpan timeShift; - readonly IScheduler scheduler; - - public BufferObservable(IObservable source, int count, int skip) - : base(source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.count = count; - this.skip = skip; - } - - public BufferObservable(IObservable source, TimeSpan timeSpan, TimeSpan timeShift, IScheduler scheduler) - : base(scheduler == Scheduler.CurrentThread || source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.timeSpan = timeSpan; - this.timeShift = timeShift; - this.scheduler = scheduler; - } - - public BufferObservable(IObservable source, TimeSpan timeSpan, int count, IScheduler scheduler) - : base(scheduler == Scheduler.CurrentThread || source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.timeSpan = timeSpan; - this.count = count; - this.scheduler = scheduler; - } - - protected override IDisposable SubscribeCore(IObserver> observer, IDisposable cancel) - { - // count,skip - if (scheduler == null) - { - if (skip == 0) - { - return new Buffer(this, observer, cancel).Run(); - } - else - { - return new Buffer_(this, observer, cancel).Run(); - } - } - else - { - // time + count - if (count > 0) - { - return new BufferTC(this, observer, cancel).Run(); - } - else - { - if (timeSpan == timeShift) - { - return new BufferT(this, observer, cancel).Run(); - } - else - { - return new BufferTS(this, observer, cancel).Run(); - } - } - } - } - - // count only - class Buffer : OperatorObserverBase> - { - readonly BufferObservable parent; - List list; - - public Buffer(BufferObservable parent, IObserver> observer, IDisposable cancel) : base(observer, cancel) - { - this.parent = parent; - } - - public IDisposable Run() - { - list = new List(parent.count); - return parent.source.Subscribe(this); - } - - public override void OnNext(T value) - { - list.Add(value); - if (list.Count == parent.count) - { - observer.OnNext(list); - list = new List(parent.count); - } - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } finally { Dispose(); } - } - - public override void OnCompleted() - { - if (list.Count > 0) - { - observer.OnNext(list); - } - try { observer.OnCompleted(); } finally { Dispose(); } - } - } - - // count and skip - class Buffer_ : OperatorObserverBase> - { - readonly BufferObservable parent; - Queue> q; - int index; - - public Buffer_(BufferObservable parent, IObserver> observer, IDisposable cancel) : base(observer, cancel) - { - this.parent = parent; - } - - public IDisposable Run() - { - q = new Queue>(); - index = -1; - return parent.source.Subscribe(this); - } - - public override void OnNext(T value) - { - index++; - - if (index % parent.skip == 0) - { - q.Enqueue(new List(parent.count)); - } - - var len = q.Count; - for (int i = 0; i < len; i++) - { - var list = q.Dequeue(); - list.Add(value); - if (list.Count == parent.count) - { - observer.OnNext(list); - } - else - { - q.Enqueue(list); - } - } - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } finally { Dispose(); } - } - - public override void OnCompleted() - { - foreach (var list in q) - { - observer.OnNext(list); - } - try { observer.OnCompleted(); } finally { Dispose(); } - } - } - - // timespan = timeshift - class BufferT : OperatorObserverBase> - { - static readonly T[] EmptyArray = new T[0]; - - readonly BufferObservable parent; - readonly object gate = new object(); - - List list; - - public BufferT(BufferObservable parent, IObserver> observer, IDisposable cancel) : base(observer, cancel) - { - this.parent = parent; - } - - public IDisposable Run() - { - list = new List(); - - var timerSubscription = Observable.Interval(parent.timeSpan, parent.scheduler) - .Subscribe(new Buffer(this)); - - var sourceSubscription = parent.source.Subscribe(this); - - return StableCompositeDisposable.Create(timerSubscription, sourceSubscription); - } - - public override void OnNext(T value) - { - lock (gate) - { - list.Add(value); - } - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } finally { Dispose(); } - } - - public override void OnCompleted() - { - List currentList; - lock (gate) - { - currentList = list; - } - observer.OnNext(currentList); - try { observer.OnCompleted(); } finally { Dispose(); } - } - - class Buffer : IObserver - { - BufferT parent; - - public Buffer(BufferT parent) - { - this.parent = parent; - } - - public void OnNext(long value) - { - var isZero = false; - List currentList; - lock (parent.gate) - { - currentList = parent.list; - if (currentList.Count != 0) - { - parent.list = new List(); - } - else - { - isZero = true; - } - } - - parent.observer.OnNext((isZero) ? (IList)EmptyArray : currentList); - } - - public void OnError(Exception error) - { - } - - public void OnCompleted() - { - } - } - } - - // timespan + timeshift - class BufferTS : OperatorObserverBase> - { - readonly BufferObservable parent; - readonly object gate = new object(); - - Queue> q; - TimeSpan totalTime; - TimeSpan nextShift; - TimeSpan nextSpan; - SerialDisposable timerD; - - public BufferTS(BufferObservable parent, IObserver> observer, IDisposable cancel) : base(observer, cancel) - { - this.parent = parent; - } - - public IDisposable Run() - { - totalTime = TimeSpan.Zero; - nextShift = parent.timeShift; - nextSpan = parent.timeSpan; - - q = new Queue>(); - - timerD = new SerialDisposable(); - q.Enqueue(new List()); - CreateTimer(); - - var subscription = parent.source.Subscribe(this); - - return StableCompositeDisposable.Create(subscription, timerD); - } - - void CreateTimer() - { - var m = new SingleAssignmentDisposable(); - timerD.Disposable = m; - - var isSpan = false; - var isShift = false; - if (nextSpan == nextShift) - { - isSpan = true; - isShift = true; - } - else if (nextSpan < nextShift) - isSpan = true; - else - isShift = true; - - var newTotalTime = isSpan ? nextSpan : nextShift; - var ts = newTotalTime - totalTime; - totalTime = newTotalTime; - - if (isSpan) - nextSpan += parent.timeShift; - if (isShift) - nextShift += parent.timeShift; - - m.Disposable = parent.scheduler.Schedule(ts, () => - { - lock (gate) - { - if (isShift) - { - var s = new List(); - q.Enqueue(s); - } - if (isSpan) - { - var s = q.Dequeue(); - observer.OnNext(s); - } - } - - CreateTimer(); - }); - } - - public override void OnNext(T value) - { - lock (gate) - { - foreach (var s in q) - { - s.Add(value); - } - } - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } finally { Dispose(); } - } - - public override void OnCompleted() - { - lock (gate) - { - foreach (var list in q) - { - observer.OnNext(list); - } - - try { observer.OnCompleted(); } finally { Dispose(); } - } - } - } - - // timespan + count - class BufferTC : OperatorObserverBase> - { - static readonly T[] EmptyArray = new T[0]; // cache - - readonly BufferObservable parent; - readonly object gate = new object(); - - List list; - long timerId; - SerialDisposable timerD; - - public BufferTC(BufferObservable parent, IObserver> observer, IDisposable cancel) : base(observer, cancel) - { - this.parent = parent; - } - - public IDisposable Run() - { - list = new List(); - timerId = 0L; - timerD = new SerialDisposable(); - - CreateTimer(); - var subscription = parent.source.Subscribe(this); - - return StableCompositeDisposable.Create(subscription, timerD); - } - - void CreateTimer() - { - var currentTimerId = timerId; - var timerS = new SingleAssignmentDisposable(); - timerD.Disposable = timerS; // restart timer(dispose before) - - - var periodicScheduler = parent.scheduler as ISchedulerPeriodic; - if (periodicScheduler != null) - { - timerS.Disposable = periodicScheduler.SchedulePeriodic(parent.timeSpan, () => OnNextTick(currentTimerId)); - } - else - { - timerS.Disposable = parent.scheduler.Schedule(parent.timeSpan, self => OnNextRecursive(currentTimerId, self)); - } - } - - void OnNextTick(long currentTimerId) - { - var isZero = false; - List currentList; - lock (gate) - { - if (currentTimerId != timerId) return; - - currentList = list; - if (currentList.Count != 0) - { - list = new List(); - } - else - { - isZero = true; - } - } - - observer.OnNext((isZero) ? (IList)EmptyArray : currentList); - } - - void OnNextRecursive(long currentTimerId, Action self) - { - var isZero = false; - List currentList; - lock (gate) - { - if (currentTimerId != timerId) return; - - currentList = list; - if (currentList.Count != 0) - { - list = new List(); - } - else - { - isZero = true; - } - } - - observer.OnNext((isZero) ? (IList)EmptyArray : currentList); - self(parent.timeSpan); - } - - public override void OnNext(T value) - { - List currentList = null; - lock (gate) - { - list.Add(value); - if (list.Count == parent.count) - { - currentList = list; - list = new List(); - timerId++; - CreateTimer(); - } - } - if (currentList != null) - { - observer.OnNext(currentList); - } - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } finally { Dispose(); } - } - - public override void OnCompleted() - { - List currentList; - lock (gate) - { - timerId++; - currentList = list; - } - observer.OnNext(currentList); - try { observer.OnCompleted(); } finally { Dispose(); } - } - } - } - - internal class BufferObservable : OperatorObservableBase> - { - readonly IObservable source; - readonly IObservable windowBoundaries; - - public BufferObservable(IObservable source, IObservable windowBoundaries) - : base(source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.windowBoundaries = windowBoundaries; - } - - protected override IDisposable SubscribeCore(IObserver> observer, IDisposable cancel) - { - return new Buffer(this, observer, cancel).Run(); - } - - class Buffer : OperatorObserverBase> - { - static readonly TSource[] EmptyArray = new TSource[0]; // cache - - readonly BufferObservable parent; - object gate = new object(); - List list; - - public Buffer(BufferObservable parent, IObserver> observer, IDisposable cancel) : base(observer, cancel) - { - this.parent = parent; - } - - public IDisposable Run() - { - list = new List(); - - var sourceSubscription = parent.source.Subscribe(this); - var windowSubscription = parent.windowBoundaries.Subscribe(new Buffer_(this)); - - return StableCompositeDisposable.Create(sourceSubscription, windowSubscription); - } - - public override void OnNext(TSource value) - { - lock (gate) - { - list.Add(value); - } - } - - public override void OnError(Exception error) - { - lock (gate) - { - try { observer.OnError(error); } finally { Dispose(); } - } - } - - public override void OnCompleted() - { - lock (gate) - { - var currentList = list; - list = new List(); // safe - observer.OnNext(currentList); - try { observer.OnCompleted(); } finally { Dispose(); } - } - } - - class Buffer_ : IObserver - { - readonly Buffer parent; - - public Buffer_(Buffer parent) - { - this.parent = parent; - } - - public void OnNext(TWindowBoundary value) - { - var isZero = false; - List currentList; - lock (parent.gate) - { - currentList = parent.list; - if (currentList.Count != 0) - { - parent.list = new List(); - } - else - { - isZero = true; - } - } - if (isZero) - { - parent.observer.OnNext(EmptyArray); - } - else - { - parent.observer.OnNext(currentList); - } - } - - public void OnError(Exception error) - { - parent.OnError(error); - } - - public void OnCompleted() - { - parent.OnCompleted(); - } - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Buffer.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/Buffer.cs.meta deleted file mode 100644 index b30149a..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/Buffer.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 4137aec9640d3ea41a740d677026aa8c -timeCreated: 1455373898 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Cast.cs b/Assets/Plugins/UniRx/Scripts/Operators/Cast.cs deleted file mode 100644 index f0008b1..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/Cast.cs +++ /dev/null @@ -1,57 +0,0 @@ -using System; - -namespace UniRx.Operators -{ - internal class CastObservable : OperatorObservableBase - { - readonly IObservable source; - - public CastObservable(IObservable source) - : base(source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - return source.Subscribe(new Cast(observer, cancel)); - } - - class Cast : OperatorObserverBase - { - public Cast(IObserver observer, IDisposable cancel) - : base(observer, cancel) - { - } - - public override void OnNext(TSource value) - { - var castValue = default(TResult); - try - { - castValue = (TResult)(object)value; - } - catch (Exception ex) - { - try { observer.OnError(ex); } - finally { Dispose(); } - return; - } - - observer.OnNext(castValue); - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } - finally { Dispose(); } - } - - public override void OnCompleted() - { - try { observer.OnCompleted(); } - finally { Dispose(); } - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Cast.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/Cast.cs.meta deleted file mode 100644 index 87b7a43..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/Cast.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: e70ae559c9b927742acbff91d50b3b22 -timeCreated: 1455373901 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Catch.cs b/Assets/Plugins/UniRx/Scripts/Operators/Catch.cs deleted file mode 100644 index 93014d9..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/Catch.cs +++ /dev/null @@ -1,217 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace UniRx.Operators -{ - internal class CatchObservable : OperatorObservableBase - where TException : Exception - { - readonly IObservable source; - readonly Func> errorHandler; - - public CatchObservable(IObservable source, Func> errorHandler) - : base(source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.errorHandler = errorHandler; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - return new Catch(this, observer, cancel).Run(); - } - - class Catch : OperatorObserverBase - { - readonly CatchObservable parent; - SingleAssignmentDisposable sourceSubscription; - SingleAssignmentDisposable exceptionSubscription; - - public Catch(CatchObservable parent, IObserver observer, IDisposable cancel) - : base(observer, cancel) - { - this.parent = parent; - } - - public IDisposable Run() - { - this.sourceSubscription = new SingleAssignmentDisposable(); - this.exceptionSubscription = new SingleAssignmentDisposable(); - - this.sourceSubscription.Disposable = parent.source.Subscribe(this); - return StableCompositeDisposable.Create(sourceSubscription, exceptionSubscription); - } - - public override void OnNext(T value) - { - base.observer.OnNext(value); - } - - public override void OnError(Exception error) - { - var e = error as TException; - if (e != null) - { - IObservable next; - try - { - if (parent.errorHandler == Stubs.CatchIgnore) - { - next = Observable.Empty(); // for avoid iOS AOT - } - else - { - next = parent.errorHandler(e); - } - } - catch (Exception ex) - { - try { observer.OnError(ex); } finally { Dispose(); }; - return; - } - - exceptionSubscription.Disposable = next.Subscribe(observer); - } - else - { - try { observer.OnError(error); } finally { Dispose(); }; - return; - } - } - - public override void OnCompleted() - { - try { observer.OnCompleted(); } finally { Dispose(); }; - } - } - } - - - internal class CatchObservable : OperatorObservableBase - { - readonly IEnumerable> sources; - - public CatchObservable(IEnumerable> sources) - : base(true) - { - this.sources = sources; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - return new Catch(this, observer, cancel).Run(); - } - - class Catch : OperatorObserverBase - { - readonly CatchObservable parent; - readonly object gate = new object(); - bool isDisposed; - IEnumerator> e; - SerialDisposable subscription; - Exception lastException; - Action nextSelf; - - public Catch(CatchObservable parent, IObserver observer, IDisposable cancel) - : base(observer, cancel) - { - this.parent = parent; - } - - public IDisposable Run() - { - isDisposed = false; - e = parent.sources.GetEnumerator(); - subscription = new SerialDisposable(); - - var schedule = Scheduler.DefaultSchedulers.TailRecursion.Schedule(RecursiveRun); - - return StableCompositeDisposable.Create(schedule, subscription, Disposable.Create(() => - { - lock (gate) - { - this.isDisposed = true; - this.e.Dispose(); - } - })); - } - - void RecursiveRun(Action self) - { - lock (gate) - { - nextSelf = self; - if (isDisposed) return; - - var current = default(IObservable); - var hasNext = false; - var ex = default(Exception); - - try - { - hasNext = e.MoveNext(); - if (hasNext) - { - current = e.Current; - if (current == null) throw new InvalidOperationException("sequence is null."); - } - else - { - e.Dispose(); - } - } - catch (Exception exception) - { - ex = exception; - e.Dispose(); - } - - if (ex != null) - { - try { observer.OnError(ex); } - finally { Dispose(); } - return; - } - - if (!hasNext) - { - if (lastException != null) - { - try { observer.OnError(lastException); } - finally { Dispose(); } - } - else - { - try { observer.OnCompleted(); } - finally { Dispose(); } - } - return; - } - - var source = current; - var d = new SingleAssignmentDisposable(); - subscription.Disposable = d; - d.Disposable = source.Subscribe(this); - } - } - - public override void OnNext(T value) - { - base.observer.OnNext(value); - } - - public override void OnError(Exception error) - { - lastException = error; - nextSelf(); - } - - public override void OnCompleted() - { - try { observer.OnCompleted(); } - finally { Dispose(); } - return; - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Catch.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/Catch.cs.meta deleted file mode 100644 index c3259ae..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/Catch.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 404a684db151ca34f8258c6fb373db8d -timeCreated: 1455373898 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/CombineLatest.cs b/Assets/Plugins/UniRx/Scripts/Operators/CombineLatest.cs deleted file mode 100644 index b24b6c1..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/CombineLatest.cs +++ /dev/null @@ -1,1010 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace UniRx.Operators -{ - public delegate TR CombineLatestFunc(T1 arg1, T2 arg2, T3 arg3); - public delegate TR CombineLatestFunc(T1 arg1, T2 arg2, T3 arg3, T4 arg4); - public delegate TR CombineLatestFunc(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5); - public delegate TR CombineLatestFunc(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6); - public delegate TR CombineLatestFunc(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7); - - - // binary - internal class CombineLatestObservable : OperatorObservableBase - { - readonly IObservable left; - readonly IObservable right; - readonly Func selector; - - public CombineLatestObservable(IObservable left, IObservable right, Func selector) - : base(left.IsRequiredSubscribeOnCurrentThread() || right.IsRequiredSubscribeOnCurrentThread()) - { - this.left = left; - this.right = right; - this.selector = selector; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - return new CombineLatest(this, observer, cancel).Run(); - } - - class CombineLatest : OperatorObserverBase - { - readonly CombineLatestObservable parent; - readonly object gate = new object(); - - TLeft leftValue = default(TLeft); - bool leftStarted = false; - bool leftCompleted = false; - - TRight rightValue = default(TRight); - bool rightStarted = false; - bool rightCompleted = false; - - public CombineLatest(CombineLatestObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) - { - this.parent = parent; - } - - public IDisposable Run() - { - var l = parent.left.Subscribe(new LeftObserver(this)); - var r = parent.right.Subscribe(new RightObserver(this)); - - return StableCompositeDisposable.Create(l, r); - } - - // publish in lock - public void Publish() - { - if ((leftCompleted && !leftStarted) || (rightCompleted && !rightStarted)) - { - try { observer.OnCompleted(); } - finally { Dispose(); } - return; - } - else if (!(leftStarted && rightStarted)) - { - return; - } - - TResult v; - try - { - v = parent.selector(leftValue, rightValue); - } - catch (Exception ex) - { - try { observer.OnError(ex); } - finally { Dispose(); } - return; - } - - OnNext(v); - } - - public override void OnNext(TResult value) - { - base.observer.OnNext(value); - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } - finally { Dispose(); } - } - - public override void OnCompleted() - { - try { observer.OnCompleted(); } - finally { Dispose(); } - } - - class LeftObserver : IObserver - { - readonly CombineLatest parent; - - public LeftObserver(CombineLatest parent) - { - this.parent = parent; - } - - public void OnNext(TLeft value) - { - lock (parent.gate) - { - parent.leftStarted = true; - parent.leftValue = value; - parent.Publish(); - } - } - - public void OnError(Exception error) - { - lock (parent.gate) - { - parent.OnError(error); - } - } - - public void OnCompleted() - { - lock (parent.gate) - { - parent.leftCompleted = true; - if (parent.rightCompleted) parent.OnCompleted(); - } - } - } - - class RightObserver : IObserver - { - readonly CombineLatest parent; - - public RightObserver(CombineLatest parent) - { - this.parent = parent; - } - - - public void OnNext(TRight value) - { - lock (parent.gate) - { - parent.rightStarted = true; - parent.rightValue = value; - parent.Publish(); - } - } - - public void OnError(Exception error) - { - lock (parent.gate) - { - parent.OnError(error); - } - } - - public void OnCompleted() - { - lock (parent.gate) - { - parent.rightCompleted = true; - if (parent.leftCompleted) parent.OnCompleted(); - } - } - } - } - } - - // array - internal class CombineLatestObservable : OperatorObservableBase> - { - readonly IObservable[] sources; - - public CombineLatestObservable(IObservable[] sources) - : base(true) - { - this.sources = sources; - } - - protected override IDisposable SubscribeCore(IObserver> observer, IDisposable cancel) - { - return new CombineLatest(this, observer, cancel).Run(); - } - - class CombineLatest : OperatorObserverBase, IList> - { - readonly CombineLatestObservable parent; - readonly object gate = new object(); - - int length; - T[] values; - bool[] isStarted; - bool[] isCompleted; - bool isAllValueStarted; - - public CombineLatest(CombineLatestObservable parent, IObserver> observer, IDisposable cancel) : base(observer, cancel) - { - this.parent = parent; - } - - public IDisposable Run() - { - length = parent.sources.Length; - values = new T[length]; - isStarted = new bool[length]; - isCompleted = new bool[length]; - isAllValueStarted = false; - - var disposables = new IDisposable[length]; - for (int i = 0; i < length; i++) - { - var source = parent.sources[i]; - disposables[i] = source.Subscribe(new CombineLatestObserver(this, i)); - } - - return StableCompositeDisposable.CreateUnsafe(disposables); - } - - // publish is in the lock - void Publish(int index) - { - isStarted[index] = true; - - if (isAllValueStarted) - { - OnNext(new List(values)); - return; - } - - var allValueStarted = true; - for (int i = 0; i < length; i++) - { - if (!isStarted[i]) - { - allValueStarted = false; - break; - } - } - - isAllValueStarted = allValueStarted; - - if (isAllValueStarted) - { - OnNext(new List(values)); - return; - } - else - { - var allCompletedWithoutSelf = true; - for (int i = 0; i < length; i++) - { - if (i == index) continue; - if (!isCompleted[i]) - { - allCompletedWithoutSelf = false; - break; - } - } - - if (allCompletedWithoutSelf) - { - try { observer.OnCompleted(); } - finally { Dispose(); } - return; - } - else - { - return; - } - } - } - - public override void OnNext(IList value) - { - base.observer.OnNext(value); - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } - finally { Dispose(); } - } - - public override void OnCompleted() - { - try { observer.OnCompleted(); } - finally { Dispose(); } - } - - class CombineLatestObserver : IObserver - { - readonly CombineLatest parent; - readonly int index; - - public CombineLatestObserver(CombineLatest parent, int index) - { - this.parent = parent; - this.index = index; - } - - public void OnNext(T value) - { - lock (parent.gate) - { - parent.values[index] = value; - parent.Publish(index); - } - } - - public void OnError(Exception ex) - { - lock (parent.gate) - { - parent.OnError(ex); - } - } - - public void OnCompleted() - { - lock (parent.gate) - { - parent.isCompleted[index] = true; - - var allTrue = true; - for (int i = 0; i < parent.length; i++) - { - if (!parent.isCompleted[i]) - { - allTrue = false; - break; - } - } - - if (allTrue) - { - parent.OnCompleted(); - } - } - } - } - } - } - - // generated from UniRx.Console.CombineLatestGenerator.tt - #region NTH - - internal class CombineLatestObservable : OperatorObservableBase - { - IObservable source1; - IObservable source2; - IObservable source3; - CombineLatestFunc resultSelector; - - public CombineLatestObservable( - IObservable source1, - IObservable source2, - IObservable source3, - CombineLatestFunc resultSelector) - : base( - source1.IsRequiredSubscribeOnCurrentThread() || - source2.IsRequiredSubscribeOnCurrentThread() || - source3.IsRequiredSubscribeOnCurrentThread() || - false) - { - this.source1 = source1; - this.source2 = source2; - this.source3 = source3; - this.resultSelector = resultSelector; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - return new CombineLatest(3, this, observer, cancel).Run(); - } - - class CombineLatest : NthCombineLatestObserverBase - { - readonly CombineLatestObservable parent; - readonly object gate = new object(); - CombineLatestObserver c1; - CombineLatestObserver c2; - CombineLatestObserver c3; - - public CombineLatest(int length, CombineLatestObservable parent, IObserver observer, IDisposable cancel) - : base(length, observer, cancel) - { - this.parent = parent; - } - - public IDisposable Run() - { - c1 = new CombineLatestObserver(gate, this, 0); - c2 = new CombineLatestObserver(gate, this, 1); - c3 = new CombineLatestObserver(gate, this, 2); - - var s1 = parent.source1.Subscribe(c1); - var s2 = parent.source2.Subscribe(c2); - var s3 = parent.source3.Subscribe(c3); - - return StableCompositeDisposable.Create(s1, s2, s3); - } - - public override TR GetResult() - { - return parent.resultSelector(c1.Value, c2.Value, c3.Value); - } - - public override void OnNext(TR value) - { - base.observer.OnNext(value); - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } - finally { Dispose(); } - } - - public override void OnCompleted() - { - try { observer.OnCompleted(); } - finally { Dispose(); } - } - } - } - - - internal class CombineLatestObservable : OperatorObservableBase - { - IObservable source1; - IObservable source2; - IObservable source3; - IObservable source4; - CombineLatestFunc resultSelector; - - public CombineLatestObservable( - IObservable source1, - IObservable source2, - IObservable source3, - IObservable source4, - CombineLatestFunc resultSelector) - : base( - source1.IsRequiredSubscribeOnCurrentThread() || - source2.IsRequiredSubscribeOnCurrentThread() || - source3.IsRequiredSubscribeOnCurrentThread() || - source4.IsRequiredSubscribeOnCurrentThread() || - false) - { - this.source1 = source1; - this.source2 = source2; - this.source3 = source3; - this.source4 = source4; - this.resultSelector = resultSelector; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - return new CombineLatest(4, this, observer, cancel).Run(); - } - - class CombineLatest : NthCombineLatestObserverBase - { - readonly CombineLatestObservable parent; - readonly object gate = new object(); - CombineLatestObserver c1; - CombineLatestObserver c2; - CombineLatestObserver c3; - CombineLatestObserver c4; - - public CombineLatest(int length, CombineLatestObservable parent, IObserver observer, IDisposable cancel) - : base(length, observer, cancel) - { - this.parent = parent; - } - - public IDisposable Run() - { - c1 = new CombineLatestObserver(gate, this, 0); - c2 = new CombineLatestObserver(gate, this, 1); - c3 = new CombineLatestObserver(gate, this, 2); - c4 = new CombineLatestObserver(gate, this, 3); - - var s1 = parent.source1.Subscribe(c1); - var s2 = parent.source2.Subscribe(c2); - var s3 = parent.source3.Subscribe(c3); - var s4 = parent.source4.Subscribe(c4); - - return StableCompositeDisposable.Create(s1, s2, s3, s4); - } - - public override TR GetResult() - { - return parent.resultSelector(c1.Value, c2.Value, c3.Value, c4.Value); - } - - public override void OnNext(TR value) - { - base.observer.OnNext(value); - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } - finally { Dispose(); } - } - - public override void OnCompleted() - { - try { observer.OnCompleted(); } - finally { Dispose(); } - } - } - } - - - internal class CombineLatestObservable : OperatorObservableBase - { - IObservable source1; - IObservable source2; - IObservable source3; - IObservable source4; - IObservable source5; - CombineLatestFunc resultSelector; - - public CombineLatestObservable( - IObservable source1, - IObservable source2, - IObservable source3, - IObservable source4, - IObservable source5, - CombineLatestFunc resultSelector) - : base( - source1.IsRequiredSubscribeOnCurrentThread() || - source2.IsRequiredSubscribeOnCurrentThread() || - source3.IsRequiredSubscribeOnCurrentThread() || - source4.IsRequiredSubscribeOnCurrentThread() || - source5.IsRequiredSubscribeOnCurrentThread() || - false) - { - this.source1 = source1; - this.source2 = source2; - this.source3 = source3; - this.source4 = source4; - this.source5 = source5; - this.resultSelector = resultSelector; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - return new CombineLatest(5, this, observer, cancel).Run(); - } - - class CombineLatest : NthCombineLatestObserverBase - { - readonly CombineLatestObservable parent; - readonly object gate = new object(); - CombineLatestObserver c1; - CombineLatestObserver c2; - CombineLatestObserver c3; - CombineLatestObserver c4; - CombineLatestObserver c5; - - public CombineLatest(int length, CombineLatestObservable parent, IObserver observer, IDisposable cancel) - : base(length, observer, cancel) - { - this.parent = parent; - } - - public IDisposable Run() - { - c1 = new CombineLatestObserver(gate, this, 0); - c2 = new CombineLatestObserver(gate, this, 1); - c3 = new CombineLatestObserver(gate, this, 2); - c4 = new CombineLatestObserver(gate, this, 3); - c5 = new CombineLatestObserver(gate, this, 4); - - var s1 = parent.source1.Subscribe(c1); - var s2 = parent.source2.Subscribe(c2); - var s3 = parent.source3.Subscribe(c3); - var s4 = parent.source4.Subscribe(c4); - var s5 = parent.source5.Subscribe(c5); - - return StableCompositeDisposable.Create(s1, s2, s3, s4, s5); - } - - public override TR GetResult() - { - return parent.resultSelector(c1.Value, c2.Value, c3.Value, c4.Value, c5.Value); - } - - public override void OnNext(TR value) - { - base.observer.OnNext(value); - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } - finally { Dispose(); } - } - - public override void OnCompleted() - { - try { observer.OnCompleted(); } - finally { Dispose(); } - } - } - } - - - internal class CombineLatestObservable : OperatorObservableBase - { - IObservable source1; - IObservable source2; - IObservable source3; - IObservable source4; - IObservable source5; - IObservable source6; - CombineLatestFunc resultSelector; - - public CombineLatestObservable( - IObservable source1, - IObservable source2, - IObservable source3, - IObservable source4, - IObservable source5, - IObservable source6, - CombineLatestFunc resultSelector) - : base( - source1.IsRequiredSubscribeOnCurrentThread() || - source2.IsRequiredSubscribeOnCurrentThread() || - source3.IsRequiredSubscribeOnCurrentThread() || - source4.IsRequiredSubscribeOnCurrentThread() || - source5.IsRequiredSubscribeOnCurrentThread() || - source6.IsRequiredSubscribeOnCurrentThread() || - false) - { - this.source1 = source1; - this.source2 = source2; - this.source3 = source3; - this.source4 = source4; - this.source5 = source5; - this.source6 = source6; - this.resultSelector = resultSelector; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - return new CombineLatest(6, this, observer, cancel).Run(); - } - - class CombineLatest : NthCombineLatestObserverBase - { - readonly CombineLatestObservable parent; - readonly object gate = new object(); - CombineLatestObserver c1; - CombineLatestObserver c2; - CombineLatestObserver c3; - CombineLatestObserver c4; - CombineLatestObserver c5; - CombineLatestObserver c6; - - public CombineLatest(int length, CombineLatestObservable parent, IObserver observer, IDisposable cancel) - : base(length, observer, cancel) - { - this.parent = parent; - } - - public IDisposable Run() - { - c1 = new CombineLatestObserver(gate, this, 0); - c2 = new CombineLatestObserver(gate, this, 1); - c3 = new CombineLatestObserver(gate, this, 2); - c4 = new CombineLatestObserver(gate, this, 3); - c5 = new CombineLatestObserver(gate, this, 4); - c6 = new CombineLatestObserver(gate, this, 5); - - var s1 = parent.source1.Subscribe(c1); - var s2 = parent.source2.Subscribe(c2); - var s3 = parent.source3.Subscribe(c3); - var s4 = parent.source4.Subscribe(c4); - var s5 = parent.source5.Subscribe(c5); - var s6 = parent.source6.Subscribe(c6); - - return StableCompositeDisposable.Create(s1, s2, s3, s4, s5, s6); - } - - public override TR GetResult() - { - return parent.resultSelector(c1.Value, c2.Value, c3.Value, c4.Value, c5.Value, c6.Value); - } - - public override void OnNext(TR value) - { - base.observer.OnNext(value); - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } - finally { Dispose(); } - } - - public override void OnCompleted() - { - try { observer.OnCompleted(); } - finally { Dispose(); } - } - } - } - - - internal class CombineLatestObservable : OperatorObservableBase - { - IObservable source1; - IObservable source2; - IObservable source3; - IObservable source4; - IObservable source5; - IObservable source6; - IObservable source7; - CombineLatestFunc resultSelector; - - public CombineLatestObservable( - IObservable source1, - IObservable source2, - IObservable source3, - IObservable source4, - IObservable source5, - IObservable source6, - IObservable source7, - CombineLatestFunc resultSelector) - : base( - source1.IsRequiredSubscribeOnCurrentThread() || - source2.IsRequiredSubscribeOnCurrentThread() || - source3.IsRequiredSubscribeOnCurrentThread() || - source4.IsRequiredSubscribeOnCurrentThread() || - source5.IsRequiredSubscribeOnCurrentThread() || - source6.IsRequiredSubscribeOnCurrentThread() || - source7.IsRequiredSubscribeOnCurrentThread() || - false) - { - this.source1 = source1; - this.source2 = source2; - this.source3 = source3; - this.source4 = source4; - this.source5 = source5; - this.source6 = source6; - this.source7 = source7; - this.resultSelector = resultSelector; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - return new CombineLatest(7, this, observer, cancel).Run(); - } - - class CombineLatest : NthCombineLatestObserverBase - { - readonly CombineLatestObservable parent; - readonly object gate = new object(); - CombineLatestObserver c1; - CombineLatestObserver c2; - CombineLatestObserver c3; - CombineLatestObserver c4; - CombineLatestObserver c5; - CombineLatestObserver c6; - CombineLatestObserver c7; - - public CombineLatest(int length, CombineLatestObservable parent, IObserver observer, IDisposable cancel) - : base(length, observer, cancel) - { - this.parent = parent; - } - - public IDisposable Run() - { - c1 = new CombineLatestObserver(gate, this, 0); - c2 = new CombineLatestObserver(gate, this, 1); - c3 = new CombineLatestObserver(gate, this, 2); - c4 = new CombineLatestObserver(gate, this, 3); - c5 = new CombineLatestObserver(gate, this, 4); - c6 = new CombineLatestObserver(gate, this, 5); - c7 = new CombineLatestObserver(gate, this, 6); - - var s1 = parent.source1.Subscribe(c1); - var s2 = parent.source2.Subscribe(c2); - var s3 = parent.source3.Subscribe(c3); - var s4 = parent.source4.Subscribe(c4); - var s5 = parent.source5.Subscribe(c5); - var s6 = parent.source6.Subscribe(c6); - var s7 = parent.source7.Subscribe(c7); - - return StableCompositeDisposable.Create(s1, s2, s3, s4, s5, s6, s7); - } - - public override TR GetResult() - { - return parent.resultSelector(c1.Value, c2.Value, c3.Value, c4.Value, c5.Value, c6.Value, c7.Value); - } - - public override void OnNext(TR value) - { - base.observer.OnNext(value); - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } - finally { Dispose(); } - } - - public override void OnCompleted() - { - try { observer.OnCompleted(); } - finally { Dispose(); } - } - } - } - - #endregion - - // Nth infrastructure - - internal interface ICombineLatestObservable - { - void Publish(int index); - void Fail(Exception error); - void Done(int index); - } - - internal abstract class NthCombineLatestObserverBase : OperatorObserverBase, ICombineLatestObservable - { - readonly int length; - bool isAllValueStarted; - readonly bool[] isStarted; - readonly bool[] isCompleted; - - public NthCombineLatestObserverBase(int length, IObserver observer, IDisposable cancel) : base(observer, cancel) - { - this.length = length; - this.isAllValueStarted = false; - this.isStarted = new bool[length]; - this.isCompleted = new bool[length]; - } - - public abstract T GetResult(); - - // operators in lock - public void Publish(int index) - { - isStarted[index] = true; - - if (isAllValueStarted) - { - var result = default(T); - try - { - result = GetResult(); - } - catch (Exception ex) - { - try { observer.OnError(ex); } - finally { Dispose(); } - return; - } - OnNext(result); - return; - } - - var allValueStarted = true; - for (int i = 0; i < length; i++) - { - if (!isStarted[i]) - { - allValueStarted = false; - break; - } - } - - isAllValueStarted = allValueStarted; - - if (isAllValueStarted) - { - var result = default(T); - try - { - result = GetResult(); - } - catch (Exception ex) - { - try { observer.OnError(ex); } - finally { Dispose(); } - return; - } - OnNext(result); - return; - } - else - { - var allCompletedWithoutSelf = true; - for (int i = 0; i < length; i++) - { - if (i == index) continue; - if (!isCompleted[i]) - { - allCompletedWithoutSelf = false; - break; - } - } - - if (allCompletedWithoutSelf) - { - try { observer.OnCompleted(); } - finally { Dispose(); } - return; - } - else - { - return; - } - } - } - - public void Done(int index) - { - isCompleted[index] = true; - - var allTrue = true; - for (int i = 0; i < length; i++) - { - if (!isCompleted[i]) - { - allTrue = false; - break; - } - } - - if (allTrue) - { - try { observer.OnCompleted(); } - finally { Dispose(); } - } - } - - public void Fail(Exception error) - { - try { observer.OnError(error); } - finally { Dispose(); } - } - } - - // Nth - internal class CombineLatestObserver : IObserver - { - readonly object gate; - readonly ICombineLatestObservable parent; - readonly int index; - T value; - - public T Value { get { return value; } } - - public CombineLatestObserver(object gate, ICombineLatestObservable parent, int index) - { - this.gate = gate; - this.parent = parent; - this.index = index; - } - - public void OnNext(T value) - { - lock (gate) - { - this.value = value; - parent.Publish(index); - } - } - - public void OnError(Exception error) - { - lock (gate) - { - parent.Fail(error); - } - } - - public void OnCompleted() - { - lock (gate) - { - parent.Done(index); - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/CombineLatest.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/CombineLatest.cs.meta deleted file mode 100644 index be62b73..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/CombineLatest.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 64910ffa78510ee48b3a395ee5b2cfe1 -timeCreated: 1455373899 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Concat.cs b/Assets/Plugins/UniRx/Scripts/Operators/Concat.cs deleted file mode 100644 index b1d80d7..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/Concat.cs +++ /dev/null @@ -1,142 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace UniRx.Operators -{ - // needs to more improvement - - internal class ConcatObservable : OperatorObservableBase - { - readonly IEnumerable> sources; - - public ConcatObservable(IEnumerable> sources) - : base(true) - { - this.sources = sources; - } - - public IObservable Combine(IEnumerable> combineSources) - { - return new ConcatObservable(CombineSources(this.sources, combineSources)); - } - - static IEnumerable> CombineSources(IEnumerable> first, IEnumerable> second) - { - foreach (var item in first) - { - yield return item; - } - foreach (var item in second) - { - yield return item; - } - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - return new Concat(this, observer, cancel).Run(); - } - - class Concat : OperatorObserverBase - { - readonly ConcatObservable parent; - readonly object gate = new object(); - - bool isDisposed; - IEnumerator> e; - SerialDisposable subscription; - Action nextSelf; - - public Concat(ConcatObservable parent, IObserver observer, IDisposable cancel) - : base(observer, cancel) - { - this.parent = parent; - } - - public IDisposable Run() - { - isDisposed = false; - e = parent.sources.GetEnumerator(); - subscription = new SerialDisposable(); - - var schedule = Scheduler.DefaultSchedulers.TailRecursion.Schedule(RecursiveRun); - - return StableCompositeDisposable.Create(schedule, subscription, Disposable.Create(() => - { - lock (gate) - { - this.isDisposed = true; - this.e.Dispose(); - } - })); - } - - void RecursiveRun(Action self) - { - lock (gate) - { - this.nextSelf = self; - if (isDisposed) return; - - var current = default(IObservable); - var hasNext = false; - var ex = default(Exception); - - try - { - hasNext = e.MoveNext(); - if (hasNext) - { - current = e.Current; - if (current == null) throw new InvalidOperationException("sequence is null."); - } - else - { - e.Dispose(); - } - } - catch (Exception exception) - { - ex = exception; - e.Dispose(); - } - - if (ex != null) - { - try { observer.OnError(ex); } - finally { Dispose(); } - return; - } - - if (!hasNext) - { - try { observer.OnCompleted(); } - finally { Dispose(); } - return; - } - - var source = current; - var d = new SingleAssignmentDisposable(); - subscription.Disposable = d; - d.Disposable = source.Subscribe(this); - } - } - - public override void OnNext(T value) - { - base.observer.OnNext(value); - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } - finally { Dispose(); } - } - - public override void OnCompleted() - { - this.nextSelf(); - } - } - } -} diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Concat.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/Concat.cs.meta deleted file mode 100644 index ea2836f..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/Concat.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 740c2691a7e434f439abfdcac75ea809 -timeCreated: 1455373899 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/ContinueWith.cs b/Assets/Plugins/UniRx/Scripts/Operators/ContinueWith.cs deleted file mode 100644 index 6ce640f..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/ContinueWith.cs +++ /dev/null @@ -1,77 +0,0 @@ -using System; - -namespace UniRx.Operators -{ - internal class ContinueWithObservable : OperatorObservableBase - { - readonly IObservable source; - readonly Func> selector; - - public ContinueWithObservable(IObservable source, Func> selector) - : base(source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.selector = selector; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - return new ContinueWith(this, observer, cancel).Run(); - } - - class ContinueWith : OperatorObserverBase - { - readonly ContinueWithObservable parent; - readonly SerialDisposable serialDisposable = new SerialDisposable(); - - bool seenValue; - TSource lastValue; - - public ContinueWith(ContinueWithObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) - { - this.parent = parent; - } - - public IDisposable Run() - { - var sourceDisposable = new SingleAssignmentDisposable(); - serialDisposable.Disposable = sourceDisposable; - - sourceDisposable.Disposable = parent.source.Subscribe(this); - return serialDisposable; - } - - public override void OnNext(TSource value) - { - this.seenValue = true; - this.lastValue = value; - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } finally { Dispose(); }; - } - - public override void OnCompleted() - { - if (seenValue) - { - try - { - var v = parent.selector(lastValue); - // dispose source subscription - serialDisposable.Disposable = v.Subscribe(observer); - } - catch (Exception error) - { - OnError(error); - } - } - else - { - try { observer.OnCompleted(); } finally { Dispose(); }; - } - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/ContinueWith.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/ContinueWith.cs.meta deleted file mode 100644 index 0b7c80f..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/ContinueWith.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: bea59b3eb246d244a99183eeb7f3bad4 -timeCreated: 1455373901 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Create.cs b/Assets/Plugins/UniRx/Scripts/Operators/Create.cs deleted file mode 100644 index fc4fa87..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/Create.cs +++ /dev/null @@ -1,156 +0,0 @@ -using System; - -namespace UniRx.Operators -{ - internal class CreateObservable : OperatorObservableBase - { - readonly Func, IDisposable> subscribe; - - public CreateObservable(Func, IDisposable> subscribe) - : base(true) // fail safe - { - this.subscribe = subscribe; - } - - public CreateObservable(Func, IDisposable> subscribe, bool isRequiredSubscribeOnCurrentThread) - : base(isRequiredSubscribeOnCurrentThread) - { - this.subscribe = subscribe; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - observer = new Create(observer, cancel); - return subscribe(observer) ?? Disposable.Empty; - } - - class Create : OperatorObserverBase - { - public Create(IObserver observer, IDisposable cancel) : base(observer, cancel) - { - } - - public override void OnNext(T value) - { - base.observer.OnNext(value); - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } - finally { Dispose(); } - } - - public override void OnCompleted() - { - try { observer.OnCompleted(); } - finally { Dispose(); } - } - } - } - - internal class CreateObservable : OperatorObservableBase - { - readonly TState state; - readonly Func, IDisposable> subscribe; - - public CreateObservable(TState state, Func, IDisposable> subscribe) - : base(true) // fail safe - { - this.state = state; - this.subscribe = subscribe; - } - - public CreateObservable(TState state, Func, IDisposable> subscribe, bool isRequiredSubscribeOnCurrentThread) - : base(isRequiredSubscribeOnCurrentThread) - { - this.state = state; - this.subscribe = subscribe; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - observer = new Create(observer, cancel); - return subscribe(state, observer) ?? Disposable.Empty; - } - - class Create : OperatorObserverBase - { - public Create(IObserver observer, IDisposable cancel) : base(observer, cancel) - { - } - - public override void OnNext(T value) - { - base.observer.OnNext(value); - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } - finally { Dispose(); } - } - - public override void OnCompleted() - { - try { observer.OnCompleted(); } - finally { Dispose(); } - } - } - } - - internal class CreateSafeObservable : OperatorObservableBase - { - readonly Func, IDisposable> subscribe; - - public CreateSafeObservable(Func, IDisposable> subscribe) - : base(true) // fail safe - { - this.subscribe = subscribe; - } - - public CreateSafeObservable(Func, IDisposable> subscribe, bool isRequiredSubscribeOnCurrentThread) - : base(isRequiredSubscribeOnCurrentThread) - { - this.subscribe = subscribe; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - observer = new CreateSafe(observer, cancel); - return subscribe(observer) ?? Disposable.Empty; - } - - class CreateSafe : OperatorObserverBase - { - public CreateSafe(IObserver observer, IDisposable cancel) : base(observer, cancel) - { - } - - public override void OnNext(T value) - { - try - { - base.observer.OnNext(value); - } - catch - { - Dispose(); // safe - throw; - } - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } - finally { Dispose(); } - } - - public override void OnCompleted() - { - try { observer.OnCompleted(); } - finally { Dispose(); } - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Create.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/Create.cs.meta deleted file mode 100644 index 1bf20a9..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/Create.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: cae9e62bf5eb3dc4e9d93cf6ff606052 -timeCreated: 1455373901 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/DefaultIfEmpty.cs b/Assets/Plugins/UniRx/Scripts/Operators/DefaultIfEmpty.cs deleted file mode 100644 index ff7b8c9..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/DefaultIfEmpty.cs +++ /dev/null @@ -1,58 +0,0 @@ -using System; -using UniRx.Operators; - -namespace UniRx.Operators -{ - internal class DefaultIfEmptyObservable : OperatorObservableBase - { - readonly IObservable source; - readonly T defaultValue; - - public DefaultIfEmptyObservable(IObservable source, T defaultValue) - : base(source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.defaultValue = defaultValue; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - return source.Subscribe(new DefaultIfEmpty(this, observer, cancel)); - } - - class DefaultIfEmpty : OperatorObserverBase - { - readonly DefaultIfEmptyObservable parent; - bool hasValue; - - public DefaultIfEmpty(DefaultIfEmptyObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) - { - this.parent = parent; - this.hasValue = false; - } - - public override void OnNext(T value) - { - hasValue = true; - observer.OnNext(value); - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } - finally { Dispose(); } - } - - public override void OnCompleted() - { - if (!hasValue) - { - observer.OnNext(parent.defaultValue); - } - - try { observer.OnCompleted(); } - finally { Dispose(); } - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/DefaultIfEmpty.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/DefaultIfEmpty.cs.meta deleted file mode 100644 index 736b984..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/DefaultIfEmpty.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 551075cda284fbc489824d153743b1e6 -timeCreated: 1455373899 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Defer.cs b/Assets/Plugins/UniRx/Scripts/Operators/Defer.cs deleted file mode 100644 index 81f01a8..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/Defer.cs +++ /dev/null @@ -1,64 +0,0 @@ -using System; - -namespace UniRx.Operators -{ - internal class DeferObservable : OperatorObservableBase - { - readonly Func> observableFactory; - - public DeferObservable(Func> observableFactory) - : base(false) - { - this.observableFactory = observableFactory; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - observer = new Defer(observer, cancel); - - IObservable source; - try - { - source = observableFactory(); - } - catch (Exception ex) - { - source = Observable.Throw(ex); - } - - return source.Subscribe(observer); - } - - class Defer : OperatorObserverBase - { - public Defer(IObserver observer, IDisposable cancel) : base(observer, cancel) - { - } - - public override void OnNext(T value) - { - try - { - base.observer.OnNext(value); - } - catch - { - Dispose(); - throw; - } - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } - finally { Dispose(); } - } - - public override void OnCompleted() - { - try { observer.OnCompleted(); } - finally { Dispose(); } - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Defer.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/Defer.cs.meta deleted file mode 100644 index 681f93e..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/Defer.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 15ca418b98836d943864b1e8b82f6658 -timeCreated: 1455373897 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Delay.cs b/Assets/Plugins/UniRx/Scripts/Operators/Delay.cs deleted file mode 100644 index 82e55fe..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/Delay.cs +++ /dev/null @@ -1,227 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace UniRx.Operators -{ - internal class DelayObservable : OperatorObservableBase - { - readonly IObservable source; - readonly TimeSpan dueTime; - readonly IScheduler scheduler; - - public DelayObservable(IObservable source, TimeSpan dueTime, IScheduler scheduler) - : base(scheduler == Scheduler.CurrentThread || source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.dueTime = dueTime; - this.scheduler = scheduler; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - return new Delay(this, observer, cancel).Run(); - } - - class Delay : OperatorObserverBase - { - readonly DelayObservable parent; - readonly object gate = new object(); - bool hasFailed; - bool running; - bool active; - Exception exception; - Queue> queue; - bool onCompleted; - DateTimeOffset completeAt; - IDisposable sourceSubscription; - TimeSpan delay; - bool ready; - SerialDisposable cancelable; - - public Delay(DelayObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) - { - this.parent = parent; - } - - public IDisposable Run() - { - cancelable = new SerialDisposable(); - - active = false; - running = false; - queue = new Queue>(); - onCompleted = false; - completeAt = default(DateTimeOffset); - hasFailed = false; - exception = default(Exception); - ready = true; - delay = Scheduler.Normalize(parent.dueTime); - - var _sourceSubscription = new SingleAssignmentDisposable(); - sourceSubscription = _sourceSubscription; // assign to field - _sourceSubscription.Disposable = parent.source.Subscribe(this); - - return StableCompositeDisposable.Create(sourceSubscription, cancelable); - } - - public override void OnNext(T value) - { - var next = parent.scheduler.Now.Add(delay); - var shouldRun = false; - - lock (gate) - { - queue.Enqueue(new Timestamped(value, next)); - - shouldRun = ready && !active; - active = true; - } - - if (shouldRun) - { - cancelable.Disposable = parent.scheduler.Schedule(delay, DrainQueue); - } - } - - public override void OnError(Exception error) - { - sourceSubscription.Dispose(); - - var shouldRun = false; - - lock (gate) - { - queue.Clear(); - - exception = error; - hasFailed = true; - - shouldRun = !running; - } - - if (shouldRun) - { - try { base.observer.OnError(error); } finally { Dispose(); } - } - } - - public override void OnCompleted() - { - sourceSubscription.Dispose(); - - var next = parent.scheduler.Now.Add(delay); - var shouldRun = false; - - lock (gate) - { - completeAt = next; - onCompleted = true; - - shouldRun = ready && !active; - active = true; - } - - if (shouldRun) - { - cancelable.Disposable = parent.scheduler.Schedule(delay, DrainQueue); - } - } - - void DrainQueue(Action recurse) - { - lock (gate) - { - if (hasFailed) return; - running = true; - } - - var shouldYield = false; - - while (true) - { - var hasFailed = false; - var error = default(Exception); - - var hasValue = false; - var value = default(T); - var hasCompleted = false; - - var shouldRecurse = false; - var recurseDueTime = default(TimeSpan); - - lock (gate) - { - if (hasFailed) - { - error = exception; - hasFailed = true; - running = false; - } - else - { - if (queue.Count > 0) - { - var nextDue = queue.Peek().Timestamp; - - if (nextDue.CompareTo(parent.scheduler.Now) <= 0 && !shouldYield) - { - value = queue.Dequeue().Value; - hasValue = true; - } - else - { - shouldRecurse = true; - recurseDueTime = Scheduler.Normalize(nextDue.Subtract(parent.scheduler.Now)); - running = false; - } - } - else if (onCompleted) - { - if (completeAt.CompareTo(parent.scheduler.Now) <= 0 && !shouldYield) - { - hasCompleted = true; - } - else - { - shouldRecurse = true; - recurseDueTime = Scheduler.Normalize(completeAt.Subtract(parent.scheduler.Now)); - running = false; - } - } - else - { - running = false; - active = false; - } - } - } - - if (hasValue) - { - base.observer.OnNext(value); - shouldYield = true; - } - else - { - if (hasCompleted) - { - try { base.observer.OnCompleted(); } finally { Dispose(); } - } - else if (hasFailed) - { - try { base.observer.OnError(error); } finally { Dispose(); } - } - else if (shouldRecurse) - { - recurse(recurseDueTime); - } - - return; - } - } - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Delay.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/Delay.cs.meta deleted file mode 100644 index 1563740..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/Delay.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 2af9c507ce062994a904e4b5565b49c0 -timeCreated: 1455373898 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/DelaySubscription.cs b/Assets/Plugins/UniRx/Scripts/Operators/DelaySubscription.cs deleted file mode 100644 index 22ae6ca..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/DelaySubscription.cs +++ /dev/null @@ -1,56 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace UniRx.Operators -{ - internal class DelaySubscriptionObservable : OperatorObservableBase - { - readonly IObservable source; - readonly IScheduler scheduler; - readonly TimeSpan? dueTimeT; - readonly DateTimeOffset? dueTimeD; - - public DelaySubscriptionObservable(IObservable source,TimeSpan dueTime, IScheduler scheduler) - : base(scheduler == Scheduler.CurrentThread || source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.scheduler = scheduler; - this.dueTimeT = dueTime; - } - - public DelaySubscriptionObservable(IObservable source, DateTimeOffset dueTime, IScheduler scheduler) - : base(scheduler == Scheduler.CurrentThread || source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.scheduler = scheduler; - this.dueTimeD = dueTime; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - if (dueTimeT != null) - { - var d = new MultipleAssignmentDisposable(); - var dt = Scheduler.Normalize(dueTimeT.Value); - - d.Disposable = scheduler.Schedule(dt, () => - { - d.Disposable = source.Subscribe(observer); - }); - - return d; - } - else - { - var d = new MultipleAssignmentDisposable(); - - d.Disposable = scheduler.Schedule(dueTimeD.Value, () => - { - d.Disposable = source.Subscribe(observer); - }); - - return d; - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/DelaySubscription.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/DelaySubscription.cs.meta deleted file mode 100644 index 3232eb3..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/DelaySubscription.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 4f532fc776d5298439cb8f03d52e1211 -timeCreated: 1455373899 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Dematerialize.cs b/Assets/Plugins/UniRx/Scripts/Operators/Dematerialize.cs deleted file mode 100644 index b4a1b62..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/Dematerialize.cs +++ /dev/null @@ -1,66 +0,0 @@ -using System; - -namespace UniRx.Operators -{ - internal class DematerializeObservable : OperatorObservableBase - { - readonly IObservable> source; - - public DematerializeObservable(IObservable> source) - : base(source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - return new Dematerialize(this, observer, cancel).Run(); - } - - class Dematerialize : OperatorObserverBase, T> - { - readonly DematerializeObservable parent; - - public Dematerialize(DematerializeObservable parent, IObserver observer, IDisposable cancel) - : base(observer, cancel) - { - this.parent = parent; - } - - public IDisposable Run() - { - return parent.source.Subscribe(this); - } - - public override void OnNext(Notification value) - { - switch (value.Kind) - { - case NotificationKind.OnNext: - observer.OnNext(value.Value); - break; - case NotificationKind.OnError: - try { observer.OnError(value.Exception); } - finally { Dispose(); } - break; - case NotificationKind.OnCompleted: - try { observer.OnCompleted(); } - finally { Dispose(); } - break; - default: - break; - } - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } finally { Dispose(); } - } - - public override void OnCompleted() - { - try { observer.OnCompleted(); } finally { Dispose(); } - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Dematerialize.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/Dematerialize.cs.meta deleted file mode 100644 index 01c30f8..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/Dematerialize.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 80682be7e41afb44581208534f226d38 -timeCreated: 1455373899 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Distinct.cs b/Assets/Plugins/UniRx/Scripts/Operators/Distinct.cs deleted file mode 100644 index 2f3ee14..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/Distinct.cs +++ /dev/null @@ -1,133 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace UniRx.Operators -{ - internal class DistinctObservable : OperatorObservableBase - { - readonly IObservable source; - readonly IEqualityComparer comparer; - - public DistinctObservable(IObservable source, IEqualityComparer comparer) - : base(source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.comparer = comparer; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - return source.Subscribe(new Distinct(this, observer, cancel)); - } - - class Distinct : OperatorObserverBase - { - readonly HashSet hashSet; - - public Distinct(DistinctObservable parent, IObserver observer, IDisposable cancel) - : base(observer, cancel) - { - hashSet = (parent.comparer == null) - ? new HashSet() - : new HashSet(parent.comparer); - } - - public override void OnNext(T value) - { - var key = default(T); - var isAdded = false; - try - { - key = value; - isAdded = hashSet.Add(key); - } - catch (Exception exception) - { - try { observer.OnError(exception); } finally { Dispose(); } - return; - } - - if (isAdded) - { - observer.OnNext(value); - } - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } finally { Dispose(); } - } - - public override void OnCompleted() - { - try { observer.OnCompleted(); } finally { Dispose(); } - } - } - } - - internal class DistinctObservable : OperatorObservableBase - { - readonly IObservable source; - readonly IEqualityComparer comparer; - readonly Func keySelector; - - public DistinctObservable(IObservable source, Func keySelector, IEqualityComparer comparer) - : base(source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.comparer = comparer; - this.keySelector = keySelector; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - return source.Subscribe(new Distinct(this, observer, cancel)); - } - - class Distinct : OperatorObserverBase - { - readonly DistinctObservable parent; - readonly HashSet hashSet; - - public Distinct(DistinctObservable parent, IObserver observer, IDisposable cancel) - : base(observer, cancel) - { - this.parent = parent; - hashSet = (parent.comparer == null) - ? new HashSet() - : new HashSet(parent.comparer); - } - - public override void OnNext(T value) - { - var key = default(TKey); - var isAdded = false; - try - { - key = parent.keySelector(value); - isAdded = hashSet.Add(key); - } - catch (Exception exception) - { - try { observer.OnError(exception); } finally { Dispose(); } - return; - } - - if (isAdded) - { - observer.OnNext(value); - } - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } finally { Dispose(); } - } - - public override void OnCompleted() - { - try { observer.OnCompleted(); } finally { Dispose(); } - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Distinct.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/Distinct.cs.meta deleted file mode 100644 index 6bbb0bd..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/Distinct.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 376a7ed430bff5c4b860af4d23ab6b79 -timeCreated: 1455373898 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/DistinctUntilChanged.cs b/Assets/Plugins/UniRx/Scripts/Operators/DistinctUntilChanged.cs deleted file mode 100644 index 1c54c21..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/DistinctUntilChanged.cs +++ /dev/null @@ -1,165 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace UniRx.Operators -{ - internal class DistinctUntilChangedObservable : OperatorObservableBase - { - readonly IObservable source; - readonly IEqualityComparer comparer; - - public DistinctUntilChangedObservable(IObservable source, IEqualityComparer comparer) - : base(source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.comparer = comparer; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - return source.Subscribe(new DistinctUntilChanged(this, observer, cancel)); - } - - class DistinctUntilChanged : OperatorObserverBase - { - readonly DistinctUntilChangedObservable parent; - bool isFirst = true; - T prevKey = default(T); - - public DistinctUntilChanged(DistinctUntilChangedObservable parent, IObserver observer, IDisposable cancel) - : base(observer, cancel) - { - this.parent = parent; - } - - public override void OnNext(T value) - { - T currentKey; - try - { - currentKey = value; - } - catch (Exception exception) - { - try { observer.OnError(exception); } finally { Dispose(); } - return; - } - - var sameKey = false; - if (isFirst) - { - isFirst = false; - } - else - { - try - { - sameKey = parent.comparer.Equals(currentKey, prevKey); - } - catch (Exception ex) - { - try { observer.OnError(ex); } finally { Dispose(); } - return; - } - } - - if (!sameKey) - { - prevKey = currentKey; - observer.OnNext(value); - } - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } finally { Dispose(); } - } - - public override void OnCompleted() - { - try { observer.OnCompleted(); } finally { Dispose(); } - } - } - } - - internal class DistinctUntilChangedObservable : OperatorObservableBase - { - readonly IObservable source; - readonly IEqualityComparer comparer; - readonly Func keySelector; - - public DistinctUntilChangedObservable(IObservable source, Func keySelector, IEqualityComparer comparer) - : base(source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.comparer = comparer; - this.keySelector = keySelector; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - return source.Subscribe(new DistinctUntilChanged(this, observer, cancel)); - } - - class DistinctUntilChanged : OperatorObserverBase - { - readonly DistinctUntilChangedObservable parent; - bool isFirst = true; - TKey prevKey = default(TKey); - - public DistinctUntilChanged(DistinctUntilChangedObservable parent, IObserver observer, IDisposable cancel) - : base(observer, cancel) - { - this.parent = parent; - } - - public override void OnNext(T value) - { - TKey currentKey; - try - { - currentKey = parent.keySelector(value); - } - catch (Exception exception) - { - try { observer.OnError(exception); } finally { Dispose(); } - return; - } - - var sameKey = false; - if (isFirst) - { - isFirst = false; - } - else - { - try - { - sameKey = parent.comparer.Equals(currentKey, prevKey); - } - catch (Exception ex) - { - try { observer.OnError(ex); } finally { Dispose(); } - return; - } - } - - if (!sameKey) - { - prevKey = currentKey; - observer.OnNext(value); - } - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } finally { Dispose(); } - } - - public override void OnCompleted() - { - try { observer.OnCompleted(); } finally { Dispose(); } - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/DistinctUntilChanged.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/DistinctUntilChanged.cs.meta deleted file mode 100644 index f26ca6f..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/DistinctUntilChanged.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: a09c4b58f60c22342871c30eaf589f6c -timeCreated: 1455373900 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Do.cs b/Assets/Plugins/UniRx/Scripts/Operators/Do.cs deleted file mode 100644 index d1b08a1..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/Do.cs +++ /dev/null @@ -1,477 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace UniRx.Operators -{ - // Do, DoOnError, DoOnCompleted, DoOnTerminate, DoOnSubscribe, DoOnCancel - - internal class DoObservable : OperatorObservableBase - { - readonly IObservable source; - readonly Action onNext; - readonly Action onError; - readonly Action onCompleted; - - public DoObservable(IObservable source, Action onNext, Action onError, Action onCompleted) - : base(source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.onNext = onNext; - this.onError = onError; - this.onCompleted = onCompleted; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - return new Do(this, observer, cancel).Run(); - } - - class Do : OperatorObserverBase - { - readonly DoObservable parent; - - public Do(DoObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) - { - this.parent = parent; - } - - public IDisposable Run() - { - return parent.source.Subscribe(this); - } - - public override void OnNext(T value) - { - try - { - parent.onNext(value); - } - catch (Exception ex) - { - try { observer.OnError(ex); } finally { Dispose(); }; - return; - } - base.observer.OnNext(value); - } - - public override void OnError(Exception error) - { - try - { - parent.onError(error); - } - catch (Exception ex) - { - try { observer.OnError(ex); } finally { Dispose(); }; - return; - } - try { observer.OnError(error); } finally { Dispose(); }; - } - - public override void OnCompleted() - { - try - { - parent.onCompleted(); - } - catch (Exception ex) - { - base.observer.OnError(ex); - Dispose(); - return; - } - try { observer.OnCompleted(); } finally { Dispose(); }; - } - } - } - - internal class DoObserverObservable : OperatorObservableBase - { - readonly IObservable source; - readonly IObserver observer; - - public DoObserverObservable(IObservable source, IObserver observer) - : base(source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.observer = observer; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - return new Do(this, observer, cancel).Run(); - } - - class Do : OperatorObserverBase - { - readonly DoObserverObservable parent; - - public Do(DoObserverObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) - { - this.parent = parent; - } - - public IDisposable Run() - { - return parent.source.Subscribe(this); - } - - public override void OnNext(T value) - { - try - { - parent.observer.OnNext(value); - } - catch (Exception ex) - { - try { observer.OnError(ex); } - finally { Dispose(); } - return; - } - base.observer.OnNext(value); - } - - public override void OnError(Exception error) - { - try - { - parent.observer.OnError(error); - } - catch (Exception ex) - { - try { observer.OnError(ex); } - finally { Dispose(); } - return; - } - - try { observer.OnError(error); } - finally { Dispose(); } - } - - public override void OnCompleted() - { - try - { - parent.observer.OnCompleted(); - } - catch (Exception ex) - { - try { observer.OnError(ex); } - finally { Dispose(); } - return; - } - - try { observer.OnCompleted(); } - finally { Dispose(); } - } - } - } - - internal class DoOnErrorObservable : OperatorObservableBase - { - readonly IObservable source; - readonly Action onError; - - public DoOnErrorObservable(IObservable source, Action onError) - : base(source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.onError = onError; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - return new DoOnError(this, observer, cancel).Run(); - } - - class DoOnError : OperatorObserverBase - { - readonly DoOnErrorObservable parent; - - public DoOnError(DoOnErrorObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) - { - this.parent = parent; - } - - public IDisposable Run() - { - return parent.source.Subscribe(this); - } - - public override void OnNext(T value) - { - base.observer.OnNext(value); - } - - public override void OnError(Exception error) - { - try - { - parent.onError(error); - } - catch (Exception ex) - { - try { observer.OnError(ex); } - finally { Dispose(); } - return; - } - - - try { observer.OnError(error); } - finally { Dispose(); } - } - - public override void OnCompleted() - { - try { observer.OnCompleted(); } - finally { Dispose(); } - } - } - } - - internal class DoOnCompletedObservable : OperatorObservableBase - { - readonly IObservable source; - readonly Action onCompleted; - - public DoOnCompletedObservable(IObservable source, Action onCompleted) - : base(source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.onCompleted = onCompleted; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - return new DoOnCompleted(this, observer, cancel).Run(); - } - - class DoOnCompleted : OperatorObserverBase - { - readonly DoOnCompletedObservable parent; - - public DoOnCompleted(DoOnCompletedObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) - { - this.parent = parent; - } - - public IDisposable Run() - { - return parent.source.Subscribe(this); - } - - public override void OnNext(T value) - { - base.observer.OnNext(value); - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } - finally { Dispose(); } - } - - public override void OnCompleted() - { - try - { - parent.onCompleted(); - } - catch (Exception ex) - { - base.observer.OnError(ex); - Dispose(); - return; - } - try { observer.OnCompleted(); } finally { Dispose(); }; - } - } - } - - internal class DoOnTerminateObservable : OperatorObservableBase - { - readonly IObservable source; - readonly Action onTerminate; - - public DoOnTerminateObservable(IObservable source, Action onTerminate) - : base(source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.onTerminate = onTerminate; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - return new DoOnTerminate(this, observer, cancel).Run(); - } - - class DoOnTerminate : OperatorObserverBase - { - readonly DoOnTerminateObservable parent; - - public DoOnTerminate(DoOnTerminateObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) - { - this.parent = parent; - } - - public IDisposable Run() - { - return parent.source.Subscribe(this); - } - - public override void OnNext(T value) - { - base.observer.OnNext(value); - } - - public override void OnError(Exception error) - { - try - { - parent.onTerminate(); - } - catch (Exception ex) - { - try { observer.OnError(ex); } - finally { Dispose(); } - return; - } - try { observer.OnError(error); } finally { Dispose(); }; - } - - public override void OnCompleted() - { - try - { - parent.onTerminate(); - } - catch (Exception ex) - { - base.observer.OnError(ex); - Dispose(); - return; - } - try { observer.OnCompleted(); } finally { Dispose(); }; - } - } - } - - internal class DoOnSubscribeObservable : OperatorObservableBase - { - readonly IObservable source; - readonly Action onSubscribe; - - public DoOnSubscribeObservable(IObservable source, Action onSubscribe) - : base(source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.onSubscribe = onSubscribe; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - return new DoOnSubscribe(this, observer, cancel).Run(); - } - - class DoOnSubscribe : OperatorObserverBase - { - readonly DoOnSubscribeObservable parent; - - public DoOnSubscribe(DoOnSubscribeObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) - { - this.parent = parent; - } - - public IDisposable Run() - { - try - { - parent.onSubscribe(); - } - catch (Exception ex) - { - try { observer.OnError(ex); } - finally { Dispose(); } - return Disposable.Empty; - } - - return parent.source.Subscribe(this); - } - - public override void OnNext(T value) - { - base.observer.OnNext(value); - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } finally { Dispose(); } - } - - public override void OnCompleted() - { - try { observer.OnCompleted(); } finally { Dispose(); } - } - } - } - - internal class DoOnCancelObservable : OperatorObservableBase - { - readonly IObservable source; - readonly Action onCancel; - - public DoOnCancelObservable(IObservable source, Action onCancel) - : base(source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.onCancel = onCancel; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - return new DoOnCancel(this, observer, cancel).Run(); - } - - class DoOnCancel : OperatorObserverBase - { - readonly DoOnCancelObservable parent; - bool isCompletedCall = false; - - public DoOnCancel(DoOnCancelObservable parent, IObserver observer, IDisposable cancel) - : base(observer, cancel) - { - this.parent = parent; - } - - public IDisposable Run() - { - return StableCompositeDisposable.Create(parent.source.Subscribe(this), Disposable.Create(() => - { - if (!isCompletedCall) - { - parent.onCancel(); - } - })); - } - - public override void OnNext(T value) - { - base.observer.OnNext(value); - } - - public override void OnError(Exception error) - { - isCompletedCall = true; - try { observer.OnError(error); } finally { Dispose(); }; - } - - public override void OnCompleted() - { - isCompletedCall = true; - try { observer.OnCompleted(); } finally { Dispose(); }; - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Do.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/Do.cs.meta deleted file mode 100644 index e4162a9..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/Do.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 8f99ae8870195e34b8618451a95818e0 -timeCreated: 1455373900 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Empty.cs b/Assets/Plugins/UniRx/Scripts/Operators/Empty.cs deleted file mode 100644 index 0cd77fd..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/Empty.cs +++ /dev/null @@ -1,83 +0,0 @@ -using System; - -namespace UniRx.Operators -{ - internal class EmptyObservable : OperatorObservableBase - { - readonly IScheduler scheduler; - - public EmptyObservable(IScheduler scheduler) - : base(false) - { - this.scheduler = scheduler; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - observer = new Empty(observer, cancel); - - if (scheduler == Scheduler.Immediate) - { - observer.OnCompleted(); - return Disposable.Empty; - } - else - { - return scheduler.Schedule(observer.OnCompleted); - } - } - - class Empty : OperatorObserverBase - { - public Empty(IObserver observer, IDisposable cancel) : base(observer, cancel) - { - } - - public override void OnNext(T value) - { - try - { - base.observer.OnNext(value); - } - catch - { - Dispose(); - throw; - } - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } - finally { Dispose(); } - } - - public override void OnCompleted() - { - try { observer.OnCompleted(); } - finally { Dispose(); } - } - } - } - - internal class ImmutableEmptyObservable : IObservable, IOptimizedObservable - { - internal static ImmutableEmptyObservable Instance = new ImmutableEmptyObservable(); - - ImmutableEmptyObservable() - { - - } - - public bool IsRequiredSubscribeOnCurrentThread() - { - return false; - } - - public IDisposable Subscribe(IObserver observer) - { - observer.OnCompleted(); - return Disposable.Empty; - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Empty.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/Empty.cs.meta deleted file mode 100644 index 6625cb8..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/Empty.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 9e9a7050a289d3a4aa17cba89e085135 -timeCreated: 1455373900 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Finally.cs b/Assets/Plugins/UniRx/Scripts/Operators/Finally.cs deleted file mode 100644 index ced54f0..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/Finally.cs +++ /dev/null @@ -1,68 +0,0 @@ -using System; - -namespace UniRx.Operators -{ - internal class FinallyObservable : OperatorObservableBase - { - readonly IObservable source; - readonly Action finallyAction; - - public FinallyObservable(IObservable source, Action finallyAction) - : base(source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.finallyAction = finallyAction; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - return new Finally(this, observer, cancel).Run(); - } - - class Finally : OperatorObserverBase - { - readonly FinallyObservable parent; - - public Finally(FinallyObservable parent, IObserver observer, IDisposable cancel) - : base(observer, cancel) - { - this.parent = parent; - } - - public IDisposable Run() - { - IDisposable subscription; - try - { - subscription = parent.source.Subscribe(this); - } - catch - { - // This behaviour is not same as .NET Official Rx - parent.finallyAction(); - throw; - } - - return StableCompositeDisposable.Create(subscription, Disposable.Create(() => - { - parent.finallyAction(); - })); - } - - public override void OnNext(T value) - { - base.observer.OnNext(value); - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } finally { Dispose(); }; - } - - public override void OnCompleted() - { - try { observer.OnCompleted(); } finally { Dispose(); }; - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Finally.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/Finally.cs.meta deleted file mode 100644 index 772d478..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/Finally.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 9ce919d8f2acf2b47a932e850e399d3a -timeCreated: 1455373900 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/First.cs b/Assets/Plugins/UniRx/Scripts/Operators/First.cs deleted file mode 100644 index 8233d9e..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/First.cs +++ /dev/null @@ -1,166 +0,0 @@ -using System; -using UniRx.Operators; - -namespace UniRx.Operators -{ - internal class FirstObservable : OperatorObservableBase - { - readonly IObservable source; - readonly bool useDefault; - readonly Func predicate; - - public FirstObservable(IObservable source, bool useDefault) - : base(source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.useDefault = useDefault; - } - - public FirstObservable(IObservable source, Func predicate, bool useDefault) - : base(source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.predicate = predicate; - this.useDefault = useDefault; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - if (predicate == null) - { - return source.Subscribe(new First(this, observer, cancel)); - } - else - { - return source.Subscribe(new First_(this, observer, cancel)); - } - } - - class First : OperatorObserverBase - { - readonly FirstObservable parent; - bool notPublished; - - public First(FirstObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) - { - this.parent = parent; - this.notPublished = true; - } - - public override void OnNext(T value) - { - if (notPublished) - { - notPublished = false; - observer.OnNext(value); - try { observer.OnCompleted(); } - finally { Dispose(); } - return; - } - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } - finally { Dispose(); } - } - - public override void OnCompleted() - { - if (parent.useDefault) - { - if (notPublished) - { - observer.OnNext(default(T)); - } - try { observer.OnCompleted(); } - finally { Dispose(); } - } - else - { - if (notPublished) - { - try { observer.OnError(new InvalidOperationException("sequence is empty")); } - finally { Dispose(); } - } - else - { - try { observer.OnCompleted(); } - finally { Dispose(); } - } - } - } - } - - // with predicate - class First_ : OperatorObserverBase - { - readonly FirstObservable parent; - bool notPublished; - - public First_(FirstObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) - { - this.parent = parent; - this.notPublished = true; - } - - public override void OnNext(T value) - { - if (notPublished) - { - bool isPassed; - try - { - isPassed = parent.predicate(value); - } - catch (Exception ex) - { - try { observer.OnError(ex); } - finally { Dispose(); } - return; - } - - if (isPassed) - { - notPublished = false; - observer.OnNext(value); - try { observer.OnCompleted(); } - finally { Dispose(); } - } - } - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } - finally { Dispose(); } - } - - public override void OnCompleted() - { - if (parent.useDefault) - { - if (notPublished) - { - observer.OnNext(default(T)); - } - try { observer.OnCompleted(); } - finally { Dispose(); } - } - else - { - if (notPublished) - { - try { observer.OnError(new InvalidOperationException("sequence is empty")); } - finally { Dispose(); } - } - else - { - try { observer.OnCompleted(); } - finally { Dispose(); } - } - } - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/First.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/First.cs.meta deleted file mode 100644 index a6c3f8e..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/First.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 8e3093220aeb1d54faa3fca9fe0af6c0 -timeCreated: 1455373900 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/ForEachAsync.cs b/Assets/Plugins/UniRx/Scripts/Operators/ForEachAsync.cs deleted file mode 100644 index fb9fab5..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/ForEachAsync.cs +++ /dev/null @@ -1,116 +0,0 @@ -using System; -using UniRx.Operators; - -namespace UniRx.Operators -{ - internal class ForEachAsyncObservable : OperatorObservableBase - { - readonly IObservable source; - readonly Action onNext; - readonly Action onNextWithIndex; - - public ForEachAsyncObservable(IObservable source, Action onNext) - : base(source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.onNext = onNext; - } - - public ForEachAsyncObservable(IObservable source, Action onNext) - : base(source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.onNextWithIndex = onNext; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - if (onNext != null) - { - return source.Subscribe(new ForEachAsync(this, observer, cancel)); - } - else - { - return source.Subscribe(new ForEachAsync_(this, observer, cancel)); - } - } - - class ForEachAsync : OperatorObserverBase - { - readonly ForEachAsyncObservable parent; - - public ForEachAsync(ForEachAsyncObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) - { - this.parent = parent; - } - - public override void OnNext(T value) - { - try - { - parent.onNext(value); - } - catch (Exception ex) - { - try { observer.OnError(ex); } - finally { Dispose(); } - return; - } - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } - finally { Dispose(); } - } - - public override void OnCompleted() - { - observer.OnNext(Unit.Default); - - try { observer.OnCompleted(); } - finally { Dispose(); } - } - } - - // with index - class ForEachAsync_ : OperatorObserverBase - { - readonly ForEachAsyncObservable parent; - int index = 0; - - public ForEachAsync_(ForEachAsyncObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) - { - this.parent = parent; - } - - public override void OnNext(T value) - { - try - { - parent.onNextWithIndex(value, index++); - } - catch (Exception ex) - { - try { observer.OnError(ex); } - finally { Dispose(); } - return; - } - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } - finally { Dispose(); } - } - - public override void OnCompleted() - { - observer.OnNext(Unit.Default); - - try { observer.OnCompleted(); } - finally { Dispose(); } - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/ForEachAsync.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/ForEachAsync.cs.meta deleted file mode 100644 index 3ca9296..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/ForEachAsync.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 5b66ecd2e5290bc4eb8c78a1ccc2d009 -timeCreated: 1455373899 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/FromEvent.cs b/Assets/Plugins/UniRx/Scripts/Operators/FromEvent.cs deleted file mode 100644 index 7a08543..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/FromEvent.cs +++ /dev/null @@ -1,323 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace UniRx.Operators -{ - // FromEvent, FromEventPattern - - internal class FromEventPatternObservable : OperatorObservableBase> - where TEventArgs : EventArgs - { - readonly Func, TDelegate> conversion; - readonly Action addHandler; - readonly Action removeHandler; - - public FromEventPatternObservable(Func, TDelegate> conversion, Action addHandler, Action removeHandler) - : base(false) - { - this.conversion = conversion; - this.addHandler = addHandler; - this.removeHandler = removeHandler; - } - - protected override IDisposable SubscribeCore(IObserver> observer, IDisposable cancel) - { - var fe = new FromEventPattern(this, observer); - return fe.Register() ? fe : Disposable.Empty; - } - - class FromEventPattern : IDisposable - { - readonly FromEventPatternObservable parent; - readonly IObserver> observer; - TDelegate handler; - - public FromEventPattern(FromEventPatternObservable parent, IObserver> observer) - { - this.parent = parent; - this.observer = observer; - } - - public bool Register() - { - handler = parent.conversion(OnNext); - try - { - parent.addHandler(handler); - } - catch (Exception ex) - { - observer.OnError(ex); - return false; - } - return true; - } - - void OnNext(object sender, TEventArgs eventArgs) - { - observer.OnNext(new EventPattern(sender, eventArgs)); - } - - public void Dispose() - { - if (handler != null) - { - parent.removeHandler(handler); - handler = default(TDelegate); - } - } - } - } - - internal class FromEventObservable : OperatorObservableBase - { - readonly Func conversion; - readonly Action addHandler; - readonly Action removeHandler; - - public FromEventObservable(Func conversion, Action addHandler, Action removeHandler) - : base(false) - { - this.conversion = conversion; - this.addHandler = addHandler; - this.removeHandler = removeHandler; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - var fe = new FromEvent(this, observer); - return fe.Register() ? fe : Disposable.Empty; - } - - class FromEvent : IDisposable - { - readonly FromEventObservable parent; - readonly IObserver observer; - TDelegate handler; - - public FromEvent(FromEventObservable parent, IObserver observer) - { - this.parent = parent; - this.observer = observer; - } - - public bool Register() - { - handler = parent.conversion(OnNext); - - try - { - parent.addHandler(handler); - } - catch (Exception ex) - { - observer.OnError(ex); - return false; - } - return true; - } - - void OnNext() - { - observer.OnNext(Unit.Default); - } - - public void Dispose() - { - if (handler != null) - { - parent.removeHandler(handler); - handler = default(TDelegate); - } - } - } - } - - internal class FromEventObservable : OperatorObservableBase - { - readonly Func, TDelegate> conversion; - readonly Action addHandler; - readonly Action removeHandler; - - public FromEventObservable(Func, TDelegate> conversion, Action addHandler, Action removeHandler) - : base(false) - { - this.conversion = conversion; - this.addHandler = addHandler; - this.removeHandler = removeHandler; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - var fe = new FromEvent(this, observer); - return fe.Register() ? fe : Disposable.Empty; - } - - class FromEvent : IDisposable - { - readonly FromEventObservable parent; - readonly IObserver observer; - TDelegate handler; - - public FromEvent(FromEventObservable parent, IObserver observer) - { - this.parent = parent; - this.observer = observer; - } - - public bool Register() - { - handler = parent.conversion(OnNext); - - try - { - parent.addHandler(handler); - } - catch (Exception ex) - { - observer.OnError(ex); - return false; - } - return true; - } - - void OnNext(TEventArgs args) - { - observer.OnNext(args); - } - - public void Dispose() - { - if (handler != null) - { - parent.removeHandler(handler); - handler = default(TDelegate); - } - } - } - } - - internal class FromEventObservable : OperatorObservableBase - { - readonly Action addHandler; - readonly Action removeHandler; - - public FromEventObservable(Action addHandler, Action removeHandler) - : base(false) - { - this.addHandler = addHandler; - this.removeHandler = removeHandler; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - var fe = new FromEvent(this, observer); - return fe.Register() ? fe : Disposable.Empty; - } - - class FromEvent : IDisposable - { - readonly FromEventObservable parent; - readonly IObserver observer; - Action handler; - - public FromEvent(FromEventObservable parent, IObserver observer) - { - this.parent = parent; - this.observer = observer; - this.handler = OnNext; - } - - public bool Register() - { - try - { - parent.addHandler(handler); - } - catch (Exception ex) - { - observer.OnError(ex); - return false; - } - return true; - } - - void OnNext() - { - observer.OnNext(Unit.Default); - } - - public void Dispose() - { - if (handler != null) - { - parent.removeHandler(handler); - handler = null; - } - } - } - } - - internal class FromEventObservable_ : OperatorObservableBase - { - readonly Action> addHandler; - readonly Action> removeHandler; - - public FromEventObservable_(Action> addHandler, Action> removeHandler) - : base(false) - { - this.addHandler = addHandler; - this.removeHandler = removeHandler; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - var fe = new FromEvent(this, observer); - return fe.Register() ? fe : Disposable.Empty; - } - - class FromEvent : IDisposable - { - readonly FromEventObservable_ parent; - readonly IObserver observer; - Action handler; - - public FromEvent(FromEventObservable_ parent, IObserver observer) - { - this.parent = parent; - this.observer = observer; - this.handler = OnNext; - } - - public bool Register() - { - try - { - parent.addHandler(handler); - } - catch (Exception ex) - { - observer.OnError(ex); - return false; - } - return true; - } - - void OnNext(T value) - { - observer.OnNext(value); - } - - public void Dispose() - { - if (handler != null) - { - parent.removeHandler(handler); - handler = null; - } - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/FromEvent.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/FromEvent.cs.meta deleted file mode 100644 index 97fdf21..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/FromEvent.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 05fcc5083e94e704ca8f059e4e535ffa -timeCreated: 1455373897 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/GroupBy.cs b/Assets/Plugins/UniRx/Scripts/Operators/GroupBy.cs deleted file mode 100644 index ba21bdc..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/GroupBy.cs +++ /dev/null @@ -1,196 +0,0 @@ -using System; -using System.Collections.Generic; -using UniRx.Operators; - -namespace UniRx.Operators -{ - internal class GroupedObservable : IGroupedObservable - { - readonly TKey key; - readonly IObservable subject; - readonly RefCountDisposable refCount; - - public TKey Key - { - get { return key; } - } - - public GroupedObservable(TKey key, ISubject subject, RefCountDisposable refCount) - { - this.key = key; - this.subject = subject; - this.refCount = refCount; - } - - public IDisposable Subscribe(IObserver observer) - { - var release = refCount.GetDisposable(); - var subscription = subject.Subscribe(observer); - return StableCompositeDisposable.Create(release, subscription); - } - } - - internal class GroupByObservable : OperatorObservableBase> - { - readonly IObservable source; - readonly Func keySelector; - readonly Func elementSelector; - readonly int? capacity; - readonly IEqualityComparer comparer; - - public GroupByObservable(IObservable source, Func keySelector, Func elementSelector, int? capacity, IEqualityComparer comparer) - : base(source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.keySelector = keySelector; - this.elementSelector = elementSelector; - this.capacity = capacity; - this.comparer = comparer; - } - - protected override IDisposable SubscribeCore(IObserver> observer, IDisposable cancel) - { - return new GroupBy(this, observer, cancel).Run(); - } - - class GroupBy : OperatorObserverBase> - { - readonly GroupByObservable parent; - readonly Dictionary> map; - ISubject nullKeySubject; - - CompositeDisposable groupDisposable; - RefCountDisposable refCountDisposable; - - public GroupBy(GroupByObservable parent, IObserver> observer, IDisposable cancel) - : base(observer, cancel) - { - this.parent = parent; - if (parent.capacity.HasValue) - { - map = new Dictionary>(parent.capacity.Value, parent.comparer); - } - else - { - map = new Dictionary>(parent.comparer); - } - } - - public IDisposable Run() - { - groupDisposable = new CompositeDisposable(); - refCountDisposable = new RefCountDisposable(groupDisposable); - - groupDisposable.Add(parent.source.Subscribe(this)); - - return refCountDisposable; - } - - public override void OnNext(TSource value) - { - var key = default(TKey); - try - { - key = parent.keySelector(value); - } - catch (Exception exception) - { - Error(exception); - return; - } - - var fireNewMapEntry = false; - var writer = default(ISubject); - try - { - if (key == null) - { - if (nullKeySubject == null) - { - nullKeySubject = new Subject(); - fireNewMapEntry = true; - } - - writer = nullKeySubject; - } - else - { - if (!map.TryGetValue(key, out writer)) - { - writer = new Subject(); - map.Add(key, writer); - fireNewMapEntry = true; - } - } - } - catch (Exception exception) - { - Error(exception); - return; - } - - if (fireNewMapEntry) - { - var group = new GroupedObservable(key, writer, refCountDisposable); - observer.OnNext(group); - } - - var element = default(TElement); - try - { - element = parent.elementSelector(value); - } - catch (Exception exception) - { - Error(exception); - return; - } - - writer.OnNext(element); - } - - public override void OnError(Exception error) - { - Error(error); - } - - public override void OnCompleted() - { - try - { - if (nullKeySubject != null) nullKeySubject.OnCompleted(); - - foreach (var s in map.Values) - { - s.OnCompleted(); - } - - observer.OnCompleted(); - } - finally - { - Dispose(); - } - } - - void Error(Exception exception) - { - try - { - if (nullKeySubject != null) nullKeySubject.OnError(exception); - - foreach (var s in map.Values) - { - s.OnError(exception); - } - - observer.OnError(exception); - } - finally - { - Dispose(); - } - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/GroupBy.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/GroupBy.cs.meta deleted file mode 100644 index 1d7b46a..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/GroupBy.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 7345fc4a6df05ca47ab89ec819bccde6 -timeCreated: 1455373899 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/IgnoreElements.cs b/Assets/Plugins/UniRx/Scripts/Operators/IgnoreElements.cs deleted file mode 100644 index bd3c0b7..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/IgnoreElements.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System; -using UniRx.Operators; - -namespace UniRx.Operators -{ - internal class IgnoreElementsObservable : OperatorObservableBase - { - readonly IObservable source; - - public IgnoreElementsObservable(IObservable source) - : base(source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - return source.Subscribe(new IgnoreElements(observer, cancel)); - } - - class IgnoreElements : OperatorObserverBase - { - public IgnoreElements(IObserver observer, IDisposable cancel) : base(observer, cancel) - { - } - - public override void OnNext(T value) - { - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } - finally { Dispose(); } - } - - public override void OnCompleted() - { - try { observer.OnCompleted(); } - finally { Dispose(); } - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/IgnoreElements.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/IgnoreElements.cs.meta deleted file mode 100644 index f829b3c..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/IgnoreElements.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: d6c8ca210619da74b92cbdb3e8c58127 -timeCreated: 1455373901 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Last.cs b/Assets/Plugins/UniRx/Scripts/Operators/Last.cs deleted file mode 100644 index 5c04e9d..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/Last.cs +++ /dev/null @@ -1,165 +0,0 @@ -using System; - -namespace UniRx.Operators -{ - internal class LastObservable : OperatorObservableBase - { - readonly IObservable source; - readonly bool useDefault; - readonly Func predicate; - - public LastObservable(IObservable source, bool useDefault) - : base(source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.useDefault = useDefault; - } - - public LastObservable(IObservable source, Func predicate, bool useDefault) - : base(source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.predicate = predicate; - this.useDefault = useDefault; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - if (predicate == null) - { - return source.Subscribe(new Last(this, observer, cancel)); - } - else - { - return source.Subscribe(new Last_(this, observer, cancel)); - } - } - - class Last : OperatorObserverBase - { - readonly LastObservable parent; - bool notPublished; - T lastValue; - - public Last(LastObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) - { - this.parent = parent; - this.notPublished = true; - } - - public override void OnNext(T value) - { - notPublished = false; - lastValue = value; - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } - finally { Dispose(); } - } - - public override void OnCompleted() - { - if (parent.useDefault) - { - if (notPublished) - { - observer.OnNext(default(T)); - } - else - { - observer.OnNext(lastValue); - } - try { observer.OnCompleted(); } - finally { Dispose(); } - } - else - { - if (notPublished) - { - try { observer.OnError(new InvalidOperationException("sequence is empty")); } - finally { Dispose(); } - } - else - { - observer.OnNext(lastValue); - try { observer.OnCompleted(); } - finally { Dispose(); } - } - } - } - } - - class Last_ : OperatorObserverBase - { - readonly LastObservable parent; - bool notPublished; - T lastValue; - - public Last_(LastObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) - { - this.parent = parent; - this.notPublished = true; - } - - public override void OnNext(T value) - { - bool isPassed; - try - { - isPassed = parent.predicate(value); - } - catch (Exception ex) - { - try { observer.OnError(ex); } - finally { Dispose(); } - return; - } - - if (isPassed) - { - notPublished = false; - lastValue = value; - } - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } - finally { Dispose(); } - } - - public override void OnCompleted() - { - if (parent.useDefault) - { - if (notPublished) - { - observer.OnNext(default(T)); - } - else - { - observer.OnNext(lastValue); - } - try { observer.OnCompleted(); } - finally { Dispose(); } - } - else - { - if (notPublished) - { - try { observer.OnError(new InvalidOperationException("sequence is empty")); } - finally { Dispose(); } - } - else - { - observer.OnNext(lastValue); - try { observer.OnCompleted(); } - finally { Dispose(); } - } - } - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Last.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/Last.cs.meta deleted file mode 100644 index 1c33d43..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/Last.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 696780c8759162d4b996683ec13d7e0b -timeCreated: 1455373899 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Materialize.cs b/Assets/Plugins/UniRx/Scripts/Operators/Materialize.cs deleted file mode 100644 index 8c5268e..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/Materialize.cs +++ /dev/null @@ -1,53 +0,0 @@ -using System; - -namespace UniRx.Operators -{ - internal class MaterializeObservable : OperatorObservableBase> - { - readonly IObservable source; - - public MaterializeObservable(IObservable source) - : base(source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - } - - protected override IDisposable SubscribeCore(IObserver> observer, IDisposable cancel) - { - return new Materialize(this, observer, cancel).Run(); - } - - class Materialize : OperatorObserverBase> - { - readonly MaterializeObservable parent; - - public Materialize(MaterializeObservable parent, IObserver> observer, IDisposable cancel) - : base(observer, cancel) - { - this.parent = parent; - } - - public IDisposable Run() - { - return parent.source.Subscribe(this); - } - - public override void OnNext(T value) - { - observer.OnNext(Notification.CreateOnNext(value)); - } - - public override void OnError(Exception error) - { - observer.OnNext(Notification.CreateOnError(error)); - try { observer.OnCompleted(); } finally { Dispose(); } - } - - public override void OnCompleted() - { - observer.OnNext(Notification.CreateOnCompleted()); - try { observer.OnCompleted(); } finally { Dispose(); } - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Materialize.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/Materialize.cs.meta deleted file mode 100644 index aa04020..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/Materialize.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 09d3ba9e6d5fe4643bbf0df943652908 -timeCreated: 1455373897 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Merge.cs b/Assets/Plugins/UniRx/Scripts/Operators/Merge.cs deleted file mode 100644 index b30c8a2..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/Merge.cs +++ /dev/null @@ -1,264 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace UniRx.Operators -{ - internal class MergeObservable : OperatorObservableBase - { - private readonly IObservable> sources; - private readonly int maxConcurrent; - - public MergeObservable(IObservable> sources, bool isRequiredSubscribeOnCurrentThread) - : base(isRequiredSubscribeOnCurrentThread) - { - this.sources = sources; - } - - public MergeObservable(IObservable> sources, int maxConcurrent, bool isRequiredSubscribeOnCurrentThread) - : base(isRequiredSubscribeOnCurrentThread) - { - this.sources = sources; - this.maxConcurrent = maxConcurrent; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - if (maxConcurrent > 0) - { - return new MergeConcurrentObserver(this, observer, cancel).Run(); - } - else - { - return new MergeOuterObserver(this, observer, cancel).Run(); - } - } - - class MergeOuterObserver : OperatorObserverBase, T> - { - readonly MergeObservable parent; - - CompositeDisposable collectionDisposable; - SingleAssignmentDisposable sourceDisposable; - object gate = new object(); - bool isStopped = false; - - public MergeOuterObserver(MergeObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) - { - this.parent = parent; - } - - public IDisposable Run() - { - collectionDisposable = new CompositeDisposable(); - sourceDisposable = new SingleAssignmentDisposable(); - collectionDisposable.Add(sourceDisposable); - - sourceDisposable.Disposable = parent.sources.Subscribe(this); - return collectionDisposable; - } - - public override void OnNext(IObservable value) - { - var disposable = new SingleAssignmentDisposable(); - collectionDisposable.Add(disposable); - var collectionObserver = new Merge(this, disposable); - disposable.Disposable = value.Subscribe(collectionObserver); - } - - public override void OnError(Exception error) - { - lock (gate) - { - try { observer.OnError(error); } finally { Dispose(); }; - } - } - - public override void OnCompleted() - { - isStopped = true; - if (collectionDisposable.Count == 1) - { - lock (gate) - { - try { observer.OnCompleted(); } finally { Dispose(); }; - } - } - else - { - sourceDisposable.Dispose(); - } - } - - class Merge : OperatorObserverBase - { - readonly MergeOuterObserver parent; - readonly IDisposable cancel; - - public Merge(MergeOuterObserver parent, IDisposable cancel) - : base(parent.observer, cancel) - { - this.parent = parent; - this.cancel = cancel; - } - - public override void OnNext(T value) - { - lock (parent.gate) - { - base.observer.OnNext(value); - } - } - - public override void OnError(Exception error) - { - lock (parent.gate) - { - try { observer.OnError(error); } finally { Dispose(); }; - } - } - - public override void OnCompleted() - { - parent.collectionDisposable.Remove(cancel); - if (parent.isStopped && parent.collectionDisposable.Count == 1) - { - lock (parent.gate) - { - try { observer.OnCompleted(); } finally { Dispose(); }; - } - } - } - } - } - - class MergeConcurrentObserver : OperatorObserverBase, T> - { - readonly MergeObservable parent; - - CompositeDisposable collectionDisposable; - SingleAssignmentDisposable sourceDisposable; - object gate = new object(); - bool isStopped = false; - - // concurrency - Queue> q; - int activeCount; - - public MergeConcurrentObserver(MergeObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) - { - this.parent = parent; - } - - public IDisposable Run() - { - q = new Queue>(); - activeCount = 0; - - collectionDisposable = new CompositeDisposable(); - sourceDisposable = new SingleAssignmentDisposable(); - collectionDisposable.Add(sourceDisposable); - - sourceDisposable.Disposable = parent.sources.Subscribe(this); - return collectionDisposable; - } - - public override void OnNext(IObservable value) - { - lock (gate) - { - if (activeCount < parent.maxConcurrent) - { - activeCount++; - Subscribe(value); - } - else - { - q.Enqueue(value); - } - } - } - - public override void OnError(Exception error) - { - lock (gate) - { - try { observer.OnError(error); } finally { Dispose(); }; - } - } - - public override void OnCompleted() - { - lock (gate) - { - isStopped = true; - if (activeCount == 0) - { - try { observer.OnCompleted(); } finally { Dispose(); }; - } - else - { - sourceDisposable.Dispose(); - } - } - } - - void Subscribe(IObservable innerSource) - { - var disposable = new SingleAssignmentDisposable(); - collectionDisposable.Add(disposable); - var collectionObserver = new Merge(this, disposable); - disposable.Disposable = innerSource.Subscribe(collectionObserver); - } - - class Merge : OperatorObserverBase - { - readonly MergeConcurrentObserver parent; - readonly IDisposable cancel; - - public Merge(MergeConcurrentObserver parent, IDisposable cancel) - : base(parent.observer, cancel) - { - this.parent = parent; - this.cancel = cancel; - } - - public override void OnNext(T value) - { - lock (parent.gate) - { - base.observer.OnNext(value); - } - } - - public override void OnError(Exception error) - { - lock (parent.gate) - { - try { observer.OnError(error); } finally { Dispose(); }; - } - } - - public override void OnCompleted() - { - parent.collectionDisposable.Remove(cancel); - lock (parent.gate) - { - if (parent.q.Count > 0) - { - var source = parent.q.Dequeue(); - parent.Subscribe(source); - } - else - { - parent.activeCount--; - if (parent.isStopped && parent.activeCount == 0) - { - try { observer.OnCompleted(); } finally { Dispose(); }; - } - } - } - } - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Merge.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/Merge.cs.meta deleted file mode 100644 index 50d7fca..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/Merge.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 94158fab525468d4e896a62f633257e6 -timeCreated: 1455373900 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Never.cs b/Assets/Plugins/UniRx/Scripts/Operators/Never.cs deleted file mode 100644 index 858408f..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/Never.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System; - -namespace UniRx.Operators -{ - internal class NeverObservable : OperatorObservableBase - { - public NeverObservable() - : base(false) - { - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - return Disposable.Empty; - } - } - - internal class ImmutableNeverObservable : IObservable, IOptimizedObservable - { - internal static ImmutableNeverObservable Instance = new ImmutableNeverObservable(); - - public bool IsRequiredSubscribeOnCurrentThread() - { - return false; - } - - public IDisposable Subscribe(IObserver observer) - { - return Disposable.Empty; - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Never.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/Never.cs.meta deleted file mode 100644 index 8e92ea5..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/Never.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: b5db8d5c73883214abaf3715002da256 -timeCreated: 1455373900 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/ObserveOn.cs b/Assets/Plugins/UniRx/Scripts/Operators/ObserveOn.cs deleted file mode 100644 index d8e3bd5..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/ObserveOn.cs +++ /dev/null @@ -1,210 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace UniRx.Operators -{ - internal class ObserveOnObservable : OperatorObservableBase - { - readonly IObservable source; - readonly IScheduler scheduler; - - public ObserveOnObservable(IObservable source, IScheduler scheduler) - : base(source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.scheduler = scheduler; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - var queueing = scheduler as ISchedulerQueueing; - if (queueing == null) - { - return new ObserveOn(this, observer, cancel).Run(); - } - else - { - return new ObserveOn_(this, queueing, observer, cancel).Run(); - } - } - - class ObserveOn : OperatorObserverBase - { - class SchedulableAction : IDisposable - { - public Notification data; - public LinkedListNode node; - public IDisposable schedule; - - public void Dispose() - { - if (schedule != null) - schedule.Dispose(); - schedule = null; - - if (node.List != null) - { - node.List.Remove(node); - } - } - - public bool IsScheduled { get { return schedule != null; } } - } - - readonly ObserveOnObservable parent; - readonly LinkedList actions = new LinkedList(); - bool isDisposed; - - public ObserveOn(ObserveOnObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) - { - this.parent = parent; - } - - public IDisposable Run() - { - isDisposed = false; - - var sourceDisposable = parent.source.Subscribe(this); - - return StableCompositeDisposable.Create(sourceDisposable, Disposable.Create(() => - { - lock (actions) - { - isDisposed = true; - - while (actions.Count > 0) - { - // Dispose will both cancel the action (if not already running) - // and remove it from 'actions' - actions.First.Value.Dispose(); - } - } - })); - } - - public override void OnNext(T value) - { - QueueAction(new Notification.OnNextNotification(value)); - } - - public override void OnError(Exception error) - { - QueueAction(new Notification.OnErrorNotification(error)); - } - - public override void OnCompleted() - { - QueueAction(new Notification.OnCompletedNotification()); - } - - private void QueueAction(Notification data) - { - var action = new SchedulableAction { data = data }; - lock (actions) - { - if (isDisposed) return; - - action.node = actions.AddLast(action); - ProcessNext(); - } - } - - private void ProcessNext() - { - lock (actions) - { - if (actions.Count == 0 || isDisposed) - return; - - var action = actions.First.Value; - - if (action.IsScheduled) - return; - - action.schedule = parent.scheduler.Schedule(() => - { - try - { - switch (action.data.Kind) - { - case NotificationKind.OnNext: - observer.OnNext(action.data.Value); - break; - case NotificationKind.OnError: - observer.OnError(action.data.Exception); - break; - case NotificationKind.OnCompleted: - observer.OnCompleted(); - break; - } - } - finally - { - lock (actions) - { - action.Dispose(); - } - - if (action.data.Kind == NotificationKind.OnNext) - ProcessNext(); - else - Dispose(); - } - }); - } - } - } - - class ObserveOn_ : OperatorObserverBase - { - readonly ObserveOnObservable parent; - readonly ISchedulerQueueing scheduler; - readonly BooleanDisposable isDisposed; - readonly Action onNext; - - public ObserveOn_(ObserveOnObservable parent, ISchedulerQueueing scheduler, IObserver observer, IDisposable cancel) : base(observer, cancel) - { - this.parent = parent; - this.scheduler = scheduler; - this.isDisposed = new BooleanDisposable(); - this.onNext = new Action(OnNext_); // cache delegate - } - - public IDisposable Run() - { - var sourceDisposable = parent.source.Subscribe(this); - return StableCompositeDisposable.Create(sourceDisposable, isDisposed); - } - - void OnNext_(T value) - { - base.observer.OnNext(value); - } - - void OnError_(Exception error) - { - try { observer.OnError(error); } finally { Dispose(); }; - } - - void OnCompleted_(Unit _) - { - try { observer.OnCompleted(); } finally { Dispose(); }; - } - - public override void OnNext(T value) - { - scheduler.ScheduleQueueing(isDisposed, value, onNext); - } - - public override void OnError(Exception error) - { - scheduler.ScheduleQueueing(isDisposed, error, OnError_); - } - - public override void OnCompleted() - { - scheduler.ScheduleQueueing(isDisposed, Unit.Default, OnCompleted_); - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/ObserveOn.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/ObserveOn.cs.meta deleted file mode 100644 index a4dde12..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/ObserveOn.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 39df784f492c7404286d05b09a840705 -timeCreated: 1455373898 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/OfType.cs b/Assets/Plugins/UniRx/Scripts/Operators/OfType.cs deleted file mode 100644 index 79207c5..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/OfType.cs +++ /dev/null @@ -1,47 +0,0 @@ -using System; - -namespace UniRx.Operators -{ - internal class OfTypeObservable : OperatorObservableBase - { - readonly IObservable source; - - public OfTypeObservable(IObservable source) - : base(source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - return source.Subscribe(new OfType(observer, cancel)); - } - - class OfType : OperatorObserverBase - { - public OfType(IObserver observer, IDisposable cancel) - : base(observer, cancel) - { - } - - public override void OnNext(TSource value) - { - if (value is TResult) - { - var castValue = (TResult)(object)value; - observer.OnNext(castValue); - } - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } finally { Dispose(); } - } - - public override void OnCompleted() - { - try { observer.OnCompleted(); } finally { Dispose(); } - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/OfType.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/OfType.cs.meta deleted file mode 100644 index 4cb3e09..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/OfType.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 981fd4bf7704404459a0deed254a03e5 -timeCreated: 1455373900 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/OperatorObservableBase.cs b/Assets/Plugins/UniRx/Scripts/Operators/OperatorObservableBase.cs deleted file mode 100644 index 35337ae..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/OperatorObservableBase.cs +++ /dev/null @@ -1,42 +0,0 @@ -using System; - -namespace UniRx.Operators -{ - // implements note : all field must be readonly. - public abstract class OperatorObservableBase : IObservable, IOptimizedObservable - { - readonly bool isRequiredSubscribeOnCurrentThread; - - public OperatorObservableBase(bool isRequiredSubscribeOnCurrentThread) - { - this.isRequiredSubscribeOnCurrentThread = isRequiredSubscribeOnCurrentThread; - } - - public bool IsRequiredSubscribeOnCurrentThread() - { - return isRequiredSubscribeOnCurrentThread; - } - - public IDisposable Subscribe(IObserver observer) - { - var subscription = new SingleAssignmentDisposable(); - - // note: - // does not make the safe observer, it breaks exception durability. - // var safeObserver = Observer.CreateAutoDetachObserver(observer, subscription); - - if (isRequiredSubscribeOnCurrentThread && Scheduler.IsCurrentThreadSchedulerScheduleRequired) - { - Scheduler.CurrentThread.Schedule(() => subscription.Disposable = SubscribeCore(observer, subscription)); - } - else - { - subscription.Disposable = SubscribeCore(observer, subscription); - } - - return subscription; - } - - protected abstract IDisposable SubscribeCore(IObserver observer, IDisposable cancel); - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/OperatorObservableBase.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/OperatorObservableBase.cs.meta deleted file mode 100644 index 385c56f..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/OperatorObservableBase.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 1b94a1a0ae5d509488c6242454216bdb -timeCreated: 1455373897 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/OperatorObserverBase.cs b/Assets/Plugins/UniRx/Scripts/Operators/OperatorObserverBase.cs deleted file mode 100644 index a13affe..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/OperatorObserverBase.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System; -using System.Threading; - -namespace UniRx.Operators -{ - public abstract class OperatorObserverBase : IDisposable, IObserver - { - protected internal volatile IObserver observer; - IDisposable cancel; - - public OperatorObserverBase(IObserver observer, IDisposable cancel) - { - this.observer = observer; - this.cancel = cancel; - } - - public abstract void OnNext(TSource value); - - public abstract void OnError(Exception error); - - public abstract void OnCompleted(); - - public void Dispose() - { - observer = UniRx.InternalUtil.EmptyObserver.Instance; - var target = System.Threading.Interlocked.Exchange(ref cancel, null); - if (target != null) - { - target.Dispose(); - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/OperatorObserverBase.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/OperatorObserverBase.cs.meta deleted file mode 100644 index a58903d..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/OperatorObserverBase.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 258901a4513be8f4a8bfcca91e70bb12 -timeCreated: 1455373898 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/PairWise.cs b/Assets/Plugins/UniRx/Scripts/Operators/PairWise.cs deleted file mode 100644 index 481ee1a..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/PairWise.cs +++ /dev/null @@ -1,120 +0,0 @@ -using System; - -namespace UniRx.Operators -{ - internal class PairwiseObservable : OperatorObservableBase - { - readonly IObservable source; - readonly Func selector; - - public PairwiseObservable(IObservable source, Func selector) - : base(source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.selector = selector; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - return source.Subscribe(new Pairwise(this, observer, cancel)); - } - - class Pairwise : OperatorObserverBase - { - readonly PairwiseObservable parent; - T prev = default(T); - bool isFirst = true; - - public Pairwise(PairwiseObservable parent, IObserver observer, IDisposable cancel) - : base(observer, cancel) - { - this.parent = parent; - } - - public override void OnNext(T value) - { - if (isFirst) - { - isFirst = false; - prev = value; - return; - } - - TR v; - try - { - v = parent.selector(prev, value); - prev = value; - } - catch (Exception ex) - { - try { observer.OnError(ex); } finally { Dispose(); } - return; - } - - observer.OnNext(v); - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } finally { Dispose(); } - } - - public override void OnCompleted() - { - try { observer.OnCompleted(); } finally { Dispose(); } - } - } - } - - internal class PairwiseObservable : OperatorObservableBase> - { - readonly IObservable source; - - public PairwiseObservable(IObservable source) - : base(source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - } - - protected override IDisposable SubscribeCore(IObserver> observer, IDisposable cancel) - { - return source.Subscribe(new Pairwise(observer, cancel)); - } - - class Pairwise : OperatorObserverBase> - { - T prev = default(T); - bool isFirst = true; - - public Pairwise(IObserver> observer, IDisposable cancel) - : base(observer, cancel) - { - } - - public override void OnNext(T value) - { - if (isFirst) - { - isFirst = false; - prev = value; - return; - } - - var pair = new Pair(prev, value); - prev = value; - observer.OnNext(pair); - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } finally { Dispose(); } - } - - public override void OnCompleted() - { - try { observer.OnCompleted(); } finally { Dispose(); } - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/PairWise.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/PairWise.cs.meta deleted file mode 100644 index 17b6aa0..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/PairWise.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: f66e4871304e6e74d8548d597457e53c -timeCreated: 1455373902 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Range.cs b/Assets/Plugins/UniRx/Scripts/Operators/Range.cs deleted file mode 100644 index 472926d..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/Range.cs +++ /dev/null @@ -1,89 +0,0 @@ -using System; - -namespace UniRx.Operators -{ - internal class RangeObservable : OperatorObservableBase - { - readonly int start; - readonly int count; - readonly IScheduler scheduler; - - public RangeObservable(int start, int count, IScheduler scheduler) - : base(scheduler == Scheduler.CurrentThread) - { - if (count < 0) throw new ArgumentOutOfRangeException("count < 0"); - - this.start = start; - this.count = count; - this.scheduler = scheduler; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - observer = new Range(observer, cancel); - - if (scheduler == Scheduler.Immediate) - { - for (int i = 0; i < count; i++) - { - int v = start + i; - observer.OnNext(v); - } - observer.OnCompleted(); - - return Disposable.Empty; - } - else - { - var i = 0; - return scheduler.Schedule((Action self) => - { - if (i < count) - { - int v = start + i; - observer.OnNext(v); - i++; - self(); - } - else - { - observer.OnCompleted(); - } - }); - } - } - - class Range : OperatorObserverBase - { - public Range(IObserver observer, IDisposable cancel) - : base(observer, cancel) - { - } - - public override void OnNext(int value) - { - try - { - base.observer.OnNext(value); - } - catch - { - Dispose(); - throw; - } - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } - finally { Dispose(); } - } - - public override void OnCompleted() - { - try { observer.OnCompleted(); } - finally { Dispose(); } - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Range.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/Range.cs.meta deleted file mode 100644 index f49b0a7..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/Range.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 2249fbe589c8d3042ac201c1ab4be76f -timeCreated: 1455373897 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/RefCount.cs b/Assets/Plugins/UniRx/Scripts/Operators/RefCount.cs deleted file mode 100644 index 668d279..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/RefCount.cs +++ /dev/null @@ -1,77 +0,0 @@ -using System; -using UniRx.Operators; - -namespace UniRx.Operators -{ - internal class RefCountObservable : OperatorObservableBase - { - readonly IConnectableObservable source; - readonly object gate = new object(); - int refCount = 0; - IDisposable connection; - - public RefCountObservable(IConnectableObservable source) - : base(source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - return new RefCount(this, observer, cancel).Run(); - } - - class RefCount : OperatorObserverBase - { - readonly RefCountObservable parent; - - public RefCount(RefCountObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) - { - this.parent = parent; - } - - public IDisposable Run() - { - var subcription = parent.source.Subscribe(this); - - lock (parent.gate) - { - if (++parent.refCount == 1) - { - parent.connection = parent.source.Connect(); - } - } - - return Disposable.Create(() => - { - subcription.Dispose(); - - lock (parent.gate) - { - if (--parent.refCount == 0) - { - parent.connection.Dispose(); - } - } - }); - } - - public override void OnNext(T value) - { - base.observer.OnNext(value); - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } - finally { Dispose(); } - } - - public override void OnCompleted() - { - try { observer.OnCompleted(); } - finally { Dispose(); } - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/RefCount.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/RefCount.cs.meta deleted file mode 100644 index 66a6675..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/RefCount.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 17a77b422aa699d4d8cfbf6de804d238 -timeCreated: 1455373897 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Repeat.cs b/Assets/Plugins/UniRx/Scripts/Operators/Repeat.cs deleted file mode 100644 index 41a53f9..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/Repeat.cs +++ /dev/null @@ -1,99 +0,0 @@ -using System; - -namespace UniRx.Operators -{ - internal class RepeatObservable : OperatorObservableBase - { - readonly T value; - readonly int? repeatCount; - readonly IScheduler scheduler; - - public RepeatObservable(T value, int? repeatCount, IScheduler scheduler) - : base(scheduler == Scheduler.CurrentThread) - { - this.value = value; - this.repeatCount = repeatCount; - this.scheduler = scheduler; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - observer = new Repeat(observer, cancel); - - if (repeatCount == null) - { - return scheduler.Schedule((Action self) => - { - observer.OnNext(value); - self(); - }); - } - else - { - if (scheduler == Scheduler.Immediate) - { - var count = this.repeatCount.Value; - for (int i = 0; i < count; i++) - { - observer.OnNext(value); - } - observer.OnCompleted(); - return Disposable.Empty; - } - else - { - var currentCount = this.repeatCount.Value; - return scheduler.Schedule((Action self) => - { - if (currentCount > 0) - { - observer.OnNext(value); - currentCount--; - } - - if (currentCount == 0) - { - observer.OnCompleted(); - return; - } - - self(); - }); - } - } - } - - class Repeat : OperatorObserverBase - { - public Repeat(IObserver observer, IDisposable cancel) - : base(observer, cancel) - { - } - - public override void OnNext(T value) - { - try - { - base.observer.OnNext(value); - } - catch - { - Dispose(); - throw; - } - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } - finally { Dispose(); } - } - - public override void OnCompleted() - { - try { observer.OnCompleted(); } - finally { Dispose(); } - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Repeat.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/Repeat.cs.meta deleted file mode 100644 index 6e484c5..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/Repeat.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 63930706f2ea6e847866fc6d914b0d2e -timeCreated: 1455373899 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/RepeatSafe.cs b/Assets/Plugins/UniRx/Scripts/Operators/RepeatSafe.cs deleted file mode 100644 index b4412bb..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/RepeatSafe.cs +++ /dev/null @@ -1,138 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; - -namespace UniRx.Operators -{ - internal class RepeatSafeObservable : OperatorObservableBase - { - readonly IEnumerable> sources; - - public RepeatSafeObservable(IEnumerable> sources, bool isRequiredSubscribeOnCurrentThread) - : base(isRequiredSubscribeOnCurrentThread) - { - this.sources = sources; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - return new RepeatSafe(this, observer, cancel).Run(); - } - - class RepeatSafe : OperatorObserverBase - { - readonly RepeatSafeObservable parent; - readonly object gate = new object(); - - IEnumerator> e; - SerialDisposable subscription; - Action nextSelf; - bool isDisposed; - bool isRunNext; - - public RepeatSafe(RepeatSafeObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) - { - this.parent = parent; - } - - public IDisposable Run() - { - isDisposed = false; - isRunNext = false; - e = parent.sources.GetEnumerator(); - subscription = new SerialDisposable(); - - var schedule = Scheduler.DefaultSchedulers.TailRecursion.Schedule(RecursiveRun); - - return StableCompositeDisposable.Create(schedule, subscription, Disposable.Create(() => - { - lock (gate) - { - isDisposed = true; - e.Dispose(); - } - })); - } - - void RecursiveRun(Action self) - { - lock (gate) - { - this.nextSelf = self; - if (isDisposed) return; - - var current = default(IObservable); - var hasNext = false; - var ex = default(Exception); - - try - { - hasNext = e.MoveNext(); - if (hasNext) - { - current = e.Current; - if (current == null) throw new InvalidOperationException("sequence is null."); - } - else - { - e.Dispose(); - } - } - catch (Exception exception) - { - ex = exception; - e.Dispose(); - } - - if (ex != null) - { - try { observer.OnError(ex); } - finally { Dispose(); } - return; - } - - if (!hasNext) - { - try { observer.OnCompleted(); } - finally { Dispose(); } - return; - } - - var source = e.Current; - var d = new SingleAssignmentDisposable(); - subscription.Disposable = d; - d.Disposable = source.Subscribe(this); - } - } - - public override void OnNext(T value) - { - isRunNext = true; - base.observer.OnNext(value); - } - public override void OnError(Exception error) - { - try { observer.OnError(error); } - finally { Dispose(); } - } - - public override void OnCompleted() - { - if (isRunNext && !isDisposed) - { - isRunNext = false; - this.nextSelf(); - } - else - { - e.Dispose(); - if (!isDisposed) - { - try { observer.OnCompleted(); } - finally { Dispose(); } - } - } - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/RepeatSafe.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/RepeatSafe.cs.meta deleted file mode 100644 index 85c808c..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/RepeatSafe.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 6458fa5124443dc4bb95ad3d0b743934 -timeCreated: 1455373899 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Return.cs b/Assets/Plugins/UniRx/Scripts/Operators/Return.cs deleted file mode 100644 index abb6b8e..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/Return.cs +++ /dev/null @@ -1,205 +0,0 @@ -using System; - -namespace UniRx.Operators -{ - internal class ReturnObservable : OperatorObservableBase - { - readonly T value; - readonly IScheduler scheduler; - - public ReturnObservable(T value, IScheduler scheduler) - : base(scheduler == Scheduler.CurrentThread) - { - this.value = value; - this.scheduler = scheduler; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - observer = new Return(observer, cancel); - - if (scheduler == Scheduler.Immediate) - { - observer.OnNext(value); - observer.OnCompleted(); - return Disposable.Empty; - } - else - { - return scheduler.Schedule(() => - { - observer.OnNext(value); - observer.OnCompleted(); - }); - } - } - - class Return : OperatorObserverBase - { - public Return(IObserver observer, IDisposable cancel) - : base(observer, cancel) - { - } - - public override void OnNext(T value) - { - try - { - base.observer.OnNext(value); - } - catch - { - Dispose(); - throw; - } - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } - finally { Dispose(); } - } - - public override void OnCompleted() - { - try { observer.OnCompleted(); } - finally { Dispose(); } - } - } - } - - internal class ImmediateReturnObservable : IObservable, IOptimizedObservable - { - readonly T value; - - public ImmediateReturnObservable(T value) - { - this.value = value; - } - - public bool IsRequiredSubscribeOnCurrentThread() - { - return false; - } - - public IDisposable Subscribe(IObserver observer) - { - observer.OnNext(value); - observer.OnCompleted(); - return Disposable.Empty; - } - } - - internal class ImmutableReturnUnitObservable : IObservable, IOptimizedObservable - { - internal static ImmutableReturnUnitObservable Instance = new ImmutableReturnUnitObservable(); - - ImmutableReturnUnitObservable() - { - - } - - public bool IsRequiredSubscribeOnCurrentThread() - { - return false; - } - - public IDisposable Subscribe(IObserver observer) - { - observer.OnNext(Unit.Default); - observer.OnCompleted(); - return Disposable.Empty; - } - } - - internal class ImmutableReturnTrueObservable : IObservable, IOptimizedObservable - { - internal static ImmutableReturnTrueObservable Instance = new ImmutableReturnTrueObservable(); - - ImmutableReturnTrueObservable() - { - - } - - public bool IsRequiredSubscribeOnCurrentThread() - { - return false; - } - - public IDisposable Subscribe(IObserver observer) - { - observer.OnNext(true); - observer.OnCompleted(); - return Disposable.Empty; - } - } - - internal class ImmutableReturnFalseObservable : IObservable, IOptimizedObservable - { - internal static ImmutableReturnFalseObservable Instance = new ImmutableReturnFalseObservable(); - - ImmutableReturnFalseObservable() - { - - } - - public bool IsRequiredSubscribeOnCurrentThread() - { - return false; - } - - public IDisposable Subscribe(IObserver observer) - { - observer.OnNext(false); - observer.OnCompleted(); - return Disposable.Empty; - } - } - - internal class ImmutableReturnInt32Observable : IObservable, IOptimizedObservable - { - static ImmutableReturnInt32Observable[] Caches = new ImmutableReturnInt32Observable[] - { - new ImmutableReturnInt32Observable(-1), - new ImmutableReturnInt32Observable(0), - new ImmutableReturnInt32Observable(1), - new ImmutableReturnInt32Observable(2), - new ImmutableReturnInt32Observable(3), - new ImmutableReturnInt32Observable(4), - new ImmutableReturnInt32Observable(5), - new ImmutableReturnInt32Observable(6), - new ImmutableReturnInt32Observable(7), - new ImmutableReturnInt32Observable(8), - new ImmutableReturnInt32Observable(9), - }; - - public static IObservable GetInt32Observable(int x) - { - if (-1 <= x && x <= 9) - { - return Caches[x + 1]; - } - - return new ImmediateReturnObservable(x); - } - - readonly int x; - - ImmutableReturnInt32Observable(int x) - { - this.x = x; - } - - public bool IsRequiredSubscribeOnCurrentThread() - { - return false; - } - - public IDisposable Subscribe(IObserver observer) - { - observer.OnNext(x); - observer.OnCompleted(); - return Disposable.Empty; - } - } -} diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Return.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/Return.cs.meta deleted file mode 100644 index df54f05..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/Return.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 25648117feeec6043bd39468bfab62b7 -timeCreated: 1455373898 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Sample.cs b/Assets/Plugins/UniRx/Scripts/Operators/Sample.cs deleted file mode 100644 index 18232a6..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/Sample.cs +++ /dev/null @@ -1,241 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace UniRx.Operators -{ - internal class SampleObservable : OperatorObservableBase - { - readonly IObservable source; - readonly TimeSpan interval; - readonly IScheduler scheduler; - - public SampleObservable(IObservable source, TimeSpan interval, IScheduler scheduler) - : base(source.IsRequiredSubscribeOnCurrentThread() || scheduler == Scheduler.CurrentThread) - { - this.source = source; - this.interval = interval; - this.scheduler = scheduler; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - return new Sample(this, observer, cancel).Run(); - } - - class Sample : OperatorObserverBase - { - readonly SampleObservable parent; - readonly object gate = new object(); - T latestValue = default(T); - bool isUpdated = false; - bool isCompleted = false; - SingleAssignmentDisposable sourceSubscription; - - public Sample(SampleObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) - { - this.parent = parent; - } - - public IDisposable Run() - { - sourceSubscription = new SingleAssignmentDisposable(); - sourceSubscription.Disposable = parent.source.Subscribe(this); - - - IDisposable scheduling; - var periodicScheduler = parent.scheduler as ISchedulerPeriodic; - if (periodicScheduler != null) - { - scheduling = periodicScheduler.SchedulePeriodic(parent.interval, OnNextTick); - } - else - { - scheduling = parent.scheduler.Schedule(parent.interval, OnNextRecursive); - } - - return StableCompositeDisposable.Create(sourceSubscription, scheduling); - } - - void OnNextTick() - { - lock (gate) - { - if (isUpdated) - { - var value = latestValue; - isUpdated = false; - observer.OnNext(value); - } - if (isCompleted) - { - try { observer.OnCompleted(); } finally { Dispose(); } - } - } - } - - void OnNextRecursive(Action self) - { - lock (gate) - { - if (isUpdated) - { - var value = latestValue; - isUpdated = false; - observer.OnNext(value); - } - if (isCompleted) - { - try { observer.OnCompleted(); } finally { Dispose(); } - } - } - self(parent.interval); - } - - public override void OnNext(T value) - { - lock (gate) - { - latestValue = value; - isUpdated = true; - } - } - - public override void OnError(Exception error) - { - lock (gate) - { - try { base.observer.OnError(error); } finally { Dispose(); } - } - } - - public override void OnCompleted() - { - lock (gate) - { - isCompleted = true; - sourceSubscription.Dispose(); - } - } - } - } - - internal class SampleObservable : OperatorObservableBase - { - readonly IObservable source; - readonly IObservable intervalSource; - - public SampleObservable(IObservable source, IObservable intervalSource) - : base(source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.intervalSource = intervalSource; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - return new Sample(this, observer, cancel).Run(); - } - - class Sample : OperatorObserverBase - { - readonly SampleObservable parent; - readonly object gate = new object(); - T latestValue = default(T); - bool isUpdated = false; - bool isCompleted = false; - SingleAssignmentDisposable sourceSubscription; - - public Sample( - SampleObservable parent, IObserver observer, IDisposable cancel) - : base(observer, cancel) - { - this.parent = parent; - } - - public IDisposable Run() - { - sourceSubscription = new SingleAssignmentDisposable(); - sourceSubscription.Disposable = parent.source.Subscribe(this); - - var scheduling = this.parent.intervalSource.Subscribe(new SampleTick(this)); - - return StableCompositeDisposable.Create(sourceSubscription, scheduling); - } - - public override void OnNext(T value) - { - lock (gate) - { - latestValue = value; - isUpdated = true; - } - } - - public override void OnError(Exception error) - { - lock (gate) - { - try { base.observer.OnError(error); } finally { Dispose(); } - } - } - - public override void OnCompleted() - { - lock (gate) - { - isCompleted = true; - sourceSubscription.Dispose(); - } - } - - class SampleTick : IObserver - { - readonly Sample parent; - - public SampleTick(Sample parent) - { - this.parent = parent; - } - - public void OnCompleted() - { - lock (parent.gate) - { - if (parent.isUpdated) - { - parent.isUpdated = false; - parent.observer.OnNext(parent.latestValue); - } - if (parent.isCompleted) - { - try { parent.observer.OnCompleted(); } finally { parent.Dispose(); } - } - } - } - - public void OnError(Exception error) - { - } - - public void OnNext(T2 _) - { - lock (parent.gate) - { - if (parent.isUpdated) - { - var value = parent.latestValue; - parent.isUpdated = false; - parent.observer.OnNext(value); - } - if (parent.isCompleted) - { - try { parent.observer.OnCompleted(); } finally { parent.Dispose(); } - } - } - } - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Sample.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/Sample.cs.meta deleted file mode 100644 index dfdce6c..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/Sample.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 414e918f6a4dfc549b2a8c916a6325e1 -timeCreated: 1455373898 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Scan.cs b/Assets/Plugins/UniRx/Scripts/Operators/Scan.cs deleted file mode 100644 index 0139ab2..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/Scan.cs +++ /dev/null @@ -1,139 +0,0 @@ -using System; -using UniRx.Operators; - -namespace UniRx.Operators -{ - internal class ScanObservable : OperatorObservableBase - { - readonly IObservable source; - readonly Func accumulator; - - public ScanObservable(IObservable source, Func accumulator) - : base(source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.accumulator = accumulator; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - return source.Subscribe(new Scan(this, observer, cancel)); - } - - class Scan : OperatorObserverBase - { - readonly ScanObservable parent; - TSource accumulation; - bool isFirst; - - public Scan(ScanObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) - { - this.parent = parent; - this.isFirst = true; - } - - public override void OnNext(TSource value) - { - if (isFirst) - { - isFirst = false; - accumulation = value; - } - else - { - try - { - accumulation = parent.accumulator(accumulation, value); - } - catch (Exception ex) - { - try { observer.OnError(ex); } - finally { Dispose(); } - return; - } - } - - observer.OnNext(accumulation); - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } - finally { Dispose(); } - } - - public override void OnCompleted() - { - try { observer.OnCompleted(); } - finally { Dispose(); } - } - } - } - - internal class ScanObservable : OperatorObservableBase - { - readonly IObservable source; - readonly TAccumulate seed; - readonly Func accumulator; - - public ScanObservable(IObservable source, TAccumulate seed, Func accumulator) - : base(source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.seed = seed; - this.accumulator = accumulator; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - return source.Subscribe(new Scan(this, observer, cancel)); - } - - class Scan : OperatorObserverBase - { - readonly ScanObservable parent; - TAccumulate accumulation; - bool isFirst; - - public Scan(ScanObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) - { - this.parent = parent; - this.isFirst = true; - } - - public override void OnNext(TSource value) - { - if (isFirst) - { - isFirst = false; - accumulation = parent.seed; - } - - try - { - accumulation = parent.accumulator(accumulation, value); - } - catch (Exception ex) - { - try { observer.OnError(ex); } - finally { Dispose(); } - return; - } - - observer.OnNext(accumulation); - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } - finally { Dispose(); } - } - - public override void OnCompleted() - { - try { observer.OnCompleted(); } - finally { Dispose(); } - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Scan.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/Scan.cs.meta deleted file mode 100644 index 87a736e..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/Scan.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 461fecd0ef4d48c4d95aae68c2ca2c1c -timeCreated: 1455373898 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Select.cs b/Assets/Plugins/UniRx/Scripts/Operators/Select.cs deleted file mode 100644 index 73464ce..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/Select.cs +++ /dev/null @@ -1,146 +0,0 @@ -using System; - -namespace UniRx.Operators -{ - internal interface ISelect - { - // IObservable CombineSelector(Func selector); - IObservable CombinePredicate(Func predicate); - } - - internal class SelectObservable : OperatorObservableBase, ISelect - { - readonly IObservable source; - readonly Func selector; - readonly Func selectorWithIndex; - - public SelectObservable(IObservable source, Func selector) - : base(source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.selector = selector; - } - - public SelectObservable(IObservable source, Func selector) - : base(source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.selectorWithIndex = selector; - } - - // sometimes cause "which no ahead of time (AOT) code was generated." on IL2CPP... - - //public IObservable CombineSelector(Func combineSelector) - //{ - // if (this.selector != null) - // { - // return new Select(source, x => combineSelector(this.selector(x))); - // } - // else - // { - // return new Select(this, combineSelector); - // } - //} - - public IObservable CombinePredicate(Func predicate) - { - if (this.selector != null) - { - return new SelectWhereObservable(this.source, this.selector, predicate); - } - else - { - return new WhereObservable(this, predicate); // can't combine - } - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - if (selector != null) - { - return source.Subscribe(new Select(this, observer, cancel)); - } - else - { - return source.Subscribe(new Select_(this, observer, cancel)); - } - } - - class Select : OperatorObserverBase - { - readonly SelectObservable parent; - - public Select(SelectObservable parent, IObserver observer, IDisposable cancel) - : base(observer, cancel) - { - this.parent = parent; - } - - public override void OnNext(T value) - { - var v = default(TR); - try - { - v = parent.selector(value); - } - catch (Exception ex) - { - try { observer.OnError(ex); } finally { Dispose(); } - return; - } - - observer.OnNext(v); - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } finally { Dispose(); } - } - - public override void OnCompleted() - { - try { observer.OnCompleted(); } finally { Dispose(); } - } - } - - // with Index - class Select_ : OperatorObserverBase - { - readonly SelectObservable parent; - int index; - - public Select_(SelectObservable parent, IObserver observer, IDisposable cancel) - : base(observer, cancel) - { - this.parent = parent; - this.index = 0; - } - - public override void OnNext(T value) - { - var v = default(TR); - try - { - v = parent.selectorWithIndex(value, index++); - } - catch (Exception ex) - { - try { observer.OnError(ex); } finally { Dispose(); } - return; - } - - observer.OnNext(v); - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } finally { Dispose(); } - } - - public override void OnCompleted() - { - try { observer.OnCompleted(); } finally { Dispose(); } - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Select.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/Select.cs.meta deleted file mode 100644 index 9a78495..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/Select.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 997e36ad7b02b804ea1f03d05e60bed5 -timeCreated: 1455373900 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/SelectMany.cs b/Assets/Plugins/UniRx/Scripts/Operators/SelectMany.cs deleted file mode 100644 index c057621..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/SelectMany.cs +++ /dev/null @@ -1,910 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace UniRx.Operators -{ - internal class SelectManyObservable : OperatorObservableBase - { - readonly IObservable source; - readonly Func> selector; - readonly Func> selectorWithIndex; - readonly Func> selectorEnumerable; - readonly Func> selectorEnumerableWithIndex; - - public SelectManyObservable(IObservable source, Func> selector) - : base(source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.selector = selector; - } - - public SelectManyObservable(IObservable source, Func> selector) - : base(source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.selectorWithIndex = selector; - } - - public SelectManyObservable(IObservable source, Func> selector) - : base(source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.selectorEnumerable = selector; - } - - public SelectManyObservable(IObservable source, Func> selector) - : base(source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.selectorEnumerableWithIndex = selector; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - if (this.selector != null) - { - return new SelectManyOuterObserver(this, observer, cancel).Run(); - } - else if (this.selectorWithIndex != null) - { - return new SelectManyObserverWithIndex(this, observer, cancel).Run(); - } - else if (this.selectorEnumerable != null) - { - return new SelectManyEnumerableObserver(this, observer, cancel).Run(); - } - else if (this.selectorEnumerableWithIndex != null) - { - return new SelectManyEnumerableObserverWithIndex(this, observer, cancel).Run(); - } - else - { - throw new InvalidOperationException(); - } - } - - class SelectManyOuterObserver : OperatorObserverBase - { - readonly SelectManyObservable parent; - - CompositeDisposable collectionDisposable; - SingleAssignmentDisposable sourceDisposable; - object gate = new object(); - bool isStopped = false; - - public SelectManyOuterObserver(SelectManyObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) - { - this.parent = parent; - } - - public IDisposable Run() - { - collectionDisposable = new CompositeDisposable(); - sourceDisposable = new SingleAssignmentDisposable(); - collectionDisposable.Add(sourceDisposable); - - sourceDisposable.Disposable = parent.source.Subscribe(this); - return collectionDisposable; - } - - public override void OnNext(TSource value) - { - IObservable nextObservable; - try - { - nextObservable = parent.selector(value); - } - catch (Exception ex) - { - try { observer.OnError(ex); } finally { Dispose(); }; - return; - } - - var disposable = new SingleAssignmentDisposable(); - collectionDisposable.Add(disposable); - var collectionObserver = new SelectMany(this, disposable); - disposable.Disposable = nextObservable.Subscribe(collectionObserver); - } - - public override void OnError(Exception error) - { - lock (gate) - { - try { observer.OnError(error); } finally { Dispose(); }; - } - } - - public override void OnCompleted() - { - isStopped = true; - if (collectionDisposable.Count == 1) - { - lock (gate) - { - try { observer.OnCompleted(); } finally { Dispose(); }; - } - } - else - { - sourceDisposable.Dispose(); - } - } - - class SelectMany : OperatorObserverBase - { - readonly SelectManyOuterObserver parent; - readonly IDisposable cancel; - - public SelectMany(SelectManyOuterObserver parent, IDisposable cancel) - : base(parent.observer, cancel) - { - this.parent = parent; - this.cancel = cancel; - } - - public override void OnNext(TResult value) - { - lock (parent.gate) - { - base.observer.OnNext(value); - } - } - - public override void OnError(Exception error) - { - lock (parent.gate) - { - try { observer.OnError(error); } finally { Dispose(); }; - } - } - - public override void OnCompleted() - { - parent.collectionDisposable.Remove(cancel); - if (parent.isStopped && parent.collectionDisposable.Count == 1) - { - lock (parent.gate) - { - try { observer.OnCompleted(); } finally { Dispose(); }; - } - } - } - } - } - - class SelectManyObserverWithIndex : OperatorObserverBase - { - readonly SelectManyObservable parent; - - CompositeDisposable collectionDisposable; - int index = 0; - object gate = new object(); - bool isStopped = false; - SingleAssignmentDisposable sourceDisposable; - - public SelectManyObserverWithIndex(SelectManyObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) - { - this.parent = parent; - } - - public IDisposable Run() - { - collectionDisposable = new CompositeDisposable(); - sourceDisposable = new SingleAssignmentDisposable(); - collectionDisposable.Add(sourceDisposable); - - sourceDisposable.Disposable = parent.source.Subscribe(this); - return collectionDisposable; - } - - public override void OnNext(TSource value) - { - IObservable nextObservable; - try - { - nextObservable = parent.selectorWithIndex(value, index++); - } - catch (Exception ex) - { - try { observer.OnError(ex); } finally { Dispose(); }; - return; - } - - var disposable = new SingleAssignmentDisposable(); - collectionDisposable.Add(disposable); - var collectionObserver = new SelectMany(this, disposable); - disposable.Disposable = nextObservable.Subscribe(collectionObserver); - } - - public override void OnError(Exception error) - { - lock (gate) - { - try { observer.OnError(error); } finally { Dispose(); }; - } - } - - public override void OnCompleted() - { - isStopped = true; - if (collectionDisposable.Count == 1) - { - lock (gate) - { - try { observer.OnCompleted(); } finally { Dispose(); }; - } - } - else - { - sourceDisposable.Dispose(); - } - } - - class SelectMany : OperatorObserverBase - { - readonly SelectManyObserverWithIndex parent; - readonly IDisposable cancel; - - public SelectMany(SelectManyObserverWithIndex parent, IDisposable cancel) - : base(parent.observer, cancel) - { - this.parent = parent; - this.cancel = cancel; - } - - public override void OnNext(TResult value) - { - lock (parent.gate) - { - base.observer.OnNext(value); - } - } - - public override void OnError(Exception error) - { - lock (parent.gate) - { - try { observer.OnError(error); } finally { Dispose(); }; - } - } - - public override void OnCompleted() - { - parent.collectionDisposable.Remove(cancel); - if (parent.isStopped && parent.collectionDisposable.Count == 1) - { - lock (parent.gate) - { - try { observer.OnCompleted(); } finally { Dispose(); }; - } - } - } - } - } - - class SelectManyEnumerableObserver : OperatorObserverBase - { - readonly SelectManyObservable parent; - - public SelectManyEnumerableObserver(SelectManyObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) - { - this.parent = parent; - } - - public IDisposable Run() - { - return parent.source.Subscribe(this); - } - - public override void OnNext(TSource value) - { - IEnumerable nextEnumerable; - try - { - nextEnumerable = parent.selectorEnumerable(value); - } - catch (Exception ex) - { - try { observer.OnError(ex); } finally { Dispose(); }; - return; - } - - var e = nextEnumerable.GetEnumerator(); - try - { - var hasNext = true; - while (hasNext) - { - hasNext = false; - var current = default(TResult); - - try - { - hasNext = e.MoveNext(); - if (hasNext) - { - current = e.Current; - } - } - catch (Exception exception) - { - try { observer.OnError(exception); } finally { Dispose(); } - return; - } - - if (hasNext) - { - observer.OnNext(current); - } - } - } - finally - { - if (e != null) - { - e.Dispose(); - } - } - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } finally { Dispose(); } - } - - public override void OnCompleted() - { - try { observer.OnCompleted(); } finally { Dispose(); } - } - } - - class SelectManyEnumerableObserverWithIndex : OperatorObserverBase - { - readonly SelectManyObservable parent; - int index = 0; - - public SelectManyEnumerableObserverWithIndex(SelectManyObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) - { - this.parent = parent; - } - - public IDisposable Run() - { - return parent.source.Subscribe(this); - } - - public override void OnNext(TSource value) - { - IEnumerable nextEnumerable; - try - { - nextEnumerable = parent.selectorEnumerableWithIndex(value, index++); - } - catch (Exception ex) - { - OnError(ex); - return; - } - - var e = nextEnumerable.GetEnumerator(); - try - { - var hasNext = true; - while (hasNext) - { - hasNext = false; - var current = default(TResult); - - try - { - hasNext = e.MoveNext(); - if (hasNext) - { - current = e.Current; - } - } - catch (Exception exception) - { - try { observer.OnError(exception); } finally { Dispose(); } - return; - } - - if (hasNext) - { - observer.OnNext(current); - } - } - } - finally - { - if (e != null) - { - e.Dispose(); - } - } - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } finally { Dispose(); } - } - - public override void OnCompleted() - { - try { observer.OnCompleted(); } finally { Dispose(); } - } - } - } - - // with resultSelector - internal class SelectManyObservable : OperatorObservableBase - { - readonly IObservable source; - readonly Func> collectionSelector; - readonly Func> collectionSelectorWithIndex; - readonly Func> collectionSelectorEnumerable; - readonly Func> collectionSelectorEnumerableWithIndex; - readonly Func resultSelector; - readonly Func resultSelectorWithIndex; - - public SelectManyObservable(IObservable source, Func> collectionSelector, Func resultSelector) - : base(source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.collectionSelector = collectionSelector; - this.resultSelector = resultSelector; - } - - public SelectManyObservable(IObservable source, Func> collectionSelector, Func resultSelector) - : base(source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.collectionSelectorWithIndex = collectionSelector; - this.resultSelectorWithIndex = resultSelector; - } - - public SelectManyObservable(IObservable source, Func> collectionSelector, Func resultSelector) - : base(source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.collectionSelectorEnumerable = collectionSelector; - this.resultSelector = resultSelector; - } - - public SelectManyObservable(IObservable source, Func> collectionSelector, Func resultSelector) - : base(source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.collectionSelectorEnumerableWithIndex = collectionSelector; - this.resultSelectorWithIndex = resultSelector; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - if (collectionSelector != null) - { - return new SelectManyOuterObserver(this, observer, cancel).Run(); - } - else if (collectionSelectorWithIndex != null) - { - return new SelectManyObserverWithIndex(this, observer, cancel).Run(); - } - else if (collectionSelectorEnumerable != null) - { - return new SelectManyEnumerableObserver(this, observer, cancel).Run(); - } - else if (collectionSelectorEnumerableWithIndex != null) - { - return new SelectManyEnumerableObserverWithIndex(this, observer, cancel).Run(); - } - else - { - throw new InvalidOperationException(); - } - } - - class SelectManyOuterObserver : OperatorObserverBase - { - readonly SelectManyObservable parent; - - CompositeDisposable collectionDisposable; - object gate = new object(); - bool isStopped = false; - SingleAssignmentDisposable sourceDisposable; - - public SelectManyOuterObserver(SelectManyObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) - { - this.parent = parent; - } - - public IDisposable Run() - { - collectionDisposable = new CompositeDisposable(); - sourceDisposable = new SingleAssignmentDisposable(); - collectionDisposable.Add(sourceDisposable); - - sourceDisposable.Disposable = parent.source.Subscribe(this); - return collectionDisposable; - } - - public override void OnNext(TSource value) - { - IObservable nextObservable; - try - { - nextObservable = parent.collectionSelector(value); - } - catch (Exception ex) - { - OnError(ex); - return; - } - - var disposable = new SingleAssignmentDisposable(); - collectionDisposable.Add(disposable); - var collectionObserver = new SelectMany(this, value, disposable); - disposable.Disposable = nextObservable.Subscribe(collectionObserver); - } - - public override void OnError(Exception error) - { - lock (gate) - { - try { observer.OnError(error); } finally { Dispose(); }; - } - } - - public override void OnCompleted() - { - isStopped = true; - if (collectionDisposable.Count == 1) - { - lock (gate) - { - try { observer.OnCompleted(); } finally { Dispose(); }; - } - } - else - { - sourceDisposable.Dispose(); - } - } - - class SelectMany : OperatorObserverBase - { - readonly SelectManyOuterObserver parent; - readonly TSource sourceValue; - readonly IDisposable cancel; - - public SelectMany(SelectManyOuterObserver parent, TSource value, IDisposable cancel) - : base(parent.observer, cancel) - { - this.parent = parent; - this.sourceValue = value; - this.cancel = cancel; - } - - public override void OnNext(TCollection value) - { - TResult resultValue; - try - { - resultValue = parent.parent.resultSelector(sourceValue, value); - } - catch (Exception ex) - { - OnError(ex); - return; - } - - lock (parent.gate) - { - base.observer.OnNext(resultValue); - } - } - - public override void OnError(Exception error) - { - lock (parent.gate) - { - try { observer.OnError(error); } finally { Dispose(); }; - } - } - - public override void OnCompleted() - { - parent.collectionDisposable.Remove(cancel); - if (parent.isStopped && parent.collectionDisposable.Count == 1) - { - lock (parent.gate) - { - try { observer.OnCompleted(); } finally { Dispose(); }; - } - } - } - } - } - - class SelectManyObserverWithIndex : OperatorObserverBase - { - readonly SelectManyObservable parent; - - CompositeDisposable collectionDisposable; - object gate = new object(); - bool isStopped = false; - SingleAssignmentDisposable sourceDisposable; - int index = 0; - - public SelectManyObserverWithIndex(SelectManyObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) - { - this.parent = parent; - } - - public IDisposable Run() - { - collectionDisposable = new CompositeDisposable(); - sourceDisposable = new SingleAssignmentDisposable(); - collectionDisposable.Add(sourceDisposable); - - sourceDisposable.Disposable = parent.source.Subscribe(this); - return collectionDisposable; - } - - public override void OnNext(TSource value) - { - var i = index++; - IObservable nextObservable; - try - { - nextObservable = parent.collectionSelectorWithIndex(value, i); - } - catch (Exception ex) - { - OnError(ex); - return; - } - - var disposable = new SingleAssignmentDisposable(); - collectionDisposable.Add(disposable); - var collectionObserver = new SelectManyObserver(this, value, i, disposable); - disposable.Disposable = nextObservable.Subscribe(collectionObserver); - } - - public override void OnError(Exception error) - { - lock (gate) - { - try { observer.OnError(error); } finally { Dispose(); }; - } - } - - public override void OnCompleted() - { - isStopped = true; - if (collectionDisposable.Count == 1) - { - lock (gate) - { - try { observer.OnCompleted(); } finally { Dispose(); }; - } - } - else - { - sourceDisposable.Dispose(); - } - } - - class SelectManyObserver : OperatorObserverBase - { - readonly SelectManyObserverWithIndex parent; - readonly TSource sourceValue; - readonly int sourceIndex; - readonly IDisposable cancel; - int index; - - public SelectManyObserver(SelectManyObserverWithIndex parent, TSource value, int index, IDisposable cancel) - : base(parent.observer, cancel) - { - this.parent = parent; - this.sourceValue = value; - this.sourceIndex = index; - this.cancel = cancel; - } - - public override void OnNext(TCollection value) - { - TResult resultValue; - try - { - resultValue = parent.parent.resultSelectorWithIndex(sourceValue, sourceIndex, value, index++); - } - catch (Exception ex) - { - try { observer.OnError(ex); } finally { Dispose(); }; - return; - } - - lock (parent.gate) - { - base.observer.OnNext(resultValue); - } - } - - public override void OnError(Exception error) - { - lock (parent.gate) - { - try { observer.OnError(error); } finally { Dispose(); }; - } - } - - public override void OnCompleted() - { - parent.collectionDisposable.Remove(cancel); - if (parent.isStopped && parent.collectionDisposable.Count == 1) - { - lock (parent.gate) - { - try { observer.OnCompleted(); } finally { Dispose(); }; - } - } - } - } - } - - class SelectManyEnumerableObserver : OperatorObserverBase - { - readonly SelectManyObservable parent; - - public SelectManyEnumerableObserver(SelectManyObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) - { - this.parent = parent; - } - - public IDisposable Run() - { - return parent.source.Subscribe(this); - } - - public override void OnNext(TSource value) - { - IEnumerable nextEnumerable; - try - { - nextEnumerable = parent.collectionSelectorEnumerable(value); - } - catch (Exception ex) - { - try { observer.OnError(ex); } finally { Dispose(); }; - return; - } - - var e = nextEnumerable.GetEnumerator(); - try - { - var hasNext = true; - while (hasNext) - { - hasNext = false; - var current = default(TResult); - - try - { - hasNext = e.MoveNext(); - if (hasNext) - { - current = parent.resultSelector(value, e.Current); - } - } - catch (Exception exception) - { - try { observer.OnError(exception); } finally { Dispose(); } - return; - } - - if (hasNext) - { - observer.OnNext(current); - } - } - } - finally - { - if (e != null) - { - e.Dispose(); - } - } - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } finally { Dispose(); } - } - - public override void OnCompleted() - { - try { observer.OnCompleted(); } finally { Dispose(); } - } - } - - class SelectManyEnumerableObserverWithIndex : OperatorObserverBase - { - readonly SelectManyObservable parent; - int index = 0; - - public SelectManyEnumerableObserverWithIndex(SelectManyObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) - { - this.parent = parent; - } - - public IDisposable Run() - { - return parent.source.Subscribe(this); - } - - public override void OnNext(TSource value) - { - var i = index++; - IEnumerable nextEnumerable; - try - { - nextEnumerable = parent.collectionSelectorEnumerableWithIndex(value, i); - } - catch (Exception ex) - { - try { observer.OnError(ex); } finally { Dispose(); }; - return; - } - - var e = nextEnumerable.GetEnumerator(); - try - { - var sequenceI = 0; - var hasNext = true; - while (hasNext) - { - hasNext = false; - var current = default(TResult); - - try - { - hasNext = e.MoveNext(); - if (hasNext) - { - current = parent.resultSelectorWithIndex(value, i, e.Current, sequenceI++); - } - } - catch (Exception exception) - { - try { observer.OnError(exception); } finally { Dispose(); } - return; - } - - if (hasNext) - { - observer.OnNext(current); - } - } - } - finally - { - if (e != null) - { - e.Dispose(); - } - } - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } finally { Dispose(); } - } - - public override void OnCompleted() - { - try { observer.OnCompleted(); } finally { Dispose(); } - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/SelectMany.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/SelectMany.cs.meta deleted file mode 100644 index 35bc2f6..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/SelectMany.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 6496e8557f6066e4380c32935b6f37c3 -timeCreated: 1455373899 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/SelectWhere.cs b/Assets/Plugins/UniRx/Scripts/Operators/SelectWhere.cs deleted file mode 100644 index 833688a..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/SelectWhere.cs +++ /dev/null @@ -1,77 +0,0 @@ -using System; - -namespace UniRx.Operators -{ - // Optimize for .Select().Where() - - internal class SelectWhereObservable : OperatorObservableBase - { - readonly IObservable source; - readonly Func selector; - readonly Func predicate; - - public SelectWhereObservable(IObservable source, Func selector, Func predicate) - : base(source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.selector = selector; - this.predicate = predicate; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - return source.Subscribe(new SelectWhere(this, observer, cancel)); - } - - class SelectWhere : OperatorObserverBase - { - readonly SelectWhereObservable parent; - - public SelectWhere(SelectWhereObservable parent, IObserver observer, IDisposable cancel) - : base(observer, cancel) - { - this.parent = parent; - } - - public override void OnNext(T value) - { - var v = default(TR); - try - { - v = parent.selector(value); - } - catch (Exception ex) - { - try { observer.OnError(ex); } finally { Dispose(); } - return; - } - - var isPassed = false; - try - { - isPassed = parent.predicate(v); - } - catch (Exception ex) - { - try { observer.OnError(ex); } finally { Dispose(); } - return; - } - - if (isPassed) - { - observer.OnNext(v); - } - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } finally { Dispose(); } - } - - public override void OnCompleted() - { - try { observer.OnCompleted(); } finally { Dispose(); } - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/SelectWhere.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/SelectWhere.cs.meta deleted file mode 100644 index 3f7d9e3..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/SelectWhere.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 6a7561d10967d6b4d9c2a67ffc3b9d85 -timeCreated: 1468748731 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Single.cs b/Assets/Plugins/UniRx/Scripts/Operators/Single.cs deleted file mode 100644 index 41a5781..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/Single.cs +++ /dev/null @@ -1,182 +0,0 @@ -using System; - -namespace UniRx.Operators -{ - internal class SingleObservable : OperatorObservableBase - { - readonly IObservable source; - readonly bool useDefault; - readonly Func predicate; - - public SingleObservable(IObservable source, bool useDefault) - : base(source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.useDefault = useDefault; - } - - public SingleObservable(IObservable source, Func predicate, bool useDefault) - : base(source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.predicate = predicate; - this.useDefault = useDefault; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - if (predicate == null) - { - return source.Subscribe(new Single(this, observer, cancel)); - } - else - { - return source.Subscribe(new Single_(this, observer, cancel)); - } - } - - class Single : OperatorObserverBase - { - readonly SingleObservable parent; - bool seenValue; - T lastValue; - - public Single(SingleObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) - { - this.parent = parent; - this.seenValue = false; - } - - public override void OnNext(T value) - { - if (seenValue) - { - try { observer.OnError(new InvalidOperationException("sequence is not single")); } - finally { Dispose(); } - } - else - { - seenValue = true; - lastValue = value; - } - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } - finally { Dispose(); } - } - - public override void OnCompleted() - { - if (parent.useDefault) - { - if (!seenValue) - { - observer.OnNext(default(T)); - } - else - { - observer.OnNext(lastValue); - } - try { observer.OnCompleted(); } - finally { Dispose(); } - } - else - { - if (!seenValue) - { - try { observer.OnError(new InvalidOperationException("sequence is empty")); } - finally { Dispose(); } - } - else - { - observer.OnNext(lastValue); - try { observer.OnCompleted(); } - finally { Dispose(); } - } - } - } - } - - class Single_ : OperatorObserverBase - { - readonly SingleObservable parent; - bool seenValue; - T lastValue; - - public Single_(SingleObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) - { - this.parent = parent; - this.seenValue = false; - } - - public override void OnNext(T value) - { - bool isPassed; - try - { - isPassed = parent.predicate(value); - } - catch (Exception ex) - { - try { observer.OnError(ex); } - finally { Dispose(); } - return; - } - - if (isPassed) - { - if (seenValue) - { - try { observer.OnError(new InvalidOperationException("sequence is not single")); } - finally { Dispose(); } - return; - } - else - { - seenValue = true; - lastValue = value; - } - } - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } - finally { Dispose(); } - } - - public override void OnCompleted() - { - if (parent.useDefault) - { - if (!seenValue) - { - observer.OnNext(default(T)); - } - else - { - observer.OnNext(lastValue); - } - try { observer.OnCompleted(); } - finally { Dispose(); } - } - else - { - if (!seenValue) - { - try { observer.OnError(new InvalidOperationException("sequence is empty")); } - finally { Dispose(); } - } - else - { - observer.OnNext(lastValue); - try { observer.OnCompleted(); } - finally { Dispose(); } - } - } - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Single.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/Single.cs.meta deleted file mode 100644 index 88c862f..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/Single.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 9a50aee929f403f4ea076fc11f71fc53 -timeCreated: 1455373900 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Skip.cs b/Assets/Plugins/UniRx/Scripts/Operators/Skip.cs deleted file mode 100644 index a8cc51d..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/Skip.cs +++ /dev/null @@ -1,138 +0,0 @@ -using System; -using UniRx.Operators; - -namespace UniRx.Operators -{ - internal class SkipObservable : OperatorObservableBase - { - readonly IObservable source; - readonly int count; - readonly TimeSpan duration; - internal readonly IScheduler scheduler; // public for optimization check - - public SkipObservable(IObservable source, int count) - : base(source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.count = count; - } - - public SkipObservable(IObservable source, TimeSpan duration, IScheduler scheduler) - : base(scheduler == Scheduler.CurrentThread || source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.duration = duration; - this.scheduler = scheduler; - } - - // optimize combiner - - public IObservable Combine(int count) - { - // use sum - // xs = 6 - // xs.Skip(2) = 4 - // xs.Skip(2).Skip(3) = 1 - - return new SkipObservable(source, this.count + count); - } - - public IObservable Combine(TimeSpan duration) - { - // use max - // xs = 6s - // xs.Skip(2s) = 2s - // xs.Skip(2s).Skip(3s) = 3s - - return (duration <= this.duration) - ? this - : new SkipObservable(source, duration, scheduler); - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - if (scheduler == null) - { - return source.Subscribe(new Skip(this, observer, cancel)); - } - else - { - return new Skip_(this, observer, cancel).Run(); - } - } - - class Skip : OperatorObserverBase - { - int remaining; - - public Skip(SkipObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) - { - this.remaining = parent.count; - } - - public override void OnNext(T value) - { - if (remaining <= 0) - { - base.observer.OnNext(value); - } - else - { - remaining--; - } - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } finally { Dispose(); } - } - - public override void OnCompleted() - { - try { observer.OnCompleted(); } finally { Dispose(); } - } - } - - class Skip_ : OperatorObserverBase - { - readonly SkipObservable parent; - volatile bool open; - - public Skip_(SkipObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) - { - this.parent = parent; - } - - public IDisposable Run() - { - var d1 = parent.scheduler.Schedule(parent.duration, Tick); - var d2 = parent.source.Subscribe(this); - - return StableCompositeDisposable.Create(d1, d2); - } - - void Tick() - { - open = true; - } - - public override void OnNext(T value) - { - if (open) - { - base.observer.OnNext(value); - } - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } finally { Dispose(); }; - } - - public override void OnCompleted() - { - try { observer.OnCompleted(); } finally { Dispose(); }; - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Skip.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/Skip.cs.meta deleted file mode 100644 index 02833c7..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/Skip.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 1ffcb45c02e14e94bb37c6513b04bb7c -timeCreated: 1455373897 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/SkipUntil.cs b/Assets/Plugins/UniRx/Scripts/Operators/SkipUntil.cs deleted file mode 100644 index 19c89a7..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/SkipUntil.cs +++ /dev/null @@ -1,119 +0,0 @@ -using System; - -namespace UniRx.Operators -{ - internal class SkipUntilObservable : OperatorObservableBase - { - readonly IObservable source; - readonly IObservable other; - - public SkipUntilObservable(IObservable source, IObservable other) - : base(source.IsRequiredSubscribeOnCurrentThread() || other.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.other = other; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - return new SkipUntilOuterObserver(this, observer, cancel).Run(); - } - - class SkipUntilOuterObserver : OperatorObserverBase - { - readonly SkipUntilObservable parent; - - public SkipUntilOuterObserver(SkipUntilObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) - { - this.parent = parent; - } - - public IDisposable Run() - { - var sourceSubscription = new SingleAssignmentDisposable(); - var sourceObserver = new SkipUntil(this, sourceSubscription); - - var otherSubscription = new SingleAssignmentDisposable(); - var otherObserver = new SkipUntilOther(this, sourceObserver, otherSubscription); - - sourceSubscription.Disposable = parent.source.Subscribe(sourceObserver); - otherSubscription.Disposable = parent.other.Subscribe(otherObserver); - - return StableCompositeDisposable.Create(otherSubscription, sourceSubscription); - } - - public override void OnNext(T value) - { - } - - public override void OnError(Exception error) - { - } - - public override void OnCompleted() - { - } - - class SkipUntil : IObserver - { - public volatile IObserver observer; - readonly SkipUntilOuterObserver parent; - readonly IDisposable subscription; - - public SkipUntil(SkipUntilOuterObserver parent, IDisposable subscription) - { - this.parent = parent; - observer = UniRx.InternalUtil.EmptyObserver.Instance; - this.subscription = subscription; - } - - public void OnNext(T value) - { - observer.OnNext(value); - } - - public void OnError(Exception error) - { - try { observer.OnError(error); } - finally { parent.Dispose(); } - } - - public void OnCompleted() - { - try { observer.OnCompleted(); } - finally { subscription.Dispose(); } - } - } - - class SkipUntilOther : IObserver - { - readonly SkipUntilOuterObserver parent; - readonly SkipUntil sourceObserver; - readonly IDisposable subscription; - - public SkipUntilOther(SkipUntilOuterObserver parent, SkipUntil sourceObserver, IDisposable subscription) - { - this.parent = parent; - this.sourceObserver = sourceObserver; - this.subscription = subscription; - } - - public void OnNext(TOther value) - { - sourceObserver.observer = parent.observer; - subscription.Dispose(); - } - - public void OnError(Exception error) - { - try { parent.observer.OnError(error); } finally { parent.Dispose(); } - } - - public void OnCompleted() - { - subscription.Dispose(); - } - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/SkipUntil.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/SkipUntil.cs.meta deleted file mode 100644 index 0e639d2..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/SkipUntil.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 52314487e375f3d44a49bc5ceb90adab -timeCreated: 1455373899 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/SkipWhile.cs b/Assets/Plugins/UniRx/Scripts/Operators/SkipWhile.cs deleted file mode 100644 index 834caff..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/SkipWhile.cs +++ /dev/null @@ -1,130 +0,0 @@ -using System; - -namespace UniRx.Operators -{ - internal class SkipWhileObservable : OperatorObservableBase - { - readonly IObservable source; - readonly Func predicate; - readonly Func predicateWithIndex; - - public SkipWhileObservable(IObservable source, Func predicate) - : base(source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.predicate = predicate; - } - - public SkipWhileObservable(IObservable source, Func predicateWithIndex) - : base(source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.predicateWithIndex = predicateWithIndex; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - if (predicate != null) - { - return new SkipWhile(this, observer, cancel).Run(); - } - else - { - return new SkipWhile_(this, observer, cancel).Run(); - } - } - - class SkipWhile : OperatorObserverBase - { - readonly SkipWhileObservable parent; - bool endSkip = false; - - public SkipWhile(SkipWhileObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) - { - this.parent = parent; - } - - public IDisposable Run() - { - return parent.source.Subscribe(this); - } - - public override void OnNext(T value) - { - if (!endSkip) - { - try - { - endSkip = !parent.predicate(value); - } - catch (Exception ex) - { - try { observer.OnError(ex); } finally { Dispose(); } - return; - } - - if (!endSkip) return; - } - - observer.OnNext(value); - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } finally { Dispose(); } - } - - public override void OnCompleted() - { - try { observer.OnCompleted(); } finally { Dispose(); } - } - } - - class SkipWhile_ : OperatorObserverBase - { - readonly SkipWhileObservable parent; - bool endSkip = false; - int index = 0; - - public SkipWhile_(SkipWhileObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) - { - this.parent = parent; - } - - public IDisposable Run() - { - return parent.source.Subscribe(this); - } - - public override void OnNext(T value) - { - if (!endSkip) - { - try - { - endSkip = !parent.predicateWithIndex(value, index++); - } - catch (Exception ex) - { - try { observer.OnError(ex); } finally { Dispose(); } - return; - } - - if (!endSkip) return; - } - - observer.OnNext(value); - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } finally { Dispose(); } - } - - public override void OnCompleted() - { - try { observer.OnCompleted(); } finally { Dispose(); } - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/SkipWhile.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/SkipWhile.cs.meta deleted file mode 100644 index 113e94b..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/SkipWhile.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 4bc7a1e818d05654694d51e883739cca -timeCreated: 1455373898 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Start.cs b/Assets/Plugins/UniRx/Scripts/Operators/Start.cs deleted file mode 100644 index 6343a32..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/Start.cs +++ /dev/null @@ -1,101 +0,0 @@ -using System; - -namespace UniRx.Operators -{ - internal class StartObservable : OperatorObservableBase - { - readonly Action action; - readonly Func function; - readonly IScheduler scheduler; - readonly TimeSpan? startAfter; - - public StartObservable(Func function, TimeSpan? startAfter, IScheduler scheduler) - : base(scheduler == Scheduler.CurrentThread) - { - this.function = function; - this.startAfter = startAfter; - this.scheduler = scheduler; - } - - public StartObservable(Action action, TimeSpan? startAfter, IScheduler scheduler) - : base(scheduler == Scheduler.CurrentThread) - { - this.action = action; - this.startAfter = startAfter; - this.scheduler = scheduler; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - if (startAfter != null) - { - return scheduler.Schedule(startAfter.Value, new StartObserver(this, observer, cancel).Run); - } - else - { - return scheduler.Schedule(new StartObserver(this, observer, cancel).Run); - } - } - - class StartObserver : OperatorObserverBase - { - readonly StartObservable parent; - - public StartObserver(StartObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) - { - this.parent = parent; - } - - public void Run() - { - var result = default(T); - try - { - if (parent.function != null) - { - result = parent.function(); - } - else - { - parent.action(); - } - } - catch (Exception exception) - { - try { observer.OnError(exception); } - finally { Dispose(); } - return; - } - - OnNext(result); - try { observer.OnCompleted(); } - finally { Dispose(); } - } - - public override void OnNext(T value) - { - try - { - base.observer.OnNext(value); - } - catch - { - Dispose(); - throw; - } - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } - finally { Dispose(); } - } - - public override void OnCompleted() - { - try { observer.OnCompleted(); } - finally { Dispose(); } - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Start.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/Start.cs.meta deleted file mode 100644 index 9c42432..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/Start.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 2b99cac67f8c387439619e01a480c465 -timeCreated: 1455373898 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/StartWith.cs b/Assets/Plugins/UniRx/Scripts/Operators/StartWith.cs deleted file mode 100644 index 4fbb221..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/StartWith.cs +++ /dev/null @@ -1,82 +0,0 @@ -using System; - -namespace UniRx.Operators -{ - internal class StartWithObservable : OperatorObservableBase - { - readonly IObservable source; - readonly T value; - readonly Func valueFactory; - - public StartWithObservable(IObservable source, T value) - : base(source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.value = value; - } - - public StartWithObservable(IObservable source, Func valueFactory) - : base(source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.valueFactory = valueFactory; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - return new StartWith(this, observer, cancel).Run(); - } - - class StartWith : OperatorObserverBase - { - readonly StartWithObservable parent; - - public StartWith(StartWithObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) - { - this.parent = parent; - } - - public IDisposable Run() - { - T t; - if (parent.valueFactory == null) - { - t = parent.value; - } - else - { - try - { - t = parent.valueFactory(); - } - catch (Exception ex) - { - try { observer.OnError(ex); } - finally { Dispose(); } - return Disposable.Empty; - } - } - - OnNext(t); - return parent.source.Subscribe(base.observer); // good bye StartWithObserver - } - - public override void OnNext(T value) - { - base.observer.OnNext(value); - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } - finally { Dispose(); } - } - - public override void OnCompleted() - { - try { observer.OnCompleted(); } - finally { Dispose(); } - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/StartWith.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/StartWith.cs.meta deleted file mode 100644 index 498a564..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/StartWith.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 05df6719453543e458dc3e0d29ac7fa8 -timeCreated: 1455373897 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/SubscribeOn.cs b/Assets/Plugins/UniRx/Scripts/Operators/SubscribeOn.cs deleted file mode 100644 index e63fde9..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/SubscribeOn.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace UniRx.Operators -{ - internal class SubscribeOnObservable : OperatorObservableBase - { - readonly IObservable source; - readonly IScheduler scheduler; - - public SubscribeOnObservable(IObservable source, IScheduler scheduler) - : base(scheduler == Scheduler.CurrentThread || source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.scheduler = scheduler; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - var m = new SingleAssignmentDisposable(); - var d = new SerialDisposable(); - d.Disposable = m; - - m.Disposable = scheduler.Schedule(() => - { - d.Disposable = new ScheduledDisposable(scheduler, source.Subscribe(observer)); - }); - - return d; - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/SubscribeOn.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/SubscribeOn.cs.meta deleted file mode 100644 index cf05344..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/SubscribeOn.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: bff34f363b1797c4396815b5b3a4be1c -timeCreated: 1455373901 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Switch.cs b/Assets/Plugins/UniRx/Scripts/Operators/Switch.cs deleted file mode 100644 index 29482bd..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/Switch.cs +++ /dev/null @@ -1,130 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace UniRx.Operators -{ - internal class SwitchObservable : OperatorObservableBase - { - readonly IObservable> sources; - - public SwitchObservable(IObservable> sources) - : base(true) - { - this.sources = sources; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - return new SwitchObserver(this, observer, cancel).Run(); - } - - class SwitchObserver : OperatorObserverBase, T> - { - readonly SwitchObservable parent; - - readonly object gate = new object(); - readonly SerialDisposable innerSubscription = new SerialDisposable(); - bool isStopped = false; - ulong latest = 0UL; - bool hasLatest = false; - - public SwitchObserver(SwitchObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) - { - this.parent = parent; - } - - public IDisposable Run() - { - var subscription = parent.sources.Subscribe(this); - return StableCompositeDisposable.Create(subscription, innerSubscription); - } - - public override void OnNext(IObservable value) - { - var id = default(ulong); - lock (gate) - { - id = unchecked(++latest); - hasLatest = true; - } - - var d = new SingleAssignmentDisposable(); - innerSubscription.Disposable = d; - d.Disposable = value.Subscribe(new Switch(this, id)); - } - - public override void OnError(Exception error) - { - lock (gate) - { - try { observer.OnError(error); } - finally { Dispose(); } - } - } - - public override void OnCompleted() - { - lock (gate) - { - isStopped = true; - if (!hasLatest) - { - try { observer.OnCompleted(); } - finally { Dispose(); } - } - } - } - - class Switch : IObserver - { - readonly SwitchObserver parent; - readonly ulong id; - - public Switch(SwitchObserver observer, ulong id) - { - this.parent = observer; - this.id = id; - } - - public void OnNext(T value) - { - lock (parent.gate) - { - if (parent.latest == id) - { - parent.observer.OnNext(value); - } - } - } - - public void OnError(Exception error) - { - lock (parent.gate) - { - if (parent.latest == id) - { - parent.observer.OnError(error); - } - } - } - - public void OnCompleted() - { - lock (parent.gate) - { - if (parent.latest == id) - { - parent.hasLatest = false; - if (parent.isStopped) - { - parent.observer.OnCompleted(); - } - } - } - } - } - } - } -} diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Switch.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/Switch.cs.meta deleted file mode 100644 index b68dd17..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/Switch.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 5e16cdc638ec3bf41bbd380b75991734 -timeCreated: 1455373899 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Synchronize.cs b/Assets/Plugins/UniRx/Scripts/Operators/Synchronize.cs deleted file mode 100644 index 6d368a2..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/Synchronize.cs +++ /dev/null @@ -1,57 +0,0 @@ -using System; -using UniRx.Operators; - -namespace UniRx.Operators -{ - internal class SynchronizeObservable : OperatorObservableBase - { - readonly IObservable source; - readonly object gate; - - public SynchronizeObservable(IObservable source, object gate) - : base(source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.gate = gate; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - return source.Subscribe(new Synchronize(this, observer, cancel)); - } - - class Synchronize : OperatorObserverBase - { - readonly SynchronizeObservable parent; - - public Synchronize(SynchronizeObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) - { - this.parent = parent; - } - - public override void OnNext(T value) - { - lock (parent.gate) - { - base.observer.OnNext(value); - } - } - - public override void OnError(Exception error) - { - lock (parent.gate) - { - try { observer.OnError(error); } finally { Dispose(); }; - } - } - - public override void OnCompleted() - { - lock (parent.gate) - { - try { observer.OnCompleted(); } finally { Dispose(); }; - } - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Synchronize.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/Synchronize.cs.meta deleted file mode 100644 index c194498..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/Synchronize.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 31ddcb8477b384b4c9867568f6dc8359 -timeCreated: 1455373898 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/SynchronizedObserver.cs b/Assets/Plugins/UniRx/Scripts/Operators/SynchronizedObserver.cs deleted file mode 100644 index 7edd134..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/SynchronizedObserver.cs +++ /dev/null @@ -1,40 +0,0 @@ -using System; - -namespace UniRx.Operators -{ - internal class SynchronizedObserver : IObserver - { - readonly IObserver observer; - readonly object gate; - - public SynchronizedObserver(IObserver observer, object gate) - { - this.observer = observer; - this.gate = gate; - } - - public void OnNext(T value) - { - lock (gate) - { - observer.OnNext(value); - } - } - - public void OnError(Exception error) - { - lock (gate) - { - observer.OnError(error); - } - } - - public void OnCompleted() - { - lock (gate) - { - observer.OnCompleted(); - } - } - } -} diff --git a/Assets/Plugins/UniRx/Scripts/Operators/SynchronizedObserver.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/SynchronizedObserver.cs.meta deleted file mode 100644 index abbaeeb..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/SynchronizedObserver.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 4fd465af6ee05a64f9115b45b58360b7 -timeCreated: 1455373899 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Take.cs b/Assets/Plugins/UniRx/Scripts/Operators/Take.cs deleted file mode 100644 index d22dfed..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/Take.cs +++ /dev/null @@ -1,150 +0,0 @@ -using System; -using UniRx.Operators; - -namespace UniRx.Operators -{ - internal class TakeObservable : OperatorObservableBase - { - readonly IObservable source; - readonly int count; - readonly TimeSpan duration; - internal readonly IScheduler scheduler; // public for optimization check - - public TakeObservable(IObservable source, int count) - : base(source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.count = count; - } - - public TakeObservable(IObservable source, TimeSpan duration, IScheduler scheduler) - : base(scheduler == Scheduler.CurrentThread || source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.duration = duration; - this.scheduler = scheduler; - } - - // optimize combiner - - public IObservable Combine(int count) - { - // xs = 6 - // xs.Take(5) = 5 | xs.Take(3) = 3 - // xs.Take(5).Take(3) = 3 | xs.Take(3).Take(5) = 3 - - // use minimum one - return (this.count <= count) - ? this - : new TakeObservable(source, count); - } - - public IObservable Combine(TimeSpan duration) - { - // xs = 6s - // xs.Take(5s) = 5s | xs.Take(3s) = 3s - // xs.Take(5s).Take(3s) = 3s | xs.Take(3s).Take(5s) = 3s - - // use minimum one - return (this.duration <= duration) - ? this - : new TakeObservable(source, duration, scheduler); - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - if (scheduler == null) - { - return source.Subscribe(new Take(this, observer, cancel)); - } - else - { - return new Take_(this, observer, cancel).Run(); - } - } - - class Take : OperatorObserverBase - { - int rest; - - public Take(TakeObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) - { - this.rest = parent.count; - } - - public override void OnNext(T value) - { - if (rest > 0) - { - rest -= 1; - base.observer.OnNext(value); - if (rest == 0) - { - try { observer.OnCompleted(); } finally { Dispose(); }; - } - } - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } finally { Dispose(); } - } - - public override void OnCompleted() - { - try { observer.OnCompleted(); } finally { Dispose(); } - } - } - - class Take_ : OperatorObserverBase - { - readonly TakeObservable parent; - readonly object gate = new object(); - - public Take_(TakeObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) - { - this.parent = parent; - } - - public IDisposable Run() - { - var d1 = parent.scheduler.Schedule(parent.duration, Tick); - var d2 = parent.source.Subscribe(this); - - return StableCompositeDisposable.Create(d1, d2); - } - - void Tick() - { - lock (gate) - { - try { observer.OnCompleted(); } finally { Dispose(); }; - } - } - - public override void OnNext(T value) - { - lock (gate) - { - base.observer.OnNext(value); - } - } - - public override void OnError(Exception error) - { - lock (gate) - { - try { observer.OnError(error); } finally { Dispose(); }; - } - } - - public override void OnCompleted() - { - lock (gate) - { - try { observer.OnCompleted(); } finally { Dispose(); }; - } - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Take.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/Take.cs.meta deleted file mode 100644 index bc171a0..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/Take.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 5275fc8bb6611984781d8ccd56b9b572 -timeCreated: 1455373899 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/TakeLast.cs b/Assets/Plugins/UniRx/Scripts/Operators/TakeLast.cs deleted file mode 100644 index 8887cd6..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/TakeLast.cs +++ /dev/null @@ -1,140 +0,0 @@ -using System; -using System.Collections.Generic; -using UniRx.Operators; - -namespace UniRx.Operators -{ - internal class TakeLastObservable : OperatorObservableBase - { - readonly IObservable source; - - // count - readonly int count; - - // duration - readonly TimeSpan duration; - readonly IScheduler scheduler; - - public TakeLastObservable(IObservable source, int count) - : base(source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.count = count; - } - - public TakeLastObservable(IObservable source, TimeSpan duration, IScheduler scheduler) - : base(scheduler == Scheduler.CurrentThread || source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.duration = duration; - this.scheduler = scheduler; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - if (scheduler == null) - { - return new TakeLast(this, observer, cancel).Run(); - } - else - { - return new TakeLast_(this, observer, cancel).Run(); - } - } - - // count - class TakeLast : OperatorObserverBase - { - readonly TakeLastObservable parent; - readonly Queue q; - - public TakeLast(TakeLastObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) - { - this.parent = parent; - this.q = new Queue(); - } - - public IDisposable Run() - { - return parent.source.Subscribe(this); - } - - public override void OnNext(T value) - { - q.Enqueue(value); - if (q.Count > parent.count) - { - q.Dequeue(); - } - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } finally { Dispose(); } - } - - public override void OnCompleted() - { - foreach (var item in q) - { - observer.OnNext(item); - } - try { observer.OnCompleted(); } finally { Dispose(); } - } - } - - // time - class TakeLast_ : OperatorObserverBase - { - DateTimeOffset startTime; - readonly TakeLastObservable parent; - readonly Queue> q; - - public TakeLast_(TakeLastObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) - { - this.parent = parent; - this.q = new Queue>(); - } - - public IDisposable Run() - { - startTime = parent.scheduler.Now; - return parent.source.Subscribe(this); - } - - public override void OnNext(T value) - { - var now = parent.scheduler.Now; - var elapsed = now - startTime; - q.Enqueue(new TimeInterval(value, elapsed)); - Trim(elapsed); - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } finally { Dispose(); }; - } - - public override void OnCompleted() - { - var now = parent.scheduler.Now; - var elapsed = now - startTime; - Trim(elapsed); - - foreach (var item in q) - { - observer.OnNext(item.Value); - } - try { observer.OnCompleted(); } finally { Dispose(); }; - } - - void Trim(TimeSpan now) - { - while (q.Count > 0 && now - q.Peek().Interval >= parent.duration) - { - q.Dequeue(); - } - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/TakeLast.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/TakeLast.cs.meta deleted file mode 100644 index 25a0927..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/TakeLast.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 8ea2ac59577a3214f9fb66ccc62f2ffd -timeCreated: 1455373900 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/TakeUntil.cs b/Assets/Plugins/UniRx/Scripts/Operators/TakeUntil.cs deleted file mode 100644 index a8704fa..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/TakeUntil.cs +++ /dev/null @@ -1,128 +0,0 @@ -using System; - -namespace UniRx.Operators -{ - internal class TakeUntilObservable : OperatorObservableBase - { - readonly IObservable source; - readonly IObservable other; - - public TakeUntilObservable(IObservable source, IObservable other) - : base(source.IsRequiredSubscribeOnCurrentThread() || other.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.other = other; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - return new TakeUntil(this, observer, cancel).Run(); - } - - class TakeUntil : OperatorObserverBase - { - readonly TakeUntilObservable parent; - object gate = new object(); - - public TakeUntil(TakeUntilObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) - { - this.parent = parent; - } - - public IDisposable Run() - { - var otherSubscription = new SingleAssignmentDisposable(); - var otherObserver = new TakeUntilOther(this, otherSubscription); - otherSubscription.Disposable = parent.other.Subscribe(otherObserver); - - var sourceSubscription = parent.source.Subscribe(this); - - return StableCompositeDisposable.Create(otherSubscription, sourceSubscription); - } - - public override void OnNext(T value) - { - lock (gate) - { - observer.OnNext(value); - } - } - - public override void OnError(Exception error) - { - lock (gate) - { - try { observer.OnError(error); } finally { Dispose(); } - } - } - - public override void OnCompleted() - { - lock (gate) - { - try { observer.OnCompleted(); } finally { Dispose(); } - } - } - - class TakeUntilOther : IObserver - { - readonly TakeUntil sourceObserver; - readonly IDisposable subscription; - - public TakeUntilOther(TakeUntil sourceObserver, IDisposable subscription) - { - this.sourceObserver = sourceObserver; - this.subscription = subscription; - } - - public void OnNext(TOther value) - { - lock (sourceObserver.gate) - { - try - { - sourceObserver.observer.OnCompleted(); - } - finally - { - sourceObserver.Dispose(); - subscription.Dispose(); - } - } - } - - public void OnError(Exception error) - { - lock (sourceObserver.gate) - { - try - { - sourceObserver.observer.OnError(error); - } - finally - { - sourceObserver.Dispose(); - subscription.Dispose(); - } - } - } - - public void OnCompleted() - { - lock (sourceObserver.gate) - { - try - { - sourceObserver.observer.OnCompleted(); - } - finally - { - sourceObserver.Dispose(); - subscription.Dispose(); - } - } - } - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/TakeUntil.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/TakeUntil.cs.meta deleted file mode 100644 index e81affb..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/TakeUntil.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 163e3eab299b735418c94e634fecd811 -timeCreated: 1455373897 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/TakeWhile.cs b/Assets/Plugins/UniRx/Scripts/Operators/TakeWhile.cs deleted file mode 100644 index 56e69d4..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/TakeWhile.cs +++ /dev/null @@ -1,134 +0,0 @@ -using System; - -namespace UniRx.Operators -{ - internal class TakeWhileObservable : OperatorObservableBase - { - readonly IObservable source; - readonly Func predicate; - readonly Func predicateWithIndex; - - public TakeWhileObservable(IObservable source, Func predicate) - : base(source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.predicate = predicate; - } - - public TakeWhileObservable(IObservable source, Func predicateWithIndex) - : base(source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.predicateWithIndex = predicateWithIndex; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - if (predicate != null) - { - return new TakeWhile(this, observer, cancel).Run(); - } - else - { - return new TakeWhile_(this, observer, cancel).Run(); - } - } - - class TakeWhile : OperatorObserverBase - { - readonly TakeWhileObservable parent; - - public TakeWhile(TakeWhileObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) - { - this.parent = parent; - } - - public IDisposable Run() - { - return parent.source.Subscribe(this); - } - - public override void OnNext(T value) - { - bool isPassed; - try - { - isPassed = parent.predicate(value); - } - catch (Exception ex) - { - try { observer.OnError(ex); } finally { Dispose(); } - return; - } - - if (isPassed) - { - observer.OnNext(value); - } - else - { - try { observer.OnCompleted(); } finally { Dispose(); } - } - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } finally { Dispose(); } - } - - public override void OnCompleted() - { - try { observer.OnCompleted(); } finally { Dispose(); } - } - } - - class TakeWhile_ : OperatorObserverBase - { - readonly TakeWhileObservable parent; - int index = 0; - - public TakeWhile_(TakeWhileObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) - { - this.parent = parent; - } - - public IDisposable Run() - { - return parent.source.Subscribe(this); - } - - public override void OnNext(T value) - { - bool isPassed; - try - { - isPassed = parent.predicateWithIndex(value, index++); - } - catch (Exception ex) - { - try { observer.OnError(ex); } finally { Dispose(); } - return; - } - - if (isPassed) - { - observer.OnNext(value); - } - else - { - try { observer.OnCompleted(); } finally { Dispose(); } - } - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } finally { Dispose(); } - } - - public override void OnCompleted() - { - try { observer.OnCompleted(); } finally { Dispose(); } - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/TakeWhile.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/TakeWhile.cs.meta deleted file mode 100644 index beb13c9..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/TakeWhile.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: d6f2da76023d9734ebb4ed1883fda2bc -timeCreated: 1455373901 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Throttle.cs b/Assets/Plugins/UniRx/Scripts/Operators/Throttle.cs deleted file mode 100644 index e69afe4..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/Throttle.cs +++ /dev/null @@ -1,106 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace UniRx.Operators -{ - internal class ThrottleObservable : OperatorObservableBase - { - readonly IObservable source; - readonly TimeSpan dueTime; - readonly IScheduler scheduler; - - public ThrottleObservable(IObservable source, TimeSpan dueTime, IScheduler scheduler) - : base(scheduler == Scheduler.CurrentThread || source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.dueTime = dueTime; - this.scheduler = scheduler; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - return new Throttle(this, observer, cancel).Run(); - } - - class Throttle : OperatorObserverBase - { - readonly ThrottleObservable parent; - readonly object gate = new object(); - T latestValue = default(T); - bool hasValue = false; - SerialDisposable cancelable; - ulong id = 0; - - public Throttle(ThrottleObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) - { - this.parent = parent; - } - - public IDisposable Run() - { - cancelable = new SerialDisposable(); - var subscription = parent.source.Subscribe(this); - - return StableCompositeDisposable.Create(cancelable, subscription); - } - - void OnNext(ulong currentid) - { - lock (gate) - { - if (hasValue && id == currentid) - { - observer.OnNext(latestValue); - } - hasValue = false; - } - } - - public override void OnNext(T value) - { - ulong currentid; - lock (gate) - { - hasValue = true; - latestValue = value; - id = unchecked(id + 1); - currentid = id; - } - - var d = new SingleAssignmentDisposable(); - cancelable.Disposable = d; - d.Disposable = parent.scheduler.Schedule(parent.dueTime, () => OnNext(currentid)); - } - - public override void OnError(Exception error) - { - cancelable.Dispose(); - - lock (gate) - { - hasValue = false; - id = unchecked(id + 1); - try { observer.OnError(error); } finally { Dispose(); } - } - } - - public override void OnCompleted() - { - cancelable.Dispose(); - - lock (gate) - { - if (hasValue) - { - observer.OnNext(latestValue); - } - hasValue = false; - id = unchecked(id + 1); - try { observer.OnCompleted(); } finally { Dispose(); } - } - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Throttle.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/Throttle.cs.meta deleted file mode 100644 index 9e6e728..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/Throttle.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: dc296a61927394b4b908b385087f23d0 -timeCreated: 1455373901 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/ThrottleFirst.cs b/Assets/Plugins/UniRx/Scripts/Operators/ThrottleFirst.cs deleted file mode 100644 index 0bb5876..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/ThrottleFirst.cs +++ /dev/null @@ -1,87 +0,0 @@ -using System; - -namespace UniRx.Operators -{ - internal class ThrottleFirstObservable : OperatorObservableBase - { - readonly IObservable source; - readonly TimeSpan dueTime; - readonly IScheduler scheduler; - - public ThrottleFirstObservable(IObservable source, TimeSpan dueTime, IScheduler scheduler) - : base(scheduler == Scheduler.CurrentThread || source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.dueTime = dueTime; - this.scheduler = scheduler; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - return new ThrottleFirst(this, observer, cancel).Run(); - } - - class ThrottleFirst : OperatorObserverBase - { - readonly ThrottleFirstObservable parent; - readonly object gate = new object(); - bool open = true; - SerialDisposable cancelable; - - public ThrottleFirst(ThrottleFirstObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) - { - this.parent = parent; - } - - public IDisposable Run() - { - cancelable = new SerialDisposable(); - var subscription = parent.source.Subscribe(this); - - return StableCompositeDisposable.Create(cancelable, subscription); - } - - void OnNext() - { - lock (gate) - { - open = true; - } - } - - public override void OnNext(T value) - { - lock (gate) - { - if (!open) return; - observer.OnNext(value); - open = false; - } - - var d = new SingleAssignmentDisposable(); - cancelable.Disposable = d; - d.Disposable = parent.scheduler.Schedule(parent.dueTime, OnNext); - } - - public override void OnError(Exception error) - { - cancelable.Dispose(); - - lock (gate) - { - try { observer.OnError(error); } finally { Dispose(); } - } - } - - public override void OnCompleted() - { - cancelable.Dispose(); - - lock (gate) - { - try { observer.OnCompleted(); } finally { Dispose(); } - } - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/ThrottleFirst.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/ThrottleFirst.cs.meta deleted file mode 100644 index 0fe0524..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/ThrottleFirst.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 32b6a6efbab897b41a055d830a4d9755 -timeCreated: 1455373898 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Throw.cs b/Assets/Plugins/UniRx/Scripts/Operators/Throw.cs deleted file mode 100644 index 781a1da..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/Throw.cs +++ /dev/null @@ -1,69 +0,0 @@ -using System; - -namespace UniRx.Operators -{ - internal class ThrowObservable : OperatorObservableBase - { - readonly Exception error; - readonly IScheduler scheduler; - - public ThrowObservable(Exception error, IScheduler scheduler) - : base(scheduler == Scheduler.CurrentThread) - { - this.error = error; - this.scheduler = scheduler; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - observer = new Throw(observer, cancel); - - if (scheduler == Scheduler.Immediate) - { - observer.OnError(error); - return Disposable.Empty; - } - else - { - return scheduler.Schedule(() => - { - observer.OnError(error); - observer.OnCompleted(); - }); - } - } - - class Throw : OperatorObserverBase - { - public Throw(IObserver observer, IDisposable cancel) - : base(observer, cancel) - { - } - - public override void OnNext(T value) - { - try - { - base.observer.OnNext(value); - } - catch - { - Dispose(); - throw; - } - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } - finally { Dispose(); } - } - - public override void OnCompleted() - { - try { observer.OnCompleted(); } - finally { Dispose(); } - } - } - } -} diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Throw.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/Throw.cs.meta deleted file mode 100644 index 5a6be2e..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/Throw.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 1e5623719e9b1f1418aa67a63abed4cc -timeCreated: 1455373897 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/TimeInterval.cs b/Assets/Plugins/UniRx/Scripts/Operators/TimeInterval.cs deleted file mode 100644 index 9d23377..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/TimeInterval.cs +++ /dev/null @@ -1,56 +0,0 @@ -using System; - -namespace UniRx.Operators -{ - internal class TimeIntervalObservable : OperatorObservableBase> - { - readonly IObservable source; - readonly IScheduler scheduler; - - public TimeIntervalObservable(IObservable source, IScheduler scheduler) - : base(scheduler == Scheduler.CurrentThread || source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.scheduler = scheduler; - } - - protected override IDisposable SubscribeCore(IObserver> observer, IDisposable cancel) - { - return source.Subscribe(new TimeInterval(this, observer, cancel)); - } - - class TimeInterval : OperatorObserverBase> - { - readonly TimeIntervalObservable parent; - DateTimeOffset lastTime; - - public TimeInterval(TimeIntervalObservable parent, IObserver> observer, IDisposable cancel) - : base(observer, cancel) - { - this.parent = parent; - this.lastTime = parent.scheduler.Now; - } - - public override void OnNext(T value) - { - var now = parent.scheduler.Now; - var span = now.Subtract(lastTime); - lastTime = now; - - base.observer.OnNext(new UniRx.TimeInterval(value, span)); - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } - finally { Dispose(); } - } - - public override void OnCompleted() - { - try { observer.OnCompleted(); } - finally { Dispose(); } - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/TimeInterval.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/TimeInterval.cs.meta deleted file mode 100644 index ab4108c..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/TimeInterval.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 065e40ebd4bd4a848b58a7a90dac881d -timeCreated: 1455373897 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Timeout.cs b/Assets/Plugins/UniRx/Scripts/Operators/Timeout.cs deleted file mode 100644 index 3a0e9f3..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/Timeout.cs +++ /dev/null @@ -1,198 +0,0 @@ -using System; - -namespace UniRx.Operators -{ - internal class TimeoutObservable : OperatorObservableBase - { - readonly IObservable source; - readonly TimeSpan? dueTime; - readonly DateTimeOffset? dueTimeDT; - readonly IScheduler scheduler; - - public TimeoutObservable(IObservable source, TimeSpan dueTime, IScheduler scheduler) - : base(scheduler == Scheduler.CurrentThread || source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.dueTime = dueTime; - this.scheduler = scheduler; - } - - public TimeoutObservable(IObservable source, DateTimeOffset dueTime, IScheduler scheduler) - : base(scheduler == Scheduler.CurrentThread || source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.dueTimeDT = dueTime; - this.scheduler = scheduler; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - if (dueTime != null) - { - return new Timeout(this, observer, cancel).Run(); - } - else - { - return new Timeout_(this, observer, cancel).Run(); - } - } - - class Timeout : OperatorObserverBase - { - readonly TimeoutObservable parent; - readonly object gate = new object(); - ulong objectId = 0ul; - bool isTimeout = false; - SingleAssignmentDisposable sourceSubscription; - SerialDisposable timerSubscription; - - public Timeout(TimeoutObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) - { - this.parent = parent; - } - - public IDisposable Run() - { - sourceSubscription = new SingleAssignmentDisposable(); - timerSubscription = new SerialDisposable(); - timerSubscription.Disposable = RunTimer(objectId); - sourceSubscription.Disposable = parent.source.Subscribe(this); - - return StableCompositeDisposable.Create(timerSubscription, sourceSubscription); - } - - IDisposable RunTimer(ulong timerId) - { - return parent.scheduler.Schedule(parent.dueTime.Value, () => - { - lock (gate) - { - if (objectId == timerId) - { - isTimeout = true; - } - } - if (isTimeout) - { - try { observer.OnError(new TimeoutException()); } finally { Dispose(); } - } - }); - } - - public override void OnNext(T value) - { - ulong useObjectId; - bool timeout; - lock (gate) - { - timeout = isTimeout; - objectId++; - useObjectId = objectId; - } - if (timeout) return; - - timerSubscription.Disposable = Disposable.Empty; // cancel old timer - observer.OnNext(value); - timerSubscription.Disposable = RunTimer(useObjectId); - } - - public override void OnError(Exception error) - { - bool timeout; - lock (gate) - { - timeout = isTimeout; - objectId++; - } - if (timeout) return; - - timerSubscription.Dispose(); - try { observer.OnError(error); } finally { Dispose(); } - } - - public override void OnCompleted() - { - bool timeout; - lock (gate) - { - timeout = isTimeout; - objectId++; - } - if (timeout) return; - - timerSubscription.Dispose(); - try { observer.OnCompleted(); } finally { Dispose(); } - } - } - - class Timeout_ : OperatorObserverBase - { - readonly TimeoutObservable parent; - readonly object gate = new object(); - bool isFinished = false; - SingleAssignmentDisposable sourceSubscription; - IDisposable timerSubscription; - - public Timeout_(TimeoutObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) - { - this.parent = parent; - } - - public IDisposable Run() - { - sourceSubscription = new SingleAssignmentDisposable(); - - timerSubscription = parent.scheduler.Schedule(parent.dueTimeDT.Value, OnNext); - sourceSubscription.Disposable = parent.source.Subscribe(this); - - return StableCompositeDisposable.Create(timerSubscription, sourceSubscription); - } - - // in timer - void OnNext() - { - lock (gate) - { - if (isFinished) return; - isFinished = true; - } - - sourceSubscription.Dispose(); - try { observer.OnError(new TimeoutException()); } finally { Dispose(); } - } - - public override void OnNext(T value) - { - lock (gate) - { - if (!isFinished) observer.OnNext(value); - } - } - - public override void OnError(Exception error) - { - lock (gate) - { - if (isFinished) return; - isFinished = true; - timerSubscription.Dispose(); - } - try { observer.OnError(error); } finally { Dispose(); } - } - - public override void OnCompleted() - { - - lock (gate) - { - if (!isFinished) - { - isFinished = true; - timerSubscription.Dispose(); - } - try { observer.OnCompleted(); } finally { Dispose(); } - } - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Timeout.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/Timeout.cs.meta deleted file mode 100644 index c3c77d5..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/Timeout.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: a22cd4a86f62fc64384dddb043530703 -timeCreated: 1455373900 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Timer.cs b/Assets/Plugins/UniRx/Scripts/Operators/Timer.cs deleted file mode 100644 index ceac8b5..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/Timer.cs +++ /dev/null @@ -1,124 +0,0 @@ -using System; - -namespace UniRx.Operators -{ - internal class TimerObservable : OperatorObservableBase - { - readonly DateTimeOffset? dueTimeA; - readonly TimeSpan? dueTimeB; - readonly TimeSpan? period; - readonly IScheduler scheduler; - - public TimerObservable(DateTimeOffset dueTime, TimeSpan? period, IScheduler scheduler) - : base(scheduler == Scheduler.CurrentThread) - { - this.dueTimeA = dueTime; - this.period = period; - this.scheduler = scheduler; - } - - public TimerObservable(TimeSpan dueTime, TimeSpan? period, IScheduler scheduler) - : base(scheduler == Scheduler.CurrentThread) - { - this.dueTimeB = dueTime; - this.period = period; - this.scheduler = scheduler; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - var timerObserver = new Timer(observer, cancel); - - var dueTime = (dueTimeA != null) - ? dueTimeA.Value - scheduler.Now - : dueTimeB.Value; - - // one-shot - if (period == null) - { - return scheduler.Schedule(Scheduler.Normalize(dueTime), () => - { - timerObserver.OnNext(); - timerObserver.OnCompleted(); - }); - } - else - { - var periodicScheduler = scheduler as ISchedulerPeriodic; - if (periodicScheduler != null) - { - if (dueTime == period.Value) - { - // same(Observable.Interval), run periodic - return periodicScheduler.SchedulePeriodic(Scheduler.Normalize(dueTime), timerObserver.OnNext); - } - else - { - // Schedule Once + Scheudle Periodic - var disposable = new SerialDisposable(); - - disposable.Disposable = scheduler.Schedule(Scheduler.Normalize(dueTime), () => - { - timerObserver.OnNext(); // run first - - var timeP = Scheduler.Normalize(period.Value); - disposable.Disposable = periodicScheduler.SchedulePeriodic(timeP, timerObserver.OnNext); // run periodic - }); - - return disposable; - } - } - else - { - var timeP = Scheduler.Normalize(period.Value); - - return scheduler.Schedule(Scheduler.Normalize(dueTime), self => - { - timerObserver.OnNext(); - self(timeP); - }); - } - } - } - - class Timer : OperatorObserverBase - { - long index = 0; - - public Timer(IObserver observer, IDisposable cancel) - : base(observer, cancel) - { - } - - public void OnNext() - { - try - { - base.observer.OnNext(index++); - } - catch - { - Dispose(); - throw; - } - } - - public override void OnNext(long value) - { - // no use. - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } - finally { Dispose(); } - } - - public override void OnCompleted() - { - try { observer.OnCompleted(); } - finally { Dispose(); } - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Timer.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/Timer.cs.meta deleted file mode 100644 index 7f55fe4..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/Timer.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 6be220be1da39e14ea87b366c149953e -timeCreated: 1455373899 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Timestamp.cs b/Assets/Plugins/UniRx/Scripts/Operators/Timestamp.cs deleted file mode 100644 index 43ccdfc..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/Timestamp.cs +++ /dev/null @@ -1,50 +0,0 @@ -using System; - -namespace UniRx.Operators -{ - internal class TimestampObservable : OperatorObservableBase> - { - readonly IObservable source; - readonly IScheduler scheduler; - - public TimestampObservable(IObservable source, IScheduler scheduler) - : base(scheduler == Scheduler.CurrentThread || source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.scheduler = scheduler; - } - - protected override IDisposable SubscribeCore(IObserver> observer, IDisposable cancel) - { - return source.Subscribe(new Timestamp(this, observer, cancel)); - } - - class Timestamp : OperatorObserverBase> - { - readonly TimestampObservable parent; - - public Timestamp(TimestampObservable parent, IObserver> observer, IDisposable cancel) - : base(observer, cancel) - { - this.parent = parent; - } - - public override void OnNext(T value) - { - base.observer.OnNext(new Timestamped(value, parent.scheduler.Now)); - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } - finally { Dispose(); } - } - - public override void OnCompleted() - { - try { observer.OnCompleted(); } - finally { Dispose(); } - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Timestamp.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/Timestamp.cs.meta deleted file mode 100644 index 1313978..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/Timestamp.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: d9ec806fec477b243a812e7f609a4453 -timeCreated: 1455373901 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/ToArray.cs b/Assets/Plugins/UniRx/Scripts/Operators/ToArray.cs deleted file mode 100644 index 9226ee8..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/ToArray.cs +++ /dev/null @@ -1,66 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace UniRx.Operators -{ - internal class ToArrayObservable : OperatorObservableBase - { - readonly IObservable source; - - public ToArrayObservable(IObservable source) - : base(source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - return source.Subscribe(new ToArray(observer, cancel)); - } - - class ToArray : OperatorObserverBase - { - readonly List list = new List(); - - public ToArray(IObserver observer, IDisposable cancel) - : base(observer, cancel) - { - } - - public override void OnNext(TSource value) - { - try - { - list.Add(value); // sometimes cause error on multithread - } - catch (Exception ex) - { - try { observer.OnError(ex); } finally { Dispose(); } - return; - } - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } finally { Dispose(); } - } - - public override void OnCompleted() - { - TSource[] result; - try - { - result = list.ToArray(); - } - catch (Exception ex) - { - try { observer.OnError(ex); } finally { Dispose(); } - return; - } - - base.observer.OnNext(result); - try { observer.OnCompleted(); } finally { Dispose(); }; - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/ToArray.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/ToArray.cs.meta deleted file mode 100644 index f2da5ba..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/ToArray.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 38d1f7c869353b542af469b0e3fae89a -timeCreated: 1455373898 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/ToList.cs b/Assets/Plugins/UniRx/Scripts/Operators/ToList.cs deleted file mode 100644 index 62c924d..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/ToList.cs +++ /dev/null @@ -1,55 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace UniRx.Operators -{ - internal class ToListObservable : OperatorObservableBase> - { - readonly IObservable source; - - public ToListObservable(IObservable source) - : base(source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - } - - protected override IDisposable SubscribeCore(IObserver> observer, IDisposable cancel) - { - return source.Subscribe(new ToList(observer, cancel)); - } - - class ToList : OperatorObserverBase> - { - readonly List list = new List(); - - public ToList(IObserver> observer, IDisposable cancel) - : base(observer, cancel) - { - } - - public override void OnNext(TSource value) - { - try - { - list.Add(value); // sometimes cause error on multithread - } - catch (Exception ex) - { - try { observer.OnError(ex); } finally { Dispose(); } - return; - } - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } finally { Dispose(); } - } - - public override void OnCompleted() - { - base.observer.OnNext(list); - try { observer.OnCompleted(); } finally { Dispose(); }; - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/ToList.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/ToList.cs.meta deleted file mode 100644 index 586772b..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/ToList.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: cee1b9300a644c9458346c1f80f64197 -timeCreated: 1455373901 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/ToObservable.cs b/Assets/Plugins/UniRx/Scripts/Operators/ToObservable.cs deleted file mode 100644 index 81b6b88..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/ToObservable.cs +++ /dev/null @@ -1,138 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace UniRx.Operators -{ - internal class ToObservableObservable : OperatorObservableBase - { - readonly IEnumerable source; - readonly IScheduler scheduler; - - public ToObservableObservable(IEnumerable source, IScheduler scheduler) - : base(scheduler == Scheduler.CurrentThread) - { - this.source = source; - this.scheduler = scheduler; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - return new ToObservable(this, observer, cancel).Run(); - } - - class ToObservable : OperatorObserverBase - { - readonly ToObservableObservable parent; - - public ToObservable(ToObservableObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) - { - this.parent = parent; - } - - public IDisposable Run() - { - var e = default(IEnumerator); - try - { - e = parent.source.GetEnumerator(); - } - catch (Exception exception) - { - OnError(exception); - return Disposable.Empty; - } - - if (parent.scheduler == Scheduler.Immediate) - { - while (true) - { - bool hasNext; - var current = default(T); - try - { - hasNext = e.MoveNext(); - if (hasNext) current = e.Current; - } - catch (Exception ex) - { - e.Dispose(); - try { observer.OnError(ex); } - finally { Dispose(); } - break; - } - - if (hasNext) - { - observer.OnNext(current); - } - else - { - e.Dispose(); - try { observer.OnCompleted(); } - finally { Dispose(); } - break; - } - } - - return Disposable.Empty; - } - - var flag = new SingleAssignmentDisposable(); - flag.Disposable = parent.scheduler.Schedule(self => - { - if (flag.IsDisposed) - { - e.Dispose(); - return; - } - - bool hasNext; - var current = default(T); - try - { - hasNext = e.MoveNext(); - if (hasNext) current = e.Current; - } - catch (Exception ex) - { - e.Dispose(); - try { observer.OnError(ex); } - finally { Dispose(); } - return; - } - - if (hasNext) - { - observer.OnNext(current); - self(); - } - else - { - e.Dispose(); - try { observer.OnCompleted(); } - finally { Dispose(); } - } - }); - - return flag; - } - - public override void OnNext(T value) - { - // do nothing - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } - finally { Dispose(); } - } - - public override void OnCompleted() - { - try { observer.OnCompleted(); } - finally { Dispose(); } - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/ToObservable.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/ToObservable.cs.meta deleted file mode 100644 index 7714ed0..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/ToObservable.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 7cd3ae084c8ca754f9aceca2e18c3af9 -timeCreated: 1455373899 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Wait.cs b/Assets/Plugins/UniRx/Scripts/Operators/Wait.cs deleted file mode 100644 index 8710c49..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/Wait.cs +++ /dev/null @@ -1,63 +0,0 @@ -using System; -using UniRx.InternalUtil; - -namespace UniRx.Operators -{ - internal class Wait : IObserver - { - static readonly TimeSpan InfiniteTimeSpan = new TimeSpan(0, 0, 0, 0, -1); // from .NET 4.5 - - readonly IObservable source; - readonly TimeSpan timeout; - - System.Threading.ManualResetEvent semaphore; - - bool seenValue = false; - T value = default(T); - Exception ex = default(Exception); - - public Wait(IObservable source, TimeSpan timeout) - { - this.source = source; - this.timeout = timeout; - } - - public T Run() - { - semaphore = new System.Threading.ManualResetEvent(false); - using (source.Subscribe(this)) - { - var waitComplete = (timeout == InfiniteTimeSpan) - ? semaphore.WaitOne() - : semaphore.WaitOne(timeout); - - if (!waitComplete) - { - throw new TimeoutException("OnCompleted not fired."); - } - } - - if (ex != null) ex.Throw(); - if (!seenValue) throw new InvalidOperationException("No Elements."); - - return value; - } - - public void OnNext(T value) - { - seenValue = true; - this.value = value; - } - - public void OnError(Exception error) - { - this.ex = error; - semaphore.Set(); - } - - public void OnCompleted() - { - semaphore.Set(); - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Wait.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/Wait.cs.meta deleted file mode 100644 index 5291736..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/Wait.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: ea55c5647aa075b4f894dd37abf5e469 -timeCreated: 1455373902 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/WhenAll.cs b/Assets/Plugins/UniRx/Scripts/Operators/WhenAll.cs deleted file mode 100644 index e7d3376..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/WhenAll.cs +++ /dev/null @@ -1,485 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace UniRx.Operators -{ - internal class WhenAllObservable : OperatorObservableBase - { - readonly IObservable[] sources; - readonly IEnumerable> sourcesEnumerable; - - public WhenAllObservable(IObservable[] sources) - : base(false) - { - this.sources = sources; - } - - public WhenAllObservable(IEnumerable> sources) - : base(false) - { - this.sourcesEnumerable = sources; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - if (sources != null) - { - return new WhenAll(this.sources, observer, cancel).Run(); - } - else - { - var xs = sourcesEnumerable as IList>; - if (xs == null) - { - xs = new List>(sourcesEnumerable); // materialize observables - } - return new WhenAll_(xs, observer, cancel).Run(); - } - } - - class WhenAll : OperatorObserverBase - { - readonly IObservable[] sources; - readonly object gate = new object(); - int completedCount; - int length; - T[] values; - - public WhenAll(IObservable[] sources, IObserver observer, IDisposable cancel) - : base(observer, cancel) - { - this.sources = sources; - } - - public IDisposable Run() - { - length = sources.Length; - - // fail safe... - if (length == 0) - { - OnNext(new T[0]); - try { observer.OnCompleted(); } finally { Dispose(); } - return Disposable.Empty; - } - - completedCount = 0; - values = new T[length]; - - var subscriptions = new IDisposable[length]; - for (int index = 0; index < length; index++) - { - var source = sources[index]; - var observer = new WhenAllCollectionObserver(this, index); - subscriptions[index] = source.Subscribe(observer); - } - - return StableCompositeDisposable.CreateUnsafe(subscriptions); - } - - public override void OnNext(T[] value) - { - base.observer.OnNext(value); - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } finally { Dispose(); } - } - - public override void OnCompleted() - { - try { observer.OnCompleted(); } finally { Dispose(); } - } - - class WhenAllCollectionObserver : IObserver - { - readonly WhenAll parent; - readonly int index; - bool isCompleted = false; - - public WhenAllCollectionObserver(WhenAll parent, int index) - { - this.parent = parent; - this.index = index; - } - - public void OnNext(T value) - { - lock (parent.gate) - { - if (!isCompleted) - { - parent.values[index] = value; - } - } - } - - public void OnError(Exception error) - { - lock (parent.gate) - { - if (!isCompleted) - { - parent.OnError(error); - } - } - } - - public void OnCompleted() - { - lock (parent.gate) - { - if (!isCompleted) - { - isCompleted = true; - parent.completedCount++; - if (parent.completedCount == parent.length) - { - parent.OnNext(parent.values); - parent.OnCompleted(); - } - } - } - } - } - } - - class WhenAll_ : OperatorObserverBase - { - readonly IList> sources; - readonly object gate = new object(); - int completedCount; - int length; - T[] values; - - public WhenAll_(IList> sources, IObserver observer, IDisposable cancel) - : base(observer, cancel) - { - this.sources = sources; - } - - public IDisposable Run() - { - length = sources.Count; - - // fail safe... - if (length == 0) - { - OnNext(new T[0]); - try { observer.OnCompleted(); } finally { Dispose(); } - return Disposable.Empty; - } - - completedCount = 0; - values = new T[length]; - - var subscriptions = new IDisposable[length]; - for (int index = 0; index < length; index++) - { - var source = sources[index]; - var observer = new WhenAllCollectionObserver(this, index); - subscriptions[index] = source.Subscribe(observer); - } - - return StableCompositeDisposable.CreateUnsafe(subscriptions); - } - - public override void OnNext(T[] value) - { - base.observer.OnNext(value); - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } finally { Dispose(); } - } - - public override void OnCompleted() - { - try { observer.OnCompleted(); } finally { Dispose(); } - } - - class WhenAllCollectionObserver : IObserver - { - readonly WhenAll_ parent; - readonly int index; - bool isCompleted = false; - - public WhenAllCollectionObserver(WhenAll_ parent, int index) - { - this.parent = parent; - this.index = index; - } - - public void OnNext(T value) - { - lock (parent.gate) - { - if (!isCompleted) - { - parent.values[index] = value; - } - } - } - - public void OnError(Exception error) - { - lock (parent.gate) - { - if (!isCompleted) - { - parent.OnError(error); - } - } - } - - public void OnCompleted() - { - lock (parent.gate) - { - if (!isCompleted) - { - isCompleted = true; - parent.completedCount++; - if (parent.completedCount == parent.length) - { - parent.OnNext(parent.values); - parent.OnCompleted(); - } - } - } - } - } - } - } - - internal class WhenAllObservable : OperatorObservableBase - { - readonly IObservable[] sources; - readonly IEnumerable> sourcesEnumerable; - - public WhenAllObservable(IObservable[] sources) - : base(false) - { - this.sources = sources; - } - - public WhenAllObservable(IEnumerable> sources) - : base(false) - { - this.sourcesEnumerable = sources; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - if (sources != null) - { - return new WhenAll(this.sources, observer, cancel).Run(); - } - else - { - var xs = sourcesEnumerable as IList>; - if (xs == null) - { - xs = new List>(sourcesEnumerable); // materialize observables - } - return new WhenAll_(xs, observer, cancel).Run(); - } - } - - class WhenAll : OperatorObserverBase - { - readonly IObservable[] sources; - readonly object gate = new object(); - int completedCount; - int length; - - public WhenAll(IObservable[] sources, IObserver observer, IDisposable cancel) - : base(observer, cancel) - { - this.sources = sources; - } - - public IDisposable Run() - { - length = sources.Length; - - // fail safe... - if (length == 0) - { - OnNext(Unit.Default); - try { observer.OnCompleted(); } finally { Dispose(); } - return Disposable.Empty; - } - - completedCount = 0; - - var subscriptions = new IDisposable[length]; - for (int index = 0; index < sources.Length; index++) - { - var source = sources[index]; - var observer = new WhenAllCollectionObserver(this); - subscriptions[index] = source.Subscribe(observer); - } - - return StableCompositeDisposable.CreateUnsafe(subscriptions); - } - - public override void OnNext(Unit value) - { - base.observer.OnNext(value); - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } finally { Dispose(); } - } - - public override void OnCompleted() - { - try { observer.OnCompleted(); } finally { Dispose(); } - } - - class WhenAllCollectionObserver : IObserver - { - readonly WhenAll parent; - bool isCompleted = false; - - public WhenAllCollectionObserver(WhenAll parent) - { - this.parent = parent; - } - - public void OnNext(Unit value) - { - } - - public void OnError(Exception error) - { - lock (parent.gate) - { - if (!isCompleted) - { - parent.OnError(error); - } - } - } - - public void OnCompleted() - { - lock (parent.gate) - { - if (!isCompleted) - { - isCompleted = true; - parent.completedCount++; - if (parent.completedCount == parent.length) - { - parent.OnNext(Unit.Default); - parent.OnCompleted(); - } - } - } - } - } - } - - class WhenAll_ : OperatorObserverBase - { - readonly IList> sources; - readonly object gate = new object(); - int completedCount; - int length; - - public WhenAll_(IList> sources, IObserver observer, IDisposable cancel) - : base(observer, cancel) - { - this.sources = sources; - } - - public IDisposable Run() - { - length = sources.Count; - - // fail safe... - if (length == 0) - { - OnNext(Unit.Default); - try { observer.OnCompleted(); } finally { Dispose(); } - return Disposable.Empty; - } - - completedCount = 0; - - var subscriptions = new IDisposable[length]; - for (int index = 0; index < length; index++) - { - var source = sources[index]; - var observer = new WhenAllCollectionObserver(this); - subscriptions[index] = source.Subscribe(observer); - } - - return StableCompositeDisposable.CreateUnsafe(subscriptions); - } - - public override void OnNext(Unit value) - { - base.observer.OnNext(value); - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } finally { Dispose(); } - } - - public override void OnCompleted() - { - try { observer.OnCompleted(); } finally { Dispose(); } - } - - class WhenAllCollectionObserver : IObserver - { - readonly WhenAll_ parent; - bool isCompleted = false; - - public WhenAllCollectionObserver(WhenAll_ parent) - { - this.parent = parent; - } - - public void OnNext(Unit value) - { - } - - public void OnError(Exception error) - { - lock (parent.gate) - { - if (!isCompleted) - { - parent.OnError(error); - } - } - } - - public void OnCompleted() - { - lock (parent.gate) - { - if (!isCompleted) - { - isCompleted = true; - parent.completedCount++; - if (parent.completedCount == parent.length) - { - parent.OnNext(Unit.Default); - parent.OnCompleted(); - } - } - } - } - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/WhenAll.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/WhenAll.cs.meta deleted file mode 100644 index 4d47c87..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/WhenAll.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 0af8ada83db8f8a408ee6e9aa994fbbd -timeCreated: 1455373897 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Where.cs b/Assets/Plugins/UniRx/Scripts/Operators/Where.cs deleted file mode 100644 index f9d9c05..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/Where.cs +++ /dev/null @@ -1,147 +0,0 @@ -using System; - -namespace UniRx.Operators -{ - internal class WhereObservable : OperatorObservableBase - { - readonly IObservable source; - readonly Func predicate; - readonly Func predicateWithIndex; - - public WhereObservable(IObservable source, Func predicate) - : base(source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.predicate = predicate; - } - - public WhereObservable(IObservable source, Func predicateWithIndex) - : base(source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.predicateWithIndex = predicateWithIndex; - } - - // Optimize for .Where().Where() - - public IObservable CombinePredicate(Func combinePredicate) - { - if (this.predicate != null) - { - return new WhereObservable(source, x => this.predicate(x) && combinePredicate(x)); - } - else - { - return new WhereObservable(this, combinePredicate); - } - } - - // Optimize for .Where().Select() - - public IObservable CombineSelector(Func selector) - { - if (this.predicate != null) - { - return new WhereSelectObservable(source, predicate, selector); - } - else - { - return new SelectObservable(this, selector); // can't combine - } - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - if (predicate != null) - { - return source.Subscribe(new Where(this, observer, cancel)); - } - else - { - return source.Subscribe(new Where_(this, observer, cancel)); - } - } - - class Where : OperatorObserverBase - { - readonly WhereObservable parent; - - public Where(WhereObservable parent, IObserver observer, IDisposable cancel) - : base(observer, cancel) - { - this.parent = parent; - } - - public override void OnNext(T value) - { - var isPassed = false; - try - { - isPassed = parent.predicate(value); - } - catch (Exception ex) - { - try { observer.OnError(ex); } finally { Dispose(); } - return; - } - - if (isPassed) - { - observer.OnNext(value); - } - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } finally { Dispose(); } - } - - public override void OnCompleted() - { - try { observer.OnCompleted(); } finally { Dispose(); } - } - } - - class Where_ : OperatorObserverBase - { - readonly WhereObservable parent; - int index; - - public Where_(WhereObservable parent, IObserver observer, IDisposable cancel) - : base(observer, cancel) - { - this.parent = parent; - this.index = 0; - } - - public override void OnNext(T value) - { - var isPassed = false; - try - { - isPassed = parent.predicateWithIndex(value, index++); - } - catch (Exception ex) - { - try { observer.OnError(ex); } finally { Dispose(); } - return; - } - - if (isPassed) - { - observer.OnNext(value); - } - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } finally { Dispose(); } - } - - public override void OnCompleted() - { - try { observer.OnCompleted(); } finally { Dispose(); } - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Where.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/Where.cs.meta deleted file mode 100644 index b440e73..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/Where.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: a035699dbe9572548afa47c460bad078 -timeCreated: 1455373900 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/WhereSelect.cs b/Assets/Plugins/UniRx/Scripts/Operators/WhereSelect.cs deleted file mode 100644 index 3a34912..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/WhereSelect.cs +++ /dev/null @@ -1,77 +0,0 @@ -using System; - -namespace UniRx.Operators -{ - // Optimize for .Where().Select() - - internal class WhereSelectObservable : OperatorObservableBase - { - readonly IObservable source; - readonly Func predicate; - readonly Func selector; - - public WhereSelectObservable(IObservable source, Func predicate, Func selector) - : base(source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.predicate = predicate; - this.selector = selector; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - return source.Subscribe(new WhereSelect(this, observer, cancel)); - } - - class WhereSelect : OperatorObserverBase - { - readonly WhereSelectObservable parent; - - public WhereSelect(WhereSelectObservable parent, IObserver observer, IDisposable cancel) - : base(observer, cancel) - { - this.parent = parent; - } - - public override void OnNext(T value) - { - var isPassed = false; - try - { - isPassed = parent.predicate(value); - } - catch (Exception ex) - { - try { observer.OnError(ex); } finally { Dispose(); } - return; - } - - if (isPassed) - { - var v = default(TR); - try - { - v = parent.selector(value); - } - catch (Exception ex) - { - try { observer.OnError(ex); } finally { Dispose(); } - return; - } - - observer.OnNext(v); - } - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } finally { Dispose(); } - } - - public override void OnCompleted() - { - try { observer.OnCompleted(); } finally { Dispose(); } - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/WhereSelect.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/WhereSelect.cs.meta deleted file mode 100644 index 7fa57a1..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/WhereSelect.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: f7453a184d42aa34c854977496f381b9 -timeCreated: 1468743755 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/WithLatestFrom.cs b/Assets/Plugins/UniRx/Scripts/Operators/WithLatestFrom.cs deleted file mode 100644 index e47be92..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/WithLatestFrom.cs +++ /dev/null @@ -1,149 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace UniRx.Operators -{ - internal class WithLatestFromObservable : OperatorObservableBase - { - readonly IObservable left; - readonly IObservable right; - readonly Func selector; - - public WithLatestFromObservable(IObservable left, IObservable right, Func selector) - : base(left.IsRequiredSubscribeOnCurrentThread() || right.IsRequiredSubscribeOnCurrentThread()) - { - this.left = left; - this.right = right; - this.selector = selector; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - return new WithLatestFrom(this, observer, cancel).Run(); - } - - class WithLatestFrom : OperatorObserverBase - { - readonly WithLatestFromObservable parent; - readonly object gate = new object(); - - volatile bool hasLatest; - TRight latestValue = default(TRight); - - public WithLatestFrom(WithLatestFromObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) - { - this.parent = parent; - } - - public IDisposable Run() - { - var l = parent.left.Subscribe(new LeftObserver(this)); - var rSubscription = new SingleAssignmentDisposable(); - rSubscription.Disposable = parent.right.Subscribe(new RightObserver(this, rSubscription)); - - return StableCompositeDisposable.Create(l, rSubscription); - } - - public override void OnNext(TResult value) - { - base.observer.OnNext(value); - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } - finally { Dispose(); } - } - - public override void OnCompleted() - { - try { observer.OnCompleted(); } - finally { Dispose(); } - } - - class LeftObserver : IObserver - { - readonly WithLatestFrom parent; - - public LeftObserver(WithLatestFrom parent) - { - this.parent = parent; - } - - public void OnNext(TLeft value) - { - if (parent.hasLatest) - { - var result = default(TResult); - try - { - result = parent.parent.selector(value, parent.latestValue); - } - catch (Exception ex) - { - lock (parent.gate) - { - parent.OnError(ex); - } - return; - } - - lock (parent.gate) - { - parent.OnNext(result); - } - } - } - - public void OnError(Exception error) - { - lock (parent.gate) - { - parent.OnError(error); - } - } - - public void OnCompleted() - { - lock (parent.gate) - { - parent.OnCompleted(); - } - } - } - - class RightObserver : IObserver - { - readonly WithLatestFrom parent; - readonly IDisposable selfSubscription; - - public RightObserver(WithLatestFrom parent, IDisposable subscription) - { - this.parent = parent; - this.selfSubscription = subscription; - } - - public void OnNext(TRight value) - { - parent.latestValue = value; - parent.hasLatest = true; - } - - public void OnError(Exception error) - { - lock (parent.gate) - { - parent.OnError(error); - } - } - - public void OnCompleted() - { - selfSubscription.Dispose(); - } - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/WithLatestFrom.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/WithLatestFrom.cs.meta deleted file mode 100644 index f94c77c..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/WithLatestFrom.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: eb0bc7125d343ed45bb7e36ff1a53362 -timeCreated: 1455373902 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Zip.cs b/Assets/Plugins/UniRx/Scripts/Operators/Zip.cs deleted file mode 100644 index 05415e3..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/Zip.cs +++ /dev/null @@ -1,1004 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace UniRx.Operators -{ - public delegate TR ZipFunc(T1 arg1, T2 arg2, T3 arg3); - public delegate TR ZipFunc(T1 arg1, T2 arg2, T3 arg3, T4 arg4); - public delegate TR ZipFunc(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5); - public delegate TR ZipFunc(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6); - public delegate TR ZipFunc(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7); - - // binary - internal class ZipObservable : OperatorObservableBase - { - readonly IObservable left; - readonly IObservable right; - readonly Func selector; - - public ZipObservable(IObservable left, IObservable right, Func selector) - : base(left.IsRequiredSubscribeOnCurrentThread() || right.IsRequiredSubscribeOnCurrentThread()) - { - this.left = left; - this.right = right; - this.selector = selector; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - return new Zip(this, observer, cancel).Run(); - } - - class Zip : OperatorObserverBase - { - readonly ZipObservable parent; - - readonly object gate = new object(); - readonly Queue leftQ = new Queue(); - bool leftCompleted = false; - readonly Queue rightQ = new Queue(); - bool rightCompleted = false; - - public Zip(ZipObservable parent, IObserver observer, IDisposable cancel) - : base(observer, cancel) - { - this.parent = parent; - } - - public IDisposable Run() - { - var l = parent.left.Subscribe(new LeftZipObserver(this)); - var r = parent.right.Subscribe(new RightZipObserver(this)); - - return StableCompositeDisposable.Create(l, r, Disposable.Create(() => - { - lock (gate) - { - leftQ.Clear(); - rightQ.Clear(); - } - })); - } - - // dequeue is in the lock - void Dequeue() - { - TLeft lv; - TRight rv; - TResult v; - - if (leftQ.Count != 0 && rightQ.Count != 0) - { - lv = leftQ.Dequeue(); - rv = rightQ.Dequeue(); - } - else if (leftCompleted || rightCompleted) - { - try { observer.OnCompleted(); } - finally { Dispose(); } - return; - } - else - { - return; - } - - try - { - v = parent.selector(lv, rv); - } - catch (Exception ex) - { - try { observer.OnError(ex); } - finally { Dispose(); } - return; - } - - OnNext(v); - } - - public override void OnNext(TResult value) - { - base.observer.OnNext(value); - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } - finally { Dispose(); } - } - - public override void OnCompleted() - { - try { observer.OnCompleted(); } - finally { Dispose(); } - } - - class LeftZipObserver : IObserver - { - readonly Zip parent; - - public LeftZipObserver(Zip parent) - { - this.parent = parent; - } - - public void OnNext(TLeft value) - { - lock (parent.gate) - { - parent.leftQ.Enqueue(value); - parent.Dequeue(); - } - } - - public void OnError(Exception ex) - { - lock (parent.gate) - { - parent.OnError(ex); - } - } - - public void OnCompleted() - { - lock (parent.gate) - { - parent.leftCompleted = true; - if (parent.rightCompleted) parent.OnCompleted(); - } - } - } - - class RightZipObserver : IObserver - { - readonly Zip parent; - - public RightZipObserver(Zip parent) - { - this.parent = parent; - } - - public void OnNext(TRight value) - { - lock (parent.gate) - { - parent.rightQ.Enqueue(value); - parent.Dequeue(); - } - } - - public void OnError(Exception ex) - { - lock (parent.gate) - { - parent.OnError(ex); - } - } - - public void OnCompleted() - { - lock (parent.gate) - { - parent.rightCompleted = true; - if (parent.leftCompleted) parent.OnCompleted(); - } - } - } - } - } - - // array - internal class ZipObservable : OperatorObservableBase> - { - readonly IObservable[] sources; - - public ZipObservable(IObservable[] sources) - : base(true) - { - this.sources = sources; - } - - protected override IDisposable SubscribeCore(IObserver> observer, IDisposable cancel) - { - return new Zip(this, observer, cancel).Run(); - } - - class Zip : OperatorObserverBase, IList> - { - readonly ZipObservable parent; - readonly object gate = new object(); - - Queue[] queues; - bool[] isDone; - int length; - - public Zip(ZipObservable parent, IObserver> observer, IDisposable cancel) : base(observer, cancel) - { - this.parent = parent; - } - - public IDisposable Run() - { - length = parent.sources.Length; - queues = new Queue[length]; - isDone = new bool[length]; - - for (int i = 0; i < length; i++) - { - queues[i] = new Queue(); - } - - var disposables = new IDisposable[length + 1]; - for (int i = 0; i < length; i++) - { - var source = parent.sources[i]; - disposables[i] = source.Subscribe(new ZipObserver(this, i)); - } - - disposables[length] = Disposable.Create(() => - { - lock (gate) - { - for (int i = 0; i < length; i++) - { - var q = queues[i]; - q.Clear(); - } - } - }); - - return StableCompositeDisposable.CreateUnsafe(disposables); - } - - // dequeue is in the lock - void Dequeue(int index) - { - var allQueueHasValue = true; - for (int i = 0; i < length; i++) - { - if (queues[i].Count == 0) - { - allQueueHasValue = false; - break; - } - } - - if (!allQueueHasValue) - { - var allCompletedWithoutSelf = true; - for (int i = 0; i < length; i++) - { - if (i == index) continue; - if (!isDone[i]) - { - allCompletedWithoutSelf = false; - break; - } - } - - if (allCompletedWithoutSelf) - { - try { observer.OnCompleted(); } - finally { Dispose(); } - return; - } - else - { - return; - } - } - - var array = new T[length]; - for (int i = 0; i < length; i++) - { - array[i] = queues[i].Dequeue(); - } - - OnNext(array); - } - - public override void OnNext(IList value) - { - base.observer.OnNext(value); - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } - finally { Dispose(); } - } - - public override void OnCompleted() - { - try { observer.OnCompleted(); } - finally { Dispose(); } - } - - class ZipObserver : IObserver - { - readonly Zip parent; - readonly int index; - - public ZipObserver(Zip parent, int index) - { - this.parent = parent; - this.index = index; - } - - public void OnNext(T value) - { - lock (parent.gate) - { - parent.queues[index].Enqueue(value); - parent.Dequeue(index); - } - } - - public void OnError(Exception ex) - { - lock (parent.gate) - { - parent.OnError(ex); - } - } - - public void OnCompleted() - { - lock (parent.gate) - { - parent.isDone[index] = true; - var allTrue = true; - for (int i = 0; i < parent.length; i++) - { - if (!parent.isDone[i]) - { - allTrue = false; - break; - } - } - - if (allTrue) - { - parent.OnCompleted(); - } - } - } - } - } - } - - // Generated from UniRx.Console.ZipGenerator.tt - #region NTH - - internal class ZipObservable : OperatorObservableBase - { - IObservable source1; - IObservable source2; - IObservable source3; - ZipFunc resultSelector; - - public ZipObservable( - IObservable source1, - IObservable source2, - IObservable source3, - ZipFunc resultSelector) - : base( - source1.IsRequiredSubscribeOnCurrentThread() || - source2.IsRequiredSubscribeOnCurrentThread() || - source3.IsRequiredSubscribeOnCurrentThread() || - false) - { - this.source1 = source1; - this.source2 = source2; - this.source3 = source3; - this.resultSelector = resultSelector; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - return new Zip(this, observer, cancel).Run(); - } - - class Zip : NthZipObserverBase - { - readonly ZipObservable parent; - readonly object gate = new object(); - readonly Queue q1 = new Queue(); - readonly Queue q2 = new Queue(); - readonly Queue q3 = new Queue(); - - public Zip(ZipObservable parent, IObserver observer, IDisposable cancel) - : base(observer, cancel) - { - this.parent = parent; - } - - public IDisposable Run() - { - base.SetQueue(new System.Collections.ICollection[] { q1, q2, q3 }); - var s1 = parent.source1.Subscribe(new ZipObserver(gate, this, 0, q1)); - var s2 = parent.source2.Subscribe(new ZipObserver(gate, this, 1, q2)); - var s3 = parent.source3.Subscribe(new ZipObserver(gate, this, 2, q3)); - - return StableCompositeDisposable.Create(s1, s2, s3, Disposable.Create(() => - { - lock (gate) - { - q1.Clear(); q2.Clear(); q3.Clear(); - } - })); - } - - public override TR GetResult() - { - return parent.resultSelector(q1.Dequeue(), q2.Dequeue(), q3.Dequeue()); - } - - public override void OnNext(TR value) - { - base.observer.OnNext(value); - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } - finally { Dispose(); } - } - - public override void OnCompleted() - { - try { observer.OnCompleted(); } - finally { Dispose(); } - } - } - } - - - internal class ZipObservable : OperatorObservableBase - { - IObservable source1; - IObservable source2; - IObservable source3; - IObservable source4; - ZipFunc resultSelector; - - public ZipObservable( - IObservable source1, - IObservable source2, - IObservable source3, - IObservable source4, - ZipFunc resultSelector) - : base( - source1.IsRequiredSubscribeOnCurrentThread() || - source2.IsRequiredSubscribeOnCurrentThread() || - source3.IsRequiredSubscribeOnCurrentThread() || - source4.IsRequiredSubscribeOnCurrentThread() || - false) - { - this.source1 = source1; - this.source2 = source2; - this.source3 = source3; - this.source4 = source4; - this.resultSelector = resultSelector; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - return new Zip(this, observer, cancel).Run(); - } - - class Zip : NthZipObserverBase - { - readonly ZipObservable parent; - readonly object gate = new object(); - readonly Queue q1 = new Queue(); - readonly Queue q2 = new Queue(); - readonly Queue q3 = new Queue(); - readonly Queue q4 = new Queue(); - - public Zip(ZipObservable parent, IObserver observer, IDisposable cancel) - : base(observer, cancel) - { - this.parent = parent; - } - - public IDisposable Run() - { - base.SetQueue(new System.Collections.ICollection[] { q1, q2, q3, q4 }); - var s1 = parent.source1.Subscribe(new ZipObserver(gate, this, 0, q1)); - var s2 = parent.source2.Subscribe(new ZipObserver(gate, this, 1, q2)); - var s3 = parent.source3.Subscribe(new ZipObserver(gate, this, 2, q3)); - var s4 = parent.source4.Subscribe(new ZipObserver(gate, this, 3, q4)); - - return StableCompositeDisposable.Create(s1, s2, s3, s4, Disposable.Create(() => - { - lock (gate) - { - q1.Clear(); q2.Clear(); q3.Clear(); q4.Clear(); - } - })); - } - - public override TR GetResult() - { - return parent.resultSelector(q1.Dequeue(), q2.Dequeue(), q3.Dequeue(), q4.Dequeue()); - } - - public override void OnNext(TR value) - { - base.observer.OnNext(value); - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } - finally { Dispose(); } - } - - public override void OnCompleted() - { - try { observer.OnCompleted(); } - finally { Dispose(); } - } - } - } - - - internal class ZipObservable : OperatorObservableBase - { - IObservable source1; - IObservable source2; - IObservable source3; - IObservable source4; - IObservable source5; - ZipFunc resultSelector; - - public ZipObservable( - IObservable source1, - IObservable source2, - IObservable source3, - IObservable source4, - IObservable source5, - ZipFunc resultSelector) - : base( - source1.IsRequiredSubscribeOnCurrentThread() || - source2.IsRequiredSubscribeOnCurrentThread() || - source3.IsRequiredSubscribeOnCurrentThread() || - source4.IsRequiredSubscribeOnCurrentThread() || - source5.IsRequiredSubscribeOnCurrentThread() || - false) - { - this.source1 = source1; - this.source2 = source2; - this.source3 = source3; - this.source4 = source4; - this.source5 = source5; - this.resultSelector = resultSelector; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - return new Zip(this, observer, cancel).Run(); - } - - class Zip : NthZipObserverBase - { - readonly ZipObservable parent; - readonly object gate = new object(); - readonly Queue q1 = new Queue(); - readonly Queue q2 = new Queue(); - readonly Queue q3 = new Queue(); - readonly Queue q4 = new Queue(); - readonly Queue q5 = new Queue(); - - public Zip(ZipObservable parent, IObserver observer, IDisposable cancel) - : base(observer, cancel) - { - this.parent = parent; - } - - public IDisposable Run() - { - base.SetQueue(new System.Collections.ICollection[] { q1, q2, q3, q4, q5 }); - var s1 = parent.source1.Subscribe(new ZipObserver(gate, this, 0, q1)); - var s2 = parent.source2.Subscribe(new ZipObserver(gate, this, 1, q2)); - var s3 = parent.source3.Subscribe(new ZipObserver(gate, this, 2, q3)); - var s4 = parent.source4.Subscribe(new ZipObserver(gate, this, 3, q4)); - var s5 = parent.source5.Subscribe(new ZipObserver(gate, this, 4, q5)); - - return StableCompositeDisposable.Create(s1, s2, s3, s4, s5, Disposable.Create(() => - { - lock (gate) - { - q1.Clear(); q2.Clear(); q3.Clear(); q4.Clear(); q5.Clear(); - } - })); - } - - public override TR GetResult() - { - return parent.resultSelector(q1.Dequeue(), q2.Dequeue(), q3.Dequeue(), q4.Dequeue(), q5.Dequeue()); - } - - public override void OnNext(TR value) - { - base.observer.OnNext(value); - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } - finally { Dispose(); } - } - - public override void OnCompleted() - { - try { observer.OnCompleted(); } - finally { Dispose(); } - } - } - } - - - internal class ZipObservable : OperatorObservableBase - { - IObservable source1; - IObservable source2; - IObservable source3; - IObservable source4; - IObservable source5; - IObservable source6; - ZipFunc resultSelector; - - public ZipObservable( - IObservable source1, - IObservable source2, - IObservable source3, - IObservable source4, - IObservable source5, - IObservable source6, - ZipFunc resultSelector) - : base( - source1.IsRequiredSubscribeOnCurrentThread() || - source2.IsRequiredSubscribeOnCurrentThread() || - source3.IsRequiredSubscribeOnCurrentThread() || - source4.IsRequiredSubscribeOnCurrentThread() || - source5.IsRequiredSubscribeOnCurrentThread() || - source6.IsRequiredSubscribeOnCurrentThread() || - false) - { - this.source1 = source1; - this.source2 = source2; - this.source3 = source3; - this.source4 = source4; - this.source5 = source5; - this.source6 = source6; - this.resultSelector = resultSelector; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - return new Zip(this, observer, cancel).Run(); - } - - class Zip : NthZipObserverBase - { - readonly ZipObservable parent; - readonly object gate = new object(); - readonly Queue q1 = new Queue(); - readonly Queue q2 = new Queue(); - readonly Queue q3 = new Queue(); - readonly Queue q4 = new Queue(); - readonly Queue q5 = new Queue(); - readonly Queue q6 = new Queue(); - - public Zip(ZipObservable parent, IObserver observer, IDisposable cancel) - : base(observer, cancel) - { - this.parent = parent; - } - - public IDisposable Run() - { - base.SetQueue(new System.Collections.ICollection[] { q1, q2, q3, q4, q5, q6 }); - var s1 = parent.source1.Subscribe(new ZipObserver(gate, this, 0, q1)); - var s2 = parent.source2.Subscribe(new ZipObserver(gate, this, 1, q2)); - var s3 = parent.source3.Subscribe(new ZipObserver(gate, this, 2, q3)); - var s4 = parent.source4.Subscribe(new ZipObserver(gate, this, 3, q4)); - var s5 = parent.source5.Subscribe(new ZipObserver(gate, this, 4, q5)); - var s6 = parent.source6.Subscribe(new ZipObserver(gate, this, 5, q6)); - - return StableCompositeDisposable.Create(s1, s2, s3, s4, s5, s6, Disposable.Create(() => - { - lock (gate) - { - q1.Clear(); q2.Clear(); q3.Clear(); q4.Clear(); q5.Clear(); q6.Clear(); - } - })); - } - - public override TR GetResult() - { - return parent.resultSelector(q1.Dequeue(), q2.Dequeue(), q3.Dequeue(), q4.Dequeue(), q5.Dequeue(), q6.Dequeue()); - } - - public override void OnNext(TR value) - { - base.observer.OnNext(value); - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } - finally { Dispose(); } - } - - public override void OnCompleted() - { - try { observer.OnCompleted(); } - finally { Dispose(); } - } - } - } - - - internal class ZipObservable : OperatorObservableBase - { - IObservable source1; - IObservable source2; - IObservable source3; - IObservable source4; - IObservable source5; - IObservable source6; - IObservable source7; - ZipFunc resultSelector; - - public ZipObservable( - IObservable source1, - IObservable source2, - IObservable source3, - IObservable source4, - IObservable source5, - IObservable source6, - IObservable source7, - ZipFunc resultSelector) - : base( - source1.IsRequiredSubscribeOnCurrentThread() || - source2.IsRequiredSubscribeOnCurrentThread() || - source3.IsRequiredSubscribeOnCurrentThread() || - source4.IsRequiredSubscribeOnCurrentThread() || - source5.IsRequiredSubscribeOnCurrentThread() || - source6.IsRequiredSubscribeOnCurrentThread() || - source7.IsRequiredSubscribeOnCurrentThread() || - false) - { - this.source1 = source1; - this.source2 = source2; - this.source3 = source3; - this.source4 = source4; - this.source5 = source5; - this.source6 = source6; - this.source7 = source7; - this.resultSelector = resultSelector; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - return new Zip(this, observer, cancel).Run(); - } - - class Zip : NthZipObserverBase - { - readonly ZipObservable parent; - readonly object gate = new object(); - readonly Queue q1 = new Queue(); - readonly Queue q2 = new Queue(); - readonly Queue q3 = new Queue(); - readonly Queue q4 = new Queue(); - readonly Queue q5 = new Queue(); - readonly Queue q6 = new Queue(); - readonly Queue q7 = new Queue(); - - public Zip(ZipObservable parent, IObserver observer, IDisposable cancel) - : base(observer, cancel) - { - this.parent = parent; - } - - public IDisposable Run() - { - base.SetQueue(new System.Collections.ICollection[] { q1, q2, q3, q4, q5, q6, q7 }); - var s1 = parent.source1.Subscribe(new ZipObserver(gate, this, 0, q1)); - var s2 = parent.source2.Subscribe(new ZipObserver(gate, this, 1, q2)); - var s3 = parent.source3.Subscribe(new ZipObserver(gate, this, 2, q3)); - var s4 = parent.source4.Subscribe(new ZipObserver(gate, this, 3, q4)); - var s5 = parent.source5.Subscribe(new ZipObserver(gate, this, 4, q5)); - var s6 = parent.source6.Subscribe(new ZipObserver(gate, this, 5, q6)); - var s7 = parent.source7.Subscribe(new ZipObserver(gate, this, 6, q7)); - - return StableCompositeDisposable.Create(s1, s2, s3, s4, s5, s6, s7, Disposable.Create(() => - { - lock (gate) - { - q1.Clear(); q2.Clear(); q3.Clear(); q4.Clear(); q5.Clear(); q6.Clear(); q7.Clear(); - } - })); - } - - public override TR GetResult() - { - return parent.resultSelector(q1.Dequeue(), q2.Dequeue(), q3.Dequeue(), q4.Dequeue(), q5.Dequeue(), q6.Dequeue(), q7.Dequeue()); - } - - public override void OnNext(TR value) - { - base.observer.OnNext(value); - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } - finally { Dispose(); } - } - - public override void OnCompleted() - { - try { observer.OnCompleted(); } - finally { Dispose(); } - } - } - } - - #endregion - - // Nth infrastructure - - internal interface IZipObservable - { - void Dequeue(int index); - void Fail(Exception error); - void Done(int index); - } - - internal abstract class NthZipObserverBase : OperatorObserverBase, IZipObservable - { - System.Collections.ICollection[] queues; - bool[] isDone; - int length; - - public NthZipObserverBase(IObserver observer, IDisposable cancel) : base(observer, cancel) - { - } - - protected void SetQueue(System.Collections.ICollection[] queues) - { - this.queues = queues; - this.length = queues.Length; - this.isDone = new bool[length]; - } - - public abstract T GetResult(); - - // operators in lock - public void Dequeue(int index) - { - var allQueueHasValue = true; - for (int i = 0; i < length; i++) - { - if (queues[i].Count == 0) - { - allQueueHasValue = false; - break; - } - } - - if (!allQueueHasValue) - { - var allCompletedWithoutSelf = true; - for (int i = 0; i < length; i++) - { - if (i == index) continue; - if (!isDone[i]) - { - allCompletedWithoutSelf = false; - break; - } - } - - if (allCompletedWithoutSelf) - { - try { observer.OnCompleted(); } - finally { Dispose(); } - return; - } - else - { - return; - } - } - - var result = default(T); - try - { - result = GetResult(); - } - catch (Exception ex) - { - try { observer.OnError(ex); } - finally { Dispose(); } - return; - } - OnNext(result); - } - - public void Done(int index) - { - isDone[index] = true; - var allTrue = true; - for (int i = 0; i < length; i++) - { - if (!isDone[i]) - { - allTrue = false; - break; - } - } - - if (allTrue) - { - try { observer.OnCompleted(); } - finally { Dispose(); } - } - } - - public void Fail(Exception error) - { - try { observer.OnError(error); } - finally { Dispose(); } - } - } - - - // nth - internal class ZipObserver : IObserver - { - readonly object gate; - readonly IZipObservable parent; - readonly int index; - readonly Queue queue; - - public ZipObserver(object gate, IZipObservable parent, int index, Queue queue) - { - this.gate = gate; - this.parent = parent; - this.index = index; - this.queue = queue; - } - - public void OnNext(T value) - { - lock (gate) - { - queue.Enqueue(value); - parent.Dequeue(index); - } - } - - public void OnError(Exception error) - { - lock (gate) - { - parent.Fail(error); - } - } - - public void OnCompleted() - { - lock (gate) - { - parent.Done(index); - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/Zip.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/Zip.cs.meta deleted file mode 100644 index f394fdf..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/Zip.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 4e92e25f9bb221d478d4af5bcd8b8a2c -timeCreated: 1455373899 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Operators/ZipLatest.cs b/Assets/Plugins/UniRx/Scripts/Operators/ZipLatest.cs deleted file mode 100644 index 161a036..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/ZipLatest.cs +++ /dev/null @@ -1,992 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace UniRx.Operators -{ - public delegate TR ZipLatestFunc(T1 arg1, T2 arg2, T3 arg3); - public delegate TR ZipLatestFunc(T1 arg1, T2 arg2, T3 arg3, T4 arg4); - public delegate TR ZipLatestFunc(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5); - public delegate TR ZipLatestFunc(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6); - public delegate TR ZipLatestFunc(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7); - - // binary - internal class ZipLatestObservable : OperatorObservableBase - { - readonly IObservable left; - readonly IObservable right; - readonly Func selector; - - public ZipLatestObservable(IObservable left, IObservable right, Func selector) - : base(left.IsRequiredSubscribeOnCurrentThread() || right.IsRequiredSubscribeOnCurrentThread()) - { - this.left = left; - this.right = right; - this.selector = selector; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - return new ZipLatest(this, observer, cancel).Run(); - } - - class ZipLatest : OperatorObserverBase - { - readonly ZipLatestObservable parent; - readonly object gate = new object(); - - TLeft leftValue = default(TLeft); - bool leftStarted = false; - bool leftCompleted = false; - - TRight rightValue = default(TRight); - bool rightStarted = false; - bool rightCompleted = false; - - public ZipLatest(ZipLatestObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) - { - this.parent = parent; - } - - public IDisposable Run() - { - var l = parent.left.Subscribe(new LeftObserver(this)); - var r = parent.right.Subscribe(new RightObserver(this)); - - return StableCompositeDisposable.Create(l, r); - } - - // publish in lock - public void Publish() - { - if ((leftCompleted && !leftStarted) || (rightCompleted && !rightStarted)) - { - try { observer.OnCompleted(); } - finally { Dispose(); } - return; - } - else if (!(leftStarted && rightStarted)) - { - return; - } - - TResult v; - try - { - v = parent.selector(leftValue, rightValue); - } - catch (Exception ex) - { - try { observer.OnError(ex); } - finally { Dispose(); } - return; - } - - OnNext(v); - leftStarted = false; - rightStarted = false; - - if (leftCompleted || rightCompleted) - { - try { observer.OnCompleted(); } - finally { Dispose(); } - return; - } - } - - public override void OnNext(TResult value) - { - base.observer.OnNext(value); - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } - finally { Dispose(); } - } - - public override void OnCompleted() - { - try { observer.OnCompleted(); } - finally { Dispose(); } - } - - class LeftObserver : IObserver - { - readonly ZipLatest parent; - - public LeftObserver(ZipLatest parent) - { - this.parent = parent; - } - - public void OnNext(TLeft value) - { - lock (parent.gate) - { - parent.leftStarted = true; - parent.leftValue = value; - parent.Publish(); - } - } - - public void OnError(Exception error) - { - lock (parent.gate) - { - parent.OnError(error); - } - } - - public void OnCompleted() - { - lock (parent.gate) - { - parent.leftCompleted = true; - if (parent.rightCompleted) parent.OnCompleted(); - } - } - } - - class RightObserver : IObserver - { - readonly ZipLatest parent; - - public RightObserver(ZipLatest parent) - { - this.parent = parent; - } - - - public void OnNext(TRight value) - { - lock (parent.gate) - { - parent.rightStarted = true; - parent.rightValue = value; - parent.Publish(); - } - } - - public void OnError(Exception error) - { - lock (parent.gate) - { - parent.OnError(error); - } - } - - public void OnCompleted() - { - lock (parent.gate) - { - parent.rightCompleted = true; - if (parent.leftCompleted) parent.OnCompleted(); - } - } - } - } - } - - // array - internal class ZipLatestObservable : OperatorObservableBase> - { - readonly IObservable[] sources; - - public ZipLatestObservable(IObservable[] sources) - : base(true) - { - this.sources = sources; - } - - protected override IDisposable SubscribeCore(IObserver> observer, IDisposable cancel) - { - return new ZipLatest(this, observer, cancel).Run(); - } - - class ZipLatest : OperatorObserverBase, IList> - { - readonly ZipLatestObservable parent; - readonly object gate = new object(); - - int length; - T[] values; - bool[] isStarted; - bool[] isCompleted; - - public ZipLatest(ZipLatestObservable parent, IObserver> observer, IDisposable cancel) : base(observer, cancel) - { - this.parent = parent; - } - - public IDisposable Run() - { - length = parent.sources.Length; - values = new T[length]; - isStarted = new bool[length]; - isCompleted = new bool[length]; - - var disposables = new IDisposable[length]; - for (int i = 0; i < length; i++) - { - var source = parent.sources[i]; - disposables[i] = source.Subscribe(new ZipLatestObserver(this, i)); - } - - return StableCompositeDisposable.CreateUnsafe(disposables); - } - - // publish is in the lock - void Publish(int index) - { - isStarted[index] = true; - - var hasOnCompleted = false; - var allValueStarted = true; - for (int i = 0; i < length; i++) - { - if (!isStarted[i]) - { - allValueStarted = false; - break; - } - if (i == index) continue; - if (isCompleted[i]) hasOnCompleted = true; - } - - if (allValueStarted) - { - OnNext(new List(values)); - if (hasOnCompleted) - { - try { observer.OnCompleted(); } - finally { Dispose(); } - return; - } - else - { - Array.Clear(isStarted, 0, length); // reset - return; - } - } - else - { - for (int i = 0; i < length; i++) - { - if (i == index) continue; - if (isCompleted[i] && !isStarted[i]) - { - try { observer.OnCompleted(); } - finally { Dispose(); } - return; - } - } - } - } - - public override void OnNext(IList value) - { - base.observer.OnNext(value); - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } - finally { Dispose(); } - } - - public override void OnCompleted() - { - try { observer.OnCompleted(); } - finally { Dispose(); } - } - - class ZipLatestObserver : IObserver - { - readonly ZipLatest parent; - readonly int index; - - public ZipLatestObserver(ZipLatest parent, int index) - { - this.parent = parent; - this.index = index; - } - - public void OnNext(T value) - { - lock (parent.gate) - { - parent.values[index] = value; - parent.Publish(index); - } - } - - public void OnError(Exception ex) - { - lock (parent.gate) - { - parent.OnError(ex); - } - } - - public void OnCompleted() - { - lock (parent.gate) - { - parent.isCompleted[index] = true; - - var allTrue = true; - for (int i = 0; i < parent.length; i++) - { - if (!parent.isCompleted[i]) - { - allTrue = false; - break; - } - } - - if (allTrue) - { - parent.OnCompleted(); - } - } - } - } - } - } - - // generated from UniRx.Console.ZipLatestGenerator.tt - #region NTH - - internal class ZipLatestObservable : OperatorObservableBase - { - IObservable source1; - IObservable source2; - IObservable source3; - ZipLatestFunc resultSelector; - - public ZipLatestObservable( - IObservable source1, - IObservable source2, - IObservable source3, - ZipLatestFunc resultSelector) - : base( - source1.IsRequiredSubscribeOnCurrentThread() || - source2.IsRequiredSubscribeOnCurrentThread() || - source3.IsRequiredSubscribeOnCurrentThread() || - false) - { - this.source1 = source1; - this.source2 = source2; - this.source3 = source3; - this.resultSelector = resultSelector; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - return new ZipLatest(3, this, observer, cancel).Run(); - } - - class ZipLatest : NthZipLatestObserverBase - { - readonly ZipLatestObservable parent; - readonly object gate = new object(); - ZipLatestObserver c1; - ZipLatestObserver c2; - ZipLatestObserver c3; - - public ZipLatest(int length, ZipLatestObservable parent, IObserver observer, IDisposable cancel) - : base(length, observer, cancel) - { - this.parent = parent; - } - - public IDisposable Run() - { - c1 = new ZipLatestObserver(gate, this, 0); - c2 = new ZipLatestObserver(gate, this, 1); - c3 = new ZipLatestObserver(gate, this, 2); - - var s1 = parent.source1.Subscribe(c1); - var s2 = parent.source2.Subscribe(c2); - var s3 = parent.source3.Subscribe(c3); - - return StableCompositeDisposable.Create(s1, s2, s3); - } - - public override TR GetResult() - { - return parent.resultSelector(c1.Value, c2.Value, c3.Value); - } - - public override void OnNext(TR value) - { - base.observer.OnNext(value); - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } - finally { Dispose(); } - } - - public override void OnCompleted() - { - try { observer.OnCompleted(); } - finally { Dispose(); } - } - } - } - - - internal class ZipLatestObservable : OperatorObservableBase - { - IObservable source1; - IObservable source2; - IObservable source3; - IObservable source4; - ZipLatestFunc resultSelector; - - public ZipLatestObservable( - IObservable source1, - IObservable source2, - IObservable source3, - IObservable source4, - ZipLatestFunc resultSelector) - : base( - source1.IsRequiredSubscribeOnCurrentThread() || - source2.IsRequiredSubscribeOnCurrentThread() || - source3.IsRequiredSubscribeOnCurrentThread() || - source4.IsRequiredSubscribeOnCurrentThread() || - false) - { - this.source1 = source1; - this.source2 = source2; - this.source3 = source3; - this.source4 = source4; - this.resultSelector = resultSelector; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - return new ZipLatest(4, this, observer, cancel).Run(); - } - - class ZipLatest : NthZipLatestObserverBase - { - readonly ZipLatestObservable parent; - readonly object gate = new object(); - ZipLatestObserver c1; - ZipLatestObserver c2; - ZipLatestObserver c3; - ZipLatestObserver c4; - - public ZipLatest(int length, ZipLatestObservable parent, IObserver observer, IDisposable cancel) - : base(length, observer, cancel) - { - this.parent = parent; - } - - public IDisposable Run() - { - c1 = new ZipLatestObserver(gate, this, 0); - c2 = new ZipLatestObserver(gate, this, 1); - c3 = new ZipLatestObserver(gate, this, 2); - c4 = new ZipLatestObserver(gate, this, 3); - - var s1 = parent.source1.Subscribe(c1); - var s2 = parent.source2.Subscribe(c2); - var s3 = parent.source3.Subscribe(c3); - var s4 = parent.source4.Subscribe(c4); - - return StableCompositeDisposable.Create(s1, s2, s3, s4); - } - - public override TR GetResult() - { - return parent.resultSelector(c1.Value, c2.Value, c3.Value, c4.Value); - } - - public override void OnNext(TR value) - { - base.observer.OnNext(value); - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } - finally { Dispose(); } - } - - public override void OnCompleted() - { - try { observer.OnCompleted(); } - finally { Dispose(); } - } - } - } - - - internal class ZipLatestObservable : OperatorObservableBase - { - IObservable source1; - IObservable source2; - IObservable source3; - IObservable source4; - IObservable source5; - ZipLatestFunc resultSelector; - - public ZipLatestObservable( - IObservable source1, - IObservable source2, - IObservable source3, - IObservable source4, - IObservable source5, - ZipLatestFunc resultSelector) - : base( - source1.IsRequiredSubscribeOnCurrentThread() || - source2.IsRequiredSubscribeOnCurrentThread() || - source3.IsRequiredSubscribeOnCurrentThread() || - source4.IsRequiredSubscribeOnCurrentThread() || - source5.IsRequiredSubscribeOnCurrentThread() || - false) - { - this.source1 = source1; - this.source2 = source2; - this.source3 = source3; - this.source4 = source4; - this.source5 = source5; - this.resultSelector = resultSelector; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - return new ZipLatest(5, this, observer, cancel).Run(); - } - - class ZipLatest : NthZipLatestObserverBase - { - readonly ZipLatestObservable parent; - readonly object gate = new object(); - ZipLatestObserver c1; - ZipLatestObserver c2; - ZipLatestObserver c3; - ZipLatestObserver c4; - ZipLatestObserver c5; - - public ZipLatest(int length, ZipLatestObservable parent, IObserver observer, IDisposable cancel) - : base(length, observer, cancel) - { - this.parent = parent; - } - - public IDisposable Run() - { - c1 = new ZipLatestObserver(gate, this, 0); - c2 = new ZipLatestObserver(gate, this, 1); - c3 = new ZipLatestObserver(gate, this, 2); - c4 = new ZipLatestObserver(gate, this, 3); - c5 = new ZipLatestObserver(gate, this, 4); - - var s1 = parent.source1.Subscribe(c1); - var s2 = parent.source2.Subscribe(c2); - var s3 = parent.source3.Subscribe(c3); - var s4 = parent.source4.Subscribe(c4); - var s5 = parent.source5.Subscribe(c5); - - return StableCompositeDisposable.Create(s1, s2, s3, s4, s5); - } - - public override TR GetResult() - { - return parent.resultSelector(c1.Value, c2.Value, c3.Value, c4.Value, c5.Value); - } - - public override void OnNext(TR value) - { - base.observer.OnNext(value); - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } - finally { Dispose(); } - } - - public override void OnCompleted() - { - try { observer.OnCompleted(); } - finally { Dispose(); } - } - } - } - - - internal class ZipLatestObservable : OperatorObservableBase - { - IObservable source1; - IObservable source2; - IObservable source3; - IObservable source4; - IObservable source5; - IObservable source6; - ZipLatestFunc resultSelector; - - public ZipLatestObservable( - IObservable source1, - IObservable source2, - IObservable source3, - IObservable source4, - IObservable source5, - IObservable source6, - ZipLatestFunc resultSelector) - : base( - source1.IsRequiredSubscribeOnCurrentThread() || - source2.IsRequiredSubscribeOnCurrentThread() || - source3.IsRequiredSubscribeOnCurrentThread() || - source4.IsRequiredSubscribeOnCurrentThread() || - source5.IsRequiredSubscribeOnCurrentThread() || - source6.IsRequiredSubscribeOnCurrentThread() || - false) - { - this.source1 = source1; - this.source2 = source2; - this.source3 = source3; - this.source4 = source4; - this.source5 = source5; - this.source6 = source6; - this.resultSelector = resultSelector; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - return new ZipLatest(6, this, observer, cancel).Run(); - } - - class ZipLatest : NthZipLatestObserverBase - { - readonly ZipLatestObservable parent; - readonly object gate = new object(); - ZipLatestObserver c1; - ZipLatestObserver c2; - ZipLatestObserver c3; - ZipLatestObserver c4; - ZipLatestObserver c5; - ZipLatestObserver c6; - - public ZipLatest(int length, ZipLatestObservable parent, IObserver observer, IDisposable cancel) - : base(length, observer, cancel) - { - this.parent = parent; - } - - public IDisposable Run() - { - c1 = new ZipLatestObserver(gate, this, 0); - c2 = new ZipLatestObserver(gate, this, 1); - c3 = new ZipLatestObserver(gate, this, 2); - c4 = new ZipLatestObserver(gate, this, 3); - c5 = new ZipLatestObserver(gate, this, 4); - c6 = new ZipLatestObserver(gate, this, 5); - - var s1 = parent.source1.Subscribe(c1); - var s2 = parent.source2.Subscribe(c2); - var s3 = parent.source3.Subscribe(c3); - var s4 = parent.source4.Subscribe(c4); - var s5 = parent.source5.Subscribe(c5); - var s6 = parent.source6.Subscribe(c6); - - return StableCompositeDisposable.Create(s1, s2, s3, s4, s5, s6); - } - - public override TR GetResult() - { - return parent.resultSelector(c1.Value, c2.Value, c3.Value, c4.Value, c5.Value, c6.Value); - } - - public override void OnNext(TR value) - { - base.observer.OnNext(value); - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } - finally { Dispose(); } - } - - public override void OnCompleted() - { - try { observer.OnCompleted(); } - finally { Dispose(); } - } - } - } - - - internal class ZipLatestObservable : OperatorObservableBase - { - IObservable source1; - IObservable source2; - IObservable source3; - IObservable source4; - IObservable source5; - IObservable source6; - IObservable source7; - ZipLatestFunc resultSelector; - - public ZipLatestObservable( - IObservable source1, - IObservable source2, - IObservable source3, - IObservable source4, - IObservable source5, - IObservable source6, - IObservable source7, - ZipLatestFunc resultSelector) - : base( - source1.IsRequiredSubscribeOnCurrentThread() || - source2.IsRequiredSubscribeOnCurrentThread() || - source3.IsRequiredSubscribeOnCurrentThread() || - source4.IsRequiredSubscribeOnCurrentThread() || - source5.IsRequiredSubscribeOnCurrentThread() || - source6.IsRequiredSubscribeOnCurrentThread() || - source7.IsRequiredSubscribeOnCurrentThread() || - false) - { - this.source1 = source1; - this.source2 = source2; - this.source3 = source3; - this.source4 = source4; - this.source5 = source5; - this.source6 = source6; - this.source7 = source7; - this.resultSelector = resultSelector; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - return new ZipLatest(7, this, observer, cancel).Run(); - } - - class ZipLatest : NthZipLatestObserverBase - { - readonly ZipLatestObservable parent; - readonly object gate = new object(); - ZipLatestObserver c1; - ZipLatestObserver c2; - ZipLatestObserver c3; - ZipLatestObserver c4; - ZipLatestObserver c5; - ZipLatestObserver c6; - ZipLatestObserver c7; - - public ZipLatest(int length, ZipLatestObservable parent, IObserver observer, IDisposable cancel) - : base(length, observer, cancel) - { - this.parent = parent; - } - - public IDisposable Run() - { - c1 = new ZipLatestObserver(gate, this, 0); - c2 = new ZipLatestObserver(gate, this, 1); - c3 = new ZipLatestObserver(gate, this, 2); - c4 = new ZipLatestObserver(gate, this, 3); - c5 = new ZipLatestObserver(gate, this, 4); - c6 = new ZipLatestObserver(gate, this, 5); - c7 = new ZipLatestObserver(gate, this, 6); - - var s1 = parent.source1.Subscribe(c1); - var s2 = parent.source2.Subscribe(c2); - var s3 = parent.source3.Subscribe(c3); - var s4 = parent.source4.Subscribe(c4); - var s5 = parent.source5.Subscribe(c5); - var s6 = parent.source6.Subscribe(c6); - var s7 = parent.source7.Subscribe(c7); - - return StableCompositeDisposable.Create(s1, s2, s3, s4, s5, s6, s7); - } - - public override TR GetResult() - { - return parent.resultSelector(c1.Value, c2.Value, c3.Value, c4.Value, c5.Value, c6.Value, c7.Value); - } - - public override void OnNext(TR value) - { - base.observer.OnNext(value); - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } - finally { Dispose(); } - } - - public override void OnCompleted() - { - try { observer.OnCompleted(); } - finally { Dispose(); } - } - } - } - - #endregion - - // Nth infrastructure - - internal interface IZipLatestObservable - { - void Publish(int index); - void Fail(Exception error); - void Done(int index); - } - - internal abstract class NthZipLatestObserverBase : OperatorObserverBase, IZipLatestObservable - { - readonly int length; - readonly bool[] isStarted; - readonly bool[] isCompleted; - - public NthZipLatestObserverBase(int length, IObserver observer, IDisposable cancel) : base(observer, cancel) - { - this.length = length; - this.isStarted = new bool[length]; - this.isCompleted = new bool[length]; - } - - public abstract T GetResult(); - - // operators in lock - public void Publish(int index) - { - isStarted[index] = true; - - var hasOnCompleted = false; - var allValueStarted = true; - for (int i = 0; i < length; i++) - { - if (!isStarted[i]) - { - allValueStarted = false; - break; - } - if (i == index) continue; - if (isCompleted[i]) hasOnCompleted = true; - } - - if (allValueStarted) - { - var result = default(T); - try - { - result = GetResult(); - } - catch (Exception ex) - { - try { observer.OnError(ex); } - finally { Dispose(); } - return; - } - OnNext(result); - - if (hasOnCompleted) - { - try { observer.OnCompleted(); } - finally { Dispose(); } - return; - } - else - { - Array.Clear(isStarted, 0, length); // reset - return; - } - } - else - { - for (int i = 0; i < length; i++) - { - if (i == index) continue; - if (isCompleted[i] && !isStarted[i]) - { - try { observer.OnCompleted(); } - finally { Dispose(); } - return; - } - } - } - } - - public void Done(int index) - { - isCompleted[index] = true; - - var allTrue = true; - for (int i = 0; i < length; i++) - { - if (!isCompleted[i]) - { - allTrue = false; - break; - } - } - - if (allTrue) - { - try { observer.OnCompleted(); } - finally { Dispose(); } - } - } - - public void Fail(Exception error) - { - try { observer.OnError(error); } - finally { Dispose(); } - } - } - - // Nth - internal class ZipLatestObserver : IObserver - { - readonly object gate; - readonly IZipLatestObservable parent; - readonly int index; - T value; - - public T Value { get { return value; } } - - public ZipLatestObserver(object gate, IZipLatestObservable parent, int index) - { - this.gate = gate; - this.parent = parent; - this.index = index; - } - - public void OnNext(T value) - { - lock (gate) - { - this.value = value; - parent.Publish(index); - } - } - - public void OnError(Exception error) - { - lock (gate) - { - parent.Fail(error); - } - } - - public void OnCompleted() - { - lock (gate) - { - parent.Done(index); - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Operators/ZipLatest.cs.meta b/Assets/Plugins/UniRx/Scripts/Operators/ZipLatest.cs.meta deleted file mode 100644 index 725334d..0000000 --- a/Assets/Plugins/UniRx/Scripts/Operators/ZipLatest.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: f84ea50040d682c43811d1d98ae7fec8 -timeCreated: 1455373908 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Pair.cs b/Assets/Plugins/UniRx/Scripts/Pair.cs deleted file mode 100644 index df594d3..0000000 --- a/Assets/Plugins/UniRx/Scripts/Pair.cs +++ /dev/null @@ -1,59 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace UniRx -{ - // Pair is used for Observable.Pairwise - [Serializable] - public struct Pair : IEquatable> - { - readonly T previous; - readonly T current; - - public T Previous - { - get { return previous; } - } - - public T Current - { - get { return current; } - } - - public Pair(T previous, T current) - { - this.previous = previous; - this.current = current; - } - - public override int GetHashCode() - { - var comparer = EqualityComparer.Default; - - int h0; - h0 = comparer.GetHashCode(previous); - h0 = (h0 << 5) + h0 ^ comparer.GetHashCode(current); - return h0; - } - - public override bool Equals(object obj) - { - if (!(obj is Pair)) return false; - - return Equals((Pair)obj); - } - - public bool Equals(Pair other) - { - var comparer = EqualityComparer.Default; - - return comparer.Equals(previous, other.Previous) && - comparer.Equals(current, other.Current); - } - - public override string ToString() - { - return string.Format("({0}, {1})", previous, current); - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Pair.cs.meta b/Assets/Plugins/UniRx/Scripts/Pair.cs.meta deleted file mode 100644 index 16e1017..0000000 --- a/Assets/Plugins/UniRx/Scripts/Pair.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 7947c520dfd9de94bb381e45dc105752 -timeCreated: 1455373899 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Schedulers.meta b/Assets/Plugins/UniRx/Scripts/Schedulers.meta deleted file mode 100644 index 4c0d732..0000000 --- a/Assets/Plugins/UniRx/Scripts/Schedulers.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 279c9951ca9940f47add2e9d02a2d189 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Schedulers/CurrentThreadScheduler.cs b/Assets/Plugins/UniRx/Scripts/Schedulers/CurrentThreadScheduler.cs deleted file mode 100644 index 8e54c28..0000000 --- a/Assets/Plugins/UniRx/Scripts/Schedulers/CurrentThreadScheduler.cs +++ /dev/null @@ -1,135 +0,0 @@ -// this code is borrowed from RxOfficial(rx.codeplex.com) and modified - -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. - -using System.ComponentModel; -using System.Threading; -using UniRx.InternalUtil; -using UniRx; -using System; -using System.Diagnostics; -using System.Collections.Generic; - -namespace UniRx -{ - - public static partial class Scheduler - { - public static readonly IScheduler CurrentThread = new CurrentThreadScheduler(); - - public static bool IsCurrentThreadSchedulerScheduleRequired { get { return CurrentThreadScheduler.IsScheduleRequired; } } - - /// - /// Represents an object that schedules units of work on the current thread. - /// - /// Singleton instance of this type exposed through this static property. - class CurrentThreadScheduler : IScheduler - { - [ThreadStatic] - static SchedulerQueue s_threadLocalQueue; - - [ThreadStatic] - static Stopwatch s_clock; - - private static SchedulerQueue GetQueue() - { - return s_threadLocalQueue; - } - - private static void SetQueue(SchedulerQueue newQueue) - { - s_threadLocalQueue = newQueue; - } - - private static TimeSpan Time - { - get - { - if (s_clock == null) - s_clock = Stopwatch.StartNew(); - - return s_clock.Elapsed; - } - } - - /// - /// Gets a value that indicates whether the caller must call a Schedule method. - /// - [EditorBrowsable(EditorBrowsableState.Advanced)] - public static bool IsScheduleRequired - { - get - { - return GetQueue() == null; - } - } - - public IDisposable Schedule(Action action) - { - return Schedule(TimeSpan.Zero, action); - } - - public IDisposable Schedule(TimeSpan dueTime, Action action) - { - if (action == null) - throw new ArgumentNullException("action"); - - var dt = Time + Scheduler.Normalize(dueTime); - - var si = new ScheduledItem(action, dt); - - var queue = GetQueue(); - - if (queue == null) - { - queue = new SchedulerQueue(4); - queue.Enqueue(si); - - CurrentThreadScheduler.SetQueue(queue); - try - { - Trampoline.Run(queue); - } - finally - { - CurrentThreadScheduler.SetQueue(null); - } - } - else - { - queue.Enqueue(si); - } - - return si.Cancellation; - } - - static class Trampoline - { - public static void Run(SchedulerQueue queue) - { - while (queue.Count > 0) - { - var item = queue.Dequeue(); - if (!item.IsCanceled) - { - var wait = item.DueTime - CurrentThreadScheduler.Time; - if (wait.Ticks > 0) - { - Thread.Sleep(wait); - } - - if (!item.IsCanceled) - item.Invoke(); - } - } - } - } - - public DateTimeOffset Now - { - get { return Scheduler.Now; } - } - } - } -} - diff --git a/Assets/Plugins/UniRx/Scripts/Schedulers/CurrentThreadScheduler.cs.meta b/Assets/Plugins/UniRx/Scripts/Schedulers/CurrentThreadScheduler.cs.meta deleted file mode 100644 index b8bc6a0..0000000 --- a/Assets/Plugins/UniRx/Scripts/Schedulers/CurrentThreadScheduler.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 1d547b5ee71b7284db1fecfcdfa59fac -timeCreated: 1455373897 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Schedulers/IScheduler.cs b/Assets/Plugins/UniRx/Scripts/Schedulers/IScheduler.cs deleted file mode 100644 index 6132897..0000000 --- a/Assets/Plugins/UniRx/Scripts/Schedulers/IScheduler.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System; - -namespace UniRx -{ - public interface IScheduler - { - DateTimeOffset Now { get; } - - // Interface is changed from official Rx for avoid iOS AOT problem (state is dangerous). - - IDisposable Schedule(Action action); - - IDisposable Schedule(TimeSpan dueTime, Action action); - } - - public interface ISchedulerPeriodic - { - IDisposable SchedulePeriodic(TimeSpan period, Action action); - } - - public interface ISchedulerLongRunning - { - IDisposable ScheduleLongRunning(Action action); - } - - public interface ISchedulerQueueing - { - void ScheduleQueueing(ICancelable cancel, T state, Action action); - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Schedulers/IScheduler.cs.meta b/Assets/Plugins/UniRx/Scripts/Schedulers/IScheduler.cs.meta deleted file mode 100644 index 5551cf8..0000000 --- a/Assets/Plugins/UniRx/Scripts/Schedulers/IScheduler.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 7409b202c20d3894b9677c8f2a27f3aa -timeCreated: 1455373899 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Schedulers/ImmediateScheduler.cs b/Assets/Plugins/UniRx/Scripts/Schedulers/ImmediateScheduler.cs deleted file mode 100644 index 0e64af5..0000000 --- a/Assets/Plugins/UniRx/Scripts/Schedulers/ImmediateScheduler.cs +++ /dev/null @@ -1,43 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Text; -using System.Threading; - -namespace UniRx -{ - public static partial class Scheduler - { - public static readonly IScheduler Immediate = new ImmediateScheduler(); - - class ImmediateScheduler : IScheduler - { - public ImmediateScheduler() - { - } - - public DateTimeOffset Now - { - get { return Scheduler.Now; } - } - - public IDisposable Schedule(Action action) - { - action(); - return Disposable.Empty; - } - - public IDisposable Schedule(TimeSpan dueTime, Action action) - { - var wait = Scheduler.Normalize(dueTime); - if (wait.Ticks > 0) - { - Thread.Sleep(wait); - } - - action(); - return Disposable.Empty; - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Schedulers/ImmediateScheduler.cs.meta b/Assets/Plugins/UniRx/Scripts/Schedulers/ImmediateScheduler.cs.meta deleted file mode 100644 index 8cad6fe..0000000 --- a/Assets/Plugins/UniRx/Scripts/Schedulers/ImmediateScheduler.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 87be5fca34f9b44428b7fb1ce9147860 -timeCreated: 1455373900 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Schedulers/Scheduler.cs b/Assets/Plugins/UniRx/Scripts/Schedulers/Scheduler.cs deleted file mode 100644 index 6f1a236..0000000 --- a/Assets/Plugins/UniRx/Scripts/Schedulers/Scheduler.cs +++ /dev/null @@ -1,235 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Text; -using System.Threading; - -namespace UniRx -{ - // Scheduler Extension - public static partial class Scheduler - { - // configurable defaults - public static class DefaultSchedulers - { - static IScheduler constantTime; - public static IScheduler ConstantTimeOperations - { - get - { - return constantTime ?? (constantTime = Scheduler.Immediate); - } - set - { - constantTime = value; - } - } - - static IScheduler tailRecursion; - public static IScheduler TailRecursion - { - get - { - return tailRecursion ?? (tailRecursion = Scheduler.Immediate); - } - set - { - tailRecursion = value; - } - } - - static IScheduler iteration; - public static IScheduler Iteration - { - get - { - return iteration ?? (iteration = Scheduler.CurrentThread); - } - set - { - iteration = value; - } - } - - static IScheduler timeBasedOperations; - public static IScheduler TimeBasedOperations - { - get - { -#if UniRxLibrary - return timeBasedOperations ?? (timeBasedOperations = Scheduler.ThreadPool); -#else - return timeBasedOperations ?? (timeBasedOperations = Scheduler.MainThread); // MainThread as default for TimeBased Operation -#endif - } - set - { - timeBasedOperations = value; - } - } - - static IScheduler asyncConversions; - public static IScheduler AsyncConversions - { - get - { -#if WEB_GL - // WebGL does not support threadpool - return asyncConversions ?? (asyncConversions = Scheduler.MainThread); -#else - return asyncConversions ?? (asyncConversions = Scheduler.ThreadPool); -#endif - } - set - { - asyncConversions = value; - } - } - - public static void SetDotNetCompatible() - { - ConstantTimeOperations = Scheduler.Immediate; - TailRecursion = Scheduler.Immediate; - Iteration = Scheduler.CurrentThread; - TimeBasedOperations = Scheduler.ThreadPool; - AsyncConversions = Scheduler.ThreadPool; - } - } - - // utils - - public static DateTimeOffset Now - { - get { return DateTimeOffset.UtcNow; } - } - - public static TimeSpan Normalize(TimeSpan timeSpan) - { - return timeSpan >= TimeSpan.Zero ? timeSpan : TimeSpan.Zero; - } - - public static IDisposable Schedule(this IScheduler scheduler, DateTimeOffset dueTime, Action action) - { - return scheduler.Schedule(dueTime - scheduler.Now, action); - } - - public static IDisposable Schedule(this IScheduler scheduler, Action action) - { - // InvokeRec1 - var group = new CompositeDisposable(1); - var gate = new object(); - - Action recursiveAction = null; - recursiveAction = () => action(() => - { - var isAdded = false; - var isDone = false; - var d = default(IDisposable); - d = scheduler.Schedule(() => - { - lock (gate) - { - if (isAdded) - group.Remove(d); - else - isDone = true; - } - recursiveAction(); - }); - - lock (gate) - { - if (!isDone) - { - group.Add(d); - isAdded = true; - } - } - }); - - group.Add(scheduler.Schedule(recursiveAction)); - - return group; - } - - public static IDisposable Schedule(this IScheduler scheduler, TimeSpan dueTime, Action> action) - { - // InvokeRec2 - - var group = new CompositeDisposable(1); - var gate = new object(); - - Action recursiveAction = null; - recursiveAction = () => action(dt => - { - var isAdded = false; - var isDone = false; - var d = default(IDisposable); - d = scheduler.Schedule(dt, () => - { - lock (gate) - { - if (isAdded) - group.Remove(d); - else - isDone = true; - } - recursiveAction(); - }); - - lock (gate) - { - if (!isDone) - { - group.Add(d); - isAdded = true; - } - } - }); - - group.Add(scheduler.Schedule(dueTime, recursiveAction)); - - return group; - } - - public static IDisposable Schedule(this IScheduler scheduler, DateTimeOffset dueTime, Action> action) - { - // InvokeRec3 - - var group = new CompositeDisposable(1); - var gate = new object(); - - Action recursiveAction = null; - recursiveAction = () => action(dt => - { - var isAdded = false; - var isDone = false; - var d = default(IDisposable); - d = scheduler.Schedule(dt, () => - { - lock (gate) - { - if (isAdded) - group.Remove(d); - else - isDone = true; - } - recursiveAction(); - }); - - lock (gate) - { - if (!isDone) - { - group.Add(d); - isAdded = true; - } - } - }); - - group.Add(scheduler.Schedule(dueTime, recursiveAction)); - - return group; - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Schedulers/Scheduler.cs.meta b/Assets/Plugins/UniRx/Scripts/Schedulers/Scheduler.cs.meta deleted file mode 100644 index 0fabcf2..0000000 --- a/Assets/Plugins/UniRx/Scripts/Schedulers/Scheduler.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: bfeb53a7ea29f714798ba6bb3bd70ba4 -timeCreated: 1455373901 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Schedulers/ThreadPoolScheduler.cs b/Assets/Plugins/UniRx/Scripts/Schedulers/ThreadPoolScheduler.cs deleted file mode 100644 index ac510a0..0000000 --- a/Assets/Plugins/UniRx/Scripts/Schedulers/ThreadPoolScheduler.cs +++ /dev/null @@ -1,197 +0,0 @@ -#if !UNITY_METRO - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Text; -using UniRx.InternalUtil; - -namespace UniRx -{ - public static partial class Scheduler - { - public static readonly IScheduler ThreadPool = new ThreadPoolScheduler(); - - class ThreadPoolScheduler : IScheduler, ISchedulerPeriodic - { - public ThreadPoolScheduler() - { - } - - public DateTimeOffset Now - { - get { return Scheduler.Now; } - } - - public IDisposable Schedule(Action action) - { - var d = new BooleanDisposable(); - - System.Threading.ThreadPool.QueueUserWorkItem(_ => - { - if (!d.IsDisposed) - { - action(); - } - }); - - return d; - } - - public IDisposable Schedule(DateTimeOffset dueTime, Action action) - { - return Schedule(dueTime - Now, action); - } - - public IDisposable Schedule(TimeSpan dueTime, Action action) - { - return new Timer(dueTime, action); - } - - public IDisposable SchedulePeriodic(TimeSpan period, Action action) - { - return new PeriodicTimer(period, action); - } - - public void ScheduleQueueing(ICancelable cancel, T state, Action action) - { - System.Threading.ThreadPool.QueueUserWorkItem(callBackState => - { - if (!cancel.IsDisposed) - { - action((T)callBackState); - } - }, state); - } - - // timer was borrwed from Rx Official - - sealed class Timer : IDisposable - { - static readonly HashSet s_timers = new HashSet(); - - private readonly SingleAssignmentDisposable _disposable; - - private Action _action; - private System.Threading.Timer _timer; - - private bool _hasAdded; - private bool _hasRemoved; - - public Timer(TimeSpan dueTime, Action action) - { - _disposable = new SingleAssignmentDisposable(); - _disposable.Disposable = Disposable.Create(Unroot); - - _action = action; - _timer = new System.Threading.Timer(Tick, null, dueTime, TimeSpan.FromMilliseconds(System.Threading.Timeout.Infinite)); - - lock (s_timers) - { - if (!_hasRemoved) - { - s_timers.Add(_timer); - - _hasAdded = true; - } - } - } - - private void Tick(object state) - { - try - { - if (!_disposable.IsDisposed) - { - _action(); - } - } - finally - { - Unroot(); - } - } - - private void Unroot() - { - _action = Stubs.Nop; - - var timer = default(System.Threading.Timer); - - lock (s_timers) - { - if (!_hasRemoved) - { - timer = _timer; - _timer = null; - - if (_hasAdded && timer != null) - s_timers.Remove(timer); - - _hasRemoved = true; - } - } - - if (timer != null) - timer.Dispose(); - } - - public void Dispose() - { - _disposable.Dispose(); - } - } - - sealed class PeriodicTimer : IDisposable - { - static readonly HashSet s_timers = new HashSet(); - - private Action _action; - private System.Threading.Timer _timer; - private readonly AsyncLock _gate; - - public PeriodicTimer(TimeSpan period, Action action) - { - this._action = action; - this._timer = new System.Threading.Timer(Tick, null, period, period); - this._gate = new AsyncLock(); - - lock (s_timers) - { - s_timers.Add(_timer); - } - } - - private void Tick(object state) - { - _gate.Wait(() => - { - _action(); - }); - } - - public void Dispose() - { - var timer = default(System.Threading.Timer); - - lock (s_timers) - { - timer = _timer; - _timer = null; - - if (timer != null) - s_timers.Remove(timer); - } - - if (timer != null) - { - timer.Dispose(); - _action = Stubs.Nop; - } - } - } - } - } -} - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Schedulers/ThreadPoolScheduler.cs.meta b/Assets/Plugins/UniRx/Scripts/Schedulers/ThreadPoolScheduler.cs.meta deleted file mode 100644 index f748fd1..0000000 --- a/Assets/Plugins/UniRx/Scripts/Schedulers/ThreadPoolScheduler.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: f8189a60f4619be489df10eca6a78fbb -timeCreated: 1455373902 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Subjects.meta b/Assets/Plugins/UniRx/Scripts/Subjects.meta deleted file mode 100644 index 7e7668f..0000000 --- a/Assets/Plugins/UniRx/Scripts/Subjects.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 473bf570dbdec554eb519e8b122ef772 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Subjects/AsyncSubject.cs b/Assets/Plugins/UniRx/Scripts/Subjects/AsyncSubject.cs deleted file mode 100644 index 3a005ef..0000000 --- a/Assets/Plugins/UniRx/Scripts/Subjects/AsyncSubject.cs +++ /dev/null @@ -1,328 +0,0 @@ -using System; -using System.Collections.Generic; -using UniRx.InternalUtil; - -#if (NET_4_6 || NET_STANDARD_2_0) -using System.Runtime.CompilerServices; -using System.Threading; -#endif - -namespace UniRx -{ - public sealed class AsyncSubject : ISubject, IOptimizedObservable, IDisposable -#if (NET_4_6 || NET_STANDARD_2_0) - , INotifyCompletion -#endif - { - object observerLock = new object(); - - T lastValue; - bool hasValue; - bool isStopped; - bool isDisposed; - Exception lastError; - IObserver outObserver = EmptyObserver.Instance; - - public T Value - { - get - { - ThrowIfDisposed(); - if (!isStopped) throw new InvalidOperationException("AsyncSubject is not completed yet"); - if (lastError != null) lastError.Throw(); - return lastValue; - } - } - - public bool HasObservers - { - get - { - return !(outObserver is EmptyObserver) && !isStopped && !isDisposed; - } - } - - public bool IsCompleted { get { return isStopped; } } - - public void OnCompleted() - { - IObserver old; - T v; - bool hv; - lock (observerLock) - { - ThrowIfDisposed(); - if (isStopped) return; - - old = outObserver; - outObserver = EmptyObserver.Instance; - isStopped = true; - v = lastValue; - hv = hasValue; - } - - if (hv) - { - old.OnNext(v); - old.OnCompleted(); - } - else - { - old.OnCompleted(); - } - } - - public void OnError(Exception error) - { - if (error == null) throw new ArgumentNullException("error"); - - IObserver old; - lock (observerLock) - { - ThrowIfDisposed(); - if (isStopped) return; - - old = outObserver; - outObserver = EmptyObserver.Instance; - isStopped = true; - lastError = error; - } - - old.OnError(error); - } - - public void OnNext(T value) - { - lock (observerLock) - { - ThrowIfDisposed(); - if (isStopped) return; - - this.hasValue = true; - this.lastValue = value; - } - } - - public IDisposable Subscribe(IObserver observer) - { - if (observer == null) throw new ArgumentNullException("observer"); - - var ex = default(Exception); - var v = default(T); - var hv = false; - - lock (observerLock) - { - ThrowIfDisposed(); - if (!isStopped) - { - var listObserver = outObserver as ListObserver; - if (listObserver != null) - { - outObserver = listObserver.Add(observer); - } - else - { - var current = outObserver; - if (current is EmptyObserver) - { - outObserver = observer; - } - else - { - outObserver = new ListObserver(new ImmutableList>(new[] { current, observer })); - } - } - - return new Subscription(this, observer); - } - - ex = lastError; - v = lastValue; - hv = hasValue; - } - - if (ex != null) - { - observer.OnError(ex); - } - else if (hv) - { - observer.OnNext(v); - observer.OnCompleted(); - } - else - { - observer.OnCompleted(); - } - - return Disposable.Empty; - } - - public void Dispose() - { - lock (observerLock) - { - isDisposed = true; - outObserver = DisposedObserver.Instance; - lastError = null; - lastValue = default(T); - } - } - - void ThrowIfDisposed() - { - if (isDisposed) throw new ObjectDisposedException(""); - } - - public bool IsRequiredSubscribeOnCurrentThread() - { - return false; - } - - class Subscription : IDisposable - { - readonly object gate = new object(); - AsyncSubject parent; - IObserver unsubscribeTarget; - - public Subscription(AsyncSubject parent, IObserver unsubscribeTarget) - { - this.parent = parent; - this.unsubscribeTarget = unsubscribeTarget; - } - - public void Dispose() - { - lock (gate) - { - if (parent != null) - { - lock (parent.observerLock) - { - var listObserver = parent.outObserver as ListObserver; - if (listObserver != null) - { - parent.outObserver = listObserver.Remove(unsubscribeTarget); - } - else - { - parent.outObserver = EmptyObserver.Instance; - } - - unsubscribeTarget = null; - parent = null; - } - } - } - } - } - - -#if (NET_4_6 || NET_STANDARD_2_0) - - /// - /// Gets an awaitable object for the current AsyncSubject. - /// - /// Object that can be awaited. - public AsyncSubject GetAwaiter() - { - return this; - } - - /// - /// Specifies a callback action that will be invoked when the subject completes. - /// - /// Callback action that will be invoked when the subject completes. - /// is null. - public void OnCompleted(Action continuation) - { - if (continuation == null) - throw new ArgumentNullException("continuation"); - - OnCompleted(continuation, true); - } - - void OnCompleted(Action continuation, bool originalContext) - { - // - // [OK] Use of unsafe Subscribe: this type's Subscribe implementation is safe. - // - this.Subscribe/*Unsafe*/(new AwaitObserver(continuation, originalContext)); - } - - class AwaitObserver : IObserver - { - private readonly SynchronizationContext _context; - private readonly Action _callback; - - public AwaitObserver(Action callback, bool originalContext) - { - if (originalContext) - _context = SynchronizationContext.Current; - - _callback = callback; - } - - public void OnCompleted() - { - InvokeOnOriginalContext(); - } - - public void OnError(Exception error) - { - InvokeOnOriginalContext(); - } - - public void OnNext(T value) - { - } - - private void InvokeOnOriginalContext() - { - if (_context != null) - { - // - // No need for OperationStarted and OperationCompleted calls here; - // this code is invoked through await support and will have a way - // to observe its start/complete behavior, either through returned - // Task objects or the async method builder's interaction with the - // SynchronizationContext object. - // - _context.Post(c => ((Action)c)(), _callback); - } - else - { - _callback(); - } - } - } - - /// - /// Gets the last element of the subject, potentially blocking until the subject completes successfully or exceptionally. - /// - /// The last element of the subject. Throws an InvalidOperationException if no element was received. - /// The source sequence is empty. - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate", Justification = "Await pattern for C# and VB compilers.")] - public T GetResult() - { - if (!isStopped) - { - var e = new ManualResetEvent(false); - OnCompleted(() => e.Set(), false); - e.WaitOne(); - } - - if (lastError != null) - { - lastError.Throw(); - } - - if (!hasValue) - throw new InvalidOperationException("NO_ELEMENTS"); - - return lastValue; - } -#endif - } -} diff --git a/Assets/Plugins/UniRx/Scripts/Subjects/AsyncSubject.cs.meta b/Assets/Plugins/UniRx/Scripts/Subjects/AsyncSubject.cs.meta deleted file mode 100644 index b994cf8..0000000 --- a/Assets/Plugins/UniRx/Scripts/Subjects/AsyncSubject.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 137cd44250b484d4ba2390d510f8423f -timeCreated: 1455373897 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Subjects/BehaviorSubject.cs b/Assets/Plugins/UniRx/Scripts/Subjects/BehaviorSubject.cs deleted file mode 100644 index 906573b..0000000 --- a/Assets/Plugins/UniRx/Scripts/Subjects/BehaviorSubject.cs +++ /dev/null @@ -1,204 +0,0 @@ -using System; -using UniRx.InternalUtil; - -namespace UniRx -{ - public sealed class BehaviorSubject : ISubject, IDisposable, IOptimizedObservable - { - object observerLock = new object(); - - bool isStopped; - bool isDisposed; - T lastValue; - Exception lastError; - IObserver outObserver = EmptyObserver.Instance; - - public BehaviorSubject(T defaultValue) - { - lastValue = defaultValue; - } - - public T Value - { - get - { - ThrowIfDisposed(); - if (lastError != null) lastError.Throw(); - return lastValue; - } - } - - public bool HasObservers - { - get - { - return !(outObserver is EmptyObserver) && !isStopped && !isDisposed; - } - } - - public void OnCompleted() - { - IObserver old; - lock (observerLock) - { - ThrowIfDisposed(); - if (isStopped) return; - - old = outObserver; - outObserver = EmptyObserver.Instance; - isStopped = true; - } - - old.OnCompleted(); - } - - public void OnError(Exception error) - { - if (error == null) throw new ArgumentNullException("error"); - - IObserver old; - lock (observerLock) - { - ThrowIfDisposed(); - if (isStopped) return; - - old = outObserver; - outObserver = EmptyObserver.Instance; - isStopped = true; - lastError = error; - } - - old.OnError(error); - } - - public void OnNext(T value) - { - IObserver current; - lock (observerLock) - { - if (isStopped) return; - - lastValue = value; - current = outObserver; - } - - current.OnNext(value); - } - - public IDisposable Subscribe(IObserver observer) - { - if (observer == null) throw new ArgumentNullException("observer"); - - var ex = default(Exception); - var v = default(T); - var subscription = default(Subscription); - - lock (observerLock) - { - ThrowIfDisposed(); - if (!isStopped) - { - var listObserver = outObserver as ListObserver; - if (listObserver != null) - { - outObserver = listObserver.Add(observer); - } - else - { - var current = outObserver; - if (current is EmptyObserver) - { - outObserver = observer; - } - else - { - outObserver = new ListObserver(new ImmutableList>(new[] { current, observer })); - } - } - - v = lastValue; - subscription = new Subscription(this, observer); - } - else - { - ex = lastError; - } - } - - if (subscription != null) - { - observer.OnNext(v); - return subscription; - } - else if (ex != null) - { - observer.OnError(ex); - } - else - { - observer.OnCompleted(); - } - - return Disposable.Empty; - } - - public void Dispose() - { - lock (observerLock) - { - isDisposed = true; - outObserver = DisposedObserver.Instance; - lastError = null; - lastValue = default(T); - } - } - - void ThrowIfDisposed() - { - if (isDisposed) throw new ObjectDisposedException(""); - } - - public bool IsRequiredSubscribeOnCurrentThread() - { - return false; - } - - class Subscription : IDisposable - { - readonly object gate = new object(); - BehaviorSubject parent; - IObserver unsubscribeTarget; - - public Subscription(BehaviorSubject parent, IObserver unsubscribeTarget) - { - this.parent = parent; - this.unsubscribeTarget = unsubscribeTarget; - } - - public void Dispose() - { - lock (gate) - { - if (parent != null) - { - lock (parent.observerLock) - { - var listObserver = parent.outObserver as ListObserver; - if (listObserver != null) - { - parent.outObserver = listObserver.Remove(unsubscribeTarget); - } - else - { - parent.outObserver = EmptyObserver.Instance; - } - - unsubscribeTarget = null; - parent = null; - } - } - } - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Subjects/BehaviorSubject.cs.meta b/Assets/Plugins/UniRx/Scripts/Subjects/BehaviorSubject.cs.meta deleted file mode 100644 index b679d0d..0000000 --- a/Assets/Plugins/UniRx/Scripts/Subjects/BehaviorSubject.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 2fa461d2fc0c4ec4999e0b9aff16dd47 -timeCreated: 1455373898 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Subjects/ConnectableObservable.cs b/Assets/Plugins/UniRx/Scripts/Subjects/ConnectableObservable.cs deleted file mode 100644 index 70060af..0000000 --- a/Assets/Plugins/UniRx/Scripts/Subjects/ConnectableObservable.cs +++ /dev/null @@ -1,71 +0,0 @@ -using System; - -namespace UniRx -{ - public interface IConnectableObservable : IObservable - { - IDisposable Connect(); - } - - public static partial class Observable - { - class ConnectableObservable : IConnectableObservable - { - readonly IObservable source; - readonly ISubject subject; - readonly object gate = new object(); - Connection connection; - - public ConnectableObservable(IObservable source, ISubject subject) - { - this.source = source.AsObservable(); - this.subject = subject; - } - - public IDisposable Connect() - { - lock (gate) - { - // don't subscribe twice - if (connection == null) - { - var subscription = source.Subscribe(subject); - connection = new Connection(this, subscription); - } - - return connection; - } - } - - public IDisposable Subscribe(IObserver observer) - { - return subject.Subscribe(observer); - } - - class Connection : IDisposable - { - readonly ConnectableObservable parent; - IDisposable subscription; - - public Connection(ConnectableObservable parent, IDisposable subscription) - { - this.parent = parent; - this.subscription = subscription; - } - - public void Dispose() - { - lock (parent.gate) - { - if (subscription != null) - { - subscription.Dispose(); - subscription = null; - parent.connection = null; - } - } - } - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Subjects/ConnectableObservable.cs.meta b/Assets/Plugins/UniRx/Scripts/Subjects/ConnectableObservable.cs.meta deleted file mode 100644 index d407f17..0000000 --- a/Assets/Plugins/UniRx/Scripts/Subjects/ConnectableObservable.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 8de419b467eded246bc4fc5e70859f73 -timeCreated: 1455373900 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Subjects/ISubject.cs b/Assets/Plugins/UniRx/Scripts/Subjects/ISubject.cs deleted file mode 100644 index b6caca7..0000000 --- a/Assets/Plugins/UniRx/Scripts/Subjects/ISubject.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace UniRx -{ - public interface ISubject : IObserver, IObservable - { - } - - public interface ISubject : ISubject, IObserver, IObservable - { - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Subjects/ISubject.cs.meta b/Assets/Plugins/UniRx/Scripts/Subjects/ISubject.cs.meta deleted file mode 100644 index e0c92e5..0000000 --- a/Assets/Plugins/UniRx/Scripts/Subjects/ISubject.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: e9dbcd28e4f3965408744e0ee03b7bc8 -timeCreated: 1455373901 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Subjects/ReplaySubject.cs b/Assets/Plugins/UniRx/Scripts/Subjects/ReplaySubject.cs deleted file mode 100644 index 0f495ab..0000000 --- a/Assets/Plugins/UniRx/Scripts/Subjects/ReplaySubject.cs +++ /dev/null @@ -1,251 +0,0 @@ -using System; -using System.Collections.Generic; -using UniRx.InternalUtil; - -namespace UniRx -{ - public sealed class ReplaySubject : ISubject, IOptimizedObservable, IDisposable - { - object observerLock = new object(); - - bool isStopped; - bool isDisposed; - Exception lastError; - IObserver outObserver = EmptyObserver.Instance; - - readonly int bufferSize; - readonly TimeSpan window; - readonly DateTimeOffset startTime; - readonly IScheduler scheduler; - Queue> queue = new Queue>(); - - - public ReplaySubject() - : this(int.MaxValue, TimeSpan.MaxValue, Scheduler.DefaultSchedulers.Iteration) - { - } - - public ReplaySubject(IScheduler scheduler) - : this(int.MaxValue, TimeSpan.MaxValue, scheduler) - { - } - - public ReplaySubject(int bufferSize) - : this(bufferSize, TimeSpan.MaxValue, Scheduler.DefaultSchedulers.Iteration) - { - } - - public ReplaySubject(int bufferSize, IScheduler scheduler) - : this(bufferSize, TimeSpan.MaxValue, scheduler) - { - } - - public ReplaySubject(TimeSpan window) - : this(int.MaxValue, window, Scheduler.DefaultSchedulers.Iteration) - { - } - - public ReplaySubject(TimeSpan window, IScheduler scheduler) - : this(int.MaxValue, window, scheduler) - { - } - - // full constructor - public ReplaySubject(int bufferSize, TimeSpan window, IScheduler scheduler) - { - if (bufferSize < 0) throw new ArgumentOutOfRangeException("bufferSize"); - if (window < TimeSpan.Zero) throw new ArgumentOutOfRangeException("window"); - if (scheduler == null) throw new ArgumentNullException("scheduler"); - - this.bufferSize = bufferSize; - this.window = window; - this.scheduler = scheduler; - startTime = scheduler.Now; - } - - void Trim() - { - var elapsedTime = Scheduler.Normalize(scheduler.Now - startTime); - - while (queue.Count > bufferSize) - { - queue.Dequeue(); - } - while (queue.Count > 0 && elapsedTime.Subtract(queue.Peek().Interval).CompareTo(window) > 0) - { - queue.Dequeue(); - } - } - - public void OnCompleted() - { - IObserver old; - lock (observerLock) - { - ThrowIfDisposed(); - if (isStopped) return; - - old = outObserver; - outObserver = EmptyObserver.Instance; - isStopped = true; - Trim(); - } - - old.OnCompleted(); - } - - public void OnError(Exception error) - { - if (error == null) throw new ArgumentNullException("error"); - - IObserver old; - lock (observerLock) - { - ThrowIfDisposed(); - if (isStopped) return; - - old = outObserver; - outObserver = EmptyObserver.Instance; - isStopped = true; - lastError = error; - Trim(); - } - - old.OnError(error); - } - - public void OnNext(T value) - { - IObserver current; - lock (observerLock) - { - ThrowIfDisposed(); - if (isStopped) return; - - // enQ - queue.Enqueue(new TimeInterval(value, scheduler.Now - startTime)); - Trim(); - - current = outObserver; - } - - current.OnNext(value); - } - - public IDisposable Subscribe(IObserver observer) - { - if (observer == null) throw new ArgumentNullException("observer"); - - var ex = default(Exception); - var subscription = default(Subscription); - - lock (observerLock) - { - ThrowIfDisposed(); - if (!isStopped) - { - var listObserver = outObserver as ListObserver; - if (listObserver != null) - { - outObserver = listObserver.Add(observer); - } - else - { - var current = outObserver; - if (current is EmptyObserver) - { - outObserver = observer; - } - else - { - outObserver = new ListObserver(new ImmutableList>(new[] { current, observer })); - } - } - - subscription = new Subscription(this, observer); - } - - ex = lastError; - Trim(); - foreach (var item in queue) - { - observer.OnNext(item.Value); - } - } - - if (subscription != null) - { - return subscription; - } - else if (ex != null) - { - observer.OnError(ex); - } - else - { - observer.OnCompleted(); - } - - return Disposable.Empty; - } - - public void Dispose() - { - lock (observerLock) - { - isDisposed = true; - outObserver = DisposedObserver.Instance; - lastError = null; - queue = null; - } - } - - void ThrowIfDisposed() - { - if (isDisposed) throw new ObjectDisposedException(""); - } - - public bool IsRequiredSubscribeOnCurrentThread() - { - return false; - } - - class Subscription : IDisposable - { - readonly object gate = new object(); - ReplaySubject parent; - IObserver unsubscribeTarget; - - public Subscription(ReplaySubject parent, IObserver unsubscribeTarget) - { - this.parent = parent; - this.unsubscribeTarget = unsubscribeTarget; - } - - public void Dispose() - { - lock (gate) - { - if (parent != null) - { - lock (parent.observerLock) - { - var listObserver = parent.outObserver as ListObserver; - if (listObserver != null) - { - parent.outObserver = listObserver.Remove(unsubscribeTarget); - } - else - { - parent.outObserver = EmptyObserver.Instance; - } - - unsubscribeTarget = null; - parent = null; - } - } - } - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Subjects/ReplaySubject.cs.meta b/Assets/Plugins/UniRx/Scripts/Subjects/ReplaySubject.cs.meta deleted file mode 100644 index 5275283..0000000 --- a/Assets/Plugins/UniRx/Scripts/Subjects/ReplaySubject.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: d9b0c2f29645e1f468259893bf9afb68 -timeCreated: 1455373901 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Subjects/Subject.cs b/Assets/Plugins/UniRx/Scripts/Subjects/Subject.cs deleted file mode 100644 index c6e61fd..0000000 --- a/Assets/Plugins/UniRx/Scripts/Subjects/Subject.cs +++ /dev/null @@ -1,169 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using UniRx.InternalUtil; - -namespace UniRx -{ - public sealed class Subject : ISubject, IDisposable, IOptimizedObservable - { - object observerLock = new object(); - - bool isStopped; - bool isDisposed; - Exception lastError; - IObserver outObserver = EmptyObserver.Instance; - - public bool HasObservers - { - get - { - return !(outObserver is EmptyObserver) && !isStopped && !isDisposed; - } - } - - public void OnCompleted() - { - IObserver old; - lock (observerLock) - { - ThrowIfDisposed(); - if (isStopped) return; - - old = outObserver; - outObserver = EmptyObserver.Instance; - isStopped = true; - } - - old.OnCompleted(); - } - - public void OnError(Exception error) - { - if (error == null) throw new ArgumentNullException("error"); - - IObserver old; - lock (observerLock) - { - ThrowIfDisposed(); - if (isStopped) return; - - old = outObserver; - outObserver = EmptyObserver.Instance; - isStopped = true; - lastError = error; - } - - old.OnError(error); - } - - public void OnNext(T value) - { - outObserver.OnNext(value); - } - - public IDisposable Subscribe(IObserver observer) - { - if (observer == null) throw new ArgumentNullException("observer"); - - var ex = default(Exception); - - lock (observerLock) - { - ThrowIfDisposed(); - if (!isStopped) - { - var listObserver = outObserver as ListObserver; - if (listObserver != null) - { - outObserver = listObserver.Add(observer); - } - else - { - var current = outObserver; - if (current is EmptyObserver) - { - outObserver = observer; - } - else - { - outObserver = new ListObserver(new ImmutableList>(new[] { current, observer })); - } - } - - return new Subscription(this, observer); - } - - ex = lastError; - } - - if (ex != null) - { - observer.OnError(ex); - } - else - { - observer.OnCompleted(); - } - - return Disposable.Empty; - } - - public void Dispose() - { - lock (observerLock) - { - isDisposed = true; - outObserver = DisposedObserver.Instance; - } - } - - void ThrowIfDisposed() - { - if (isDisposed) throw new ObjectDisposedException(""); - } - - public bool IsRequiredSubscribeOnCurrentThread() - { - return false; - } - - class Subscription : IDisposable - { - readonly object gate = new object(); - Subject parent; - IObserver unsubscribeTarget; - - public Subscription(Subject parent, IObserver unsubscribeTarget) - { - this.parent = parent; - this.unsubscribeTarget = unsubscribeTarget; - } - - public void Dispose() - { - lock (gate) - { - if (parent != null) - { - lock (parent.observerLock) - { - var listObserver = parent.outObserver as ListObserver; - if (listObserver != null) - { - parent.outObserver = listObserver.Remove(unsubscribeTarget); - } - else - { - parent.outObserver = EmptyObserver.Instance; - } - - unsubscribeTarget = null; - parent = null; - } - } - } - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Subjects/Subject.cs.meta b/Assets/Plugins/UniRx/Scripts/Subjects/Subject.cs.meta deleted file mode 100644 index 4769776..0000000 --- a/Assets/Plugins/UniRx/Scripts/Subjects/Subject.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: d5fdc90caca9cbe4b9cd9c3fae81e7f6 -timeCreated: 1455373901 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Subjects/SubjectExtensions.cs b/Assets/Plugins/UniRx/Scripts/Subjects/SubjectExtensions.cs deleted file mode 100644 index b85540c..0000000 --- a/Assets/Plugins/UniRx/Scripts/Subjects/SubjectExtensions.cs +++ /dev/null @@ -1,61 +0,0 @@ -using System; - -namespace UniRx -{ - public static class SubjectExtensions - { - public static ISubject Synchronize(this ISubject subject) - { - return new AnonymousSubject((subject as IObserver).Synchronize(), subject); - } - - public static ISubject Synchronize(this ISubject subject, object gate) - { - return new AnonymousSubject((subject as IObserver).Synchronize(gate), subject); - } - - class AnonymousSubject : ISubject - { - readonly IObserver observer; - readonly IObservable observable; - - public AnonymousSubject(IObserver observer, IObservable observable) - { - this.observer = observer; - this.observable = observable; - } - - public void OnCompleted() - { - observer.OnCompleted(); - } - - public void OnError(Exception error) - { - if (error == null) throw new ArgumentNullException("error"); - - observer.OnError(error); - } - - public void OnNext(T value) - { - observer.OnNext(value); - } - - public IDisposable Subscribe(IObserver observer) - { - if (observer == null) throw new ArgumentNullException("observer"); - - return observable.Subscribe(observer); - } - } - - class AnonymousSubject : AnonymousSubject, ISubject - { - public AnonymousSubject(IObserver observer, IObservable observable) - : base(observer, observable) - { - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Subjects/SubjectExtensions.cs.meta b/Assets/Plugins/UniRx/Scripts/Subjects/SubjectExtensions.cs.meta deleted file mode 100644 index 9377a3d..0000000 --- a/Assets/Plugins/UniRx/Scripts/Subjects/SubjectExtensions.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 359bf19588606a14fb0edc6efa97deaf -timeCreated: 1455373898 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/System.meta b/Assets/Plugins/UniRx/Scripts/System.meta deleted file mode 100644 index 83b32b3..0000000 --- a/Assets/Plugins/UniRx/Scripts/System.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 7ac7a6b2ea7d4b448b2ac08003f2f130 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/System/IObservable.cs b/Assets/Plugins/UniRx/Scripts/System/IObservable.cs deleted file mode 100644 index f590a3c..0000000 --- a/Assets/Plugins/UniRx/Scripts/System/IObservable.cs +++ /dev/null @@ -1,23 +0,0 @@ -// defined from .NET Framework 4.0 and NETFX_CORE - -using System; - -#if !(NETFX_CORE || NET_4_6 || NET_STANDARD_2_0 || UNITY_WSA_10_0) - -namespace UniRx -{ - public interface IObservable - { - IDisposable Subscribe(IObserver observer); - } -} - -#endif - -namespace UniRx -{ - public interface IGroupedObservable : IObservable - { - TKey Key { get; } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/System/IObservable.cs.meta b/Assets/Plugins/UniRx/Scripts/System/IObservable.cs.meta deleted file mode 100644 index 162258a..0000000 --- a/Assets/Plugins/UniRx/Scripts/System/IObservable.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 9703f7aad3c6b334badd37c1b41d0d8f -timeCreated: 1455373900 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/System/IObserver.cs b/Assets/Plugins/UniRx/Scripts/System/IObserver.cs deleted file mode 100644 index b8c8d0c..0000000 --- a/Assets/Plugins/UniRx/Scripts/System/IObserver.cs +++ /dev/null @@ -1,17 +0,0 @@ -// defined from .NET Framework 4.0 and NETFX_CORE - -#if !(NETFX_CORE || NET_4_6 || NET_STANDARD_2_0 || UNITY_WSA_10_0) - -using System; - -namespace UniRx -{ - public interface IObserver - { - void OnCompleted(); - void OnError(Exception error); - void OnNext(T value); - } -} - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/System/IObserver.cs.meta b/Assets/Plugins/UniRx/Scripts/System/IObserver.cs.meta deleted file mode 100644 index 11e3ec2..0000000 --- a/Assets/Plugins/UniRx/Scripts/System/IObserver.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 1fc7a9cec9d3b644da7dbcf18ea16270 -timeCreated: 1455373897 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/System/IOptimizedObservable.cs b/Assets/Plugins/UniRx/Scripts/System/IOptimizedObservable.cs deleted file mode 100644 index 3240813..0000000 --- a/Assets/Plugins/UniRx/Scripts/System/IOptimizedObservable.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System; - -namespace UniRx -{ - public interface IOptimizedObservable : IObservable - { - bool IsRequiredSubscribeOnCurrentThread(); - } - - public static class OptimizedObservableExtensions - { - public static bool IsRequiredSubscribeOnCurrentThread(this IObservable source) - { - var obs = source as IOptimizedObservable; - if (obs == null) return true; - - return obs.IsRequiredSubscribeOnCurrentThread(); - } - - public static bool IsRequiredSubscribeOnCurrentThread(this IObservable source, IScheduler scheduler) - { - if (scheduler == Scheduler.CurrentThread) return true; - - return IsRequiredSubscribeOnCurrentThread(source); - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/System/IOptimizedObservable.cs.meta b/Assets/Plugins/UniRx/Scripts/System/IOptimizedObservable.cs.meta deleted file mode 100644 index 0bb6cbf..0000000 --- a/Assets/Plugins/UniRx/Scripts/System/IOptimizedObservable.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 5a2d3a7c73260e14a875d62586ae28f9 -timeCreated: 1455373899 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/System/IProgress.cs b/Assets/Plugins/UniRx/Scripts/System/IProgress.cs deleted file mode 100644 index c90bea9..0000000 --- a/Assets/Plugins/UniRx/Scripts/System/IProgress.cs +++ /dev/null @@ -1,30 +0,0 @@ -// defined from .NET Framework 4.5 and NETFX_CORE - -#if !(NETFX_CORE || NET_4_6 || NET_STANDARD_2_0 || UNITY_WSA_10_0) - -using System; - -namespace UniRx -{ - public interface IProgress - { - void Report(T value); - } - - public class Progress : IProgress - { - readonly Action report; - - public Progress(Action report) - { - this.report = report; - } - - public void Report(T value) - { - report(value); - } - } -} - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/System/IProgress.cs.meta b/Assets/Plugins/UniRx/Scripts/System/IProgress.cs.meta deleted file mode 100644 index 8432314..0000000 --- a/Assets/Plugins/UniRx/Scripts/System/IProgress.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: a38a024b6babf8d48b7e32f2f8fb8686 -timeCreated: 1455373900 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/System/Tuple.cs b/Assets/Plugins/UniRx/Scripts/System/Tuple.cs deleted file mode 100644 index 22facac..0000000 --- a/Assets/Plugins/UniRx/Scripts/System/Tuple.cs +++ /dev/null @@ -1,1195 +0,0 @@ -// defined from .NET Framework 4.0 and NETFX_CORE -// This code is basaed from mono/mcs, but some performance modified -// 1. class to struct -// 2. implements IEquatable - -// note, we need to create ValueTuple or UniRxTuple... -#if !(NETFX_CORE || NET_4_6 || NET_STANDARD_2_0 || UNITY_WSA_10_0) - -using System; -using System.Collections; -using System.Collections.Generic; - -namespace UniRx -{ - public interface IStructuralEquatable - { - bool Equals(object other, IEqualityComparer comparer); - - int GetHashCode(IEqualityComparer comparer); - } - - public interface IStructuralComparable - { - int CompareTo(object other, IComparer comparer); - } - - interface ITuple - { - string ToString(); - } - - public static class Tuple - { - public static Tuple> Create - ( - T1 item1, - T2 item2, - T3 item3, - T4 item4, - T5 item5, - T6 item6, - T7 item7, - T8 item8) - { - return new Tuple>(item1, item2, item3, item4, item5, item6, item7, new Tuple(item8)); - } - - public static Tuple Create - ( - T1 item1, - T2 item2, - T3 item3, - T4 item4, - T5 item5, - T6 item6, - T7 item7) - { - return new Tuple(item1, item2, item3, item4, item5, item6, item7); - } - - public static Tuple Create - ( - T1 item1, - T2 item2, - T3 item3, - T4 item4, - T5 item5, - T6 item6) - { - return new Tuple(item1, item2, item3, item4, item5, item6); - } - - public static Tuple Create - ( - T1 item1, - T2 item2, - T3 item3, - T4 item4, - T5 item5) - { - return new Tuple(item1, item2, item3, item4, item5); - } - - public static Tuple Create - ( - T1 item1, - T2 item2, - T3 item3, - T4 item4) - { - return new Tuple(item1, item2, item3, item4); - } - - public static Tuple Create - ( - T1 item1, - T2 item2, - T3 item3) - { - return new Tuple(item1, item2, item3); - } - - public static Tuple Create - ( - T1 item1, - T2 item2) - { - return new Tuple(item1, item2); - } - - public static Tuple Create - ( - T1 item1) - { - return new Tuple(item1); - } - } - - public partial class Tuple - { - public Tuple(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6, T7 item7, TRest rest) - { - this.item1 = item1; - this.item2 = item2; - this.item3 = item3; - this.item4 = item4; - this.item5 = item5; - this.item6 = item6; - this.item7 = item7; - this.rest = rest; - - if (!(rest is ITuple)) - throw new ArgumentException("rest", "The last element of an eight element tuple must be a Tuple."); - } - } - - [Serializable] - public struct Tuple : IStructuralEquatable, IStructuralComparable, IComparable, ITuple, IEquatable> - { - T1 item1; - - public Tuple(T1 item1) - { - this.item1 = item1; - } - - public T1 Item1 - { - get { return item1; } - } - - int IComparable.CompareTo(object obj) - { - return ((IStructuralComparable)this).CompareTo(obj, Comparer.Default); - } - - int IStructuralComparable.CompareTo(object other, IComparer comparer) - { - if (other == null) return 1; - if (!(other is Tuple)) - { - throw new ArgumentException("other"); - } - var t = (Tuple)other; - return comparer.Compare(item1, t.item1); - } - - public override bool Equals(object obj) - { - return ((IStructuralEquatable)this).Equals(obj, EqualityComparer.Default); - } - - bool IStructuralEquatable.Equals(object other, IEqualityComparer comparer) - { - if (!(other is Tuple)) - return false; - - var t = (Tuple)other; - return comparer.Equals(item1, t.item1); - } - - public override int GetHashCode() - { - return EqualityComparer.Default.GetHashCode(item1); - } - - int IStructuralEquatable.GetHashCode(IEqualityComparer comparer) - { - return comparer.GetHashCode(item1); - } - - string ITuple.ToString() - { - return String.Format("{0}", item1); - } - - public override string ToString() - { - return "(" + ((ITuple)this).ToString() + ")"; - } - - public bool Equals(Tuple other) - { - return EqualityComparer.Default.Equals(item1, other.item1); - } - } - - [Serializable] - public struct Tuple : IStructuralEquatable, IStructuralComparable, IComparable, ITuple, IEquatable> - { - T1 item1; - T2 item2; - - public Tuple(T1 item1, T2 item2) - { - this.item1 = item1; - this.item2 = item2; - } - - public T1 Item1 - { - get { return item1; } - } - - public T2 Item2 - { - get { return item2; } - } - - int IComparable.CompareTo(object obj) - { - return ((IStructuralComparable)this).CompareTo(obj, Comparer.Default); - } - - int IStructuralComparable.CompareTo(object other, IComparer comparer) - { - if (other == null) return 1; - if (!(other is Tuple)) - { - throw new ArgumentException("other"); - } - var t = (Tuple)other; - - int res = comparer.Compare(item1, t.item1); - if (res != 0) return res; - return comparer.Compare(item2, t.item2); - } - - public override bool Equals(object obj) - { - return ((IStructuralEquatable)this).Equals(obj, EqualityComparer.Default); - } - - bool IStructuralEquatable.Equals(object other, IEqualityComparer comparer) - { - if (!(other is Tuple)) - return false; - - var t = (Tuple)other; - return comparer.Equals(item1, t.item1) && - comparer.Equals(item2, t.item2); - } - - public override int GetHashCode() - { - var comparer1 = EqualityComparer.Default; - var comparer2 = EqualityComparer.Default; - - int h0; - h0 = comparer1.GetHashCode(item1); - h0 = (h0 << 5) + h0 ^ comparer2.GetHashCode(item2); - return h0; - } - - int IStructuralEquatable.GetHashCode(IEqualityComparer comparer) - { - int h0; - h0 = comparer.GetHashCode(item1); - h0 = (h0 << 5) + h0 ^ comparer.GetHashCode(item2); - return h0; - } - - string ITuple.ToString() - { - return String.Format("{0}, {1}", item1, item2); - } - - public override string ToString() - { - return "(" + ((ITuple)this).ToString() + ")"; - } - - public bool Equals(Tuple other) - { - var comparer1 = EqualityComparer.Default; - var comparer2 = EqualityComparer.Default; - - return comparer1.Equals(item1, other.item1) && - comparer2.Equals(item2, other.item2); - } - } - - [Serializable] - public struct Tuple : IStructuralEquatable, IStructuralComparable, IComparable, ITuple, IEquatable> - { - T1 item1; - T2 item2; - T3 item3; - - public Tuple(T1 item1, T2 item2, T3 item3) - { - this.item1 = item1; - this.item2 = item2; - this.item3 = item3; - } - - public T1 Item1 - { - get { return item1; } - } - - public T2 Item2 - { - get { return item2; } - } - - public T3 Item3 - { - get { return item3; } - } - - int IComparable.CompareTo(object obj) - { - return ((IStructuralComparable)this).CompareTo(obj, Comparer.Default); - } - - int IStructuralComparable.CompareTo(object other, IComparer comparer) - { - if (other == null) return 1; - if (!(other is Tuple)) - { - throw new ArgumentException("other"); - } - var t = (Tuple)other; - - int res = comparer.Compare(item1, t.item1); - if (res != 0) return res; - res = comparer.Compare(item2, t.item2); - if (res != 0) return res; - return comparer.Compare(item3, t.item3); - } - - public override bool Equals(object obj) - { - return ((IStructuralEquatable)this).Equals(obj, EqualityComparer.Default); - } - - bool IStructuralEquatable.Equals(object other, IEqualityComparer comparer) - { - if (!(other is Tuple)) - return false; - - var t = (Tuple)other; - return comparer.Equals(item1, t.item1) && - comparer.Equals(item2, t.item2) && - comparer.Equals(item3, t.item3); - } - - public override int GetHashCode() - { - var comparer1 = EqualityComparer.Default; - var comparer2 = EqualityComparer.Default; - var comparer3 = EqualityComparer.Default; - - int h0; - h0 = comparer1.GetHashCode(item1); - h0 = (h0 << 5) + h0 ^ comparer2.GetHashCode(item2); - h0 = (h0 << 5) + h0 ^ comparer3.GetHashCode(item3); - return h0; - } - - int IStructuralEquatable.GetHashCode(IEqualityComparer comparer) - { - int h0; - h0 = comparer.GetHashCode(item1); - h0 = (h0 << 5) + h0 ^ comparer.GetHashCode(item2); - h0 = (h0 << 5) + h0 ^ comparer.GetHashCode(item3); - return h0; - } - - string ITuple.ToString() - { - return String.Format("{0}, {1}, {2}", item1, item2, item3); - } - - public override string ToString() - { - return "(" + ((ITuple)this).ToString() + ")"; - } - - public bool Equals(Tuple other) - { - var comparer1 = EqualityComparer.Default; - var comparer2 = EqualityComparer.Default; - var comparer3 = EqualityComparer.Default; - - return comparer1.Equals(item1, other.item1) && - comparer2.Equals(item2, other.item2) && - comparer3.Equals(item3, other.item3); - } - } - - [Serializable] - public struct Tuple : IStructuralEquatable, IStructuralComparable, IComparable, ITuple, IEquatable> - { - T1 item1; - T2 item2; - T3 item3; - T4 item4; - - public Tuple(T1 item1, T2 item2, T3 item3, T4 item4) - { - this.item1 = item1; - this.item2 = item2; - this.item3 = item3; - this.item4 = item4; - } - - public T1 Item1 - { - get { return item1; } - } - - public T2 Item2 - { - get { return item2; } - } - - public T3 Item3 - { - get { return item3; } - } - - public T4 Item4 - { - get { return item4; } - } - - int IComparable.CompareTo(object obj) - { - return ((IStructuralComparable)this).CompareTo(obj, Comparer.Default); - } - - int IStructuralComparable.CompareTo(object other, IComparer comparer) - { - if (other == null) return 1; - if (!(other is Tuple)) - { - throw new ArgumentException("other"); - } - var t = (Tuple)other; - - int res = comparer.Compare(item1, t.item1); - if (res != 0) return res; - res = comparer.Compare(item2, t.item2); - if (res != 0) return res; - res = comparer.Compare(item3, t.item3); - if (res != 0) return res; - return comparer.Compare(item4, t.item4); - } - - public override bool Equals(object obj) - { - return ((IStructuralEquatable)this).Equals(obj, EqualityComparer.Default); - } - - bool IStructuralEquatable.Equals(object other, IEqualityComparer comparer) - { - if (!(other is Tuple)) - return false; - var t = (Tuple)other; - - return comparer.Equals(item1, t.item1) && - comparer.Equals(item2, t.item2) && - comparer.Equals(item3, t.item3) && - comparer.Equals(item4, t.item4); - } - - public override int GetHashCode() - { - var comparer1 = EqualityComparer.Default; - var comparer2 = EqualityComparer.Default; - var comparer3 = EqualityComparer.Default; - var comparer4 = EqualityComparer.Default; - - int h0, h1; - h0 = comparer1.GetHashCode(item1); - h0 = (h0 << 5) + h0 ^ comparer2.GetHashCode(item2); - h1 = comparer3.GetHashCode(item3); - h1 = (h1 << 5) + h1 ^ comparer4.GetHashCode(item4); - h0 = (h0 << 5) + h0 ^ h1; - return h0; - } - - int IStructuralEquatable.GetHashCode(IEqualityComparer comparer) - { - int h0, h1; - h0 = comparer.GetHashCode(item1); - h0 = (h0 << 5) + h0 ^ comparer.GetHashCode(item2); - h1 = comparer.GetHashCode(item3); - h1 = (h1 << 5) + h1 ^ comparer.GetHashCode(item4); - h0 = (h0 << 5) + h0 ^ h1; - return h0; - } - - string ITuple.ToString() - { - return String.Format("{0}, {1}, {2}, {3}", item1, item2, item3, item4); - } - - public override string ToString() - { - return "(" + ((ITuple)this).ToString() + ")"; - } - - public bool Equals(Tuple other) - { - var comparer1 = EqualityComparer.Default; - var comparer2 = EqualityComparer.Default; - var comparer3 = EqualityComparer.Default; - var comparer4 = EqualityComparer.Default; - - return comparer1.Equals(item1, other.item1) && - comparer2.Equals(item2, other.item2) && - comparer3.Equals(item3, other.item3) && - comparer4.Equals(item4, other.item4); - } - } - - [Serializable] - public struct Tuple : IStructuralEquatable, IStructuralComparable, IComparable, ITuple, IEquatable> - { - T1 item1; - T2 item2; - T3 item3; - T4 item4; - T5 item5; - - public Tuple(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5) - { - this.item1 = item1; - this.item2 = item2; - this.item3 = item3; - this.item4 = item4; - this.item5 = item5; - } - - public T1 Item1 - { - get { return item1; } - } - - public T2 Item2 - { - get { return item2; } - } - - public T3 Item3 - { - get { return item3; } - } - - public T4 Item4 - { - get { return item4; } - } - - public T5 Item5 - { - get { return item5; } - } - - int IComparable.CompareTo(object obj) - { - return ((IStructuralComparable)this).CompareTo(obj, Comparer.Default); - } - - int IStructuralComparable.CompareTo(object other, IComparer comparer) - { - if (other == null) return 1; - if (!(other is Tuple)) - { - throw new ArgumentException("other"); - } - var t = (Tuple)other; - - int res = comparer.Compare(item1, t.item1); - if (res != 0) return res; - res = comparer.Compare(item2, t.item2); - if (res != 0) return res; - res = comparer.Compare(item3, t.item3); - if (res != 0) return res; - res = comparer.Compare(item4, t.item4); - if (res != 0) return res; - return comparer.Compare(item5, t.item5); - } - - public override bool Equals(object obj) - { - return ((IStructuralEquatable)this).Equals(obj, EqualityComparer.Default); - } - - bool IStructuralEquatable.Equals(object other, IEqualityComparer comparer) - { - if (!(other is Tuple)) - return false; - var t = (Tuple)other; - - return comparer.Equals(item1, t.item1) && - comparer.Equals(item2, t.item2) && - comparer.Equals(item3, t.item3) && - comparer.Equals(item4, t.item4) && - comparer.Equals(item5, t.item5); - } - - public override int GetHashCode() - { - var comparer1 = EqualityComparer.Default; - var comparer2 = EqualityComparer.Default; - var comparer3 = EqualityComparer.Default; - var comparer4 = EqualityComparer.Default; - var comparer5 = EqualityComparer.Default; - - int h0, h1; - h0 = comparer1.GetHashCode(item1); - h0 = (h0 << 5) + h0 ^ comparer2.GetHashCode(item2); - h1 = comparer3.GetHashCode(item3); - h1 = (h1 << 5) + h1 ^ comparer4.GetHashCode(item4); - h0 = (h0 << 5) + h0 ^ h1; - h0 = (h0 << 5) + h0 ^ comparer5.GetHashCode(item5); - return h0; - } - - int IStructuralEquatable.GetHashCode(IEqualityComparer comparer) - { - int h0, h1; - h0 = comparer.GetHashCode(item1); - h0 = (h0 << 5) + h0 ^ comparer.GetHashCode(item2); - h1 = comparer.GetHashCode(item3); - h1 = (h1 << 5) + h1 ^ comparer.GetHashCode(item4); - h0 = (h0 << 5) + h0 ^ h1; - h0 = (h0 << 5) + h0 ^ comparer.GetHashCode(item5); - return h0; - } - - string ITuple.ToString() - { - return String.Format("{0}, {1}, {2}, {3}, {4}", item1, item2, item3, item4, item5); - } - - public override string ToString() - { - return "(" + ((ITuple)this).ToString() + ")"; - } - - public bool Equals(Tuple other) - { - var comparer1 = EqualityComparer.Default; - var comparer2 = EqualityComparer.Default; - var comparer3 = EqualityComparer.Default; - var comparer4 = EqualityComparer.Default; - var comparer5 = EqualityComparer.Default; - - return comparer1.Equals(item1, other.Item1) && - comparer2.Equals(item2, other.Item2) && - comparer3.Equals(item3, other.Item3) && - comparer4.Equals(item4, other.Item4) && - comparer5.Equals(item5, other.Item5); - } - } - - [Serializable] - public struct Tuple : IStructuralEquatable, IStructuralComparable, IComparable, ITuple, IEquatable> - { - T1 item1; - T2 item2; - T3 item3; - T4 item4; - T5 item5; - T6 item6; - - public Tuple(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6) - { - this.item1 = item1; - this.item2 = item2; - this.item3 = item3; - this.item4 = item4; - this.item5 = item5; - this.item6 = item6; - } - - public T1 Item1 - { - get { return item1; } - } - - public T2 Item2 - { - get { return item2; } - } - - public T3 Item3 - { - get { return item3; } - } - - public T4 Item4 - { - get { return item4; } - } - - public T5 Item5 - { - get { return item5; } - } - - public T6 Item6 - { - get { return item6; } - } - - int IComparable.CompareTo(object obj) - { - return ((IStructuralComparable)this).CompareTo(obj, Comparer.Default); - } - - int IStructuralComparable.CompareTo(object other, IComparer comparer) - { - if (other == null) return 1; - if (!(other is Tuple)) - { - throw new ArgumentException("other"); - } - var t = (Tuple)other; - - int res = comparer.Compare(item1, t.item1); - if (res != 0) return res; - res = comparer.Compare(item2, t.item2); - if (res != 0) return res; - res = comparer.Compare(item3, t.item3); - if (res != 0) return res; - res = comparer.Compare(item4, t.item4); - if (res != 0) return res; - res = comparer.Compare(item5, t.item5); - if (res != 0) return res; - return comparer.Compare(item6, t.item6); - } - - public override bool Equals(object obj) - { - return ((IStructuralEquatable)this).Equals(obj, EqualityComparer.Default); - } - - bool IStructuralEquatable.Equals(object other, IEqualityComparer comparer) - { - if (!(other is Tuple)) - return false; - var t = (Tuple)other; - - return comparer.Equals(item1, t.item1) && - comparer.Equals(item2, t.item2) && - comparer.Equals(item3, t.item3) && - comparer.Equals(item4, t.item4) && - comparer.Equals(item5, t.item5) && - comparer.Equals(item6, t.item6); - } - - public override int GetHashCode() - { - var comparer1 = EqualityComparer.Default; - var comparer2 = EqualityComparer.Default; - var comparer3 = EqualityComparer.Default; - var comparer4 = EqualityComparer.Default; - var comparer5 = EqualityComparer.Default; - var comparer6 = EqualityComparer.Default; - - int h0, h1; - h0 = comparer1.GetHashCode(item1); - h0 = (h0 << 5) + h0 ^ comparer2.GetHashCode(item2); - h1 = comparer3.GetHashCode(item3); - h1 = (h1 << 5) + h1 ^ comparer4.GetHashCode(item4); - h0 = (h0 << 5) + h0 ^ h1; - h1 = comparer5.GetHashCode(item5); - h1 = (h1 << 5) + h1 ^ comparer6.GetHashCode(item6); - h0 = (h0 << 5) + h0 ^ h1; - return h0; - } - - int IStructuralEquatable.GetHashCode(IEqualityComparer comparer) - { - int h0, h1; - h0 = comparer.GetHashCode(item1); - h0 = (h0 << 5) + h0 ^ comparer.GetHashCode(item2); - h1 = comparer.GetHashCode(item3); - h1 = (h1 << 5) + h1 ^ comparer.GetHashCode(item4); - h0 = (h0 << 5) + h0 ^ h1; - h1 = comparer.GetHashCode(item5); - h1 = (h1 << 5) + h1 ^ comparer.GetHashCode(item6); - h0 = (h0 << 5) + h0 ^ h1; - return h0; - } - - string ITuple.ToString() - { - return String.Format("{0}, {1}, {2}, {3}, {4}, {5}", item1, item2, item3, item4, item5, item6); - } - - public override string ToString() - { - return "(" + ((ITuple)this).ToString() + ")"; - } - - public bool Equals(Tuple other) - { - var comparer1 = EqualityComparer.Default; - var comparer2 = EqualityComparer.Default; - var comparer3 = EqualityComparer.Default; - var comparer4 = EqualityComparer.Default; - var comparer5 = EqualityComparer.Default; - var comparer6 = EqualityComparer.Default; - - return comparer1.Equals(item1, other.Item1) && - comparer2.Equals(item2, other.Item2) && - comparer3.Equals(item3, other.Item3) && - comparer4.Equals(item4, other.Item4) && - comparer5.Equals(item5, other.Item5) && - comparer6.Equals(item6, other.Item6); - } - } - - [Serializable] - public struct Tuple : IStructuralEquatable, IStructuralComparable, IComparable, ITuple, IEquatable> - { - T1 item1; - T2 item2; - T3 item3; - T4 item4; - T5 item5; - T6 item6; - T7 item7; - - public Tuple(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6, T7 item7) - { - this.item1 = item1; - this.item2 = item2; - this.item3 = item3; - this.item4 = item4; - this.item5 = item5; - this.item6 = item6; - this.item7 = item7; - } - - public T1 Item1 - { - get { return item1; } - } - - public T2 Item2 - { - get { return item2; } - } - - public T3 Item3 - { - get { return item3; } - } - - public T4 Item4 - { - get { return item4; } - } - - public T5 Item5 - { - get { return item5; } - } - - public T6 Item6 - { - get { return item6; } - } - - public T7 Item7 - { - get { return item7; } - } - - int IComparable.CompareTo(object obj) - { - return ((IStructuralComparable)this).CompareTo(obj, Comparer.Default); - } - - int IStructuralComparable.CompareTo(object other, IComparer comparer) - { - if (other == null) return 1; - if (!(other is Tuple)) - { - throw new ArgumentException("other"); - } - var t = (Tuple)other; - - int res = comparer.Compare(item1, t.item1); - if (res != 0) return res; - res = comparer.Compare(item2, t.item2); - if (res != 0) return res; - res = comparer.Compare(item3, t.item3); - if (res != 0) return res; - res = comparer.Compare(item4, t.item4); - if (res != 0) return res; - res = comparer.Compare(item5, t.item5); - if (res != 0) return res; - res = comparer.Compare(item6, t.item6); - if (res != 0) return res; - return comparer.Compare(item7, t.item7); - } - - public override bool Equals(object obj) - { - return ((IStructuralEquatable)this).Equals(obj, EqualityComparer.Default); - } - - bool IStructuralEquatable.Equals(object other, IEqualityComparer comparer) - { - if (!(other is Tuple)) - return false; - var t = (Tuple)other; - - return comparer.Equals(item1, t.item1) && - comparer.Equals(item2, t.item2) && - comparer.Equals(item3, t.item3) && - comparer.Equals(item4, t.item4) && - comparer.Equals(item5, t.item5) && - comparer.Equals(item6, t.item6) && - comparer.Equals(item7, t.item7); - } - - public override int GetHashCode() - { - var comparer1 = EqualityComparer.Default; - var comparer2 = EqualityComparer.Default; - var comparer3 = EqualityComparer.Default; - var comparer4 = EqualityComparer.Default; - var comparer5 = EqualityComparer.Default; - var comparer6 = EqualityComparer.Default; - var comparer7 = EqualityComparer.Default; - - int h0, h1; - h0 = comparer1.GetHashCode(item1); - h0 = (h0 << 5) + h0 ^ comparer2.GetHashCode(item2); - h1 = comparer3.GetHashCode(item3); - h1 = (h1 << 5) + h1 ^ comparer4.GetHashCode(item4); - h0 = (h0 << 5) + h0 ^ h1; - h1 = comparer5.GetHashCode(item5); - h1 = (h1 << 5) + h1 ^ comparer6.GetHashCode(item6); - h1 = (h1 << 5) + h1 ^ comparer7.GetHashCode(item7); - h0 = (h0 << 5) + h0 ^ h1; - return h0; - } - - int IStructuralEquatable.GetHashCode(IEqualityComparer comparer) - { - int h0, h1; - h0 = comparer.GetHashCode(item1); - h0 = (h0 << 5) + h0 ^ comparer.GetHashCode(item2); - h1 = comparer.GetHashCode(item3); - h1 = (h1 << 5) + h1 ^ comparer.GetHashCode(item4); - h0 = (h0 << 5) + h0 ^ h1; - h1 = comparer.GetHashCode(item5); - h1 = (h1 << 5) + h1 ^ comparer.GetHashCode(item6); - h1 = (h1 << 5) + h1 ^ comparer.GetHashCode(item7); - h0 = (h0 << 5) + h0 ^ h1; - return h0; - } - - string ITuple.ToString() - { - return String.Format("{0}, {1}, {2}, {3}, {4}, {5}, {6}", item1, item2, item3, item4, item5, item6, item7); - } - - public override string ToString() - { - return "(" + ((ITuple)this).ToString() + ")"; - } - - public bool Equals(Tuple other) - { - var comparer1 = EqualityComparer.Default; - var comparer2 = EqualityComparer.Default; - var comparer3 = EqualityComparer.Default; - var comparer4 = EqualityComparer.Default; - var comparer5 = EqualityComparer.Default; - var comparer6 = EqualityComparer.Default; - var comparer7 = EqualityComparer.Default; - - return comparer1.Equals(item1, other.Item1) && - comparer2.Equals(item2, other.Item2) && - comparer3.Equals(item3, other.Item3) && - comparer4.Equals(item4, other.Item4) && - comparer5.Equals(item5, other.Item5) && - comparer6.Equals(item6, other.Item6) && - comparer7.Equals(item7, other.Item7); - } - } - - [Serializable] - public partial class Tuple : IStructuralEquatable, IStructuralComparable, IComparable, ITuple, IEquatable> - { - T1 item1; - T2 item2; - T3 item3; - T4 item4; - T5 item5; - T6 item6; - T7 item7; - TRest rest; - - public T1 Item1 - { - get { return item1; } - } - - public T2 Item2 - { - get { return item2; } - } - - public T3 Item3 - { - get { return item3; } - } - - public T4 Item4 - { - get { return item4; } - } - - public T5 Item5 - { - get { return item5; } - } - - public T6 Item6 - { - get { return item6; } - } - - public T7 Item7 - { - get { return item7; } - } - - public TRest Rest - { - get { return rest; } - } - - int IComparable.CompareTo(object obj) - { - return ((IStructuralComparable)this).CompareTo(obj, Comparer.Default); - } - - int IStructuralComparable.CompareTo(object other, IComparer comparer) - { - if (other == null) return 1; - if (!(other is Tuple)) - { - throw new ArgumentException("other"); - } - var t = (Tuple)other; - - int res = comparer.Compare(item1, t.item1); - if (res != 0) return res; - res = comparer.Compare(item2, t.item2); - if (res != 0) return res; - res = comparer.Compare(item3, t.item3); - if (res != 0) return res; - res = comparer.Compare(item4, t.item4); - if (res != 0) return res; - res = comparer.Compare(item5, t.item5); - if (res != 0) return res; - res = comparer.Compare(item6, t.item6); - if (res != 0) return res; - res = comparer.Compare(item7, t.item7); - if (res != 0) return res; - return comparer.Compare(rest, t.rest); - } - - public override bool Equals(object obj) - { - return ((IStructuralEquatable)this).Equals(obj, EqualityComparer.Default); - } - - bool IStructuralEquatable.Equals(object other, IEqualityComparer comparer) - { - if (!(other is Tuple)) - return false; - var t = (Tuple)other; - - return comparer.Equals(item1, t.item1) && - comparer.Equals(item2, t.item2) && - comparer.Equals(item3, t.item3) && - comparer.Equals(item4, t.item4) && - comparer.Equals(item5, t.item5) && - comparer.Equals(item6, t.item6) && - comparer.Equals(item7, t.item7) && - comparer.Equals(rest, t.rest); - } - - public override int GetHashCode() - { - var comparer1 = EqualityComparer.Default; - var comparer2 = EqualityComparer.Default; - var comparer3 = EqualityComparer.Default; - var comparer4 = EqualityComparer.Default; - var comparer5 = EqualityComparer.Default; - var comparer6 = EqualityComparer.Default; - var comparer7 = EqualityComparer.Default; - var comparer8 = EqualityComparer.Default; - - int h0, h1, h2; - h0 = comparer1.GetHashCode(item1); - h0 = (h0 << 5) + h0 ^ comparer2.GetHashCode(item2); - h1 = comparer3.GetHashCode(item3); - h1 = (h1 << 5) + h1 ^ comparer4.GetHashCode(item4); - h0 = (h0 << 5) + h0 ^ h1; - h1 = comparer5.GetHashCode(item5); - h1 = (h1 << 5) + h1 ^ comparer6.GetHashCode(item6); - h2 = comparer7.GetHashCode(item7); - h2 = (h2 << 5) + h2 ^ comparer8.GetHashCode(rest); - h1 = (h1 << 5) + h1 ^ h2; - h0 = (h0 << 5) + h0 ^ h1; - return h0; - } - - int IStructuralEquatable.GetHashCode(IEqualityComparer comparer) - { - int h0, h1, h2; - h0 = comparer.GetHashCode(item1); - h0 = (h0 << 5) + h0 ^ comparer.GetHashCode(item2); - h1 = comparer.GetHashCode(item3); - h1 = (h1 << 5) + h1 ^ comparer.GetHashCode(item4); - h0 = (h0 << 5) + h0 ^ h1; - h1 = comparer.GetHashCode(item5); - h1 = (h1 << 5) + h1 ^ comparer.GetHashCode(item6); - h2 = comparer.GetHashCode(item7); - h2 = (h2 << 5) + h2 ^ comparer.GetHashCode(rest); - h1 = (h1 << 5) + h1 ^ h2; - h0 = (h0 << 5) + h0 ^ h1; - return h0; - } - - string ITuple.ToString() - { - return String.Format("{0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}", item1, item2, item3, item4, item5, item6, item7, ((ITuple)rest).ToString()); - } - - public override string ToString() - { - return "(" + ((ITuple)this).ToString() + ")"; - } - - public bool Equals(Tuple other) - { - var comparer1 = EqualityComparer.Default; - var comparer2 = EqualityComparer.Default; - var comparer3 = EqualityComparer.Default; - var comparer4 = EqualityComparer.Default; - var comparer5 = EqualityComparer.Default; - var comparer6 = EqualityComparer.Default; - var comparer7 = EqualityComparer.Default; - var comparer8 = EqualityComparer.Default; - - return comparer1.Equals(item1, other.Item1) && - comparer2.Equals(item2, other.Item2) && - comparer3.Equals(item3, other.Item3) && - comparer4.Equals(item4, other.Item4) && - comparer5.Equals(item5, other.Item5) && - comparer6.Equals(item6, other.Item6) && - comparer7.Equals(item7, other.Item7) && - comparer8.Equals(rest, other.rest); - } - } -} - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/System/Tuple.cs.meta b/Assets/Plugins/UniRx/Scripts/System/Tuple.cs.meta deleted file mode 100644 index 376a26d..0000000 --- a/Assets/Plugins/UniRx/Scripts/System/Tuple.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: be811500a5640704b92de622c9202d48 -timeCreated: 1455373901 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/System/Unit.cs b/Assets/Plugins/UniRx/Scripts/System/Unit.cs deleted file mode 100644 index 87b31c2..0000000 --- a/Assets/Plugins/UniRx/Scripts/System/Unit.cs +++ /dev/null @@ -1,41 +0,0 @@ -using System; - -namespace UniRx -{ - [Serializable] - public struct Unit : IEquatable - { - static readonly Unit @default = new Unit(); - - public static Unit Default { get { return @default; } } - - public static bool operator ==(Unit first, Unit second) - { - return true; - } - - public static bool operator !=(Unit first, Unit second) - { - return false; - } - - public bool Equals(Unit other) - { - return true; - } - public override bool Equals(object obj) - { - return obj is Unit; - } - - public override int GetHashCode() - { - return 0; - } - - public override string ToString() - { - return "()"; - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/System/Unit.cs.meta b/Assets/Plugins/UniRx/Scripts/System/Unit.cs.meta deleted file mode 100644 index 1c9fe58..0000000 --- a/Assets/Plugins/UniRx/Scripts/System/Unit.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 14f6907c0ae17e64c8fc34f08c3038a4 -timeCreated: 1455373897 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Tasks.meta b/Assets/Plugins/UniRx/Scripts/Tasks.meta deleted file mode 100644 index d42cab9..0000000 --- a/Assets/Plugins/UniRx/Scripts/Tasks.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 80e44edc9cb05404baa47314fc5ae708 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Tasks/TaskObservableExtensions.cs b/Assets/Plugins/UniRx/Scripts/Tasks/TaskObservableExtensions.cs deleted file mode 100644 index 2a5f713..0000000 --- a/Assets/Plugins/UniRx/Scripts/Tasks/TaskObservableExtensions.cs +++ /dev/null @@ -1,367 +0,0 @@ -// this code is borrowed from RxOfficial(rx.codeplex.com) and modified - -#if (NET_4_6 || NET_STANDARD_2_0) - -using System; -using System.Threading.Tasks; -using System.Threading; - -namespace UniRx -{ - /// - /// Provides a set of static methods for converting tasks to observable sequences. - /// - public static class TaskObservableExtensions - { - /// - /// Returns an observable sequence that signals when the task completes. - /// - /// Task to convert to an observable sequence. - /// An observable sequence that produces a unit value when the task completes, or propagates the exception produced by the task. - /// is null. - /// If the specified task object supports cancellation, consider using instead. - public static IObservable ToObservable(this Task task) - { - if (task == null) - throw new ArgumentNullException("task"); - - return ToObservableImpl(task, null); - } - - /// - /// Returns an observable sequence that signals when the task completes. - /// - /// Task to convert to an observable sequence. - /// Scheduler on which to notify observers about completion, cancellation or failure. - /// An observable sequence that produces a unit value when the task completes, or propagates the exception produced by the task. - /// is null or is null. - /// If the specified task object supports cancellation, consider using instead. - public static IObservable ToObservable(this Task task, IScheduler scheduler) - { - if (task == null) - throw new ArgumentNullException("task"); - if (scheduler == null) - throw new ArgumentNullException("scheduler"); - - return ToObservableImpl(task, scheduler); - } - - private static IObservable ToObservableImpl(Task task, IScheduler scheduler) - { - var res = default(IObservable); - - if (task.IsCompleted) - { - scheduler = scheduler ?? Scheduler.Immediate; - - switch (task.Status) - { - case TaskStatus.RanToCompletion: - res = Observable.Return(Unit.Default, scheduler); - break; - case TaskStatus.Faulted: - res = Observable.Throw(task.Exception.InnerException, scheduler); - break; - case TaskStatus.Canceled: - res = Observable.Throw(new TaskCanceledException(task), scheduler); - break; - } - } - else - { - // - // Separate method to avoid closure in synchronous completion case. - // - res = ToObservableSlow(task, scheduler); - } - - return res; - } - - private static IObservable ToObservableSlow(Task task, IScheduler scheduler) - { - var subject = new AsyncSubject(); - - var options = GetTaskContinuationOptions(scheduler); - - task.ContinueWith(t => ToObservableDone(task, subject), options); - - return ToObservableResult(subject, scheduler); - } - - private static void ToObservableDone(Task task, IObserver subject) - { - switch (task.Status) - { - case TaskStatus.RanToCompletion: - subject.OnNext(Unit.Default); - subject.OnCompleted(); - break; - case TaskStatus.Faulted: - subject.OnError(task.Exception.InnerException); - break; - case TaskStatus.Canceled: - subject.OnError(new TaskCanceledException(task)); - break; - } - } - - /// - /// Returns an observable sequence that propagates the result of the task. - /// - /// The type of the result produced by the task. - /// Task to convert to an observable sequence. - /// An observable sequence that produces the task's result, or propagates the exception produced by the task. - /// is null. - /// If the specified task object supports cancellation, consider using instead. - public static IObservable ToObservable(this Task task) - { - if (task == null) - throw new ArgumentNullException("task"); - - return ToObservableImpl(task, null); - } - - /// - /// Returns an observable sequence that propagates the result of the task. - /// - /// The type of the result produced by the task. - /// Task to convert to an observable sequence. - /// Scheduler on which to notify observers about completion, cancellation or failure. - /// An observable sequence that produces the task's result, or propagates the exception produced by the task. - /// is null or is null. - /// If the specified task object supports cancellation, consider using instead. - public static IObservable ToObservable(this Task task, IScheduler scheduler) - { - if (task == null) - throw new ArgumentNullException("task"); - if (scheduler == null) - throw new ArgumentNullException("scheduler"); - - return ToObservableImpl(task, scheduler); - } - - private static IObservable ToObservableImpl(Task task, IScheduler scheduler) - { - var res = default(IObservable); - - if (task.IsCompleted) - { - scheduler = scheduler ?? Scheduler.Immediate; - - switch (task.Status) - { - case TaskStatus.RanToCompletion: - res = Observable.Return(task.Result, scheduler); - break; - case TaskStatus.Faulted: - res = Observable.Throw(task.Exception.InnerException, scheduler); - break; - case TaskStatus.Canceled: - res = Observable.Throw(new TaskCanceledException(task), scheduler); - break; - } - } - else - { - // - // Separate method to avoid closure in synchronous completion case. - // - res = ToObservableSlow(task, scheduler); - } - - return res; - } - - private static IObservable ToObservableSlow(Task task, IScheduler scheduler) - { - var subject = new AsyncSubject(); - - var options = GetTaskContinuationOptions(scheduler); - - task.ContinueWith(t => ToObservableDone(task, subject), options); - - return ToObservableResult(subject, scheduler); - } - - private static void ToObservableDone(Task task, IObserver subject) - { - switch (task.Status) - { - case TaskStatus.RanToCompletion: - subject.OnNext(task.Result); - subject.OnCompleted(); - break; - case TaskStatus.Faulted: - subject.OnError(task.Exception.InnerException); - break; - case TaskStatus.Canceled: - subject.OnError(new TaskCanceledException(task)); - break; - } - } - - private static TaskContinuationOptions GetTaskContinuationOptions(IScheduler scheduler) - { - var options = TaskContinuationOptions.None; - - if (scheduler != null) - { - // - // We explicitly don't special-case the immediate scheduler here. If the user asks for a - // synchronous completion, we'll try our best. However, there's no guarantee due to the - // internal stack probing in the TPL, which may cause asynchronous completion on a thread - // pool thread in order to avoid stack overflows. Therefore we can only attempt to be more - // efficient in the case where the user specified a scheduler, hence we know that the - // continuation will trigger a scheduling operation. In case of the immediate scheduler, - // it really becomes "immediate scheduling" wherever the TPL decided to run the continuation, - // i.e. not necessarily where the task was completed from. - // - options |= TaskContinuationOptions.ExecuteSynchronously; - } - - return options; - } - - private static IObservable ToObservableResult(AsyncSubject subject, IScheduler scheduler) - { - if (scheduler != null) - { - return subject.ObserveOn(scheduler); - } - else - { - return subject.AsObservable(); - } - } - - /// - /// Returns a task that will receive the last value or the exception produced by the observable sequence. - /// - /// The type of the elements in the source sequence. - /// Observable sequence to convert to a task. - /// A task that will receive the last element or the exception produced by the observable sequence. - /// is null. - public static Task ToTask(this IObservable observable) - { - if (observable == null) - throw new ArgumentNullException("observable"); - - return observable.ToTask(new CancellationToken(), null); - } - - /// - /// Returns a task that will receive the last value or the exception produced by the observable sequence. - /// - /// The type of the elements in the source sequence. - /// Observable sequence to convert to a task. - /// The state to use as the underlying task's AsyncState. - /// A task that will receive the last element or the exception produced by the observable sequence. - /// is null. - public static Task ToTask(this IObservable observable, object state) - { - if (observable == null) - throw new ArgumentNullException("observable"); - - return observable.ToTask(new CancellationToken(), state); - } - - /// - /// Returns a task that will receive the last value or the exception produced by the observable sequence. - /// - /// The type of the elements in the source sequence. - /// Observable sequence to convert to a task. - /// Cancellation token that can be used to cancel the task, causing unsubscription from the observable sequence. - /// A task that will receive the last element or the exception produced by the observable sequence. - /// is null. - public static Task ToTask(this IObservable observable, CancellationToken cancellationToken) - { - if (observable == null) - throw new ArgumentNullException("observable"); - - return observable.ToTask(cancellationToken, null); - } - - /// - /// Returns a task that will receive the last value or the exception produced by the observable sequence. - /// - /// The type of the elements in the source sequence. - /// Observable sequence to convert to a task. - /// Cancellation token that can be used to cancel the task, causing unsubscription from the observable sequence. - /// The state to use as the underlying task's AsyncState. - /// A task that will receive the last element or the exception produced by the observable sequence. - /// is null. - public static Task ToTask(this IObservable observable, CancellationToken cancellationToken, object state) - { - if (observable == null) - throw new ArgumentNullException("observable"); - - var hasValue = false; - var lastValue = default(TResult); - - var tcs = new TaskCompletionSource(state); - - var disposable = new SingleAssignmentDisposable(); - - var ctr = default(CancellationTokenRegistration); - - if (cancellationToken.CanBeCanceled) - { - ctr = cancellationToken.Register(() => - { - disposable.Dispose(); - tcs.TrySetCanceled(cancellationToken); - }); - } - - var taskCompletionObserver = Observer.Create( - value => - { - hasValue = true; - lastValue = value; - }, - ex => - { - tcs.TrySetException(ex); - - ctr.Dispose(); // no null-check needed (struct) - disposable.Dispose(); - }, - () => - { - if (hasValue) - tcs.TrySetResult(lastValue); - else - tcs.TrySetException(new InvalidOperationException("Strings_Linq.NO_ELEMENTS")); - - ctr.Dispose(); // no null-check needed (struct) - disposable.Dispose(); - } - ); - - // - // Subtle race condition: if the source completes before we reach the line below, the SingleAssigmentDisposable - // will already have been disposed. Upon assignment, the disposable resource being set will be disposed on the - // spot, which may throw an exception. (Similar to TFS 487142) - // - try - { - // - // [OK] Use of unsafe Subscribe: we're catching the exception here to set the TaskCompletionSource. - // - // Notice we could use a safe subscription to route errors through OnError, but we still need the - // exception handling logic here for the reason explained above. We cannot afford to throw here - // and as a result never set the TaskCompletionSource, so we tunnel everything through here. - // - disposable.Disposable = observable.Subscribe/*Unsafe*/(taskCompletionObserver); - } - catch (Exception ex) - { - tcs.TrySetException(ex); - } - - return tcs.Task; - } - } -} -#endif diff --git a/Assets/Plugins/UniRx/Scripts/Tasks/TaskObservableExtensions.cs.meta b/Assets/Plugins/UniRx/Scripts/Tasks/TaskObservableExtensions.cs.meta deleted file mode 100644 index 8211ce8..0000000 --- a/Assets/Plugins/UniRx/Scripts/Tasks/TaskObservableExtensions.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: d4f80d45cec56574e990cc840d1ac16b -timeCreated: 1475139656 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Tasks/UniTaskObservableExtensions.cs b/Assets/Plugins/UniRx/Scripts/Tasks/UniTaskObservableExtensions.cs deleted file mode 100644 index 5a45f1d..0000000 --- a/Assets/Plugins/UniRx/Scripts/Tasks/UniTaskObservableExtensions.cs +++ /dev/null @@ -1,246 +0,0 @@ -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member - -using System; -using System.Threading; -using UniRx.Async; - -namespace UniRx -{ - public static class UniTaskObservableExtensions - { - public static UniTask ToUniTask(this IObservable source, CancellationToken cancellationToken = default(CancellationToken), bool useFirstValue = false) - { - var promise = new UniTaskCompletionSource(); - var disposable = new SingleAssignmentDisposable(); - - var observer = useFirstValue - ? (IObserver)new FirstValueToUniTaskObserver(promise, disposable, cancellationToken) - : (IObserver)new ToUniTaskObserver(promise, disposable, cancellationToken); - - try - { - disposable.Disposable = source.Subscribe(observer); - } - catch (Exception ex) - { - promise.TrySetException(ex); - } - - return promise.Task; - } - - public static IObservable ToObservable(this UniTask task) - { - if (task.IsCompleted) - { - try - { - return Observable.Return(task.GetAwaiter().GetResult()); - } - catch (Exception ex) - { - return Observable.Throw(ex); - } - } - - var subject = new AsyncSubject(); - Fire(subject, task).Forget(); - return subject; - } - - public static IObservable ToObservable(this UniTask task) - { - if (task.IsCompleted) - { - try - { - return Observable.ReturnUnit(); - } - catch (Exception ex) - { - return Observable.Throw(ex); - } - } - - var subject = new AsyncSubject(); - Fire(subject, task).Forget(); - return subject; - } - - static async UniTaskVoid Fire(AsyncSubject subject, UniTask task) - { - try - { - var value = await task; - subject.OnNext(value); - subject.OnCompleted(); - } - catch (Exception ex) - { - subject.OnError(ex); - } - } - - static async UniTaskVoid Fire(AsyncSubject subject, UniTask task) - { - try - { - await task; - subject.OnNext(Unit.Default); - subject.OnCompleted(); - } - catch (Exception ex) - { - subject.OnError(ex); - } - } - - class ToUniTaskObserver : IObserver - { - static readonly Action callback = OnCanceled; - - readonly UniTaskCompletionSource promise; - readonly SingleAssignmentDisposable disposable; - readonly CancellationToken cancellationToken; - readonly CancellationTokenRegistration registration; - - bool hasValue; - T latestValue; - - public ToUniTaskObserver(UniTaskCompletionSource promise, SingleAssignmentDisposable disposable, CancellationToken cancellationToken) - { - this.promise = promise; - this.disposable = disposable; - this.cancellationToken = cancellationToken; - - if (this.cancellationToken.CanBeCanceled) - { - this.registration = this.cancellationToken.RegisterWithoutCaptureExecutionContext(callback, this); - } - } - - static void OnCanceled(object state) - { - var self = (ToUniTaskObserver)state; - self.disposable.Dispose(); - self.promise.TrySetCanceled(); - } - - public void OnNext(T value) - { - hasValue = true; - latestValue = value; - } - - public void OnError(Exception error) - { - try - { - promise.TrySetException(error); - } - finally - { - registration.Dispose(); - disposable.Dispose(); - } - } - - public void OnCompleted() - { - try - { - if (hasValue) - { - promise.TrySetResult(latestValue); - } - else - { - promise.TrySetException(new InvalidOperationException("Sequence has no elements")); - } - } - finally - { - registration.Dispose(); - disposable.Dispose(); - } - } - } - - class FirstValueToUniTaskObserver : IObserver - { - static readonly Action callback = OnCanceled; - - readonly UniTaskCompletionSource promise; - readonly SingleAssignmentDisposable disposable; - readonly CancellationToken cancellationToken; - readonly CancellationTokenRegistration registration; - - bool hasValue; - - public FirstValueToUniTaskObserver(UniTaskCompletionSource promise, SingleAssignmentDisposable disposable, CancellationToken cancellationToken) - { - this.promise = promise; - this.disposable = disposable; - this.cancellationToken = cancellationToken; - - if (this.cancellationToken.CanBeCanceled) - { - this.registration = this.cancellationToken.RegisterWithoutCaptureExecutionContext(callback, this); - } - } - - static void OnCanceled(object state) - { - var self = (FirstValueToUniTaskObserver)state; - self.disposable.Dispose(); - self.promise.TrySetCanceled(); - } - - public void OnNext(T value) - { - hasValue = true; - try - { - promise.TrySetResult(value); - } - finally - { - registration.Dispose(); - disposable.Dispose(); - } - } - - public void OnError(Exception error) - { - try - { - promise.TrySetException(error); - } - finally - { - registration.Dispose(); - disposable.Dispose(); - } - } - - public void OnCompleted() - { - try - { - if (!hasValue) - { - promise.TrySetException(new InvalidOperationException("Sequence has no elements")); - } - } - finally - { - registration.Dispose(); - disposable.Dispose(); - } - } - } - } -} - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Tasks/UniTaskObservableExtensions.cs.meta b/Assets/Plugins/UniRx/Scripts/Tasks/UniTaskObservableExtensions.cs.meta deleted file mode 100644 index 0bb1eba..0000000 --- a/Assets/Plugins/UniRx/Scripts/Tasks/UniTaskObservableExtensions.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: c1ca394e8fa201840afc3d7af2917014 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/TimeInterval.cs b/Assets/Plugins/UniRx/Scripts/TimeInterval.cs deleted file mode 100644 index dc50728..0000000 --- a/Assets/Plugins/UniRx/Scripts/TimeInterval.cs +++ /dev/null @@ -1,117 +0,0 @@ -// original code from rx.codeplex.com - -/* ------------------ */ - -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. - -using System; -using System.Collections.Generic; -using System.Globalization; - -namespace UniRx -{ - /// - /// Represents a value associated with time interval information. - /// The time interval can represent the time it took to produce the value, the interval relative to a previous value, the value's delivery time relative to a base, etc. - /// - /// The type of the value being annotated with time interval information. - [Serializable] - public struct TimeInterval : IEquatable> - { - private readonly TimeSpan _interval; - private readonly T _value; - - /// - /// Constructs a time interval value. - /// - /// The value to be annotated with a time interval. - /// Time interval associated with the value. - public TimeInterval(T value, TimeSpan interval) - { - _interval = interval; - _value = value; - } - - /// - /// Gets the value. - /// - public T Value - { - get { return _value; } - } - - /// - /// Gets the interval. - /// - public TimeSpan Interval - { - get { return _interval; } - } - - /// - /// Determines whether the current TimeInterval<T> value has the same Value and Interval as a specified TimeInterval<T> value. - /// - /// An object to compare to the current TimeInterval<T> value. - /// true if both TimeInterval<T> values have the same Value and Interval; otherwise, false. - public bool Equals(TimeInterval other) - { - return other.Interval.Equals(Interval) && EqualityComparer.Default.Equals(Value, other.Value); - } - - /// - /// Determines whether the two specified TimeInterval<T> values have the same Value and Interval. - /// - /// The first TimeInterval<T> value to compare. - /// The second TimeInterval<T> value to compare. - /// true if the first TimeInterval<T> value has the same Value and Interval as the second TimeInterval<T> value; otherwise, false. - public static bool operator ==(TimeInterval first, TimeInterval second) - { - return first.Equals(second); - } - - /// - /// Determines whether the two specified TimeInterval<T> values don't have the same Value and Interval. - /// - /// The first TimeInterval<T> value to compare. - /// The second TimeInterval<T> value to compare. - /// true if the first TimeInterval<T> value has a different Value or Interval as the second TimeInterval<T> value; otherwise, false. - public static bool operator !=(TimeInterval first, TimeInterval second) - { - return !first.Equals(second); - } - - /// - /// Determines whether the specified System.Object is equal to the current TimeInterval<T>. - /// - /// The System.Object to compare with the current TimeInterval<T>. - /// true if the specified System.Object is equal to the current TimeInterval<T>; otherwise, false. - public override bool Equals(object obj) - { - if (!(obj is TimeInterval)) - return false; - - var other = (TimeInterval)obj; - return this.Equals(other); - } - - /// - /// Returns the hash code for the current TimeInterval<T> value. - /// - /// A hash code for the current TimeInterval<T> value. - public override int GetHashCode() - { - var valueHashCode = Value == null ? 1963 : Value.GetHashCode(); - - return Interval.GetHashCode() ^ valueHashCode; - } - - /// - /// Returns a string representation of the current TimeInterval<T> value. - /// - /// String representation of the current TimeInterval<T> value. - public override string ToString() - { - return String.Format(CultureInfo.CurrentCulture, "{0}@{1}", Value, Interval); - } - } -} diff --git a/Assets/Plugins/UniRx/Scripts/TimeInterval.cs.meta b/Assets/Plugins/UniRx/Scripts/TimeInterval.cs.meta deleted file mode 100644 index e7329f1..0000000 --- a/Assets/Plugins/UniRx/Scripts/TimeInterval.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: dd48622e783cadc47af9a6b456ac8438 -timeCreated: 1455373901 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/Timestamped.cs b/Assets/Plugins/UniRx/Scripts/Timestamped.cs deleted file mode 100644 index 8eca1ec..0000000 --- a/Assets/Plugins/UniRx/Scripts/Timestamped.cs +++ /dev/null @@ -1,135 +0,0 @@ -// original code from rx.codeplex.com - -/* ------------------ */ - -// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. - -using System; -using System.Collections.Generic; -using System.Globalization; - -namespace UniRx -{ - /// - /// Represents value with a timestamp on it. - /// The timestamp typically represents the time the value was received, using an IScheduler's clock to obtain the current time. - /// - /// The type of the value being timestamped. - [Serializable] - public struct Timestamped : IEquatable> - { - private readonly DateTimeOffset _timestamp; - private readonly T _value; - - /// - /// Constructs a timestamped value. - /// - /// The value to be annotated with a timestamp. - /// Timestamp associated with the value. - public Timestamped(T value, DateTimeOffset timestamp) - { - _timestamp = timestamp; - _value = value; - } - - /// - /// Gets the value. - /// - public T Value - { - get { return _value; } - } - - /// - /// Gets the timestamp. - /// - public DateTimeOffset Timestamp - { - get { return _timestamp; } - } - - /// - /// Determines whether the current Timestamped<T> value has the same Value and Timestamp as a specified Timestamped<T> value. - /// - /// An object to compare to the current Timestamped<T> value. - /// true if both Timestamped<T> values have the same Value and Timestamp; otherwise, false. - public bool Equals(Timestamped other) - { - return other.Timestamp.Equals(Timestamp) && EqualityComparer.Default.Equals(Value, other.Value); - } - - /// - /// Determines whether the two specified Timestamped<T> values have the same Value and Timestamp. - /// - /// The first Timestamped<T> value to compare. - /// The second Timestamped<T> value to compare. - /// true if the first Timestamped<T> value has the same Value and Timestamp as the second Timestamped<T> value; otherwise, false. - public static bool operator ==(Timestamped first, Timestamped second) - { - return first.Equals(second); - } - - /// - /// Determines whether the two specified Timestamped<T> values don't have the same Value and Timestamp. - /// - /// The first Timestamped<T> value to compare. - /// The second Timestamped<T> value to compare. - /// true if the first Timestamped<T> value has a different Value or Timestamp as the second Timestamped<T> value; otherwise, false. - public static bool operator !=(Timestamped first, Timestamped second) - { - return !first.Equals(second); - } - - /// - /// Determines whether the specified System.Object is equal to the current Timestamped<T>. - /// - /// The System.Object to compare with the current Timestamped<T>. - /// true if the specified System.Object is equal to the current Timestamped<T>; otherwise, false. - public override bool Equals(object obj) - { - if (!(obj is Timestamped)) - return false; - - var other = (Timestamped)obj; - return this.Equals(other); - } - - /// - /// Returns the hash code for the current Timestamped<T> value. - /// - /// A hash code for the current Timestamped<T> value. - public override int GetHashCode() - { - var valueHashCode = Value == null ? 1979 : Value.GetHashCode(); - - return _timestamp.GetHashCode() ^ valueHashCode; - } - - /// - /// Returns a string representation of the current Timestamped<T> value. - /// - /// String representation of the current Timestamped<T> value. - public override string ToString() - { - return String.Format(CultureInfo.CurrentCulture, "{0}@{1}", Value, Timestamp); - } - } - - /// - /// A helper class with a factory method for creating Timestamped<T> instances. - /// - public static class Timestamped - { - /// - /// Creates an instance of a Timestamped<T>. This is syntactic sugar that uses type inference - /// to avoid specifying a type in a constructor call, which is very useful when using anonymous types. - /// - /// The value to be annotated with a timestamp. - /// Timestamp associated with the value. - /// Creates a new timestamped value. - public static Timestamped Create(T value, DateTimeOffset timestamp) - { - return new Timestamped(value, timestamp); - } - } -} diff --git a/Assets/Plugins/UniRx/Scripts/Timestamped.cs.meta b/Assets/Plugins/UniRx/Scripts/Timestamped.cs.meta deleted file mode 100644 index 6eb3903..0000000 --- a/Assets/Plugins/UniRx/Scripts/Timestamped.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: c1d908b82d0e2b4489d3351a484e5eae -timeCreated: 1455373901 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UniRx.asmdef b/Assets/Plugins/UniRx/Scripts/UniRx.asmdef deleted file mode 100644 index 91fdcd9..0000000 --- a/Assets/Plugins/UniRx/Scripts/UniRx.asmdef +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "UniRx", - "references": [ - "UniRx.Async" - ], - "optionalUnityReferences": [], - "includePlatforms": [], - "excludePlatforms": [], - "allowUnsafeCode": false -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge.meta deleted file mode 100644 index bb8274e..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: fbd633e692c236f47b134e7b8b1f55f7 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/AsyncOperationExtensions.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/AsyncOperationExtensions.cs deleted file mode 100644 index ab876a3..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/AsyncOperationExtensions.cs +++ /dev/null @@ -1,75 +0,0 @@ -using System; -using System.Collections; -using System.Threading; -using UnityEngine; - -#if !UniRxLibrary -using ObservableUnity = UniRx.Observable; -#endif - -namespace UniRx -{ - public static partial class AsyncOperationExtensions - { - /// - /// If you needs return value, use AsAsyncOperationObservable instead. - /// - public static IObservable AsObservable(this AsyncOperation asyncOperation, IProgress progress = null) - { - return ObservableUnity.FromCoroutine((observer, cancellation) => AsObservableCore(asyncOperation, observer, progress, cancellation)); - } - - // T: where T : AsyncOperation is ambigious with IObservable.AsObservable - public static IObservable AsAsyncOperationObservable(this T asyncOperation, IProgress progress = null) - where T : AsyncOperation - { - return ObservableUnity.FromCoroutine((observer, cancellation) => AsObservableCore(asyncOperation, observer, progress, cancellation)); - } - - static IEnumerator AsObservableCore(T asyncOperation, IObserver observer, IProgress reportProgress, CancellationToken cancel) - where T : AsyncOperation - { - if (reportProgress != null) - { - while (!asyncOperation.isDone && !cancel.IsCancellationRequested) - { - try - { - reportProgress.Report(asyncOperation.progress); - } - catch (Exception ex) - { - observer.OnError(ex); - yield break; - } - yield return null; - } - } - else - { - if (!asyncOperation.isDone) - { - yield return asyncOperation; - } - } - - if (cancel.IsCancellationRequested) yield break; - - if (reportProgress != null) - { - try - { - reportProgress.Report(asyncOperation.progress); - } - catch (Exception ex) - { - observer.OnError(ex); - yield break; - } - } - - observer.OnNext(asyncOperation); - observer.OnCompleted(); - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/AsyncOperationExtensions.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/AsyncOperationExtensions.cs.meta deleted file mode 100644 index d261ab7..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/AsyncOperationExtensions.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 245d77a29b1ece34e96bfc80f8c825d8 -timeCreated: 1455373897 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/CancellationToken.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/CancellationToken.cs deleted file mode 100644 index 225eb2e..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/CancellationToken.cs +++ /dev/null @@ -1,40 +0,0 @@ -#if !(NETFX_CORE || NET_4_6 || NET_STANDARD_2_0 || UNITY_WSA_10_0) - -using System; - -namespace UniRx -{ - public struct CancellationToken - { - readonly ICancelable source; - - public static readonly CancellationToken Empty = new CancellationToken(null); - - /// Same as Empty. - public static readonly CancellationToken None = new CancellationToken(null); - - public CancellationToken(ICancelable source) - { - this.source = source; - } - - public bool IsCancellationRequested - { - get - { - return (source == null) ? false : source.IsDisposed; - } - } - - public void ThrowIfCancellationRequested() - { - if (IsCancellationRequested) - { - throw new OperationCanceledException(); - } - } - } -} - -#endif - diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/CancellationToken.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/CancellationToken.cs.meta deleted file mode 100644 index ebefcbc..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/CancellationToken.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: e02a1bf45f8861048a6014cf7eab1825 -timeCreated: 1455373901 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/CoroutineAsyncBridge.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/CoroutineAsyncBridge.cs deleted file mode 100644 index db1ac7b..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/CoroutineAsyncBridge.cs +++ /dev/null @@ -1,125 +0,0 @@ -#if (NET_4_6 || NET_STANDARD_2_0) - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using System.Runtime.CompilerServices; -using System.Text; -using System.Threading.Tasks; -using UnityEngine; - -namespace UniRx -{ - public class CoroutineAsyncBridge : INotifyCompletion - { - Action continuation; - public bool IsCompleted { get; private set; } - - CoroutineAsyncBridge() - { - IsCompleted = false; - } - - public static CoroutineAsyncBridge Start(T awaitTarget) - { - var bridge = new CoroutineAsyncBridge(); - MainThreadDispatcher.StartCoroutine(bridge.Run(awaitTarget)); - return bridge; - } - - IEnumerator Run(T target) - { - yield return target; - IsCompleted = true; - continuation(); - } - - public void OnCompleted(Action continuation) - { - this.continuation = continuation; - } - - public void GetResult() - { - if (!IsCompleted) throw new InvalidOperationException("coroutine not yet completed"); - } - } - - public class CoroutineAsyncBridge : INotifyCompletion - { - readonly T result; - Action continuation; - public bool IsCompleted { get; private set; } - - CoroutineAsyncBridge(T result) - { - IsCompleted = false; - this.result = result; - } - - public static CoroutineAsyncBridge Start(T awaitTarget) - { - var bridge = new CoroutineAsyncBridge(awaitTarget); - MainThreadDispatcher.StartCoroutine(bridge.Run(awaitTarget)); - return bridge; - } - - IEnumerator Run(T target) - { - yield return target; - IsCompleted = true; - continuation(); - } - - public void OnCompleted(Action continuation) - { - this.continuation = continuation; - } - - public T GetResult() - { - if (!IsCompleted) throw new InvalidOperationException("coroutine not yet completed"); - return result; - } - } - - public static class CoroutineAsyncExtensions - { - public static CoroutineAsyncBridge GetAwaiter(this Coroutine coroutine) - { - return CoroutineAsyncBridge.Start(coroutine); - } - -#if !(CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6))) - - // should use UniRx.Async in C# 7.0 - -#if UNITY_2018_3_OR_NEWER -#pragma warning disable CS0618 -#endif - public static CoroutineAsyncBridge GetAwaiter(this WWW www) - { - return CoroutineAsyncBridge.Start(www); - } -#if UNITY_2018_3_OR_NEWER -#pragma warning restore CS0618 -#endif - - - - public static CoroutineAsyncBridge GetAwaiter(this AsyncOperation asyncOperation) - { - return CoroutineAsyncBridge.Start(asyncOperation); - } - - public static CoroutineAsyncBridge GetAwaiter(this IEnumerator coroutine) - { - return CoroutineAsyncBridge.Start(coroutine); - } - -#endif - } -} - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/CoroutineAsyncBridge.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/CoroutineAsyncBridge.cs.meta deleted file mode 100644 index 2efbac5..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/CoroutineAsyncBridge.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 93ca3de3810199947871ab4a77014fa3 -timeCreated: 1475193276 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Diagnostics.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Diagnostics.meta deleted file mode 100644 index 05f372e..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Diagnostics.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 0d93a37770be2444fbeb3ed22660f6e4 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Diagnostics/LogEntry.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Diagnostics/LogEntry.cs deleted file mode 100644 index deb5e65..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Diagnostics/LogEntry.cs +++ /dev/null @@ -1,50 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using UnityEngine; - -namespace UniRx.Diagnostics -{ - public struct LogEntry - { - // requires - public string LoggerName { get; private set; } - public LogType LogType { get; private set; } - public string Message { get; private set; } - public DateTime Timestamp { get; private set; } - - // options - - /// [Optional] - public UnityEngine.Object Context { get; private set; } - /// [Optional] - public Exception Exception { get; private set; } - /// [Optional] - public string StackTrace { get; private set; } - /// [Optional] - public object State { get; private set; } - - public LogEntry(string loggerName, LogType logType, DateTime timestamp, string message, UnityEngine.Object context = null, Exception exception = null, string stackTrace = null, object state = null) - : this() - { - this.LoggerName = loggerName; - this.LogType = logType; - this.Timestamp = timestamp; - this.Message = message; - this.Context = context; - this.Exception = exception; - this.StackTrace = stackTrace; - this.State = state; - } - - public override string ToString() - { - var plusEx = (Exception != null) ? (Environment.NewLine + Exception.ToString()) : ""; - return "[" + Timestamp.ToString() + "]" - + "[" + LoggerName + "]" - + "[" + LogType.ToString() + "]" - + Message - + plusEx; - } - } -} diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Diagnostics/LogEntry.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Diagnostics/LogEntry.cs.meta deleted file mode 100644 index 7669e9f..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Diagnostics/LogEntry.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 53917e87e91c0e4449402e5d85a04765 -timeCreated: 1455373899 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Diagnostics/LogEntryExtensions.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Diagnostics/LogEntryExtensions.cs deleted file mode 100644 index 87a0ca4..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Diagnostics/LogEntryExtensions.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace UniRx.Diagnostics -{ - public static partial class LogEntryExtensions - { - public static IDisposable LogToUnityDebug(this IObservable source) - { - return source.Subscribe(new UnityDebugSink()); - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Diagnostics/LogEntryExtensions.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Diagnostics/LogEntryExtensions.cs.meta deleted file mode 100644 index f4303f0..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Diagnostics/LogEntryExtensions.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 8706ef5a13e53ec46b4848a7eec5e826 -timeCreated: 1455373900 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Diagnostics/Logger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Diagnostics/Logger.cs deleted file mode 100644 index 1313c54..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Diagnostics/Logger.cs +++ /dev/null @@ -1,139 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using UnityEngine; - -namespace UniRx.Diagnostics -{ - public partial class Logger - { - static bool isInitialized = false; - static bool isDebugBuild = false; - - public string Name { get; private set; } - protected readonly Action logPublisher; - - public Logger(string loggerName) - { - this.Name = loggerName; - this.logPublisher = ObservableLogger.RegisterLogger(this); - } - - /// Output LogType.Log but only enables isDebugBuild - public virtual void Debug(object message, UnityEngine.Object context = null) - { - if (!isInitialized) - { - isInitialized = true; - isDebugBuild = UnityEngine.Debug.isDebugBuild; - } - - if (isDebugBuild) - { - logPublisher(new LogEntry( - message: (message != null) ? message.ToString() : "", - logType: LogType.Log, - timestamp: DateTime.Now, - loggerName: Name, - context: context)); - } - } - - /// Output LogType.Log but only enables isDebugBuild - public virtual void DebugFormat(string format, params object[] args) - { - if (!isInitialized) - { - isInitialized = true; - isDebugBuild = UnityEngine.Debug.isDebugBuild; - } - - if (isDebugBuild) - { - logPublisher(new LogEntry( - message: (format != null) ? string.Format(format, args) : "", - logType: LogType.Log, - timestamp: DateTime.Now, - loggerName: Name, - context: null)); - } - } - - public virtual void Log(object message, UnityEngine.Object context = null) - { - logPublisher(new LogEntry( - message: (message != null) ? message.ToString() : "", - logType: LogType.Log, - timestamp: DateTime.Now, - loggerName: Name, - context: context)); - } - - public virtual void LogFormat(string format, params object[] args) - { - logPublisher(new LogEntry( - message: (format != null) ? string.Format(format, args) : "", - logType: LogType.Log, - timestamp: DateTime.Now, - loggerName: Name, - context: null)); - } - - public virtual void Warning(object message, UnityEngine.Object context = null) - { - logPublisher(new LogEntry( - message: (message != null) ? message.ToString() : "", - logType: LogType.Warning, - timestamp: DateTime.Now, - loggerName: Name, - context: context)); - } - - public virtual void WarningFormat(string format, params object[] args) - { - logPublisher(new LogEntry( - message: (format != null) ? string.Format(format, args) : "", - logType: LogType.Warning, - timestamp: DateTime.Now, - loggerName: Name, - context: null)); - } - - public virtual void Error(object message, UnityEngine.Object context = null) - { - logPublisher(new LogEntry( - message: (message != null) ? message.ToString() : "", - logType: LogType.Error, - timestamp: DateTime.Now, - loggerName: Name, - context: context)); - } - - public virtual void ErrorFormat(string format, params object[] args) - { - logPublisher(new LogEntry( - message: (format != null) ? string.Format(format, args) : "", - logType: LogType.Error, - timestamp: DateTime.Now, - loggerName: Name, - context: null)); - } - - public virtual void Exception(Exception exception, UnityEngine.Object context = null) - { - logPublisher(new LogEntry( - message: (exception != null) ? exception.ToString() : "", - exception: exception, - logType: LogType.Exception, - timestamp: DateTime.Now, - loggerName: Name, - context: context)); - } - - /// Publish raw LogEntry. - public virtual void Raw(LogEntry logEntry) - { - logPublisher(logEntry); - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Diagnostics/Logger.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Diagnostics/Logger.cs.meta deleted file mode 100644 index 348f963..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Diagnostics/Logger.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: f0ecf366503cb0644bdd90934d24da62 -timeCreated: 1455373902 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Diagnostics/ObservableDebugExtensions.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Diagnostics/ObservableDebugExtensions.cs deleted file mode 100644 index 0b1c05c..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Diagnostics/ObservableDebugExtensions.cs +++ /dev/null @@ -1,42 +0,0 @@ -using System; - -namespace UniRx.Diagnostics -{ - public static class ObservableDebugExtensions - { - /// - /// Debug helper of observbale stream. Works for only DEBUG symbol. - /// - public static IObservable Debug(this IObservable source, string label = null) - { -#if DEBUG - var l = (label == null) ? "" : "[" + label + "]"; - return source.Materialize() - .Do(x => UnityEngine.Debug.Log(l + x.ToString())) - .Dematerialize() - .DoOnCancel(() => UnityEngine.Debug.Log(l + "OnCancel")) - .DoOnSubscribe(() => UnityEngine.Debug.Log(l + "OnSubscribe")); - -#else - return source; -#endif - } - - /// - /// Debug helper of observbale stream. Works for only DEBUG symbol. - /// - public static IObservable Debug(this IObservable source, UniRx.Diagnostics.Logger logger) - { -#if DEBUG - return source.Materialize() - .Do(x => logger.Debug(x.ToString())) - .Dematerialize() - .DoOnCancel(() => logger.Debug("OnCancel")) - .DoOnSubscribe(() => logger.Debug("OnSubscribe")); - -#else - return source; -#endif - } - } -} diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Diagnostics/ObservableDebugExtensions.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Diagnostics/ObservableDebugExtensions.cs.meta deleted file mode 100644 index 549e693..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Diagnostics/ObservableDebugExtensions.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: b43f948e095c3e749a0506709be90d68 -timeCreated: 1468662620 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Diagnostics/ObservableLogger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Diagnostics/ObservableLogger.cs deleted file mode 100644 index 91d5d5f..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Diagnostics/ObservableLogger.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using UnityEngine; - -namespace UniRx.Diagnostics -{ - public class ObservableLogger : IObservable - { - static readonly Subject logPublisher = new Subject(); - - public static readonly ObservableLogger Listener = new ObservableLogger(); - - private ObservableLogger() - { - - } - - public static Action RegisterLogger(Logger logger) - { - if (logger.Name == null) throw new ArgumentNullException("logger.Name is null"); - - return logPublisher.OnNext; - } - - public IDisposable Subscribe(IObserver observer) - { - return logPublisher.Subscribe(observer); - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Diagnostics/ObservableLogger.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Diagnostics/ObservableLogger.cs.meta deleted file mode 100644 index 84b786e..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Diagnostics/ObservableLogger.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 063f79dc45f902c459f0955d27b445d7 -timeCreated: 1455373897 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Diagnostics/UnityDebugSink.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Diagnostics/UnityDebugSink.cs deleted file mode 100644 index a40a3d2..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Diagnostics/UnityDebugSink.cs +++ /dev/null @@ -1,73 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using UnityEngine; - -namespace UniRx.Diagnostics -{ - public class UnityDebugSink : IObserver - { - public void OnCompleted() - { - // do nothing - } - - public void OnError(Exception error) - { - // do nothing - } - - public void OnNext(LogEntry value) - { - // avoid multithread exception. - // (value.Context == null) can only be called from the main thread. - var ctx = (System.Object)value.Context; - - switch (value.LogType) - { - case LogType.Error: - if (ctx == null) - { - Debug.LogError(value.Message); - } - else - { - Debug.LogError(value.Message, value.Context); - } - break; - case LogType.Exception: - if (ctx == null) - { - Debug.LogException(value.Exception); - } - else - { - Debug.LogException(value.Exception, value.Context); - } - break; - case LogType.Log: - if (ctx == null) - { - Debug.Log(value.Message); - } - else - { - Debug.Log(value.Message, value.Context); - } - break; - case LogType.Warning: - if (ctx == null) - { - Debug.LogWarning(value.Message); - } - else - { - Debug.LogWarning(value.Message, value.Context); - } - break; - default: - break; - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Diagnostics/UnityDebugSink.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Diagnostics/UnityDebugSink.cs.meta deleted file mode 100644 index b1db84b..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Diagnostics/UnityDebugSink.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 882166c30c3bff841b1e12d62c392e02 -timeCreated: 1455373900 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/FrameInterval.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/FrameInterval.cs deleted file mode 100644 index 8b1190b..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/FrameInterval.cs +++ /dev/null @@ -1,111 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Globalization; - -namespace UniRx -{ - /// - /// Represents a value associated with time interval information. - /// The time interval can represent the time it took to produce the value, the interval relative to a previous value, the value's delivery time relative to a base, etc. - /// - /// The type of the value being annotated with time interval information. - [Serializable] - public struct FrameInterval : IEquatable> - { - private readonly int _interval; - private readonly T _value; - - /// - /// Constructs a time interval value. - /// - /// The value to be annotated with a time interval. - /// Time interval associated with the value. - public FrameInterval(T value, int interval) - { - _interval = interval; - _value = value; - } - - /// - /// Gets the value. - /// - public T Value - { - get { return _value; } - } - - /// - /// Gets the interval. - /// - public int Interval - { - get { return _interval; } - } - - /// - /// Determines whether the current FrameInterval<T> value has the same Value and Interval as a specified FrameInterval<T> value. - /// - /// An object to compare to the current FrameInterval<T> value. - /// true if both FrameInterval<T> values have the same Value and Interval; otherwise, false. - public bool Equals(FrameInterval other) - { - return other.Interval.Equals(Interval) && EqualityComparer.Default.Equals(Value, other.Value); - } - - /// - /// Determines whether the two specified FrameInterval<T> values have the same Value and Interval. - /// - /// The first FrameInterval<T> value to compare. - /// The second FrameInterval<T> value to compare. - /// true if the first FrameInterval<T> value has the same Value and Interval as the second FrameInterval<T> value; otherwise, false. - public static bool operator ==(FrameInterval first, FrameInterval second) - { - return first.Equals(second); - } - - /// - /// Determines whether the two specified FrameInterval<T> values don't have the same Value and Interval. - /// - /// The first FrameInterval<T> value to compare. - /// The second FrameInterval<T> value to compare. - /// true if the first FrameInterval<T> value has a different Value or Interval as the second FrameInterval<T> value; otherwise, false. - public static bool operator !=(FrameInterval first, FrameInterval second) - { - return !first.Equals(second); - } - - /// - /// Determines whether the specified System.Object is equal to the current FrameInterval<T>. - /// - /// The System.Object to compare with the current FrameInterval<T>. - /// true if the specified System.Object is equal to the current FrameInterval<T>; otherwise, false. - public override bool Equals(object obj) - { - if (!(obj is FrameInterval)) - return false; - - var other = (FrameInterval)obj; - return this.Equals(other); - } - - /// - /// Returns the hash code for the current FrameInterval<T> value. - /// - /// A hash code for the current FrameInterval<T> value. - public override int GetHashCode() - { - var valueHashCode = Value == null ? 1963 : Value.GetHashCode(); - - return Interval.GetHashCode() ^ valueHashCode; - } - - /// - /// Returns a string representation of the current FrameInterval<T> value. - /// - /// String representation of the current FrameInterval<T> value. - public override string ToString() - { - return String.Format(CultureInfo.CurrentCulture, "{0}@{1}", Value, Interval); - } - } -} diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/FrameInterval.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/FrameInterval.cs.meta deleted file mode 100644 index 2460a54..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/FrameInterval.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 266d1e44d71e7774c9abc5b23773e3f1 -timeCreated: 1467771656 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/InspectableReactiveProperty.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/InspectableReactiveProperty.cs deleted file mode 100644 index 7a66eb2..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/InspectableReactiveProperty.cs +++ /dev/null @@ -1,324 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEngine; - -namespace UniRx -{ - /// - /// Inspectable ReactiveProperty. - /// - [Serializable] - public class IntReactiveProperty : ReactiveProperty - { - public IntReactiveProperty() - : base() - { - - } - - public IntReactiveProperty(int initialValue) - : base(initialValue) - { - - } - } - - /// - /// Inspectable ReactiveProperty. - /// - [Serializable] - public class LongReactiveProperty : ReactiveProperty - { - public LongReactiveProperty() - : base() - { - - } - - public LongReactiveProperty(long initialValue) - : base(initialValue) - { - - } - } - - - /// - /// Inspectable ReactiveProperty. - /// - [Serializable] - public class ByteReactiveProperty : ReactiveProperty - { - public ByteReactiveProperty() - : base() - { - - } - - public ByteReactiveProperty(byte initialValue) - : base(initialValue) - { - - } - } - - /// - /// Inspectable ReactiveProperty. - /// - [Serializable] - public class FloatReactiveProperty : ReactiveProperty - { - public FloatReactiveProperty() - : base() - { - - } - - public FloatReactiveProperty(float initialValue) - : base(initialValue) - { - - } - } - - /// - /// Inspectable ReactiveProperty. - /// - [Serializable] - public class DoubleReactiveProperty : ReactiveProperty - { - public DoubleReactiveProperty() - : base() - { - - } - - public DoubleReactiveProperty(double initialValue) - : base(initialValue) - { - - } - } - - /// - /// Inspectable ReactiveProperty. - /// - [Serializable] - public class StringReactiveProperty : ReactiveProperty - { - public StringReactiveProperty() - : base() - { - - } - - public StringReactiveProperty(string initialValue) - : base(initialValue) - { - - } - } - - /// - /// Inspectable ReactiveProperty. - /// - [Serializable] - public class BoolReactiveProperty : ReactiveProperty - { - public BoolReactiveProperty() - : base() - { - - } - - public BoolReactiveProperty(bool initialValue) - : base(initialValue) - { - - } - } - - /// Inspectable ReactiveProperty. - [Serializable] - public class Vector2ReactiveProperty : ReactiveProperty - { - public Vector2ReactiveProperty() - { - - } - - public Vector2ReactiveProperty(Vector2 initialValue) - : base(initialValue) - { - - } - - protected override IEqualityComparer EqualityComparer - { - get - { - return UnityEqualityComparer.Vector2; - } - } - } - - /// Inspectable ReactiveProperty. - [Serializable] - public class Vector3ReactiveProperty : ReactiveProperty - { - public Vector3ReactiveProperty() - { - - } - - public Vector3ReactiveProperty(Vector3 initialValue) - : base(initialValue) - { - - } - - protected override IEqualityComparer EqualityComparer - { - get - { - return UnityEqualityComparer.Vector3; - } - } - } - - /// Inspectable ReactiveProperty. - [Serializable] - public class Vector4ReactiveProperty : ReactiveProperty - { - public Vector4ReactiveProperty() - { - - } - - public Vector4ReactiveProperty(Vector4 initialValue) - : base(initialValue) - { - - } - - protected override IEqualityComparer EqualityComparer - { - get - { - return UnityEqualityComparer.Vector4; - } - } - } - - /// Inspectable ReactiveProperty. - [Serializable] - public class ColorReactiveProperty : ReactiveProperty - { - public ColorReactiveProperty() - { - - } - - public ColorReactiveProperty(Color initialValue) - : base(initialValue) - { - - } - - protected override IEqualityComparer EqualityComparer - { - get - { - return UnityEqualityComparer.Color; - } - } - } - - /// Inspectable ReactiveProperty. - [Serializable] - public class RectReactiveProperty : ReactiveProperty - { - public RectReactiveProperty() - { - - } - - public RectReactiveProperty(Rect initialValue) - : base(initialValue) - { - - } - - protected override IEqualityComparer EqualityComparer - { - get - { - return UnityEqualityComparer.Rect; - } - } - } - - /// Inspectable ReactiveProperty. - [Serializable] - public class AnimationCurveReactiveProperty : ReactiveProperty - { - public AnimationCurveReactiveProperty() - { - - } - - public AnimationCurveReactiveProperty(AnimationCurve initialValue) - : base(initialValue) - { - - } - } - - /// Inspectable ReactiveProperty. - [Serializable] - public class BoundsReactiveProperty : ReactiveProperty - { - public BoundsReactiveProperty() - { - - } - - public BoundsReactiveProperty(Bounds initialValue) - : base(initialValue) - { - - } - - protected override IEqualityComparer EqualityComparer - { - get - { - return UnityEqualityComparer.Bounds; - } - } - } - - /// Inspectable ReactiveProperty. - [Serializable] - public class QuaternionReactiveProperty : ReactiveProperty - { - public QuaternionReactiveProperty() - { - - } - - public QuaternionReactiveProperty(Quaternion initialValue) - : base(initialValue) - { - - } - - protected override IEqualityComparer EqualityComparer - { - get - { - return UnityEqualityComparer.Quaternion; - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/InspectableReactiveProperty.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/InspectableReactiveProperty.cs.meta deleted file mode 100644 index 968f323..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/InspectableReactiveProperty.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 13c690f353ea23141aca4090d28aaa9c -timeCreated: 1455373897 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/InspectorDisplayDrawer.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/InspectorDisplayDrawer.cs deleted file mode 100644 index 028d70d..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/InspectorDisplayDrawer.cs +++ /dev/null @@ -1,306 +0,0 @@ -using System; -using System.Reflection; -using UnityEngine; -using System.Text.RegularExpressions; -using System.Collections; -using System.Linq; - -#if UNITY_EDITOR -using UnityEditor; -#endif - -namespace UniRx -{ - [System.AttributeUsage(System.AttributeTargets.Field, AllowMultiple = false, Inherited = false)] - public class InspectorDisplayAttribute : PropertyAttribute - { - public string FieldName { get; private set; } - public bool NotifyPropertyChanged { get; private set; } - - public InspectorDisplayAttribute(string fieldName = "value", bool notifyPropertyChanged = true) - { - FieldName = fieldName; - NotifyPropertyChanged = notifyPropertyChanged; - } - } - - /// - /// Enables multiline input field for StringReactiveProperty. Default line is 3. - /// - [System.AttributeUsage(System.AttributeTargets.Field, AllowMultiple = false, Inherited = false)] - public class MultilineReactivePropertyAttribute : PropertyAttribute - { - public int Lines { get; private set; } - - public MultilineReactivePropertyAttribute() - { - Lines = 3; - } - - public MultilineReactivePropertyAttribute(int lines) - { - this.Lines = lines; - } - } - - /// - /// Enables range input field for Int/FloatReactiveProperty. - /// - [System.AttributeUsage(System.AttributeTargets.Field, AllowMultiple = false, Inherited = false)] - public class RangeReactivePropertyAttribute : PropertyAttribute - { - public float Min { get; private set; } - public float Max { get; private set; } - - public RangeReactivePropertyAttribute(float min, float max) - { - this.Min = min; - this.Max = max; - } - } - -#if UNITY_EDITOR - - - // InspectorDisplay and for Specialized ReactiveProperty - // If you want to customize other specialized ReactiveProperty - // [UnityEditor.CustomPropertyDrawer(typeof(YourSpecializedReactiveProperty))] - // public class ExtendInspectorDisplayDrawer : InspectorDisplayDrawer { } - - [UnityEditor.CustomPropertyDrawer(typeof(InspectorDisplayAttribute))] - [UnityEditor.CustomPropertyDrawer(typeof(IntReactiveProperty))] - [UnityEditor.CustomPropertyDrawer(typeof(LongReactiveProperty))] - [UnityEditor.CustomPropertyDrawer(typeof(ByteReactiveProperty))] - [UnityEditor.CustomPropertyDrawer(typeof(FloatReactiveProperty))] - [UnityEditor.CustomPropertyDrawer(typeof(DoubleReactiveProperty))] - [UnityEditor.CustomPropertyDrawer(typeof(StringReactiveProperty))] - [UnityEditor.CustomPropertyDrawer(typeof(BoolReactiveProperty))] - [UnityEditor.CustomPropertyDrawer(typeof(Vector2ReactiveProperty))] - [UnityEditor.CustomPropertyDrawer(typeof(Vector3ReactiveProperty))] - [UnityEditor.CustomPropertyDrawer(typeof(Vector4ReactiveProperty))] - [UnityEditor.CustomPropertyDrawer(typeof(ColorReactiveProperty))] - [UnityEditor.CustomPropertyDrawer(typeof(RectReactiveProperty))] - [UnityEditor.CustomPropertyDrawer(typeof(AnimationCurveReactiveProperty))] - [UnityEditor.CustomPropertyDrawer(typeof(BoundsReactiveProperty))] - [UnityEditor.CustomPropertyDrawer(typeof(QuaternionReactiveProperty))] - public class InspectorDisplayDrawer : UnityEditor.PropertyDrawer - { - public override void OnGUI(Rect position, UnityEditor.SerializedProperty property, GUIContent label) - { - string fieldName; - bool notifyPropertyChanged; - { - var attr = this.attribute as InspectorDisplayAttribute; - fieldName = (attr == null) ? "value" : attr.FieldName; - notifyPropertyChanged = (attr == null) ? true : attr.NotifyPropertyChanged; - } - - if (notifyPropertyChanged) - { - EditorGUI.BeginChangeCheck(); - } - var targetSerializedProperty = property.FindPropertyRelative(fieldName); - if (targetSerializedProperty == null) - { - UnityEditor.EditorGUI.LabelField(position, label, new GUIContent() { text = "InspectorDisplay can't find target:" + fieldName }); - if (notifyPropertyChanged) - { - EditorGUI.EndChangeCheck(); - } - return; - } - else - { - EmitPropertyField(position, targetSerializedProperty, label); - } - - if (notifyPropertyChanged) - { - if (EditorGUI.EndChangeCheck()) - { - property.serializedObject.ApplyModifiedProperties(); // deserialize to field - - var paths = property.propertyPath.Split('.'); // X.Y.Z... - var attachedComponent = property.serializedObject.targetObject; - - var targetProp = (paths.Length == 1) - ? fieldInfo.GetValue(attachedComponent) - : GetValueRecursive(attachedComponent, 0, paths); - if (targetProp == null) return; - var propInfo = targetProp.GetType().GetProperty(fieldName, BindingFlags.IgnoreCase | BindingFlags.GetProperty | BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); - var modifiedValue = propInfo.GetValue(targetProp, null); // retrieve new value - - var methodInfo = targetProp.GetType().GetMethod("SetValueAndForceNotify", BindingFlags.IgnoreCase | BindingFlags.InvokeMethod | BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); - if (methodInfo != null) - { - methodInfo.Invoke(targetProp, new object[] { modifiedValue }); - } - } - else - { - property.serializedObject.ApplyModifiedProperties(); - } - } - } - - object GetValueRecursive(object obj, int index, string[] paths) - { - var path = paths[index]; - - FieldInfo fldInfo = null; - var type = obj.GetType(); - while (fldInfo == null) - { - // attempt to get information about the field - fldInfo = type.GetField(path, BindingFlags.IgnoreCase | BindingFlags.GetField | BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); - - if (fldInfo != null || - type.BaseType == null || - type.BaseType.IsSubclassOf(typeof(ReactiveProperty<>))) break; - - // if the field information is missing, it may be in the base class - type = type.BaseType; - } - - // If array, path = Array.data[index] - if (fldInfo == null && path == "Array") - { - try - { - path = paths[++index]; - var m = Regex.Match(path, @"(.+)\[([0-9]+)*\]"); - var arrayIndex = int.Parse(m.Groups[2].Value); - var arrayValue = (obj as System.Collections.IList)[arrayIndex]; - if (index < paths.Length - 1) - { - return GetValueRecursive(arrayValue, ++index, paths); - } - else - { - return arrayValue; - } - } - catch - { - Debug.Log("InspectorDisplayDrawer Exception, objType:" + obj.GetType().Name + " path:" + string.Join(", ", paths)); - throw; - } - } - else if (fldInfo == null) - { - throw new Exception("Can't decode path, please report to UniRx's GitHub issues:" + string.Join(", ", paths)); - } - - var v = fldInfo.GetValue(obj); - if (index < paths.Length - 1) - { - return GetValueRecursive(v, ++index, paths); - } - - return v; - } - - public override float GetPropertyHeight(SerializedProperty property, GUIContent label) - { - var attr = this.attribute as InspectorDisplayAttribute; - var fieldName = (attr == null) ? "value" : attr.FieldName; - - var height = base.GetPropertyHeight(property, label); - var valueProperty = property.FindPropertyRelative(fieldName); - if (valueProperty == null) - { - return height; - } - - if (valueProperty.propertyType == SerializedPropertyType.Rect) - { - return height * 2; - } - if (valueProperty.propertyType == SerializedPropertyType.Bounds) - { - return height * 3; - } - if (valueProperty.propertyType == SerializedPropertyType.String) - { - var multilineAttr = GetMultilineAttribute(); - if (multilineAttr != null) - { - return ((!EditorGUIUtility.wideMode) ? 16f : 0f) + 16f + (float)((multilineAttr.Lines - 1) * 13); - }; - } - - if (valueProperty.isExpanded) - { - var count = 0; - var e = valueProperty.GetEnumerator(); - while (e.MoveNext()) count++; - return ((height + 4) * count) + 6; // (Line = 20 + Padding) ? - } - - return height; - } - - protected virtual void EmitPropertyField(Rect position, UnityEditor.SerializedProperty targetSerializedProperty, GUIContent label) - { - var multiline = GetMultilineAttribute(); - if (multiline == null) - { - var range = GetRangeAttribute(); - if (range == null) - { - UnityEditor.EditorGUI.PropertyField(position, targetSerializedProperty, label, includeChildren: true); - } - else - { - if (targetSerializedProperty.propertyType == SerializedPropertyType.Float) - { - EditorGUI.Slider(position, targetSerializedProperty, range.Min, range.Max, label); - } - else if (targetSerializedProperty.propertyType == SerializedPropertyType.Integer) - { - EditorGUI.IntSlider(position, targetSerializedProperty, (int)range.Min, (int)range.Max, label); - } - else - { - EditorGUI.LabelField(position, label.text, "Use Range with float or int."); - } - } - } - else - { - var property = targetSerializedProperty; - - label = EditorGUI.BeginProperty(position, label, property); - var method = typeof(EditorGUI).GetMethod("MultiFieldPrefixLabel", BindingFlags.Static | BindingFlags.InvokeMethod | BindingFlags.Public | BindingFlags.NonPublic); - position = (Rect)method.Invoke(null, new object[] { position, 0, label, 1 }); - - EditorGUI.BeginChangeCheck(); - int indentLevel = EditorGUI.indentLevel; - EditorGUI.indentLevel = 0; - var stringValue = EditorGUI.TextArea(position, property.stringValue); - EditorGUI.indentLevel = indentLevel; - if (EditorGUI.EndChangeCheck()) - { - property.stringValue = stringValue; - } - EditorGUI.EndProperty(); - } - } - - MultilineReactivePropertyAttribute GetMultilineAttribute() - { - var fi = this.fieldInfo; - if (fi == null) return null; - return fi.GetCustomAttributes(false).OfType().FirstOrDefault(); - } - - RangeReactivePropertyAttribute GetRangeAttribute() - { - var fi = this.fieldInfo; - if (fi == null) return null; - return fi.GetCustomAttributes(false).OfType().FirstOrDefault(); - } - } - -#endif -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/InspectorDisplayDrawer.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/InspectorDisplayDrawer.cs.meta deleted file mode 100644 index 1388fb4..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/InspectorDisplayDrawer.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 6180f9fd2198dee44ae7f4a617529ffa -timeCreated: 1455373899 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/LifetimeDisposableExtensions.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/LifetimeDisposableExtensions.cs deleted file mode 100644 index 9103e43..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/LifetimeDisposableExtensions.cs +++ /dev/null @@ -1,90 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using UniRx.Triggers; -using UnityEngine; - -namespace UniRx -{ - public static partial class DisposableExtensions - { - /// Dispose self on target gameObject has been destroyed. Return value is self disposable. - public static T AddTo(this T disposable, GameObject gameObject) - where T : IDisposable - { - if (gameObject == null) - { - disposable.Dispose(); - return disposable; - } - - var trigger = gameObject.GetComponent(); - if (trigger == null) - { - trigger = gameObject.AddComponent(); - } - -#pragma warning disable 618 - - // If gameObject is deactive, does not raise OnDestroy, watch and invoke trigger. - if (!trigger.IsActivated && !trigger.IsMonitoredActivate && !trigger.gameObject.activeInHierarchy) - { - trigger.IsMonitoredActivate = true; - MainThreadDispatcher.StartEndOfFrameMicroCoroutine(MonitorTriggerHealth(trigger, gameObject)); - } - -#pragma warning restore 618 - - trigger.AddDisposableOnDestroy(disposable); - return disposable; - } - - static IEnumerator MonitorTriggerHealth(ObservableDestroyTrigger trigger, GameObject targetGameObject) - { - while (true) - { - yield return null; - if (trigger.IsActivated) yield break; - - if (targetGameObject == null) // isDestroy - { - trigger.ForceRaiseOnDestroy(); // Force publish OnDestroy - yield break; - } - } - } - - /// Dispose self on target gameObject has been destroyed. Return value is self disposable. - public static T AddTo(this T disposable, Component gameObjectComponent) - where T : IDisposable - { - if (gameObjectComponent == null) - { - disposable.Dispose(); - return disposable; - } - - return AddTo(disposable, gameObjectComponent.gameObject); - } - - /// - /// Add disposable(self) to CompositeDisposable(or other ICollection) and Dispose self on target gameObject has been destroyed. - /// Return value is self disposable. - /// - public static T AddTo(this T disposable, ICollection container, GameObject gameObject) - where T : IDisposable - { - return disposable.AddTo(container).AddTo(gameObject); - } - - /// - /// Add disposable(self) to CompositeDisposable(or other ICollection) and Dispose self on target gameObject has been destroyed. - /// Return value is self disposable. - /// - public static T AddTo(this T disposable, ICollection container, Component gameObjectComponent) - where T : IDisposable - { - return disposable.AddTo(container).AddTo(gameObjectComponent); - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/LifetimeDisposableExtensions.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/LifetimeDisposableExtensions.cs.meta deleted file mode 100644 index a774199..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/LifetimeDisposableExtensions.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: a7474e4acdc541340a1f566b2df46355 -timeCreated: 1455373900 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/MainThreadDispatcher.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/MainThreadDispatcher.cs deleted file mode 100644 index 741a5a5..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/MainThreadDispatcher.cs +++ /dev/null @@ -1,683 +0,0 @@ -#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5 || UNITY_4_6 || UNITY_5_0 || UNITY_5_1 || UNITY_5_2) -#define SupportCustomYieldInstruction -#endif - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Reflection; -using System.Threading; -using UniRx.InternalUtil; -using UnityEngine; - -namespace UniRx -{ - public sealed class MainThreadDispatcher : MonoBehaviour - { - public enum CullingMode - { - /// - /// Won't remove any MainThreadDispatchers. - /// - Disabled, - - /// - /// Checks if there is an existing MainThreadDispatcher on Awake(). If so, the new dispatcher removes itself. - /// - Self, - - /// - /// Search for excess MainThreadDispatchers and removes them all on Awake(). - /// - All - } - - public static CullingMode cullingMode = CullingMode.Self; - -#if UNITY_EDITOR - - // In UnityEditor's EditorMode can't instantiate and work MonoBehaviour.Update. - // EditorThreadDispatcher use EditorApplication.update instead of MonoBehaviour.Update. - class EditorThreadDispatcher - { - static object gate = new object(); - static EditorThreadDispatcher instance; - - public static EditorThreadDispatcher Instance - { - get - { - // Activate EditorThreadDispatcher is dangerous, completely Lazy. - lock (gate) - { - if (instance == null) - { - instance = new EditorThreadDispatcher(); - } - - return instance; - } - } - } - - ThreadSafeQueueWorker editorQueueWorker = new ThreadSafeQueueWorker(); - - EditorThreadDispatcher() - { - UnityEditor.EditorApplication.update += Update; - } - - public void Enqueue(Action action, object state) - { - editorQueueWorker.Enqueue(action, state); - } - - public void UnsafeInvoke(Action action) - { - try - { - action(); - } - catch (Exception ex) - { - Debug.LogException(ex); - } - } - - public void UnsafeInvoke(Action action, T state) - { - try - { - action(state); - } - catch (Exception ex) - { - Debug.LogException(ex); - } - } - - public void PseudoStartCoroutine(IEnumerator routine) - { - editorQueueWorker.Enqueue(_ => ConsumeEnumerator(routine), null); - } - - void Update() - { - editorQueueWorker.ExecuteAll(x => Debug.LogException(x)); - } - - void ConsumeEnumerator(IEnumerator routine) - { - if (routine.MoveNext()) - { - var current = routine.Current; - if (current == null) - { - goto ENQUEUE; - } - - var type = current.GetType(); -#if UNITY_2018_3_OR_NEWER -#pragma warning disable CS0618 -#endif - if (type == typeof(WWW)) - { - var www = (WWW)current; - editorQueueWorker.Enqueue(_ => ConsumeEnumerator(UnwrapWaitWWW(www, routine)), null); - return; - } -#if UNITY_2018_3_OR_NEWER -#pragma warning restore CS0618 -#endif - else if (type == typeof(AsyncOperation)) - { - var asyncOperation = (AsyncOperation)current; - editorQueueWorker.Enqueue(_ => ConsumeEnumerator(UnwrapWaitAsyncOperation(asyncOperation, routine)), null); - return; - } - else if (type == typeof(WaitForSeconds)) - { - var waitForSeconds = (WaitForSeconds)current; - var accessor = typeof(WaitForSeconds).GetField("m_Seconds", BindingFlags.Instance | BindingFlags.GetField | BindingFlags.NonPublic); - var second = (float)accessor.GetValue(waitForSeconds); - editorQueueWorker.Enqueue(_ => ConsumeEnumerator(UnwrapWaitForSeconds(second, routine)), null); - return; - } - else if (type == typeof(Coroutine)) - { - Debug.Log("Can't wait coroutine on UnityEditor"); - goto ENQUEUE; - } -#if SupportCustomYieldInstruction - else if (current is IEnumerator) - { - var enumerator = (IEnumerator)current; - editorQueueWorker.Enqueue(_ => ConsumeEnumerator(UnwrapEnumerator(enumerator, routine)), null); - return; - } -#endif - - ENQUEUE: - editorQueueWorker.Enqueue(_ => ConsumeEnumerator(routine), null); // next update - } - } - -#if UNITY_2018_3_OR_NEWER -#pragma warning disable CS0618 -#endif - IEnumerator UnwrapWaitWWW(WWW www, IEnumerator continuation) - { - while (!www.isDone) - { - yield return null; - } - ConsumeEnumerator(continuation); - } -#if UNITY_2018_3_OR_NEWER -#pragma warning restore CS0618 -#endif - - IEnumerator UnwrapWaitAsyncOperation(AsyncOperation asyncOperation, IEnumerator continuation) - { - while (!asyncOperation.isDone) - { - yield return null; - } - ConsumeEnumerator(continuation); - } - - IEnumerator UnwrapWaitForSeconds(float second, IEnumerator continuation) - { - var startTime = DateTimeOffset.UtcNow; - while (true) - { - yield return null; - - var elapsed = (DateTimeOffset.UtcNow - startTime).TotalSeconds; - if (elapsed >= second) - { - break; - } - }; - ConsumeEnumerator(continuation); - } - - IEnumerator UnwrapEnumerator(IEnumerator enumerator, IEnumerator continuation) - { - while (enumerator.MoveNext()) - { - yield return null; - } - ConsumeEnumerator(continuation); - } - } - -#endif - - /// Dispatch Asyncrhonous action. - public static void Post(Action action, object state) - { -#if UNITY_EDITOR - if (!ScenePlaybackDetector.IsPlaying) { EditorThreadDispatcher.Instance.Enqueue(action, state); return; } - -#endif - - var dispatcher = Instance; - if (!isQuitting && !object.ReferenceEquals(dispatcher, null)) - { - dispatcher.queueWorker.Enqueue(action, state); - } - } - - /// Dispatch Synchronous action if possible. - public static void Send(Action action, object state) - { -#if UNITY_EDITOR - if (!ScenePlaybackDetector.IsPlaying) { EditorThreadDispatcher.Instance.Enqueue(action, state); return; } -#endif - - if (mainThreadToken != null) - { - try - { - action(state); - } - catch (Exception ex) - { - var dispatcher = MainThreadDispatcher.Instance; - if (dispatcher != null) - { - dispatcher.unhandledExceptionCallback(ex); - } - } - } - else - { - Post(action, state); - } - } - - /// Run Synchronous action. - public static void UnsafeSend(Action action) - { -#if UNITY_EDITOR - if (!ScenePlaybackDetector.IsPlaying) { EditorThreadDispatcher.Instance.UnsafeInvoke(action); return; } -#endif - - try - { - action(); - } - catch (Exception ex) - { - var dispatcher = MainThreadDispatcher.Instance; - if (dispatcher != null) - { - dispatcher.unhandledExceptionCallback(ex); - } - } - } - - /// Run Synchronous action. - public static void UnsafeSend(Action action, T state) - { -#if UNITY_EDITOR - if (!ScenePlaybackDetector.IsPlaying) { EditorThreadDispatcher.Instance.UnsafeInvoke(action, state); return; } -#endif - - try - { - action(state); - } - catch (Exception ex) - { - var dispatcher = MainThreadDispatcher.Instance; - if (dispatcher != null) - { - dispatcher.unhandledExceptionCallback(ex); - } - } - } - - /// ThreadSafe StartCoroutine. - public static void SendStartCoroutine(IEnumerator routine) - { - if (mainThreadToken != null) - { - StartCoroutine(routine); - } - else - { -#if UNITY_EDITOR - // call from other thread - if (!ScenePlaybackDetector.IsPlaying) { EditorThreadDispatcher.Instance.PseudoStartCoroutine(routine); return; } -#endif - - var dispatcher = Instance; - if (!isQuitting && !object.ReferenceEquals(dispatcher, null)) - { - dispatcher.queueWorker.Enqueue(_ => - { - var dispacher2 = Instance; - if (dispacher2 != null) - { - (dispacher2 as MonoBehaviour).StartCoroutine(routine); - } - }, null); - } - } - } - - public static void StartUpdateMicroCoroutine(IEnumerator routine) - { -#if UNITY_EDITOR - if (!ScenePlaybackDetector.IsPlaying) { EditorThreadDispatcher.Instance.PseudoStartCoroutine(routine); return; } -#endif - - var dispatcher = Instance; - if (dispatcher != null) - { - dispatcher.updateMicroCoroutine.AddCoroutine(routine); - } - } - - public static void StartFixedUpdateMicroCoroutine(IEnumerator routine) - { -#if UNITY_EDITOR - if (!ScenePlaybackDetector.IsPlaying) { EditorThreadDispatcher.Instance.PseudoStartCoroutine(routine); return; } -#endif - - var dispatcher = Instance; - if (dispatcher != null) - { - dispatcher.fixedUpdateMicroCoroutine.AddCoroutine(routine); - } - } - - public static void StartEndOfFrameMicroCoroutine(IEnumerator routine) - { -#if UNITY_EDITOR - if (!ScenePlaybackDetector.IsPlaying) { EditorThreadDispatcher.Instance.PseudoStartCoroutine(routine); return; } -#endif - - var dispatcher = Instance; - if (dispatcher != null) - { - dispatcher.endOfFrameMicroCoroutine.AddCoroutine(routine); - } - } - - new public static Coroutine StartCoroutine(IEnumerator routine) - { -#if UNITY_EDITOR - if (!ScenePlaybackDetector.IsPlaying) { EditorThreadDispatcher.Instance.PseudoStartCoroutine(routine); return null; } -#endif - - var dispatcher = Instance; - if (dispatcher != null) - { - return (dispatcher as MonoBehaviour).StartCoroutine(routine); - } - else - { - return null; - } - } - - public static void RegisterUnhandledExceptionCallback(Action exceptionCallback) - { - if (exceptionCallback == null) - { - // do nothing - Instance.unhandledExceptionCallback = Stubs.Ignore; - } - else - { - Instance.unhandledExceptionCallback = exceptionCallback; - } - } - - ThreadSafeQueueWorker queueWorker = new ThreadSafeQueueWorker(); - Action unhandledExceptionCallback = ex => Debug.LogException(ex); // default - - MicroCoroutine updateMicroCoroutine = null; - MicroCoroutine fixedUpdateMicroCoroutine = null; - MicroCoroutine endOfFrameMicroCoroutine = null; - - static MainThreadDispatcher instance; - static bool initialized; - static bool isQuitting = false; - - public static string InstanceName - { - get - { - if (instance == null) - { - throw new NullReferenceException("MainThreadDispatcher is not initialized."); - } - return instance.name; - } - } - - public static bool IsInitialized - { - get { return initialized && instance != null; } - } - - [ThreadStatic] - static object mainThreadToken; - - static MainThreadDispatcher Instance - { - get - { - Initialize(); - return instance; - } - } - - public static void Initialize() - { - if (!initialized) - { -#if UNITY_EDITOR - // Don't try to add a GameObject when the scene is not playing. Only valid in the Editor, EditorView. - if (!ScenePlaybackDetector.IsPlaying) return; -#endif - MainThreadDispatcher dispatcher = null; - - try - { - dispatcher = GameObject.FindObjectOfType(); - } - catch - { - // Throw exception when calling from a worker thread. - var ex = new Exception("UniRx requires a MainThreadDispatcher component created on the main thread. Make sure it is added to the scene before calling UniRx from a worker thread."); - UnityEngine.Debug.LogException(ex); - throw ex; - } - - if (isQuitting) - { - // don't create new instance after quitting - // avoid "Some objects were not cleaned up when closing the scene find target" error. - return; - } - - if (dispatcher == null) - { - // awake call immediately from UnityEngine - new GameObject("MainThreadDispatcher").AddComponent(); - } - else - { - dispatcher.Awake(); // force awake - } - } - } - - public static bool IsInMainThread - { - get - { - return (mainThreadToken != null); - } - } - - void Awake() - { - if (instance == null) - { - instance = this; - mainThreadToken = new object(); - initialized = true; - - updateMicroCoroutine = new MicroCoroutine(ex => unhandledExceptionCallback(ex)); - fixedUpdateMicroCoroutine = new MicroCoroutine(ex => unhandledExceptionCallback(ex)); - endOfFrameMicroCoroutine = new MicroCoroutine(ex => unhandledExceptionCallback(ex)); - - StartCoroutine(RunUpdateMicroCoroutine()); - StartCoroutine(RunFixedUpdateMicroCoroutine()); - StartCoroutine(RunEndOfFrameMicroCoroutine()); - - DontDestroyOnLoad(gameObject); - } - else - { - if (this != instance) - { - if (cullingMode == CullingMode.Self) - { - // Try to destroy this dispatcher if there's already one in the scene. - Debug.LogWarning("There is already a MainThreadDispatcher in the scene. Removing myself..."); - DestroyDispatcher(this); - } - else if (cullingMode == CullingMode.All) - { - Debug.LogWarning("There is already a MainThreadDispatcher in the scene. Cleaning up all excess dispatchers..."); - CullAllExcessDispatchers(); - } - else - { - Debug.LogWarning("There is already a MainThreadDispatcher in the scene."); - } - } - } - } - - IEnumerator RunUpdateMicroCoroutine() - { - while (true) - { - yield return null; - updateMicroCoroutine.Run(); - } - } - - IEnumerator RunFixedUpdateMicroCoroutine() - { - while (true) - { - yield return YieldInstructionCache.WaitForFixedUpdate; - fixedUpdateMicroCoroutine.Run(); - } - } - - IEnumerator RunEndOfFrameMicroCoroutine() - { - while (true) - { - yield return YieldInstructionCache.WaitForEndOfFrame; - endOfFrameMicroCoroutine.Run(); - } - } - - static void DestroyDispatcher(MainThreadDispatcher aDispatcher) - { - if (aDispatcher != instance) - { - // Try to remove game object if it's empty - var components = aDispatcher.gameObject.GetComponents(); - if (aDispatcher.gameObject.transform.childCount == 0 && components.Length == 2) - { - if (components[0] is Transform && components[1] is MainThreadDispatcher) - { - Destroy(aDispatcher.gameObject); - } - } - else - { - // Remove component - MonoBehaviour.Destroy(aDispatcher); - } - } - } - - public static void CullAllExcessDispatchers() - { - var dispatchers = GameObject.FindObjectsOfType(); - for (int i = 0; i < dispatchers.Length; i++) - { - DestroyDispatcher(dispatchers[i]); - } - } - - void OnDestroy() - { - if (instance == this) - { - instance = GameObject.FindObjectOfType(); - initialized = instance != null; - - /* - // Although `this` still refers to a gameObject, it won't be found. - var foundDispatcher = GameObject.FindObjectOfType(); - - if (foundDispatcher != null) - { - // select another game object - Debug.Log("new instance: " + foundDispatcher.name); - instance = foundDispatcher; - initialized = true; - } - */ - } - } - - void Update() - { - if (update != null) - { - try - { - update.OnNext(Unit.Default); - } - catch (Exception ex) - { - unhandledExceptionCallback(ex); - } - } - queueWorker.ExecuteAll(unhandledExceptionCallback); - } - - // for Lifecycle Management - - Subject update; - - public static IObservable UpdateAsObservable() - { - return Instance.update ?? (Instance.update = new Subject()); - } - - Subject lateUpdate; - - void LateUpdate() - { - if (lateUpdate != null) lateUpdate.OnNext(Unit.Default); - } - - public static IObservable LateUpdateAsObservable() - { - return Instance.lateUpdate ?? (Instance.lateUpdate = new Subject()); - } - - Subject onApplicationFocus; - - void OnApplicationFocus(bool focus) - { - if (onApplicationFocus != null) onApplicationFocus.OnNext(focus); - } - - public static IObservable OnApplicationFocusAsObservable() - { - return Instance.onApplicationFocus ?? (Instance.onApplicationFocus = new Subject()); - } - - Subject onApplicationPause; - - void OnApplicationPause(bool pause) - { - if (onApplicationPause != null) onApplicationPause.OnNext(pause); - } - - public static IObservable OnApplicationPauseAsObservable() - { - return Instance.onApplicationPause ?? (Instance.onApplicationPause = new Subject()); - } - - Subject onApplicationQuit; - - void OnApplicationQuit() - { - isQuitting = true; - if (onApplicationQuit != null) onApplicationQuit.OnNext(Unit.Default); - } - - public static IObservable OnApplicationQuitAsObservable() - { - return Instance.onApplicationQuit ?? (Instance.onApplicationQuit = new Subject()); - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/MainThreadDispatcher.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/MainThreadDispatcher.cs.meta deleted file mode 100644 index a6867ef..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/MainThreadDispatcher.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: c3cd207057515c4438a31a6a7b548fe7 -timeCreated: 1465903910 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: -16000 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/MainThreadScheduler.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/MainThreadScheduler.cs deleted file mode 100644 index cf6262d..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/MainThreadScheduler.cs +++ /dev/null @@ -1,579 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Text; -using System.Threading; -using UnityEngine; - -namespace UniRx -{ -#if UniRxLibrary - public static partial class SchedulerUnity - { -#else - public static partial class Scheduler - { - public static void SetDefaultForUnity() - { - Scheduler.DefaultSchedulers.ConstantTimeOperations = Scheduler.Immediate; - Scheduler.DefaultSchedulers.TailRecursion = Scheduler.Immediate; - Scheduler.DefaultSchedulers.Iteration = Scheduler.CurrentThread; - Scheduler.DefaultSchedulers.TimeBasedOperations = MainThread; - Scheduler.DefaultSchedulers.AsyncConversions = Scheduler.ThreadPool; - } -#endif - static IScheduler mainThread; - - /// - /// Unity native MainThread Queue Scheduler. Run on mainthread and delayed on coroutine update loop, elapsed time is calculated based on Time.time. - /// - public static IScheduler MainThread - { - get - { - return mainThread ?? (mainThread = new MainThreadScheduler()); - } - } - - static IScheduler mainThreadIgnoreTimeScale; - - /// - /// Another MainThread scheduler, delay elapsed time is calculated based on Time.unscaledDeltaTime. - /// - public static IScheduler MainThreadIgnoreTimeScale - { - get - { - return mainThreadIgnoreTimeScale ?? (mainThreadIgnoreTimeScale = new IgnoreTimeScaleMainThreadScheduler()); - } - } - - static IScheduler mainThreadFixedUpdate; - - /// - /// Run on fixed update mainthread, delay elapsed time is calculated based on Time.fixedTime. - /// - public static IScheduler MainThreadFixedUpdate - { - get - { - return mainThreadFixedUpdate ?? (mainThreadFixedUpdate = new FixedUpdateMainThreadScheduler()); - } - } - - static IScheduler mainThreadEndOfFrame; - - /// - /// Run on end of frame mainthread, delay elapsed time is calculated based on Time.deltaTime. - /// - public static IScheduler MainThreadEndOfFrame - { - get - { - return mainThreadEndOfFrame ?? (mainThreadEndOfFrame = new EndOfFrameMainThreadScheduler()); - } - } - - class MainThreadScheduler : IScheduler, ISchedulerPeriodic, ISchedulerQueueing - { - readonly Action scheduleAction; - - public MainThreadScheduler() - { - MainThreadDispatcher.Initialize(); - scheduleAction = new Action(Schedule); - } - - // delay action is run in StartCoroutine - // Okay to action run synchronous and guaranteed run on MainThread - IEnumerator DelayAction(TimeSpan dueTime, Action action, ICancelable cancellation) - { - // zero == every frame - if (dueTime == TimeSpan.Zero) - { - yield return null; // not immediately, run next frame - } - else - { - yield return new WaitForSeconds((float)dueTime.TotalSeconds); - } - - if (cancellation.IsDisposed) yield break; - MainThreadDispatcher.UnsafeSend(action); - } - - IEnumerator PeriodicAction(TimeSpan period, Action action, ICancelable cancellation) - { - // zero == every frame - if (period == TimeSpan.Zero) - { - while (true) - { - yield return null; // not immediately, run next frame - if (cancellation.IsDisposed) yield break; - - MainThreadDispatcher.UnsafeSend(action); - } - } - else - { - var seconds = (float)(period.TotalMilliseconds / 1000.0); - var yieldInstruction = new WaitForSeconds(seconds); // cache single instruction object - - while (true) - { - yield return yieldInstruction; - if (cancellation.IsDisposed) yield break; - - MainThreadDispatcher.UnsafeSend(action); - } - } - } - - public DateTimeOffset Now - { - get { return Scheduler.Now; } - } - - void Schedule(object state) - { - var t = (Tuple)state; - if (!t.Item1.IsDisposed) - { - t.Item2(); - } - } - - public IDisposable Schedule(Action action) - { - var d = new BooleanDisposable(); - MainThreadDispatcher.Post(scheduleAction, Tuple.Create(d, action)); - return d; - } - - public IDisposable Schedule(DateTimeOffset dueTime, Action action) - { - return Schedule(dueTime - Now, action); - } - - public IDisposable Schedule(TimeSpan dueTime, Action action) - { - var d = new BooleanDisposable(); - var time = Scheduler.Normalize(dueTime); - - MainThreadDispatcher.SendStartCoroutine(DelayAction(time, action, d)); - - return d; - } - - public IDisposable SchedulePeriodic(TimeSpan period, Action action) - { - var d = new BooleanDisposable(); - var time = Scheduler.Normalize(period); - - MainThreadDispatcher.SendStartCoroutine(PeriodicAction(time, action, d)); - - return d; - } - - void ScheduleQueueing(object state) - { - var t = (Tuple>)state; - if (!t.Item1.IsDisposed) - { - t.Item3(t.Item2); - } - } - - public void ScheduleQueueing(ICancelable cancel, T state, Action action) - { - MainThreadDispatcher.Post(QueuedAction.Instance, Tuple.Create(cancel, state, action)); - } - - static class QueuedAction - { - public static readonly Action Instance = new Action(Invoke); - - public static void Invoke(object state) - { - var t = (Tuple>)state; - - if (!t.Item1.IsDisposed) - { - t.Item3(t.Item2); - } - } - } - } - - class IgnoreTimeScaleMainThreadScheduler : IScheduler, ISchedulerPeriodic, ISchedulerQueueing - { - readonly Action scheduleAction; - - public IgnoreTimeScaleMainThreadScheduler() - { - MainThreadDispatcher.Initialize(); - scheduleAction = new Action(Schedule); - } - - IEnumerator DelayAction(TimeSpan dueTime, Action action, ICancelable cancellation) - { - if (dueTime == TimeSpan.Zero) - { - yield return null; - if (cancellation.IsDisposed) yield break; - - MainThreadDispatcher.UnsafeSend(action); - } - else - { - var elapsed = 0f; - var dt = (float)dueTime.TotalSeconds; - while (true) - { - yield return null; - if (cancellation.IsDisposed) break; - - elapsed += Time.unscaledDeltaTime; - if (elapsed >= dt) - { - MainThreadDispatcher.UnsafeSend(action); - break; - } - } - } - } - - IEnumerator PeriodicAction(TimeSpan period, Action action, ICancelable cancellation) - { - // zero == every frame - if (period == TimeSpan.Zero) - { - while (true) - { - yield return null; // not immediately, run next frame - if (cancellation.IsDisposed) yield break; - - MainThreadDispatcher.UnsafeSend(action); - } - } - else - { - var elapsed = 0f; - var dt = (float)period.TotalSeconds; - while (true) - { - yield return null; - if (cancellation.IsDisposed) break; - - elapsed += Time.unscaledDeltaTime; - if (elapsed >= dt) - { - MainThreadDispatcher.UnsafeSend(action); - elapsed = 0; - } - } - } - } - - public DateTimeOffset Now - { - get { return Scheduler.Now; } - } - - void Schedule(object state) - { - var t = (Tuple)state; - if (!t.Item1.IsDisposed) - { - t.Item2(); - } - } - - public IDisposable Schedule(Action action) - { - var d = new BooleanDisposable(); - MainThreadDispatcher.Post(scheduleAction, Tuple.Create(d, action)); - return d; - } - - public IDisposable Schedule(DateTimeOffset dueTime, Action action) - { - return Schedule(dueTime - Now, action); - } - - public IDisposable Schedule(TimeSpan dueTime, Action action) - { - var d = new BooleanDisposable(); - var time = Scheduler.Normalize(dueTime); - - MainThreadDispatcher.SendStartCoroutine(DelayAction(time, action, d)); - - return d; - } - - public IDisposable SchedulePeriodic(TimeSpan period, Action action) - { - var d = new BooleanDisposable(); - var time = Scheduler.Normalize(period); - - MainThreadDispatcher.SendStartCoroutine(PeriodicAction(time, action, d)); - - return d; - } - - public void ScheduleQueueing(ICancelable cancel, T state, Action action) - { - MainThreadDispatcher.Post(QueuedAction.Instance, Tuple.Create(cancel, state, action)); - } - - static class QueuedAction - { - public static readonly Action Instance = new Action(Invoke); - - public static void Invoke(object state) - { - var t = (Tuple>)state; - - if (!t.Item1.IsDisposed) - { - t.Item3(t.Item2); - } - } - } - } - - class FixedUpdateMainThreadScheduler : IScheduler, ISchedulerPeriodic, ISchedulerQueueing - { - public FixedUpdateMainThreadScheduler() - { - MainThreadDispatcher.Initialize(); - } - - IEnumerator ImmediateAction(T state, Action action, ICancelable cancellation) - { - yield return null; - if (cancellation.IsDisposed) yield break; - - MainThreadDispatcher.UnsafeSend(action, state); - } - - IEnumerator DelayAction(TimeSpan dueTime, Action action, ICancelable cancellation) - { - if (dueTime == TimeSpan.Zero) - { - yield return null; - if (cancellation.IsDisposed) yield break; - - MainThreadDispatcher.UnsafeSend(action); - } - else - { - var startTime = Time.fixedTime; - var dt = (float)dueTime.TotalSeconds; - while (true) - { - yield return null; - if (cancellation.IsDisposed) break; - - var elapsed = Time.fixedTime - startTime; - if (elapsed >= dt) - { - MainThreadDispatcher.UnsafeSend(action); - break; - } - } - } - } - - IEnumerator PeriodicAction(TimeSpan period, Action action, ICancelable cancellation) - { - // zero == every frame - if (period == TimeSpan.Zero) - { - while (true) - { - yield return null; - if (cancellation.IsDisposed) yield break; - - MainThreadDispatcher.UnsafeSend(action); - } - } - else - { - var startTime = Time.fixedTime; - var dt = (float)period.TotalSeconds; - while (true) - { - yield return null; - if (cancellation.IsDisposed) break; - - var ft = Time.fixedTime; - var elapsed = ft - startTime; - if (elapsed >= dt) - { - MainThreadDispatcher.UnsafeSend(action); - startTime = ft; - } - } - } - } - - public DateTimeOffset Now - { - get { return Scheduler.Now; } - } - - public IDisposable Schedule(Action action) - { - return Schedule(TimeSpan.Zero, action); - } - - public IDisposable Schedule(DateTimeOffset dueTime, Action action) - { - return Schedule(dueTime - Now, action); - } - - public IDisposable Schedule(TimeSpan dueTime, Action action) - { - var d = new BooleanDisposable(); - var time = Scheduler.Normalize(dueTime); - - MainThreadDispatcher.StartFixedUpdateMicroCoroutine(DelayAction(time, action, d)); - - return d; - } - - public IDisposable SchedulePeriodic(TimeSpan period, Action action) - { - var d = new BooleanDisposable(); - var time = Scheduler.Normalize(period); - - MainThreadDispatcher.StartFixedUpdateMicroCoroutine(PeriodicAction(time, action, d)); - - return d; - } - - public void ScheduleQueueing(ICancelable cancel, T state, Action action) - { - MainThreadDispatcher.StartFixedUpdateMicroCoroutine(ImmediateAction(state, action, cancel)); - } - } - - class EndOfFrameMainThreadScheduler : IScheduler, ISchedulerPeriodic, ISchedulerQueueing - { - public EndOfFrameMainThreadScheduler() - { - MainThreadDispatcher.Initialize(); - } - - IEnumerator ImmediateAction(T state, Action action, ICancelable cancellation) - { - yield return null; - if (cancellation.IsDisposed) yield break; - - MainThreadDispatcher.UnsafeSend(action, state); - } - - IEnumerator DelayAction(TimeSpan dueTime, Action action, ICancelable cancellation) - { - if (dueTime == TimeSpan.Zero) - { - yield return null; - if (cancellation.IsDisposed) yield break; - - MainThreadDispatcher.UnsafeSend(action); - } - else - { - var elapsed = 0f; - var dt = (float)dueTime.TotalSeconds; - while (true) - { - yield return null; - if (cancellation.IsDisposed) break; - - elapsed += Time.deltaTime; - if (elapsed >= dt) - { - MainThreadDispatcher.UnsafeSend(action); - break; - } - } - } - } - - IEnumerator PeriodicAction(TimeSpan period, Action action, ICancelable cancellation) - { - // zero == every frame - if (period == TimeSpan.Zero) - { - while (true) - { - yield return null; - if (cancellation.IsDisposed) yield break; - - MainThreadDispatcher.UnsafeSend(action); - } - } - else - { - var elapsed = 0f; - var dt = (float)period.TotalSeconds; - while (true) - { - yield return null; - if (cancellation.IsDisposed) break; - - elapsed += Time.deltaTime; - if (elapsed >= dt) - { - MainThreadDispatcher.UnsafeSend(action); - elapsed = 0; - } - } - } - } - - public DateTimeOffset Now - { - get { return Scheduler.Now; } - } - - public IDisposable Schedule(Action action) - { - return Schedule(TimeSpan.Zero, action); - } - - public IDisposable Schedule(DateTimeOffset dueTime, Action action) - { - return Schedule(dueTime - Now, action); - } - - public IDisposable Schedule(TimeSpan dueTime, Action action) - { - var d = new BooleanDisposable(); - var time = Scheduler.Normalize(dueTime); - - MainThreadDispatcher.StartEndOfFrameMicroCoroutine(DelayAction(time, action, d)); - - return d; - } - - public IDisposable SchedulePeriodic(TimeSpan period, Action action) - { - var d = new BooleanDisposable(); - var time = Scheduler.Normalize(period); - - MainThreadDispatcher.StartEndOfFrameMicroCoroutine(PeriodicAction(time, action, d)); - - return d; - } - - public void ScheduleQueueing(ICancelable cancel, T state, Action action) - { - MainThreadDispatcher.StartEndOfFrameMicroCoroutine(ImmediateAction(state, action, cancel)); - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/MainThreadScheduler.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/MainThreadScheduler.cs.meta deleted file mode 100644 index 64bd220..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/MainThreadScheduler.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: f141c5dc72b97084a85631367a946ee8 -timeCreated: 1455373902 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Observable.Unity.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Observable.Unity.cs deleted file mode 100644 index c91af94..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Observable.Unity.cs +++ /dev/null @@ -1,1168 +0,0 @@ -#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5 || UNITY_4_6 || UNITY_5_0 || UNITY_5_1 || UNITY_5_2) -#define SupportCustomYieldInstruction -#endif - -using System; -using System.Collections; -using System.Collections.Generic; -using UniRx.InternalUtil; -using UniRx.Triggers; -using UnityEngine; -using System.Threading; - -#if !UniRxLibrary -using SchedulerUnity = UniRx.Scheduler; -#endif - -namespace UniRx -{ - public enum FrameCountType - { - Update, - FixedUpdate, - EndOfFrame, - } - - public enum MainThreadDispatchType - { - /// yield return null - Update, - FixedUpdate, - EndOfFrame, - GameObjectUpdate, - LateUpdate, - } - - public static class FrameCountTypeExtensions - { - public static YieldInstruction GetYieldInstruction(this FrameCountType frameCountType) - { - switch (frameCountType) - { - case FrameCountType.FixedUpdate: - return YieldInstructionCache.WaitForFixedUpdate; - case FrameCountType.EndOfFrame: - return YieldInstructionCache.WaitForEndOfFrame; - case FrameCountType.Update: - default: - return null; - } - } - } - - internal interface ICustomYieldInstructionErrorHandler - { - bool HasError { get; } - Exception Error { get; } - bool IsReThrowOnError { get; } - void ForceDisableRethrowOnError(); - void ForceEnableRethrowOnError(); - } - - public class ObservableYieldInstruction : IEnumerator, ICustomYieldInstructionErrorHandler - { - readonly IDisposable subscription; - readonly CancellationToken cancel; - bool reThrowOnError; - T current; - T result; - bool moveNext; - bool hasResult; - Exception error; - - public ObservableYieldInstruction(IObservable source, bool reThrowOnError, CancellationToken cancel) - { - this.moveNext = true; - this.reThrowOnError = reThrowOnError; - this.cancel = cancel; - try - { - this.subscription = source.Subscribe(new ToYieldInstruction(this)); - } - catch - { - moveNext = false; - throw; - } - } - - public bool HasError - { - get { return error != null; } - } - - public bool HasResult - { - get { return hasResult; } - } - - public bool IsCanceled - { - get - { - if (hasResult) return false; - if (error != null) return false; - return cancel.IsCancellationRequested; - } - } - - /// - /// HasResult || IsCanceled || HasError - /// - public bool IsDone - { - get - { - return HasResult || HasError || (cancel.IsCancellationRequested); - } - } - - public T Result - { - get { return result; } - } - - T IEnumerator.Current - { - get - { - return current; - } - } - - object IEnumerator.Current - { - get - { - return current; - } - } - - public Exception Error - { - get - { - return error; - } - } - - bool IEnumerator.MoveNext() - { - if (!moveNext) - { - if (reThrowOnError && HasError) - { - Error.Throw(); - } - - return false; - } - - if (cancel.IsCancellationRequested) - { - subscription.Dispose(); - return false; - } - - return true; - } - - bool ICustomYieldInstructionErrorHandler.IsReThrowOnError - { - get { return reThrowOnError; } - } - - void ICustomYieldInstructionErrorHandler.ForceDisableRethrowOnError() - { - this.reThrowOnError = false; - } - - void ICustomYieldInstructionErrorHandler.ForceEnableRethrowOnError() - { - this.reThrowOnError = true; - } - - public void Dispose() - { - subscription.Dispose(); - } - - void IEnumerator.Reset() - { - throw new NotSupportedException(); - } - - class ToYieldInstruction : IObserver - { - readonly ObservableYieldInstruction parent; - - public ToYieldInstruction(ObservableYieldInstruction parent) - { - this.parent = parent; - } - - public void OnNext(T value) - { - parent.current = value; - } - - public void OnError(Exception error) - { - parent.moveNext = false; - parent.error = error; - } - - public void OnCompleted() - { - parent.moveNext = false; - parent.hasResult = true; - parent.result = parent.current; - } - } - } - -#if UniRxLibrary - public static partial class ObservableUnity -#else - public static partial class Observable -#endif - { - readonly static HashSet YieldInstructionTypes = new HashSet - { - #if UNITY_2018_3_OR_NEWER -#pragma warning disable CS0618 -#endif - typeof(WWW), - #if UNITY_2018_3_OR_NEWER -#pragma warning restore CS0618 -#endif - typeof(WaitForEndOfFrame), - typeof(WaitForFixedUpdate), - typeof(WaitForSeconds), - typeof(AsyncOperation), - typeof(Coroutine) - }; - -#if SupportCustomYieldInstruction - - class EveryAfterUpdateInvoker : IEnumerator - { - long count = -1; - readonly IObserver observer; - readonly CancellationToken cancellationToken; - - public EveryAfterUpdateInvoker(IObserver observer, CancellationToken cancellationToken) - { - this.observer = observer; - this.cancellationToken = cancellationToken; - } - - public bool MoveNext() - { - if (!cancellationToken.IsCancellationRequested) - { - if (count != -1) // ignore first/immediate invoke - { - observer.OnNext(count++); - } - else - { - count++; - } - return true; - } - else - { - return false; - } - } - - public object Current - { - get - { - return null; - } - } - - public void Reset() - { - throw new NotSupportedException(); - } - } - -#endif - - - - /// From has no callback coroutine to IObservable. If publishEveryYield = true then publish OnNext every yield return else return once on enumeration completed. - public static IObservable FromCoroutine(Func coroutine, bool publishEveryYield = false) - { - return FromCoroutine((observer, cancellationToken) => WrapEnumerator(coroutine(), observer, cancellationToken, publishEveryYield)); - } - - /// From has no callback coroutine to IObservable. If publishEveryYield = true then publish OnNext every yield return else return once on enumeration completed. - public static IObservable FromCoroutine(Func coroutine, bool publishEveryYield = false) - { - return FromCoroutine((observer, cancellationToken) => WrapEnumerator(coroutine(cancellationToken), observer, cancellationToken, publishEveryYield)); - } - - /// - /// MicroCoroutine is lightweight, fast coroutine dispatcher. - /// IEnumerator supports only yield return null. - /// If publishEveryYield = true then publish OnNext every yield return else return once on enumeration completed. - /// - public static IObservable FromMicroCoroutine(Func coroutine, bool publishEveryYield = false, FrameCountType frameCountType = FrameCountType.Update) - { - return FromMicroCoroutine((observer, cancellationToken) => WrapEnumerator(coroutine(), observer, cancellationToken, publishEveryYield), frameCountType); - } - - /// - /// MicroCoroutine is lightweight, fast coroutine dispatcher. - /// IEnumerator supports only yield return null. - /// If publishEveryYield = true then publish OnNext every yield return else return once on enumeration completed. - /// - public static IObservable FromMicroCoroutine(Func coroutine, bool publishEveryYield = false, FrameCountType frameCountType = FrameCountType.Update) - { - return FromMicroCoroutine((observer, cancellationToken) => WrapEnumerator(coroutine(cancellationToken), observer, cancellationToken, publishEveryYield), frameCountType); - } - - static IEnumerator WrapEnumerator(IEnumerator enumerator, IObserver observer, CancellationToken cancellationToken, bool publishEveryYield) - { - var hasNext = default(bool); - var raisedError = false; - do - { - try - { - hasNext = enumerator.MoveNext(); - } - catch (Exception ex) - { - try - { - raisedError = true; - observer.OnError(ex); - } - finally - { - var d = enumerator as IDisposable; - if (d != null) - { - d.Dispose(); - } - } - yield break; - } - if (hasNext && publishEveryYield) - { - try - { - observer.OnNext(Unit.Default); - } - catch - { - var d = enumerator as IDisposable; - if (d != null) - { - d.Dispose(); - } - throw; - } - } - if (hasNext) - { -#if SupportCustomYieldInstruction - var current = enumerator.Current; - var customHandler = current as ICustomYieldInstructionErrorHandler; - if (customHandler != null && customHandler.IsReThrowOnError) - { - // If throws exception in Custom YieldInsrtuction, can't handle parent coroutine. - // It is C# limitation. - // so store error info and retrieve from parent. - customHandler.ForceDisableRethrowOnError(); - yield return current; - customHandler.ForceEnableRethrowOnError(); - - if (customHandler.HasError) - { - try - { - raisedError = true; - observer.OnError(customHandler.Error); - } - finally - { - var d = enumerator as IDisposable; - if (d != null) - { - d.Dispose(); - } - } - yield break; - } - } - else - { - yield return enumerator.Current; // yield inner YieldInstruction - } -#else - yield return enumerator.Current; // yield inner YieldInstruction -#endif - } - } while (hasNext && !cancellationToken.IsCancellationRequested); - - try - { - if (!raisedError && !cancellationToken.IsCancellationRequested) - { - observer.OnNext(Unit.Default); // last one - observer.OnCompleted(); - } - } - finally - { - var d = enumerator as IDisposable; - if (d != null) - { - d.Dispose(); - } - } - } - - /// Convert coroutine to typed IObservable. If nullAsNextUpdate = true then yield return null when Enumerator.Current and no null publish observer.OnNext. - public static IObservable FromCoroutineValue(Func coroutine, bool nullAsNextUpdate = true) - { - return FromCoroutine((observer, cancellationToken) => WrapEnumeratorYieldValue(coroutine(), observer, cancellationToken, nullAsNextUpdate)); - } - - /// Convert coroutine to typed IObservable. If nullAsNextUpdate = true then yield return null when Enumerator.Current and no null publish observer.OnNext. - public static IObservable FromCoroutineValue(Func coroutine, bool nullAsNextUpdate = true) - { - return FromCoroutine((observer, cancellationToken) => WrapEnumeratorYieldValue(coroutine(cancellationToken), observer, cancellationToken, nullAsNextUpdate)); - } - - static IEnumerator WrapEnumeratorYieldValue(IEnumerator enumerator, IObserver observer, CancellationToken cancellationToken, bool nullAsNextUpdate) - { - var hasNext = default(bool); - var current = default(object); - var raisedError = false; - do - { - try - { - hasNext = enumerator.MoveNext(); - if (hasNext) current = enumerator.Current; - } - catch (Exception ex) - { - try - { - raisedError = true; - observer.OnError(ex); - } - finally - { - var d = enumerator as IDisposable; - if (d != null) - { - d.Dispose(); - } - } - yield break; - } - - if (hasNext) - { - if (current != null && YieldInstructionTypes.Contains(current.GetType())) - { - yield return current; - } -#if SupportCustomYieldInstruction - else if (current is IEnumerator) - { - var customHandler = current as ICustomYieldInstructionErrorHandler; - if (customHandler != null && customHandler.IsReThrowOnError) - { - // If throws exception in Custom YieldInsrtuction, can't handle parent coroutine. - // It is C# limitation. - // so store error info and retrieve from parent. - customHandler.ForceDisableRethrowOnError(); - yield return current; - customHandler.ForceEnableRethrowOnError(); - - if (customHandler.HasError) - { - try - { - raisedError = true; - observer.OnError(customHandler.Error); - } - finally - { - var d = enumerator as IDisposable; - if (d != null) - { - d.Dispose(); - } - } - yield break; - } - } - else - { - yield return current; - } - } -#endif - else if (current == null && nullAsNextUpdate) - { - yield return null; - } - else - { - try - { - observer.OnNext((T)current); - } - catch - { - var d = enumerator as IDisposable; - if (d != null) - { - d.Dispose(); - } - throw; - } - } - } - } while (hasNext && !cancellationToken.IsCancellationRequested); - - try - { - if (!raisedError && !cancellationToken.IsCancellationRequested) - { - observer.OnCompleted(); - } - } - finally - { - var d = enumerator as IDisposable; - if (d != null) - { - d.Dispose(); - } - } - } - - public static IObservable FromCoroutine(Func, IEnumerator> coroutine) - { - return FromCoroutine((observer, cancellationToken) => WrapToCancellableEnumerator(coroutine(observer), observer, cancellationToken)); - } - - /// - /// MicroCoroutine is lightweight, fast coroutine dispatcher. - /// IEnumerator supports only yield return null. - /// - public static IObservable FromMicroCoroutine(Func, IEnumerator> coroutine, FrameCountType frameCountType = FrameCountType.Update) - { - return FromMicroCoroutine((observer, cancellationToken) => WrapToCancellableEnumerator(coroutine(observer), observer, cancellationToken), frameCountType); - } - - static IEnumerator WrapToCancellableEnumerator(IEnumerator enumerator, IObserver observer, CancellationToken cancellationToken) - { - var hasNext = default(bool); - do - { - try - { - hasNext = enumerator.MoveNext(); - } - catch (Exception ex) - { - try - { - observer.OnError(ex); - } - finally - { - var d = enumerator as IDisposable; - if (d != null) - { - d.Dispose(); - } - } - yield break; - } - - yield return enumerator.Current; // yield inner YieldInstruction - } while (hasNext && !cancellationToken.IsCancellationRequested); - - { - var d = enumerator as IDisposable; - if (d != null) - { - d.Dispose(); - } - } - } - - public static IObservable FromCoroutine(Func, CancellationToken, IEnumerator> coroutine) - { - return new UniRx.Operators.FromCoroutineObservable(coroutine); - } - - /// - /// MicroCoroutine is lightweight, fast coroutine dispatcher. - /// IEnumerator supports only yield return null. - /// - public static IObservable FromMicroCoroutine(Func, CancellationToken, IEnumerator> coroutine, FrameCountType frameCountType = FrameCountType.Update) - { - return new UniRx.Operators.FromMicroCoroutineObservable(coroutine, frameCountType); - } - - public static IObservable SelectMany(this IObservable source, IEnumerator coroutine, bool publishEveryYield = false) - { - return source.SelectMany(FromCoroutine(() => coroutine, publishEveryYield)); - } - - public static IObservable SelectMany(this IObservable source, Func selector, bool publishEveryYield = false) - { - return source.SelectMany(FromCoroutine(() => selector(), publishEveryYield)); - } - - /// - /// Note: publishEveryYield is always false. If you want to set true, use Observable.FromCoroutine(() => selector(x), true). This is workaround of Unity compiler's bug. - /// - public static IObservable SelectMany(this IObservable source, Func selector) - { - return source.SelectMany(x => FromCoroutine(() => selector(x), false)); - } - - public static IObservable ToObservable(this IEnumerator coroutine, bool publishEveryYield = false) - { - return FromCoroutine((observer, cancellationToken) => WrapEnumerator(coroutine, observer, cancellationToken, publishEveryYield)); - } - -#if SupportCustomYieldInstruction - - public static ObservableYieldInstruction ToYieldInstruction(this IEnumerator coroutine) - { - return ToObservable(coroutine, false).ToYieldInstruction(); - } - - public static ObservableYieldInstruction ToYieldInstruction(this IEnumerator coroutine, bool throwOnError) - { - return ToObservable(coroutine, false).ToYieldInstruction(throwOnError); - } - - public static ObservableYieldInstruction ToYieldInstruction(this IEnumerator coroutine, CancellationToken cancellationToken) - { - return ToObservable(coroutine, false).ToYieldInstruction(cancellationToken); - } - - public static ObservableYieldInstruction ToYieldInstruction(this IEnumerator coroutine, bool throwOnError, CancellationToken cancellationToken) - { - return ToObservable(coroutine, false).ToYieldInstruction(throwOnError, cancellationToken); - } - -#endif - - // variation of FromCoroutine - - /// - /// EveryUpdate calls coroutine's yield return null timing. It is after all Update and before LateUpdate. - /// - public static IObservable EveryUpdate() - { - return FromMicroCoroutine((observer, cancellationToken) => EveryCycleCore(observer, cancellationToken), FrameCountType.Update); - } - - public static IObservable EveryFixedUpdate() - { - return FromMicroCoroutine((observer, cancellationToken) => EveryCycleCore(observer, cancellationToken), FrameCountType.FixedUpdate); - } - - public static IObservable EveryEndOfFrame() - { - return FromMicroCoroutine((observer, cancellationToken) => EveryCycleCore(observer, cancellationToken), FrameCountType.EndOfFrame); - } - - static IEnumerator EveryCycleCore(IObserver observer, CancellationToken cancellationToken) - { - if (cancellationToken.IsCancellationRequested) yield break; - var count = 0L; - while (true) - { - yield return null; - if (cancellationToken.IsCancellationRequested) yield break; - - observer.OnNext(count++); - } - } - - /// - /// EveryGameObjectUpdate calls from MainThreadDispatcher's Update. - /// - public static IObservable EveryGameObjectUpdate() - { - return MainThreadDispatcher.UpdateAsObservable().Scan(-1L, (x, y) => x + 1); - } - - /// - /// EveryLateUpdate calls from MainThreadDispatcher's OnLateUpdate. - /// - public static IObservable EveryLateUpdate() - { - return MainThreadDispatcher.LateUpdateAsObservable().Scan(-1L, (x, y) => x + 1); - } - -#if SupportCustomYieldInstruction - - /// - /// [Obsolete]Same as EveryUpdate. - /// - [Obsolete] - public static IObservable EveryAfterUpdate() - { - return FromCoroutine((observer, cancellationToken) => new EveryAfterUpdateInvoker(observer, cancellationToken)); - } - -#endif - - #region Observable.Time Frame Extensions - - // Interval, Timer, Delay, Sample, Throttle, Timeout - - public static IObservable NextFrame(FrameCountType frameCountType = FrameCountType.Update) - { - return FromMicroCoroutine((observer, cancellation) => NextFrameCore(observer, cancellation), frameCountType); - } - - static IEnumerator NextFrameCore(IObserver observer, CancellationToken cancellation) - { - yield return null; - - if (!cancellation.IsCancellationRequested) - { - observer.OnNext(Unit.Default); - observer.OnCompleted(); - } - } - - public static IObservable IntervalFrame(int intervalFrameCount, FrameCountType frameCountType = FrameCountType.Update) - { - return TimerFrame(intervalFrameCount, intervalFrameCount, frameCountType); - } - - public static IObservable TimerFrame(int dueTimeFrameCount, FrameCountType frameCountType = FrameCountType.Update) - { - return FromMicroCoroutine((observer, cancellation) => TimerFrameCore(observer, dueTimeFrameCount, cancellation), frameCountType); - } - - public static IObservable TimerFrame(int dueTimeFrameCount, int periodFrameCount, FrameCountType frameCountType = FrameCountType.Update) - { - return FromMicroCoroutine((observer, cancellation) => TimerFrameCore(observer, dueTimeFrameCount, periodFrameCount, cancellation), frameCountType); - } - - static IEnumerator TimerFrameCore(IObserver observer, int dueTimeFrameCount, CancellationToken cancel) - { - // normalize - if (dueTimeFrameCount <= 0) dueTimeFrameCount = 0; - - var currentFrame = 0; - - // initial phase - while (!cancel.IsCancellationRequested) - { - if (currentFrame++ == dueTimeFrameCount) - { - observer.OnNext(0); - observer.OnCompleted(); - break; - } - yield return null; - } - } - - static IEnumerator TimerFrameCore(IObserver observer, int dueTimeFrameCount, int periodFrameCount, CancellationToken cancel) - { - // normalize - if (dueTimeFrameCount <= 0) dueTimeFrameCount = 0; - if (periodFrameCount <= 0) periodFrameCount = 1; - - var sendCount = 0L; - var currentFrame = 0; - - // initial phase - while (!cancel.IsCancellationRequested) - { - if (currentFrame++ == dueTimeFrameCount) - { - observer.OnNext(sendCount++); - currentFrame = -1; - break; - } - yield return null; - } - - // period phase - while (!cancel.IsCancellationRequested) - { - if (++currentFrame == periodFrameCount) - { - observer.OnNext(sendCount++); - currentFrame = 0; - } - yield return null; - } - } - - public static IObservable DelayFrame(this IObservable source, int frameCount, FrameCountType frameCountType = FrameCountType.Update) - { - if (frameCount < 0) throw new ArgumentOutOfRangeException("frameCount"); - return new UniRx.Operators.DelayFrameObservable(source, frameCount, frameCountType); - } - - public static IObservable Sample(this IObservable source, IObservable sampler) - { - return new UniRx.Operators.SampleObservable(source, sampler); - } - - public static IObservable SampleFrame(this IObservable source, int frameCount, FrameCountType frameCountType = FrameCountType.Update) - { - if (frameCount < 0) throw new ArgumentOutOfRangeException("frameCount"); - return new UniRx.Operators.SampleFrameObservable(source, frameCount, frameCountType); - } - - public static IObservable ThrottleFrame(this IObservable source, int frameCount, FrameCountType frameCountType = FrameCountType.Update) - { - if (frameCount < 0) throw new ArgumentOutOfRangeException("frameCount"); - return new UniRx.Operators.ThrottleFrameObservable(source, frameCount, frameCountType); - } - - public static IObservable ThrottleFirstFrame(this IObservable source, int frameCount, FrameCountType frameCountType = FrameCountType.Update) - { - if (frameCount < 0) throw new ArgumentOutOfRangeException("frameCount"); - return new UniRx.Operators.ThrottleFirstFrameObservable(source, frameCount, frameCountType); - } - - public static IObservable TimeoutFrame(this IObservable source, int frameCount, FrameCountType frameCountType = FrameCountType.Update) - { - if (frameCount < 0) throw new ArgumentOutOfRangeException("frameCount"); - return new UniRx.Operators.TimeoutFrameObservable(source, frameCount, frameCountType); - } - - public static IObservable DelayFrameSubscription(this IObservable source, int frameCount, FrameCountType frameCountType = FrameCountType.Update) - { - if (frameCount < 0) throw new ArgumentOutOfRangeException("frameCount"); - return new UniRx.Operators.DelayFrameSubscriptionObservable(source, frameCount, frameCountType); - } - - #endregion - -#if SupportCustomYieldInstruction - - /// - /// Convert to yieldable IEnumerator. e.g. yield return source.ToYieldInstruction();. - /// If needs last result, you can take ObservableYieldInstruction.HasResult/Result property. - /// This overload throws exception if received OnError events(same as coroutine). - /// - public static ObservableYieldInstruction ToYieldInstruction(this IObservable source) - { - return new ObservableYieldInstruction(source, true, CancellationToken.None); - } - - /// - /// Convert to yieldable IEnumerator. e.g. yield return source.ToYieldInstruction();. - /// If needs last result, you can take ObservableYieldInstruction.HasResult/Result property. - /// This overload throws exception if received OnError events(same as coroutine). - /// - public static ObservableYieldInstruction ToYieldInstruction(this IObservable source, CancellationToken cancel) - { - return new ObservableYieldInstruction(source, true, cancel); - } - - /// - /// Convert to yieldable IEnumerator. e.g. yield return source.ToYieldInstruction();. - /// If needs last result, you can take ObservableYieldInstruction.HasResult/Result property. - /// If throwOnError = false, you can take ObservableYieldInstruction.HasError/Error property. - /// - public static ObservableYieldInstruction ToYieldInstruction(this IObservable source, bool throwOnError) - { - return new ObservableYieldInstruction(source, throwOnError, CancellationToken.None); - } - - /// - /// Convert to yieldable IEnumerator. e.g. yield return source.ToYieldInstruction();. - /// If needs last result, you can take ObservableYieldInstruction.HasResult/Result property. - /// If throwOnError = false, you can take ObservableYieldInstruction.HasError/Error property. - /// - public static ObservableYieldInstruction ToYieldInstruction(this IObservable source, bool throwOnError, CancellationToken cancel) - { - return new ObservableYieldInstruction(source, throwOnError, cancel); - } - -#endif - - /// Convert to awaitable IEnumerator. - public static IEnumerator ToAwaitableEnumerator(this IObservable source, CancellationToken cancel = default(CancellationToken)) - { - return ToAwaitableEnumerator(source, Stubs.Ignore, Stubs.Throw, cancel); - } - - /// Convert to awaitable IEnumerator. - public static IEnumerator ToAwaitableEnumerator(this IObservable source, Action onResult, CancellationToken cancel = default(CancellationToken)) - { - return ToAwaitableEnumerator(source, onResult, Stubs.Throw, cancel); - } - - /// Convert to awaitable IEnumerator. - public static IEnumerator ToAwaitableEnumerator(this IObservable source, Action onError, CancellationToken cancel = default(CancellationToken)) - { - return ToAwaitableEnumerator(source, Stubs.Ignore, onError, cancel); - } - - /// Convert to awaitable IEnumerator. - public static IEnumerator ToAwaitableEnumerator(this IObservable source, Action onResult, Action onError, CancellationToken cancel = default(CancellationToken)) - { - var enumerator = new ObservableYieldInstruction(source, false, cancel); - var e = (IEnumerator)enumerator; - while (e.MoveNext() && !cancel.IsCancellationRequested) - { - yield return null; - } - - if (cancel.IsCancellationRequested) - { - enumerator.Dispose(); - yield break; - } - - if (enumerator.HasResult) - { - onResult(enumerator.Result); - } - else if (enumerator.HasError) - { - onError(enumerator.Error); - } - } - - /// AutoStart observable as coroutine. - public static Coroutine StartAsCoroutine(this IObservable source, CancellationToken cancel = default(CancellationToken)) - { - return StartAsCoroutine(source, Stubs.Ignore, Stubs.Throw, cancel); - } - - /// AutoStart observable as coroutine. - public static Coroutine StartAsCoroutine(this IObservable source, Action onResult, CancellationToken cancel = default(CancellationToken)) - { - return StartAsCoroutine(source, onResult, Stubs.Throw, cancel); - } - - /// AutoStart observable as coroutine. - public static Coroutine StartAsCoroutine(this IObservable source, Action onError, CancellationToken cancel = default(CancellationToken)) - { - return StartAsCoroutine(source, Stubs.Ignore, onError, cancel); - } - - /// AutoStart observable as coroutine. - public static Coroutine StartAsCoroutine(this IObservable source, Action onResult, Action onError, CancellationToken cancel = default(CancellationToken)) - { - return MainThreadDispatcher.StartCoroutine(source.ToAwaitableEnumerator(onResult, onError, cancel)); - } - - public static IObservable ObserveOnMainThread(this IObservable source) - { - return source.ObserveOn(SchedulerUnity.MainThread); - } - - public static IObservable ObserveOnMainThread(this IObservable source, MainThreadDispatchType dispatchType) - { - switch (dispatchType) - { - case MainThreadDispatchType.Update: - return source.ObserveOnMainThread(); // faster path - - // others, bit slower - - case MainThreadDispatchType.FixedUpdate: - return source.SelectMany(_ => EveryFixedUpdate().Take(1), (x, _) => x); - case MainThreadDispatchType.EndOfFrame: - return source.SelectMany(_ => EveryEndOfFrame().Take(1), (x, _) => x); - case MainThreadDispatchType.GameObjectUpdate: - return source.SelectMany(_ => MainThreadDispatcher.UpdateAsObservable().Take(1), (x, _) => x); - case MainThreadDispatchType.LateUpdate: - return source.SelectMany(_ => MainThreadDispatcher.LateUpdateAsObservable().Take(1), (x, _) => x); - default: - throw new ArgumentException("type is invalid"); - } - } - - public static IObservable SubscribeOnMainThread(this IObservable source) - { - return source.SubscribeOn(SchedulerUnity.MainThread); - } - - // I can't avoid Unity 5.3's uNET weaver bug, pending... - - //public static IObservable SubscribeOnMainThread(this IObservable source, MainThreadDispatchType dispatchType) - //{ - // switch (dispatchType) - // { - // case MainThreadDispatchType.Update: - // return source.SubscribeOnMainThread(); // faster path - - // // others, bit slower - - // case MainThreadDispatchType.FixedUpdate: - // return new UniRx.Operators.SubscribeOnMainThreadObservable(source, EveryFixedUpdate().Take(1)); - // case MainThreadDispatchType.EndOfFrame: - // return new UniRx.Operators.SubscribeOnMainThreadObservable(source, EveryEndOfFrame().Take(1)); - // case MainThreadDispatchType.GameObjectUpdate: - // return new UniRx.Operators.SubscribeOnMainThreadObservable(source, MainThreadDispatcher.UpdateAsObservable().Select(_ => 0L).Take(1)); - // case MainThreadDispatchType.LateUpdate: - // return new UniRx.Operators.SubscribeOnMainThreadObservable(source, MainThreadDispatcher.LateUpdateAsObservable().Select(_ => 0L).Take(1)); - // case MainThreadDispatchType.AfterUpdate: - // return new UniRx.Operators.SubscribeOnMainThreadObservable(source, EveryAfterUpdate().Take(1)); - // default: - // throw new ArgumentException("type is invalid"); - // } - //} - - public static IObservable EveryApplicationPause() - { - return MainThreadDispatcher.OnApplicationPauseAsObservable().AsObservable(); - } - - public static IObservable EveryApplicationFocus() - { - return MainThreadDispatcher.OnApplicationFocusAsObservable().AsObservable(); - } - - /// publish OnNext(Unit) and OnCompleted() on application quit. - public static IObservable OnceApplicationQuit() - { - return MainThreadDispatcher.OnApplicationQuitAsObservable().Take(1); - } - - public static IObservable TakeUntilDestroy(this IObservable source, Component target) - { - return source.TakeUntil(target.OnDestroyAsObservable()); - } - - public static IObservable TakeUntilDestroy(this IObservable source, GameObject target) - { - return source.TakeUntil(target.OnDestroyAsObservable()); - } - - public static IObservable TakeUntilDisable(this IObservable source, Component target) - { - return source.TakeUntil(target.OnDisableAsObservable()); - } - - public static IObservable TakeUntilDisable(this IObservable source, GameObject target) - { - return source.TakeUntil(target.OnDisableAsObservable()); - } - - public static IObservable RepeatUntilDestroy(this IObservable source, GameObject target) - { - return RepeatUntilCore(RepeatInfinite(source), target.OnDestroyAsObservable(), target); - } - - public static IObservable RepeatUntilDestroy(this IObservable source, Component target) - { - return RepeatUntilCore(RepeatInfinite(source), target.OnDestroyAsObservable(), (target != null) ? target.gameObject : null); - } - - public static IObservable RepeatUntilDisable(this IObservable source, GameObject target) - { - return RepeatUntilCore(RepeatInfinite(source), target.OnDisableAsObservable(), target); - } - - public static IObservable RepeatUntilDisable(this IObservable source, Component target) - { - return RepeatUntilCore(RepeatInfinite(source), target.OnDisableAsObservable(), (target != null) ? target.gameObject : null); - } - - static IObservable RepeatUntilCore(this IEnumerable> sources, IObservable trigger, GameObject lifeTimeChecker) - { - return new UniRx.Operators.RepeatUntilObservable(sources, trigger, lifeTimeChecker); - } - - public static IObservable> FrameInterval(this IObservable source) - { - return new UniRx.Operators.FrameIntervalObservable(source); - } - - public static IObservable> FrameTimeInterval(this IObservable source, bool ignoreTimeScale = false) - { - return new UniRx.Operators.FrameTimeIntervalObservable(source, ignoreTimeScale); - } - - /// - /// Buffer elements in during target frame counts. Default raise same frame of end(frameCount = 0, frameCountType = EndOfFrame). - /// - public static IObservable> BatchFrame(this IObservable source) - { - // if use default argument, comiler errors ambiguous(Unity's limitation) - return BatchFrame(source, 0, FrameCountType.EndOfFrame); - } - - /// - /// Buffer elements in during target frame counts. - /// - public static IObservable> BatchFrame(this IObservable source, int frameCount, FrameCountType frameCountType) - { - if (frameCount < 0) throw new ArgumentException("frameCount must be >= 0, frameCount:" + frameCount); - return new UniRx.Operators.BatchFrameObservable(source, frameCount, frameCountType); - } - - /// - /// Wait command in during target frame counts. Default raise same frame of end(frameCount = 0, frameCountType = EndOfFrame). - /// - public static IObservable BatchFrame(this IObservable source) - { - return BatchFrame(source, 0, FrameCountType.EndOfFrame); - } - - /// - /// Wait command in during target frame counts. - /// - public static IObservable BatchFrame(this IObservable source, int frameCount, FrameCountType frameCountType) - { - if (frameCount < 0) throw new ArgumentException("frameCount must be >= 0, frameCount:" + frameCount); - return new UniRx.Operators.BatchFrameObservable(source, frameCount, frameCountType); - } - -#if UniRxLibrary - - static IEnumerable> RepeatInfinite(IObservable source) - { - while (true) - { - yield return source; - } - } - - internal static class Stubs - { - public static readonly Action Nop = () => { }; - public static readonly Action Throw = ex => { ex.Throw(); }; - - // Stubs.Ignore can't avoid iOS AOT problem. - public static void Ignore(T t) - { - } - - // marker for CatchIgnore and Catch avoid iOS AOT problem. - public static IObservable CatchIgnore(Exception ex) - { - return Observable.Empty(); - } - } -#endif - } -} diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Observable.Unity.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Observable.Unity.cs.meta deleted file mode 100644 index e78c0a2..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Observable.Unity.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: c6ef0a186b9ceaf41af7f2a9f4006216 -timeCreated: 1455373901 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ObservableWWW.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ObservableWWW.cs deleted file mode 100644 index 820a6d6..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ObservableWWW.cs +++ /dev/null @@ -1,442 +0,0 @@ -using System; -using System.Collections; -using UnityEngine; - -#if !UniRxLibrary -using ObservableUnity = UniRx.Observable; -#endif - -#if UNITY_2018_3_OR_NEWER -#pragma warning disable CS0618 -#endif - -namespace UniRx -{ - using System.Threading; -#if !(UNITY_METRO || UNITY_WP8) && (UNITY_4_4 || UNITY_4_3 || UNITY_4_2 || UNITY_4_1 || UNITY_4_0_1 || UNITY_4_0 || UNITY_3_5 || UNITY_3_4 || UNITY_3_3 || UNITY_3_2 || UNITY_3_1 || UNITY_3_0_0 || UNITY_3_0 || UNITY_2_6_1 || UNITY_2_6) - // Fallback for Unity versions below 4.5 - using Hash = System.Collections.Hashtable; - using HashEntry = System.Collections.DictionaryEntry; -#else - // Unity 4.5 release notes: - // WWW: deprecated 'WWW(string url, byte[] postData, Hashtable headers)', - // use 'public WWW(string url, byte[] postData, Dictionary headers)' instead. - using Hash = System.Collections.Generic.Dictionary; - using HashEntry = System.Collections.Generic.KeyValuePair; -#endif - -#if UNITY_2018_3_OR_NEWER - [Obsolete("Use UnityWebRequest, a fully featured replacement which is more efficient and has additional features")] -#endif - public static partial class ObservableWWW - { - public static IObservable Get(string url, Hash headers = null, IProgress progress = null) - { - return ObservableUnity.FromCoroutine((observer, cancellation) => FetchText(new WWW(url, null, (headers ?? new Hash())), observer, progress, cancellation)); - } - - public static IObservable GetAndGetBytes(string url, Hash headers = null, IProgress progress = null) - { - return ObservableUnity.FromCoroutine((observer, cancellation) => FetchBytes(new WWW(url, null, (headers ?? new Hash())), observer, progress, cancellation)); - } - public static IObservable GetWWW(string url, Hash headers = null, IProgress progress = null) - { - return ObservableUnity.FromCoroutine((observer, cancellation) => Fetch(new WWW(url, null, (headers ?? new Hash())), observer, progress, cancellation)); - } - - public static IObservable Post(string url, byte[] postData, IProgress progress = null) - { - return ObservableUnity.FromCoroutine((observer, cancellation) => FetchText(new WWW(url, postData), observer, progress, cancellation)); - } - - public static IObservable Post(string url, byte[] postData, Hash headers, IProgress progress = null) - { - return ObservableUnity.FromCoroutine((observer, cancellation) => FetchText(new WWW(url, postData, headers), observer, progress, cancellation)); - } - - public static IObservable Post(string url, WWWForm content, IProgress progress = null) - { - return ObservableUnity.FromCoroutine((observer, cancellation) => FetchText(new WWW(url, content), observer, progress, cancellation)); - } - - public static IObservable Post(string url, WWWForm content, Hash headers, IProgress progress = null) - { - var contentHeaders = content.headers; - return ObservableUnity.FromCoroutine((observer, cancellation) => FetchText(new WWW(url, content.data, MergeHash(contentHeaders, headers)), observer, progress, cancellation)); - } - - public static IObservable PostAndGetBytes(string url, byte[] postData, IProgress progress = null) - { - return ObservableUnity.FromCoroutine((observer, cancellation) => FetchBytes(new WWW(url, postData), observer, progress, cancellation)); - } - - public static IObservable PostAndGetBytes(string url, byte[] postData, Hash headers, IProgress progress = null) - { - return ObservableUnity.FromCoroutine((observer, cancellation) => FetchBytes(new WWW(url, postData, headers), observer, progress, cancellation)); - } - - public static IObservable PostAndGetBytes(string url, WWWForm content, IProgress progress = null) - { - return ObservableUnity.FromCoroutine((observer, cancellation) => FetchBytes(new WWW(url, content), observer, progress, cancellation)); - } - - public static IObservable PostAndGetBytes(string url, WWWForm content, Hash headers, IProgress progress = null) - { - var contentHeaders = content.headers; - return ObservableUnity.FromCoroutine((observer, cancellation) => FetchBytes(new WWW(url, content.data, MergeHash(contentHeaders, headers)), observer, progress, cancellation)); - } - - public static IObservable PostWWW(string url, byte[] postData, IProgress progress = null) - { - return ObservableUnity.FromCoroutine((observer, cancellation) => Fetch(new WWW(url, postData), observer, progress, cancellation)); - } - - public static IObservable PostWWW(string url, byte[] postData, Hash headers, IProgress progress = null) - { - return ObservableUnity.FromCoroutine((observer, cancellation) => Fetch(new WWW(url, postData, headers), observer, progress, cancellation)); - } - - public static IObservable PostWWW(string url, WWWForm content, IProgress progress = null) - { - return ObservableUnity.FromCoroutine((observer, cancellation) => Fetch(new WWW(url, content), observer, progress, cancellation)); - } - - public static IObservable PostWWW(string url, WWWForm content, Hash headers, IProgress progress = null) - { - var contentHeaders = content.headers; - return ObservableUnity.FromCoroutine((observer, cancellation) => Fetch(new WWW(url, content.data, MergeHash(contentHeaders, headers)), observer, progress, cancellation)); - } - - public static IObservable LoadFromCacheOrDownload(string url, int version, IProgress progress = null) - { - return ObservableUnity.FromCoroutine((observer, cancellation) => FetchAssetBundle(WWW.LoadFromCacheOrDownload(url, version), observer, progress, cancellation)); - } - - public static IObservable LoadFromCacheOrDownload(string url, int version, uint crc, IProgress progress = null) - { - return ObservableUnity.FromCoroutine((observer, cancellation) => FetchAssetBundle(WWW.LoadFromCacheOrDownload(url, version, crc), observer, progress, cancellation)); - } - - // over Unity5 supports Hash128 -#if !(UNITY_4_7 || UNITY_4_6 || UNITY_4_5 || UNITY_4_4 || UNITY_4_3 || UNITY_4_2 || UNITY_4_1 || UNITY_4_0_1 || UNITY_4_0 || UNITY_3_5 || UNITY_3_4 || UNITY_3_3 || UNITY_3_2 || UNITY_3_1 || UNITY_3_0_0 || UNITY_3_0 || UNITY_2_6_1 || UNITY_2_6) - public static IObservable LoadFromCacheOrDownload(string url, Hash128 hash128, IProgress progress = null) - { - return ObservableUnity.FromCoroutine((observer, cancellation) => FetchAssetBundle(WWW.LoadFromCacheOrDownload(url, hash128), observer, progress, cancellation)); - } - - public static IObservable LoadFromCacheOrDownload(string url, Hash128 hash128, uint crc, IProgress progress = null) - { - return ObservableUnity.FromCoroutine((observer, cancellation) => FetchAssetBundle(WWW.LoadFromCacheOrDownload(url, hash128, crc), observer, progress, cancellation)); - } -#endif - - // over 4.5, Hash define is Dictionary. - // below Unity 4.5, WWW only supports Hashtable. - // Unity 4.5, 4.6 WWW supports Dictionary and [Obsolete]Hashtable but WWWForm.content is Hashtable. - // Unity 5.0 WWW only supports Dictionary and WWWForm.content is also Dictionary. -#if !(UNITY_METRO || UNITY_WP8) && (UNITY_4_5 || UNITY_4_6 || UNITY_4_7) - static Hash MergeHash(Hashtable wwwFormHeaders, Hash externalHeaders) - { - var newHeaders = new Hash(); - foreach (DictionaryEntry item in wwwFormHeaders) - { - newHeaders[item.Key.ToString()] = item.Value.ToString(); - } - foreach (HashEntry item in externalHeaders) - { - newHeaders[item.Key] = item.Value; - } - return newHeaders; - } -#else - static Hash MergeHash(Hash wwwFormHeaders, Hash externalHeaders) - { - foreach (HashEntry item in externalHeaders) - { - wwwFormHeaders[item.Key] = item.Value; - } - return wwwFormHeaders; - } -#endif - - static IEnumerator Fetch(WWW www, IObserver observer, IProgress reportProgress, CancellationToken cancel) - { - using (www) - { - if (reportProgress != null) - { - while (!www.isDone && !cancel.IsCancellationRequested) - { - try - { - reportProgress.Report(www.progress); - } - catch (Exception ex) - { - observer.OnError(ex); - yield break; - } - yield return null; - } - } - else - { - if (!www.isDone) - { - yield return www; - } - } - - if (cancel.IsCancellationRequested) - { - yield break; - } - - if (reportProgress != null) - { - try - { - reportProgress.Report(www.progress); - } - catch (Exception ex) - { - observer.OnError(ex); - yield break; - } - } - - if (!string.IsNullOrEmpty(www.error)) - { - observer.OnError(new WWWErrorException(www, www.text)); - } - else - { - observer.OnNext(www); - observer.OnCompleted(); - } - } - } - - static IEnumerator FetchText(WWW www, IObserver observer, IProgress reportProgress, CancellationToken cancel) - { - using (www) - { - if (reportProgress != null) - { - while (!www.isDone && !cancel.IsCancellationRequested) - { - try - { - reportProgress.Report(www.progress); - } - catch (Exception ex) - { - observer.OnError(ex); - yield break; - } - yield return null; - } - } - else - { - if (!www.isDone) - { - yield return www; - } - } - - if (cancel.IsCancellationRequested) - { - yield break; - } - - if (reportProgress != null) - { - try - { - reportProgress.Report(www.progress); - } - catch (Exception ex) - { - observer.OnError(ex); - yield break; - } - } - - if (!string.IsNullOrEmpty(www.error)) - { - observer.OnError(new WWWErrorException(www, www.text)); - } - else - { - observer.OnNext(www.text); - observer.OnCompleted(); - } - } - } - - static IEnumerator FetchBytes(WWW www, IObserver observer, IProgress reportProgress, CancellationToken cancel) - { - using (www) - { - if (reportProgress != null) - { - while (!www.isDone && !cancel.IsCancellationRequested) - { - try - { - reportProgress.Report(www.progress); - } - catch (Exception ex) - { - observer.OnError(ex); - yield break; - } - yield return null; - } - } - else - { - if (!www.isDone) - { - yield return www; - } - } - - if (cancel.IsCancellationRequested) - { - yield break; - } - - if (reportProgress != null) - { - try - { - reportProgress.Report(www.progress); - } - catch (Exception ex) - { - observer.OnError(ex); - yield break; - } - } - - if (!string.IsNullOrEmpty(www.error)) - { - observer.OnError(new WWWErrorException(www, www.text)); - } - else - { - observer.OnNext(www.bytes); - observer.OnCompleted(); - } - } - } - - static IEnumerator FetchAssetBundle(WWW www, IObserver observer, IProgress reportProgress, CancellationToken cancel) - { - using (www) - { - if (reportProgress != null) - { - while (!www.isDone && !cancel.IsCancellationRequested) - { - try - { - reportProgress.Report(www.progress); - } - catch (Exception ex) - { - observer.OnError(ex); - yield break; - } - yield return null; - } - } - else - { - if (!www.isDone) - { - yield return www; - } - } - - if (cancel.IsCancellationRequested) - { - yield break; - } - - if (reportProgress != null) - { - try - { - reportProgress.Report(www.progress); - } - catch (Exception ex) - { - observer.OnError(ex); - yield break; - } - } - - if (!string.IsNullOrEmpty(www.error)) - { - observer.OnError(new WWWErrorException(www, "")); - } - else - { - observer.OnNext(www.assetBundle); - observer.OnCompleted(); - } - } - } - } - - public class WWWErrorException : Exception - { - public string RawErrorMessage { get; private set; } - public bool HasResponse { get; private set; } - public string Text { get; private set; } - public System.Net.HttpStatusCode StatusCode { get; private set; } - public System.Collections.Generic.Dictionary ResponseHeaders { get; private set; } - public WWW WWW { get; private set; } - - // cache the text because if www was disposed, can't access it. - public WWWErrorException(WWW www, string text) - { - this.WWW = www; - this.RawErrorMessage = www.error; - this.ResponseHeaders = www.responseHeaders; - this.HasResponse = false; - this.Text = text; - - var splitted = RawErrorMessage.Split(' ', ':'); - if (splitted.Length != 0) - { - int statusCode; - if (int.TryParse(splitted[0], out statusCode)) - { - this.HasResponse = true; - this.StatusCode = (System.Net.HttpStatusCode)statusCode; - } - } - } - - public override string ToString() - { - var text = this.Text; - if (string.IsNullOrEmpty(text)) - { - return RawErrorMessage; - } - else - { - return RawErrorMessage + " " + text; - } - } - } -} - -#if UNITY_2018_3_OR_NEWER -#pragma warning restore CS0618 -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ObservableWWW.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ObservableWWW.cs.meta deleted file mode 100644 index cf317e4..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ObservableWWW.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: ba71e5544e233dd4b83d4c5a6c696d05 -timeCreated: 1455373900 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ObserveExtensions.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ObserveExtensions.cs deleted file mode 100644 index 7f6dc3d..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ObserveExtensions.cs +++ /dev/null @@ -1,263 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Threading; -using UniRx.Triggers; - -#if !UniRxLibrary -using ObservableUnity = UniRx.Observable; -#endif - -namespace UniRx -{ - public static partial class ObserveExtensions - { - /// - /// Publish target property when value is changed. If source is destroyed/destructed, publish OnCompleted. - /// - /// If true and target is UnityObject, use destroyed check by additional component. It is faster check for lifecycle but needs initial cost. - public static IObservable ObserveEveryValueChanged(this TSource source, Func propertySelector, FrameCountType frameCountType = FrameCountType.Update, bool fastDestroyCheck = false) - where TSource : class - { - return ObserveEveryValueChanged(source, propertySelector, frameCountType, UnityEqualityComparer.GetDefault(), fastDestroyCheck); - } - - /// - /// Publish target property when value is changed. If source is destroyed/destructed, publish OnCompleted. - /// - public static IObservable ObserveEveryValueChanged(this TSource source, Func propertySelector, FrameCountType frameCountType, IEqualityComparer comparer) - where TSource : class - { - return ObserveEveryValueChanged(source, propertySelector, frameCountType, comparer, false); - } - - /// - /// Publish target property when value is changed. If source is destroyed/destructed, publish OnCompleted. - /// - /// If true and target is UnityObject, use destroyed check by additional component. It is faster check for lifecycle but needs initial cost. - public static IObservable ObserveEveryValueChanged(this TSource source, Func propertySelector, FrameCountType frameCountType, IEqualityComparer comparer, bool fastDestroyCheck) - where TSource : class - { - if (source == null) return Observable.Empty(); - if (comparer == null) comparer = UnityEqualityComparer.GetDefault(); - - var unityObject = source as UnityEngine.Object; - var isUnityObject = source is UnityEngine.Object; - if (isUnityObject && unityObject == null) return Observable.Empty(); - - // MicroCoroutine does not publish value immediately, so publish value on subscribe. - if (isUnityObject) - { - return ObservableUnity.FromMicroCoroutine((observer, cancellationToken) => - { - if (unityObject != null) - { - var firstValue = default(TProperty); - try - { - firstValue = propertySelector((TSource)(object)unityObject); - } - catch (Exception ex) - { - observer.OnError(ex); - return EmptyEnumerator(); - } - - observer.OnNext(firstValue); - return PublishUnityObjectValueChanged(unityObject, firstValue, propertySelector, comparer, observer, cancellationToken, fastDestroyCheck); - } - else - { - observer.OnCompleted(); - return EmptyEnumerator(); - } - }, frameCountType); - } - else - { - var reference = new WeakReference(source); - source = null; - - return ObservableUnity.FromMicroCoroutine((observer, cancellationToken) => - { - var target = reference.Target; - if (target != null) - { - var firstValue = default(TProperty); - try - { - firstValue = propertySelector((TSource)target); - } - catch (Exception ex) - { - observer.OnError(ex); - return EmptyEnumerator(); - } - finally - { - target = null; - } - - observer.OnNext(firstValue); - return PublishPocoValueChanged(reference, firstValue, propertySelector, comparer, observer, cancellationToken); - } - else - { - observer.OnCompleted(); - return EmptyEnumerator(); - } - }, frameCountType); - } - } - - static IEnumerator EmptyEnumerator() - { - yield break; - } - - static IEnumerator PublishPocoValueChanged(WeakReference sourceReference, TProperty firstValue, Func propertySelector, IEqualityComparer comparer, IObserver observer, CancellationToken cancellationToken) - { - var currentValue = default(TProperty); - var prevValue = firstValue; - - while (!cancellationToken.IsCancellationRequested) - { - var target = sourceReference.Target; - if (target != null) - { - try - { - currentValue = propertySelector((TSource)target); - } - catch (Exception ex) - { - observer.OnError(ex); - yield break; - } - finally - { - target = null; // remove reference(must need!) - } - } - else - { - observer.OnCompleted(); - yield break; - } - - if (!comparer.Equals(currentValue, prevValue)) - { - observer.OnNext(currentValue); - prevValue = currentValue; - } - - yield return null; - } - } - - static IEnumerator PublishUnityObjectValueChanged(UnityEngine.Object unityObject, TProperty firstValue, Func propertySelector, IEqualityComparer comparer, IObserver observer, CancellationToken cancellationToken, bool fastDestroyCheck) - { - var currentValue = default(TProperty); - var prevValue = firstValue; - - var source = (TSource)(object)unityObject; - - if (fastDestroyCheck) - { - ObservableDestroyTrigger destroyTrigger = null; - { - var gameObject = unityObject as UnityEngine.GameObject; - if (gameObject == null) - { - var comp = unityObject as UnityEngine.Component; - if (comp != null) - { - gameObject = comp.gameObject; - } - } - - // can't use faster path - if (gameObject == null) goto STANDARD_LOOP; - - destroyTrigger = GetOrAddDestroyTrigger(gameObject); - } - - // fast compare path - while (!cancellationToken.IsCancellationRequested) - { - var isDestroyed = destroyTrigger.IsActivated - ? !destroyTrigger.IsCalledOnDestroy - : (unityObject != null); - - if (isDestroyed) - { - try - { - currentValue = propertySelector(source); - } - catch (Exception ex) - { - observer.OnError(ex); - yield break; - } - } - else - { - observer.OnCompleted(); - yield break; - } - - if (!comparer.Equals(currentValue, prevValue)) - { - observer.OnNext(currentValue); - prevValue = currentValue; - } - - yield return null; - } - - yield break; - } - - STANDARD_LOOP: - while (!cancellationToken.IsCancellationRequested) - { - if (unityObject != null) - { - try - { - currentValue = propertySelector(source); - } - catch (Exception ex) - { - observer.OnError(ex); - yield break; - } - } - else - { - observer.OnCompleted(); - yield break; - } - - if (!comparer.Equals(currentValue, prevValue)) - { - observer.OnNext(currentValue); - prevValue = currentValue; - } - - yield return null; - } - } - - static ObservableDestroyTrigger GetOrAddDestroyTrigger(UnityEngine.GameObject go) - { - var dt = go.GetComponent(); - if (dt == null) - { - dt = go.AddComponent(); - } - return dt; - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ObserveExtensions.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ObserveExtensions.cs.meta deleted file mode 100644 index 84e9e6c..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ObserveExtensions.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 8741793924a6c2f4ea22ba27031d531f -timeCreated: 1455373900 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators.meta deleted file mode 100644 index 63b7ef7..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: d8f24d5928d942d4ca81f72696726484 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/BatchFrame.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/BatchFrame.cs deleted file mode 100644 index 7d29dca..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/BatchFrame.cs +++ /dev/null @@ -1,282 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace UniRx.Operators -{ - internal class BatchFrameObservable : OperatorObservableBase> - { - readonly IObservable source; - readonly int frameCount; - readonly FrameCountType frameCountType; - - public BatchFrameObservable(IObservable source, int frameCount, FrameCountType frameCountType) - : base(source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.frameCount = frameCount; - this.frameCountType = frameCountType; - } - - protected override IDisposable SubscribeCore(IObserver> observer, IDisposable cancel) - { - return new BatchFrame(this, observer, cancel).Run(); - } - - class BatchFrame : OperatorObserverBase> - { - readonly BatchFrameObservable parent; - readonly object gate = new object(); - readonly BooleanDisposable cancellationToken = new BooleanDisposable(); - readonly System.Collections.IEnumerator timer; - bool isRunning; - bool isCompleted; - List list; - - public BatchFrame(BatchFrameObservable parent, IObserver> observer, IDisposable cancel) : base(observer, cancel) - { - this.parent = parent; - this.timer = new ReusableEnumerator(this); - } - - public IDisposable Run() - { - list = new List(); - var sourceSubscription = parent.source.Subscribe(this); - return StableCompositeDisposable.Create(sourceSubscription, cancellationToken); - } - - public override void OnNext(T value) - { - lock (gate) - { - if (isCompleted) return; - list.Add(value); - if (!isRunning) - { - isRunning = true; - timer.Reset(); // reuse - - switch (parent.frameCountType) - { - case FrameCountType.Update: - MainThreadDispatcher.StartUpdateMicroCoroutine(timer); - break; - case FrameCountType.FixedUpdate: - MainThreadDispatcher.StartFixedUpdateMicroCoroutine(timer); - break; - case FrameCountType.EndOfFrame: - MainThreadDispatcher.StartEndOfFrameMicroCoroutine(timer); - break; - default: - break; - } - } - } - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } finally { Dispose(); } - } - - public override void OnCompleted() - { - List currentList; - lock (gate) - { - isCompleted = true; - currentList = list; - } - if (currentList.Count != 0) - { - observer.OnNext(currentList); - } - try { observer.OnCompleted(); } finally { Dispose(); } - } - - // reuse, no gc allocate - class ReusableEnumerator : System.Collections.IEnumerator - { - readonly BatchFrame parent; - int currentFrame; - - public ReusableEnumerator(BatchFrame parent) - { - this.parent = parent; - } - - public object Current - { - get { return null; } - } - - public bool MoveNext() - { - if (parent.cancellationToken.IsDisposed) return false; - - List currentList; - lock (parent.gate) - { - if (currentFrame++ == parent.parent.frameCount) - { - if (parent.isCompleted) return false; - - currentList = parent.list; - parent.list = new List(); - parent.isRunning = false; - - // exit lock - } - else - { - return true; - } - } - - parent.observer.OnNext(currentList); - return false; - } - - public void Reset() - { - currentFrame = 0; - } - } - } - } - - internal class BatchFrameObservable : OperatorObservableBase - { - readonly IObservable source; - readonly int frameCount; - readonly FrameCountType frameCountType; - - public BatchFrameObservable(IObservable source, int frameCount, FrameCountType frameCountType) - : base(source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.frameCount = frameCount; - this.frameCountType = frameCountType; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - return new BatchFrame(this, observer, cancel).Run(); - } - - class BatchFrame : OperatorObserverBase - { - readonly BatchFrameObservable parent; - readonly object gate = new object(); - readonly BooleanDisposable cancellationToken = new BooleanDisposable(); - readonly System.Collections.IEnumerator timer; - - bool isRunning; - bool isCompleted; - - public BatchFrame(BatchFrameObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) - { - this.parent = parent; - this.timer = new ReusableEnumerator(this); - } - - public IDisposable Run() - { - var sourceSubscription = parent.source.Subscribe(this); - return StableCompositeDisposable.Create(sourceSubscription, cancellationToken); - } - - public override void OnNext(Unit value) - { - lock (gate) - { - if (!isRunning) - { - isRunning = true; - timer.Reset(); // reuse - - switch (parent.frameCountType) - { - case FrameCountType.Update: - MainThreadDispatcher.StartUpdateMicroCoroutine(timer); - break; - case FrameCountType.FixedUpdate: - MainThreadDispatcher.StartFixedUpdateMicroCoroutine(timer); - break; - case FrameCountType.EndOfFrame: - MainThreadDispatcher.StartEndOfFrameMicroCoroutine(timer); - break; - default: - break; - } - } - } - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } finally { Dispose(); } - } - - public override void OnCompleted() - { - bool running; - lock (gate) - { - running = isRunning; - isCompleted = true; - } - if (running) - { - observer.OnNext(Unit.Default); - } - try { observer.OnCompleted(); } finally { Dispose(); } - } - - // reuse, no gc allocate - class ReusableEnumerator : System.Collections.IEnumerator - { - readonly BatchFrame parent; - int currentFrame; - - public ReusableEnumerator(BatchFrame parent) - { - this.parent = parent; - } - - public object Current - { - get { return null; } - } - - public bool MoveNext() - { - if (parent.cancellationToken.IsDisposed) return false; - - lock (parent.gate) - { - if (currentFrame++ == parent.parent.frameCount) - { - if (parent.isCompleted) return false; - parent.isRunning = false; - - // exit lock - } - else - { - return true; - } - } - - parent.observer.OnNext(Unit.Default); - return false; - } - - public void Reset() - { - currentFrame = 0; - } - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/BatchFrame.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/BatchFrame.cs.meta deleted file mode 100644 index b742a70..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/BatchFrame.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 74a2b6b8c63d1144f914c7f0d6719a36 -timeCreated: 1467771656 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/DelayFrame.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/DelayFrame.cs deleted file mode 100644 index 98ccac7..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/DelayFrame.cs +++ /dev/null @@ -1,260 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; - -namespace UniRx.Operators -{ - internal class DelayFrameObservable : OperatorObservableBase - { - readonly IObservable source; - readonly int frameCount; - readonly FrameCountType frameCountType; - - public DelayFrameObservable(IObservable source, int frameCount, FrameCountType frameCountType) - : base(source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.frameCount = frameCount; - this.frameCountType = frameCountType; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - return new DelayFrame(this, observer, cancel).Run(); - } - - class DelayFrame : OperatorObserverBase - { - readonly DelayFrameObservable parent; - readonly object gate = new object(); - readonly QueuePool pool = new QueuePool(); - int runningEnumeratorCount; - bool readyDrainEnumerator; - bool running; - IDisposable sourceSubscription; - Queue currentQueueReference; - bool calledCompleted; - bool hasError; - Exception error; - BooleanDisposable cancelationToken; - - public DelayFrame(DelayFrameObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) - { - this.parent = parent; - } - - public IDisposable Run() - { - cancelationToken = new BooleanDisposable(); - - var _sourceSubscription = new SingleAssignmentDisposable(); - sourceSubscription = _sourceSubscription; - _sourceSubscription.Disposable = parent.source.Subscribe(this); - - return StableCompositeDisposable.Create(cancelationToken, sourceSubscription); - } - - IEnumerator DrainQueue(Queue q, int frameCount) - { - lock (gate) - { - readyDrainEnumerator = false; // use next queue. - running = false; - } - - while (!cancelationToken.IsDisposed && frameCount-- != 0) - { - yield return null; - } - - try - { - if (q != null) - { - while (q.Count > 0 && !hasError) - { - if (cancelationToken.IsDisposed) break; - - lock (gate) - { - running = true; - } - - var value = q.Dequeue(); - observer.OnNext(value); - - lock (gate) - { - running = false; - } - } - - if (q.Count == 0) - { - pool.Return(q); - } - } - - if (hasError) - { - if (!cancelationToken.IsDisposed) - { - cancelationToken.Dispose(); - - try { observer.OnError(error); } finally { Dispose(); } - } - } - else if (calledCompleted) - { - lock (gate) - { - // not self only - if (runningEnumeratorCount != 1) yield break; - } - - if (!cancelationToken.IsDisposed) - { - cancelationToken.Dispose(); - - try { observer.OnCompleted(); } - finally { Dispose(); } - } - } - } - finally - { - lock (gate) - { - runningEnumeratorCount--; - } - } - } - - public override void OnNext(T value) - { - if (cancelationToken.IsDisposed) return; - - Queue targetQueue = null; - lock (gate) - { - if (!readyDrainEnumerator) - { - readyDrainEnumerator = true; - runningEnumeratorCount++; - targetQueue = currentQueueReference = pool.Get(); - targetQueue.Enqueue(value); - } - else - { - if (currentQueueReference != null) // null - if doesn't start OnNext and start OnCompleted - { - currentQueueReference.Enqueue(value); - } - return; - } - } - - switch (parent.frameCountType) - { - case FrameCountType.Update: - MainThreadDispatcher.StartUpdateMicroCoroutine(DrainQueue(targetQueue, parent.frameCount)); - break; - case FrameCountType.FixedUpdate: - MainThreadDispatcher.StartFixedUpdateMicroCoroutine(DrainQueue(targetQueue, parent.frameCount)); - break; - case FrameCountType.EndOfFrame: - MainThreadDispatcher.StartEndOfFrameMicroCoroutine(DrainQueue(targetQueue, parent.frameCount)); - break; - default: - throw new ArgumentException("Invalid FrameCountType:" + parent.frameCountType); - } - } - - public override void OnError(Exception error) - { - sourceSubscription.Dispose(); // stop subscription - - if (cancelationToken.IsDisposed) return; - - lock (gate) - { - if (running) - { - hasError = true; - this.error = error; - return; - } - } - - cancelationToken.Dispose(); - try { base.observer.OnError(error); } finally { Dispose(); } - } - - public override void OnCompleted() - { - sourceSubscription.Dispose(); // stop subscription - - if (cancelationToken.IsDisposed) return; - - lock (gate) - { - calledCompleted = true; - - if (!readyDrainEnumerator) - { - readyDrainEnumerator = true; - runningEnumeratorCount++; - } - else - { - return; - } - } - - switch (parent.frameCountType) - { - case FrameCountType.Update: - MainThreadDispatcher.StartUpdateMicroCoroutine(DrainQueue(null, parent.frameCount)); - break; - case FrameCountType.FixedUpdate: - MainThreadDispatcher.StartFixedUpdateMicroCoroutine(DrainQueue(null, parent.frameCount)); - break; - case FrameCountType.EndOfFrame: - MainThreadDispatcher.StartEndOfFrameMicroCoroutine(DrainQueue(null, parent.frameCount)); - break; - default: - throw new ArgumentException("Invalid FrameCountType:" + parent.frameCountType); - } - } - } - - class QueuePool - { - readonly object gate = new object(); - readonly Queue> pool = new Queue>(2); - - public Queue Get() - { - lock (gate) - { - if (pool.Count == 0) - { - return new Queue(2); - } - else - { - return pool.Dequeue(); - } - } - } - - public void Return(Queue q) - { - lock (gate) - { - pool.Enqueue(q); - } - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/DelayFrame.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/DelayFrame.cs.meta deleted file mode 100644 index bff7e5e..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/DelayFrame.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 868f75a703f1a944a801ab9c9b4512aa -timeCreated: 1455373900 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/DelayFrameSubscription.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/DelayFrameSubscription.cs deleted file mode 100644 index 9ae1af0..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/DelayFrameSubscription.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System; - -#if UniRxLibrary -using UnityObservable = UniRx.ObservableUnity; -#else -using UnityObservable = UniRx.Observable; -#endif - -namespace UniRx.Operators -{ - internal class DelayFrameSubscriptionObservable : OperatorObservableBase - { - readonly IObservable source; - readonly int frameCount; - readonly FrameCountType frameCountType; - - public DelayFrameSubscriptionObservable(IObservable source, int frameCount, FrameCountType frameCountType) - : base(source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.frameCount = frameCount; - this.frameCountType = frameCountType; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - var d = new MultipleAssignmentDisposable(); - d.Disposable = UnityObservable.TimerFrame(frameCount, frameCountType) - .SubscribeWithState3(observer, d, source, (_, o, disp, s) => - { - disp.Disposable = s.Subscribe(o); - }); - - return d; - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/DelayFrameSubscription.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/DelayFrameSubscription.cs.meta deleted file mode 100644 index 8755182..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/DelayFrameSubscription.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: ecfef95eedf36c2448944fb8932f682c -timeCreated: 1455373902 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/FrameInterval.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/FrameInterval.cs deleted file mode 100644 index 8e109a4..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/FrameInterval.cs +++ /dev/null @@ -1,52 +0,0 @@ -using System; - -namespace UniRx.Operators -{ - internal class FrameIntervalObservable : OperatorObservableBase> - { - readonly IObservable source; - - public FrameIntervalObservable(IObservable source) - : base(source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - } - - protected override IDisposable SubscribeCore(IObserver> observer, IDisposable cancel) - { - return source.Subscribe(new FrameInterval(observer, cancel)); - } - - class FrameInterval : OperatorObserverBase> - { - int lastFrame; - - public FrameInterval(IObserver> observer, IDisposable cancel) - : base(observer, cancel) - { - this.lastFrame = UnityEngine.Time.frameCount; - } - - public override void OnNext(T value) - { - var now = UnityEngine.Time.frameCount; - var span = now - lastFrame; - lastFrame = now; - - base.observer.OnNext(new UniRx.FrameInterval(value, span)); - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } - finally { Dispose(); } - } - - public override void OnCompleted() - { - try { observer.OnCompleted(); } - finally { Dispose(); } - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/FrameInterval.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/FrameInterval.cs.meta deleted file mode 100644 index 429133e..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/FrameInterval.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: a731a1a74be20a04a9d7dedc5ceefab2 -timeCreated: 1467771656 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/FrameTimeInterval.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/FrameTimeInterval.cs deleted file mode 100644 index adaa149..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/FrameTimeInterval.cs +++ /dev/null @@ -1,60 +0,0 @@ -using System; - -namespace UniRx.Operators -{ - internal class FrameTimeIntervalObservable : OperatorObservableBase> - { - readonly IObservable source; - readonly bool ignoreTimeScale; - - public FrameTimeIntervalObservable(IObservable source, bool ignoreTimeScale) - : base(source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.ignoreTimeScale = ignoreTimeScale; - } - - protected override IDisposable SubscribeCore(IObserver> observer, IDisposable cancel) - { - return source.Subscribe(new FrameTimeInterval(this, observer, cancel)); - } - - class FrameTimeInterval : OperatorObserverBase> - { - readonly FrameTimeIntervalObservable parent; - float lastTime; - - public FrameTimeInterval(FrameTimeIntervalObservable parent, IObserver> observer, IDisposable cancel) - : base(observer, cancel) - { - this.parent = parent; - this.lastTime = (parent.ignoreTimeScale) - ? UnityEngine.Time.unscaledTime - : UnityEngine.Time.time; - } - - public override void OnNext(T value) - { - var now = (parent.ignoreTimeScale) - ? UnityEngine.Time.unscaledTime - : UnityEngine.Time.time; - var span = now - lastTime; - lastTime = now; - - base.observer.OnNext(new UniRx.TimeInterval(value, TimeSpan.FromSeconds(span))); - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } - finally { Dispose(); } - } - - public override void OnCompleted() - { - try { observer.OnCompleted(); } - finally { Dispose(); } - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/FrameTimeInterval.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/FrameTimeInterval.cs.meta deleted file mode 100644 index 3acaf6b..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/FrameTimeInterval.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: a55cce9ef638364409d1227a25a32421 -timeCreated: 1467771656 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/FromCoroutine.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/FromCoroutine.cs deleted file mode 100644 index 1f71fed..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/FromCoroutine.cs +++ /dev/null @@ -1,141 +0,0 @@ -using System; -using System.Collections; -using System.Threading; - -namespace UniRx.Operators -{ - internal class FromCoroutineObservable : OperatorObservableBase - { - readonly Func, CancellationToken, IEnumerator> coroutine; - - public FromCoroutineObservable(Func, CancellationToken, IEnumerator> coroutine) - : base(false) - { - this.coroutine = coroutine; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - var fromCoroutineObserver = new FromCoroutine(observer, cancel); - -#if (NETFX_CORE || NET_4_6 || NET_STANDARD_2_0 || UNITY_WSA_10_0) - var moreCancel = new CancellationDisposable(); - var token = moreCancel.Token; -#else - var moreCancel = new BooleanDisposable(); - var token = new CancellationToken(moreCancel); -#endif - - MainThreadDispatcher.SendStartCoroutine(coroutine(fromCoroutineObserver, token)); - - return moreCancel; - } - - class FromCoroutine : OperatorObserverBase - { - public FromCoroutine(IObserver observer, IDisposable cancel) : base(observer, cancel) - { - } - - public override void OnNext(T value) - { - try - { - base.observer.OnNext(value); - } - catch - { - Dispose(); - throw; - } - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } - finally { Dispose(); } - } - - public override void OnCompleted() - { - try { observer.OnCompleted(); } - finally { Dispose(); } - } - } - } - - internal class FromMicroCoroutineObservable : OperatorObservableBase - { - readonly Func, CancellationToken, IEnumerator> coroutine; - readonly FrameCountType frameCountType; - - public FromMicroCoroutineObservable(Func, CancellationToken, IEnumerator> coroutine, FrameCountType frameCountType) - : base(false) - { - this.coroutine = coroutine; - this.frameCountType = frameCountType; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - var microCoroutineObserver = new FromMicroCoroutine(observer, cancel); - -#if (NETFX_CORE || NET_4_6 || NET_STANDARD_2_0 || UNITY_WSA_10_0) - var moreCancel = new CancellationDisposable(); - var token = moreCancel.Token; -#else - var moreCancel = new BooleanDisposable(); - var token = new CancellationToken(moreCancel); -#endif - - switch (frameCountType) - { - case FrameCountType.Update: - MainThreadDispatcher.StartUpdateMicroCoroutine(coroutine(microCoroutineObserver, token)); - break; - case FrameCountType.FixedUpdate: - MainThreadDispatcher.StartFixedUpdateMicroCoroutine(coroutine(microCoroutineObserver, token)); - break; - case FrameCountType.EndOfFrame: - MainThreadDispatcher.StartEndOfFrameMicroCoroutine(coroutine(microCoroutineObserver, token)); - break; - default: - throw new ArgumentException("Invalid FrameCountType:" + frameCountType); - } - - return moreCancel; - } - - class FromMicroCoroutine : OperatorObserverBase - { - public FromMicroCoroutine(IObserver observer, IDisposable cancel) : base(observer, cancel) - { - } - - public override void OnNext(T value) - { - try - { - base.observer.OnNext(value); - } - catch - { - Dispose(); - throw; - } - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } - finally { Dispose(); } - } - - public override void OnCompleted() - { - try { observer.OnCompleted(); } - finally { Dispose(); } - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/FromCoroutine.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/FromCoroutine.cs.meta deleted file mode 100644 index 62a69e9..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/FromCoroutine.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: e83ddad992535fb4f8a68a1e7ef8be60 -timeCreated: 1455373901 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/RepeatUntil.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/RepeatUntil.cs deleted file mode 100644 index 9039e79..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/RepeatUntil.cs +++ /dev/null @@ -1,178 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -namespace UniRx.Operators -{ - internal class RepeatUntilObservable : OperatorObservableBase - { - readonly IEnumerable> sources; - readonly IObservable trigger; - readonly GameObject lifeTimeChecker; - - public RepeatUntilObservable(IEnumerable> sources, IObservable trigger, GameObject lifeTimeChecker) - : base(true) - { - this.sources = sources; - this.trigger = trigger; - this.lifeTimeChecker = lifeTimeChecker; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - return new RepeatUntil(this, observer, cancel).Run(); - } - - class RepeatUntil : OperatorObserverBase - { - readonly RepeatUntilObservable parent; - readonly object gate = new object(); - - IEnumerator> e; - SerialDisposable subscription; - SingleAssignmentDisposable schedule; - Action nextSelf; - bool isStopped; - bool isDisposed; - bool isFirstSubscribe; - IDisposable stopper; - - public RepeatUntil(RepeatUntilObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) - { - this.parent = parent; - } - - public IDisposable Run() - { - isFirstSubscribe = true; - isDisposed = false; - isStopped = false; - e = parent.sources.GetEnumerator(); - subscription = new SerialDisposable(); - schedule = new SingleAssignmentDisposable(); - - stopper = parent.trigger.Subscribe(_ => - { - lock (gate) - { - isStopped = true; - e.Dispose(); - subscription.Dispose(); - schedule.Dispose(); - observer.OnCompleted(); - } - }, observer.OnError); - - schedule.Disposable = Scheduler.CurrentThread.Schedule(RecursiveRun); - - return new CompositeDisposable(schedule, subscription, stopper, Disposable.Create(() => - { - lock (gate) - { - isDisposed = true; - e.Dispose(); - } - })); - } - - void RecursiveRun(Action self) - { - lock (gate) - { - this.nextSelf = self; - if (isDisposed) return; - if (isStopped) return; - - var current = default(IObservable); - var hasNext = false; - var ex = default(Exception); - - try - { - hasNext = e.MoveNext(); - if (hasNext) - { - current = e.Current; - if (current == null) throw new InvalidOperationException("sequence is null."); - } - else - { - e.Dispose(); - } - } - catch (Exception exception) - { - ex = exception; - e.Dispose(); - } - - if (ex != null) - { - stopper.Dispose(); - observer.OnError(ex); - return; - } - - if (!hasNext) - { - stopper.Dispose(); - observer.OnCompleted(); - return; - } - - var source = e.Current; - var d = new SingleAssignmentDisposable(); - subscription.Disposable = d; - - if (isFirstSubscribe) - { - isFirstSubscribe = false; - d.Disposable = source.Subscribe(this); - } - else - { - MainThreadDispatcher.SendStartCoroutine(SubscribeAfterEndOfFrame(d, source, this, parent.lifeTimeChecker)); - } - } - } - - static IEnumerator SubscribeAfterEndOfFrame(SingleAssignmentDisposable d, IObservable source, IObserver observer, GameObject lifeTimeChecker) - { - yield return YieldInstructionCache.WaitForEndOfFrame; - if (!d.IsDisposed && lifeTimeChecker != null) - { - d.Disposable = source.Subscribe(observer); - } - } - - public override void OnNext(T value) - { - base.observer.OnNext(value); - } - - public override void OnError(Exception error) - { - try { observer.OnError(error); } - finally { Dispose(); } - } - - public override void OnCompleted() - { - if (!isDisposed) - { - this.nextSelf(); - } - else - { - e.Dispose(); - if (!isDisposed) - { - try { observer.OnCompleted(); } - finally { Dispose(); } - } - } - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/RepeatUntil.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/RepeatUntil.cs.meta deleted file mode 100644 index e2c843c..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/RepeatUntil.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 93507e8a72a71094f870c8dbe1e5bed8 -timeCreated: 1455373900 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/SampleFrame.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/SampleFrame.cs deleted file mode 100644 index 4f0b468..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/SampleFrame.cs +++ /dev/null @@ -1,132 +0,0 @@ -using System; - -#if UniRxLibrary -using UnityObservable = UniRx.ObservableUnity; -#else -using UnityObservable = UniRx.Observable; -#endif - -namespace UniRx.Operators -{ - internal class SampleFrameObservable : OperatorObservableBase - { - readonly IObservable source; - readonly int frameCount; - readonly FrameCountType frameCountType; - - public SampleFrameObservable(IObservable source, int frameCount, FrameCountType frameCountType) : base(source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.frameCount = frameCount; - this.frameCountType = frameCountType; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - return new SampleFrame(this, observer, cancel).Run(); - } - - class SampleFrame : OperatorObserverBase - { - readonly SampleFrameObservable parent; - readonly object gate = new object(); - T latestValue = default(T); - bool isUpdated = false; - bool isCompleted = false; - SingleAssignmentDisposable sourceSubscription; - - public SampleFrame(SampleFrameObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) - { - this.parent = parent; - } - - public IDisposable Run() - { - sourceSubscription = new SingleAssignmentDisposable(); - sourceSubscription.Disposable = parent.source.Subscribe(this); - - var scheduling = UnityObservable.IntervalFrame(parent.frameCount, parent.frameCountType) - .Subscribe(new SampleFrameTick(this)); - - return StableCompositeDisposable.Create(sourceSubscription, scheduling); - } - - void OnNextTick(long _) - { - lock (gate) - { - if (isUpdated) - { - var value = latestValue; - isUpdated = false; - observer.OnNext(value); - } - if (isCompleted) - { - try { observer.OnCompleted(); } finally { Dispose(); } - } - } - } - - public override void OnNext(T value) - { - lock (gate) - { - latestValue = value; - isUpdated = true; - } - } - - public override void OnError(Exception error) - { - lock (gate) - { - try { base.observer.OnError(error); } finally { Dispose(); } - } - } - - public override void OnCompleted() - { - lock (gate) - { - isCompleted = true; - sourceSubscription.Dispose(); - } - } - class SampleFrameTick : IObserver - { - readonly SampleFrame parent; - - public SampleFrameTick(SampleFrame parent) - { - this.parent = parent; - } - - public void OnCompleted() - { - } - - public void OnError(Exception error) - { - } - - public void OnNext(long _) - { - lock (parent.gate) - { - if (parent.isUpdated) - { - var value = parent.latestValue; - parent.isUpdated = false; - parent.observer.OnNext(value); - } - if (parent.isCompleted) - { - try { parent.observer.OnCompleted(); } finally { parent.Dispose(); } - } - } - } - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/SampleFrame.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/SampleFrame.cs.meta deleted file mode 100644 index e755f50..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/SampleFrame.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: e04c7fc1929a3db458bf7ae31bcd9e55 -timeCreated: 1455373901 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/SubscribeOnMainThread.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/SubscribeOnMainThread.cs deleted file mode 100644 index 56c2734..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/SubscribeOnMainThread.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System; - -namespace UniRx.Operators -{ - internal class SubscribeOnMainThreadObservable : OperatorObservableBase - { - readonly IObservable source; - readonly IObservable subscribeTrigger; - - public SubscribeOnMainThreadObservable(IObservable source, IObservable subscribeTrigger) - : base(source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.subscribeTrigger = subscribeTrigger; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - var m = new SingleAssignmentDisposable(); - var d = new SerialDisposable(); - d.Disposable = m; - - m.Disposable = subscribeTrigger.SubscribeWithState3(observer, d, source, (_, o, disp, s) => - { - disp.Disposable = s.Subscribe(o); - }); - - return d; - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/SubscribeOnMainThread.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/SubscribeOnMainThread.cs.meta deleted file mode 100644 index bb5461a..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/SubscribeOnMainThread.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: da3fd97518766ab43827991b7b5d4270 -timeCreated: 1455373901 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/ThrottleFirstFrame.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/ThrottleFirstFrame.cs deleted file mode 100644 index ef828df..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/ThrottleFirstFrame.cs +++ /dev/null @@ -1,123 +0,0 @@ -using System; - -#if UniRxLibrary -using UnityObservable = UniRx.ObservableUnity; -#else -using UnityObservable = UniRx.Observable; -#endif - -namespace UniRx.Operators -{ - internal class ThrottleFirstFrameObservable : OperatorObservableBase - { - readonly IObservable source; - readonly int frameCount; - readonly FrameCountType frameCountType; - - public ThrottleFirstFrameObservable(IObservable source, int frameCount, FrameCountType frameCountType) : base(source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.frameCount = frameCount; - this.frameCountType = frameCountType; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - return new ThrottleFirstFrame(this, observer, cancel).Run(); - } - - class ThrottleFirstFrame : OperatorObserverBase - { - readonly ThrottleFirstFrameObservable parent; - readonly object gate = new object(); - bool open = true; - SerialDisposable cancelable; - - ThrottleFirstFrameTick tick; - - public ThrottleFirstFrame(ThrottleFirstFrameObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) - { - this.parent = parent; - } - - public IDisposable Run() - { - tick = new ThrottleFirstFrameTick(this); - cancelable = new SerialDisposable(); - - var subscription = parent.source.Subscribe(this); - return StableCompositeDisposable.Create(cancelable, subscription); - } - - void OnNext() - { - lock (gate) - { - open = true; - } - } - - public override void OnNext(T value) - { - lock (gate) - { - if (!open) return; - observer.OnNext(value); - open = false; - } - - var d = new SingleAssignmentDisposable(); - cancelable.Disposable = d; - d.Disposable = UnityObservable.TimerFrame(parent.frameCount, parent.frameCountType) - .Subscribe(tick); - } - - public override void OnError(Exception error) - { - cancelable.Dispose(); - - lock (gate) - { - try { observer.OnError(error); } finally { Dispose(); } - } - } - - public override void OnCompleted() - { - cancelable.Dispose(); - - lock (gate) - { - try { observer.OnCompleted(); } finally { Dispose(); } - } - } - - // immutable, can share. - class ThrottleFirstFrameTick : IObserver - { - readonly ThrottleFirstFrame parent; - - public ThrottleFirstFrameTick(ThrottleFirstFrame parent) - { - this.parent = parent; - } - - public void OnCompleted() - { - } - - public void OnError(Exception error) - { - } - - public void OnNext(long _) - { - lock (parent.gate) - { - parent.open = true; - } - } - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/ThrottleFirstFrame.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/ThrottleFirstFrame.cs.meta deleted file mode 100644 index e8b8b53..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/ThrottleFirstFrame.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 3ec92e777b0b4d949967b0663ce8bee8 -timeCreated: 1455373898 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/ThrottleFrame.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/ThrottleFrame.cs deleted file mode 100644 index ace4656..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/ThrottleFrame.cs +++ /dev/null @@ -1,129 +0,0 @@ -using System; - -#if UniRxLibrary -using UnityObservable = UniRx.ObservableUnity; -#else -using UnityObservable = UniRx.Observable; -#endif - -namespace UniRx.Operators -{ - internal class ThrottleFrameObservable : OperatorObservableBase - { - readonly IObservable source; - readonly int frameCount; - readonly FrameCountType frameCountType; - - public ThrottleFrameObservable(IObservable source, int frameCount, FrameCountType frameCountType) : base(source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.frameCount = frameCount; - this.frameCountType = frameCountType; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - return new ThrottleFrame(this, observer, cancel).Run(); - } - - class ThrottleFrame : OperatorObserverBase - { - readonly ThrottleFrameObservable parent; - readonly object gate = new object(); - T latestValue = default(T); - bool hasValue = false; - SerialDisposable cancelable; - ulong id = 0; - - public ThrottleFrame(ThrottleFrameObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) - { - this.parent = parent; - } - - public IDisposable Run() - { - cancelable = new SerialDisposable(); - var subscription = parent.source.Subscribe(this); - - return StableCompositeDisposable.Create(cancelable, subscription); - } - - public override void OnNext(T value) - { - ulong currentid; - lock (gate) - { - hasValue = true; - latestValue = value; - id = unchecked(id + 1); - currentid = id; - } - - var d = new SingleAssignmentDisposable(); - cancelable.Disposable = d; - d.Disposable = UnityObservable.TimerFrame(parent.frameCount, parent.frameCountType) - .Subscribe(new ThrottleFrameTick(this, currentid)); - } - - public override void OnError(Exception error) - { - cancelable.Dispose(); - - lock (gate) - { - hasValue = false; - id = unchecked(id + 1); - try { observer.OnError(error); } finally { Dispose(); } - } - } - - public override void OnCompleted() - { - cancelable.Dispose(); - - lock (gate) - { - if (hasValue) - { - observer.OnNext(latestValue); - } - hasValue = false; - id = unchecked(id + 1); - try { observer.OnCompleted(); } finally { Dispose(); } - } - } - - class ThrottleFrameTick : IObserver - { - readonly ThrottleFrame parent; - readonly ulong currentid; - - public ThrottleFrameTick(ThrottleFrame parent, ulong currentid) - { - this.parent = parent; - this.currentid = currentid; - } - - public void OnCompleted() - { - } - - public void OnError(Exception error) - { - } - - public void OnNext(long _) - { - lock (parent.gate) - { - if (parent.hasValue && parent.id == currentid) - { - parent.observer.OnNext(parent.latestValue); - } - parent.hasValue = false; - } - } - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/ThrottleFrame.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/ThrottleFrame.cs.meta deleted file mode 100644 index 9addfec..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/ThrottleFrame.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 2c4ef0bfcfe787543999c7a6cda03c07 -timeCreated: 1455373898 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/TimeoutFrame.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/TimeoutFrame.cs deleted file mode 100644 index 1653eed..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/TimeoutFrame.cs +++ /dev/null @@ -1,142 +0,0 @@ -using System; - -#if UniRxLibrary -using UnityObservable = UniRx.ObservableUnity; -#else -using UnityObservable = UniRx.Observable; -#endif - -namespace UniRx.Operators -{ - internal class TimeoutFrameObservable : OperatorObservableBase - { - readonly IObservable source; - readonly int frameCount; - readonly FrameCountType frameCountType; - - public TimeoutFrameObservable(IObservable source, int frameCount, FrameCountType frameCountType) : base(source.IsRequiredSubscribeOnCurrentThread()) - { - this.source = source; - this.frameCount = frameCount; - this.frameCountType = frameCountType; - } - - protected override IDisposable SubscribeCore(IObserver observer, IDisposable cancel) - { - return new TimeoutFrame(this, observer, cancel).Run(); - } - - class TimeoutFrame : OperatorObserverBase - { - readonly TimeoutFrameObservable parent; - readonly object gate = new object(); - ulong objectId = 0ul; - bool isTimeout = false; - SingleAssignmentDisposable sourceSubscription; - SerialDisposable timerSubscription; - - public TimeoutFrame(TimeoutFrameObservable parent, IObserver observer, IDisposable cancel) : base(observer, cancel) - { - this.parent = parent; - } - - public IDisposable Run() - { - sourceSubscription = new SingleAssignmentDisposable(); - timerSubscription = new SerialDisposable(); - timerSubscription.Disposable = RunTimer(objectId); - sourceSubscription.Disposable = parent.source.Subscribe(this); - - return StableCompositeDisposable.Create(timerSubscription, sourceSubscription); - } - - IDisposable RunTimer(ulong timerId) - { - return UnityObservable.TimerFrame(parent.frameCount, parent.frameCountType) - .Subscribe(new TimeoutFrameTick(this, timerId)); - } - - public override void OnNext(T value) - { - ulong useObjectId; - bool timeout; - lock (gate) - { - timeout = isTimeout; - objectId++; - useObjectId = objectId; - } - if (timeout) return; - - timerSubscription.Disposable = Disposable.Empty; // cancel old timer - observer.OnNext(value); - timerSubscription.Disposable = RunTimer(useObjectId); - } - - public override void OnError(Exception error) - { - bool timeout; - lock (gate) - { - timeout = isTimeout; - objectId++; - } - if (timeout) return; - - timerSubscription.Dispose(); - try { observer.OnError(error); } finally { Dispose(); } - } - - public override void OnCompleted() - { - bool timeout; - lock (gate) - { - timeout = isTimeout; - objectId++; - } - if (timeout) return; - - timerSubscription.Dispose(); - try { observer.OnCompleted(); } finally { Dispose(); } - } - - class TimeoutFrameTick : IObserver - { - readonly TimeoutFrame parent; - readonly ulong timerId; - - public TimeoutFrameTick(TimeoutFrame parent, ulong timerId) - { - this.parent = parent; - this.timerId = timerId; - } - - public void OnCompleted() - { - } - - public void OnError(Exception error) - { - } - - public void OnNext(long _) - { - - - lock (parent.gate) - { - if (parent.objectId == timerId) - { - parent.isTimeout = true; - } - } - if (parent.isTimeout) - { - try { parent.observer.OnError(new TimeoutException()); } finally { parent.Dispose(); } - } - } - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/TimeoutFrame.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/TimeoutFrame.cs.meta deleted file mode 100644 index a969e19..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Operators/TimeoutFrame.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: c27be0a585d78a944bccd31b86ee6722 -timeCreated: 1455373901 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ReactiveCollection.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ReactiveCollection.cs deleted file mode 100644 index cfe9a75..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ReactiveCollection.cs +++ /dev/null @@ -1,333 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; - -namespace UniRx -{ - public struct CollectionAddEvent : IEquatable> - { - public int Index { get; private set; } - public T Value { get; private set; } - - public CollectionAddEvent(int index, T value) - :this() - { - Index = index; - Value = value; - } - - public override string ToString() - { - return string.Format("Index:{0} Value:{1}", Index, Value); - } - - public override int GetHashCode() - { - return Index.GetHashCode() ^ EqualityComparer.Default.GetHashCode(Value) << 2; - } - - public bool Equals(CollectionAddEvent other) - { - return Index.Equals(other.Index) && EqualityComparer.Default.Equals(Value, other.Value); - } - } - - public struct CollectionRemoveEvent : IEquatable> - { - public int Index { get; private set; } - public T Value { get; private set; } - - public CollectionRemoveEvent(int index, T value) - : this() - { - Index = index; - Value = value; - } - - public override string ToString() - { - return string.Format("Index:{0} Value:{1}", Index, Value); - } - - public override int GetHashCode() - { - return Index.GetHashCode() ^ EqualityComparer.Default.GetHashCode(Value) << 2; - } - - public bool Equals(CollectionRemoveEvent other) - { - return Index.Equals(other.Index) && EqualityComparer.Default.Equals(Value, other.Value); - } - } - - public struct CollectionMoveEvent : IEquatable> - { - public int OldIndex { get; private set; } - public int NewIndex { get; private set; } - public T Value { get; private set; } - - public CollectionMoveEvent(int oldIndex, int newIndex, T value) - : this() - { - OldIndex = oldIndex; - NewIndex = newIndex; - Value = value; - } - - public override string ToString() - { - return string.Format("OldIndex:{0} NewIndex:{1} Value:{2}", OldIndex, NewIndex, Value); - } - - public override int GetHashCode() - { - return OldIndex.GetHashCode() ^ NewIndex.GetHashCode() << 2 ^ EqualityComparer.Default.GetHashCode(Value) >> 2; - } - - public bool Equals(CollectionMoveEvent other) - { - return OldIndex.Equals(other.OldIndex) && NewIndex.Equals(other.NewIndex) && EqualityComparer.Default.Equals(Value, other.Value); - } - } - - public struct CollectionReplaceEvent : IEquatable> - { - public int Index { get; private set; } - public T OldValue { get; private set; } - public T NewValue { get; private set; } - - public CollectionReplaceEvent(int index, T oldValue, T newValue) - : this() - { - Index = index; - OldValue = oldValue; - NewValue = newValue; - } - - public override string ToString() - { - return string.Format("Index:{0} OldValue:{1} NewValue:{2}", Index, OldValue, NewValue); - } - - public override int GetHashCode() - { - return Index.GetHashCode() ^ EqualityComparer.Default.GetHashCode(OldValue) << 2 ^ EqualityComparer.Default.GetHashCode(NewValue) >> 2; - } - - public bool Equals(CollectionReplaceEvent other) - { - return Index.Equals(other.Index) - && EqualityComparer.Default.Equals(OldValue, other.OldValue) - && EqualityComparer.Default.Equals(NewValue, other.NewValue); - } - } - - // IReadOnlyList is from .NET 4.5 - public interface IReadOnlyReactiveCollection : IEnumerable - { - int Count { get; } - T this[int index] { get; } - IObservable> ObserveAdd(); - IObservable ObserveCountChanged(bool notifyCurrentCount = false); - IObservable> ObserveMove(); - IObservable> ObserveRemove(); - IObservable> ObserveReplace(); - IObservable ObserveReset(); - } - - public interface IReactiveCollection : IList, IReadOnlyReactiveCollection - { - new int Count { get; } - new T this[int index] { get; set; } - void Move(int oldIndex, int newIndex); - } - - [Serializable] - public class ReactiveCollection : Collection, IReactiveCollection, IDisposable - { - [NonSerialized] - bool isDisposed = false; - - public ReactiveCollection() - { - - } - - public ReactiveCollection(IEnumerable collection) - { - if (collection == null) throw new ArgumentNullException("collection"); - - foreach (var item in collection) - { - Add(item); - } - } - - public ReactiveCollection(List list) - : base(list != null ? new List(list) : null) - { - } - - protected override void ClearItems() - { - var beforeCount = Count; - base.ClearItems(); - - if (collectionReset != null) collectionReset.OnNext(Unit.Default); - if (beforeCount > 0) - { - if (countChanged != null) countChanged.OnNext(Count); - } - } - - protected override void InsertItem(int index, T item) - { - base.InsertItem(index, item); - - if (collectionAdd != null) collectionAdd.OnNext(new CollectionAddEvent(index, item)); - if (countChanged != null) countChanged.OnNext(Count); - } - - public void Move(int oldIndex, int newIndex) - { - MoveItem(oldIndex, newIndex); - } - - protected virtual void MoveItem(int oldIndex, int newIndex) - { - T item = this[oldIndex]; - base.RemoveItem(oldIndex); - base.InsertItem(newIndex, item); - - if (collectionMove != null) collectionMove.OnNext(new CollectionMoveEvent(oldIndex, newIndex, item)); - } - - protected override void RemoveItem(int index) - { - T item = this[index]; - base.RemoveItem(index); - - if (collectionRemove != null) collectionRemove.OnNext(new CollectionRemoveEvent(index, item)); - if (countChanged != null) countChanged.OnNext(Count); - } - - protected override void SetItem(int index, T item) - { - T oldItem = this[index]; - base.SetItem(index, item); - - if (collectionReplace != null) collectionReplace.OnNext(new CollectionReplaceEvent(index, oldItem, item)); - } - - - [NonSerialized] - Subject countChanged = null; - public IObservable ObserveCountChanged(bool notifyCurrentCount = false) - { - if (isDisposed) return Observable.Empty(); - - var subject = countChanged ?? (countChanged = new Subject()); - if (notifyCurrentCount) - { - return subject.StartWith(() => this.Count); - } - else - { - return subject; - } - } - - [NonSerialized] - Subject collectionReset = null; - public IObservable ObserveReset() - { - if (isDisposed) return Observable.Empty(); - return collectionReset ?? (collectionReset = new Subject()); - } - - [NonSerialized] - Subject> collectionAdd = null; - public IObservable> ObserveAdd() - { - if (isDisposed) return Observable.Empty>(); - return collectionAdd ?? (collectionAdd = new Subject>()); - } - - [NonSerialized] - Subject> collectionMove = null; - public IObservable> ObserveMove() - { - if (isDisposed) return Observable.Empty>(); - return collectionMove ?? (collectionMove = new Subject>()); - } - - [NonSerialized] - Subject> collectionRemove = null; - public IObservable> ObserveRemove() - { - if (isDisposed) return Observable.Empty>(); - return collectionRemove ?? (collectionRemove = new Subject>()); - } - - [NonSerialized] - Subject> collectionReplace = null; - public IObservable> ObserveReplace() - { - if (isDisposed) return Observable.Empty>(); - return collectionReplace ?? (collectionReplace = new Subject>()); - } - - void DisposeSubject(ref Subject subject) - { - if (subject != null) - { - try - { - subject.OnCompleted(); - } - finally - { - subject.Dispose(); - subject = null; - } - } - } - - #region IDisposable Support - - private bool disposedValue = false; - - protected virtual void Dispose(bool disposing) - { - if (!disposedValue) - { - if (disposing) - { - DisposeSubject(ref collectionReset); - DisposeSubject(ref collectionAdd); - DisposeSubject(ref collectionMove); - DisposeSubject(ref collectionRemove); - DisposeSubject(ref collectionReplace); - DisposeSubject(ref countChanged); - } - - disposedValue = true; - } - } - - public void Dispose() - { - Dispose(true); - } - - #endregion - } - - public static partial class ReactiveCollectionExtensions - { - public static ReactiveCollection ToReactiveCollection(this IEnumerable source) - { - return new ReactiveCollection(source); - } - } -} diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ReactiveCollection.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ReactiveCollection.cs.meta deleted file mode 100644 index 76579b7..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ReactiveCollection.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 2e22185fb1dbcef42bc613efd4769011 -timeCreated: 1455373898 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ReactiveCommand.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ReactiveCommand.cs deleted file mode 100644 index 50e6496..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ReactiveCommand.cs +++ /dev/null @@ -1,592 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Threading; -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -using UniRx.Async; -using UniRx.Async.Internal; -#endif - -namespace UniRx -{ - public interface IReactiveCommand : IObservable - { - IReadOnlyReactiveProperty CanExecute { get; } - bool Execute(T parameter); - -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) - UniTask WaitUntilExecuteAsync(CancellationToken cancellationToken); -#endif - } - - public interface IAsyncReactiveCommand - { - IReadOnlyReactiveProperty CanExecute { get; } - IDisposable Execute(T parameter); - IDisposable Subscribe(Func> asyncAction); - -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) - UniTask WaitUntilExecuteAsync(CancellationToken cancellationToken); -#endif - } - - /// - /// Represents ReactiveCommand<Unit> - /// - public class ReactiveCommand : ReactiveCommand - { - /// - /// CanExecute is always true. - /// - public ReactiveCommand() - : base() - { } - - /// - /// CanExecute is changed from canExecute sequence. - /// - public ReactiveCommand(IObservable canExecuteSource, bool initialValue = true) - : base(canExecuteSource, initialValue) - { - } - - /// Push null to subscribers. - public bool Execute() - { - return Execute(Unit.Default); - } - - /// Force push parameter to subscribers. - public void ForceExecute() - { - ForceExecute(Unit.Default); - } - } - - public class ReactiveCommand : IReactiveCommand, IDisposable - { - readonly Subject trigger = new Subject(); - readonly IDisposable canExecuteSubscription; - - ReactiveProperty canExecute; - public IReadOnlyReactiveProperty CanExecute - { - get - { - return canExecute; - } - } - - public bool IsDisposed { get; private set; } - - /// - /// CanExecute is always true. - /// - public ReactiveCommand() - { - this.canExecute = new ReactiveProperty(true); - this.canExecuteSubscription = Disposable.Empty; - } - - /// - /// CanExecute is changed from canExecute sequence. - /// - public ReactiveCommand(IObservable canExecuteSource, bool initialValue = true) - { - this.canExecute = new ReactiveProperty(initialValue); - this.canExecuteSubscription = canExecuteSource - .DistinctUntilChanged() - .SubscribeWithState(canExecute, (b, c) => c.Value = b); - } - - /// Push parameter to subscribers when CanExecute. - public bool Execute(T parameter) - { - if (canExecute.Value) - { - trigger.OnNext(parameter); - -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) - commonPromise?.InvokeContinuation(ref parameter); - if (removablePromises != null) - { - PromiseHelper.TrySetResultAll(removablePromises.Values, parameter); - } -#endif - - return true; - } - else - { - return false; - } - } - - /// Force push parameter to subscribers. - public void ForceExecute(T parameter) - { - trigger.OnNext(parameter); - } - - /// Subscribe execute. - public IDisposable Subscribe(IObserver observer) - { - return trigger.Subscribe(observer); - } - - /// - /// Stop all subscription and lock CanExecute is false. - /// - public void Dispose() - { - if (IsDisposed) return; - - IsDisposed = true; - canExecute.Dispose(); - trigger.OnCompleted(); - trigger.Dispose(); - canExecuteSubscription.Dispose(); - -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) - commonPromise?.SetCanceled(); - commonPromise = null; - if (removablePromises != null) - { - foreach (var item in removablePromises) - { - item.Value.SetCanceled(); - } - removablePromises = null; - } -#endif - } - -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) - - static readonly Action Callback = CancelCallback; - ReactivePropertyReusablePromise commonPromise; - Dictionary> removablePromises; - - public UniTask WaitUntilExecuteAsync(CancellationToken cancellationToken) - { - if (IsDisposed) throw new ObjectDisposedException("ReadOnlyReactiveProperty"); - - if (!cancellationToken.CanBeCanceled) - { - if (commonPromise != null) return commonPromise.Task; - commonPromise = new ReactivePropertyReusablePromise(CancellationToken.None); - return commonPromise.Task; - } - - if (removablePromises == null) - { - removablePromises = new Dictionary>(CancellationTokenEqualityComparer.Default); - } - - if (removablePromises.TryGetValue(cancellationToken, out var newPromise)) - { - return newPromise.Task; - } - - newPromise = new ReactivePropertyReusablePromise(cancellationToken); - removablePromises.Add(cancellationToken, newPromise); - cancellationToken.RegisterWithoutCaptureExecutionContext(Callback, Tuple.Create(this, newPromise)); - - return newPromise.Task; - } - - static void CancelCallback(object state) - { - var tuple = (Tuple, ReactivePropertyReusablePromise>)state; - if (tuple.Item1.IsDisposed) return; - - tuple.Item2.SetCanceled(); - tuple.Item1.removablePromises.Remove(tuple.Item2.RegisteredCancelationToken); - } - -#endif - } - - /// - /// Variation of ReactiveCommand, when executing command then CanExecute = false after CanExecute = true. - /// - public class AsyncReactiveCommand : AsyncReactiveCommand - { - /// - /// CanExecute is automatically changed when executing to false and finished to true. - /// - public AsyncReactiveCommand() - : base() - { - - } - - /// - /// CanExecute is automatically changed when executing to false and finished to true. - /// - public AsyncReactiveCommand(IObservable canExecuteSource) - : base(canExecuteSource) - { - } - - /// - /// CanExecute is automatically changed when executing to false and finished to true. - /// The source is shared between other AsyncReactiveCommand. - /// - public AsyncReactiveCommand(IReactiveProperty sharedCanExecute) - : base(sharedCanExecute) - { - } - - public IDisposable Execute() - { - return base.Execute(Unit.Default); - } - } - - /// - /// Variation of ReactiveCommand, canExecute is changed when executing command then CanExecute = false after CanExecute = true. - /// - public class AsyncReactiveCommand : IAsyncReactiveCommand - { - UniRx.InternalUtil.ImmutableList>> asyncActions = UniRx.InternalUtil.ImmutableList>>.Empty; - - readonly object gate = new object(); - readonly IReactiveProperty canExecuteSource; - readonly IReadOnlyReactiveProperty canExecute; - - public IReadOnlyReactiveProperty CanExecute - { - get - { - return canExecute; - } - } - - public bool IsDisposed { get; private set; } - - /// - /// CanExecute is automatically changed when executing to false and finished to true. - /// - public AsyncReactiveCommand() - { - this.canExecuteSource = new ReactiveProperty(true); - this.canExecute = canExecuteSource; - } - - /// - /// CanExecute is automatically changed when executing to false and finished to true. - /// - public AsyncReactiveCommand(IObservable canExecuteSource) - { - this.canExecuteSource = new ReactiveProperty(true); - this.canExecute = canExecute.CombineLatest(canExecuteSource, (x, y) => x && y).ToReactiveProperty(); - } - - /// - /// CanExecute is automatically changed when executing to false and finished to true. - /// The source is shared between other AsyncReactiveCommand. - /// - public AsyncReactiveCommand(IReactiveProperty sharedCanExecute) - { - this.canExecuteSource = sharedCanExecute; - this.canExecute = sharedCanExecute; - } - - /// Push parameter to subscribers when CanExecute. - public IDisposable Execute(T parameter) - { - if (canExecute.Value) - { - canExecuteSource.Value = false; - var a = asyncActions.Data; - if (a.Length == 1) - { - try - { -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) - commonPromise?.InvokeContinuation(ref parameter); - if (removablePromises != null) - { - PromiseHelper.TrySetResultAll(removablePromises.Values, parameter); - } -#endif - - var asyncState = a[0].Invoke(parameter) ?? Observable.ReturnUnit(); - return asyncState.Finally(() => canExecuteSource.Value = true).Subscribe(); - } - catch - { - canExecuteSource.Value = true; - throw; - } - } - else - { - var xs = new IObservable[a.Length]; - try - { -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) - commonPromise?.InvokeContinuation(ref parameter); - if (removablePromises != null) - { - PromiseHelper.TrySetResultAll(removablePromises.Values, parameter); - } -#endif - - for (int i = 0; i < a.Length; i++) - { - xs[i] = a[i].Invoke(parameter) ?? Observable.ReturnUnit(); - } - } - catch - { - canExecuteSource.Value = true; - throw; - } - - return Observable.WhenAll(xs).Finally(() => canExecuteSource.Value = true).Subscribe(); - } - } - else - { - return Disposable.Empty; - } - } - - /// Subscribe execute. - public IDisposable Subscribe(Func> asyncAction) - { - lock (gate) - { - asyncActions = asyncActions.Add(asyncAction); - } - - return new Subscription(this, asyncAction); - } - - /// - /// Stop all subscription and lock CanExecute is false. - /// - public void Dispose() - { - if (IsDisposed) return; - - IsDisposed = true; - asyncActions = UniRx.InternalUtil.ImmutableList>>.Empty; - -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) - commonPromise?.SetCanceled(); - commonPromise = null; - if (removablePromises != null) - { - foreach (var item in removablePromises) - { - item.Value.SetCanceled(); - } - removablePromises = null; - } -#endif - } - -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) - - static readonly Action Callback = CancelCallback; - ReactivePropertyReusablePromise commonPromise; - Dictionary> removablePromises; - - public UniTask WaitUntilExecuteAsync(CancellationToken cancellationToken) - { - if (IsDisposed) throw new ObjectDisposedException("ReadOnlyReactiveProperty"); - - if (!cancellationToken.CanBeCanceled) - { - if (commonPromise != null) return commonPromise.Task; - commonPromise = new ReactivePropertyReusablePromise(CancellationToken.None); - return commonPromise.Task; - } - - if (removablePromises == null) - { - removablePromises = new Dictionary>(CancellationTokenEqualityComparer.Default); - } - - if (removablePromises.TryGetValue(cancellationToken, out var newPromise)) - { - return newPromise.Task; - } - - newPromise = new ReactivePropertyReusablePromise(cancellationToken); - removablePromises.Add(cancellationToken, newPromise); - cancellationToken.RegisterWithoutCaptureExecutionContext(Callback, Tuple.Create(this, newPromise)); - - return newPromise.Task; - } - - static void CancelCallback(object state) - { - var tuple = (Tuple, ReactivePropertyReusablePromise>)state; - if (tuple.Item1.IsDisposed) return; - - tuple.Item2.SetCanceled(); - tuple.Item1.removablePromises.Remove(tuple.Item2.RegisteredCancelationToken); - } - -#endif - - class Subscription : IDisposable - { - readonly AsyncReactiveCommand parent; - readonly Func> asyncAction; - - public Subscription(AsyncReactiveCommand parent, Func> asyncAction) - { - this.parent = parent; - this.asyncAction = asyncAction; - } - - public void Dispose() - { - lock (parent.gate) - { - parent.asyncActions = parent.asyncActions.Remove(asyncAction); - } - } - } - } - - public static class ReactiveCommandExtensions - { - /// - /// Create non parameter commands. CanExecute is changed from canExecute sequence. - /// - public static ReactiveCommand ToReactiveCommand(this IObservable canExecuteSource, bool initialValue = true) - { - return new ReactiveCommand(canExecuteSource, initialValue); - } - - /// - /// Create parametered comamnds. CanExecute is changed from canExecute sequence. - /// - public static ReactiveCommand ToReactiveCommand(this IObservable canExecuteSource, bool initialValue = true) - { - return new ReactiveCommand(canExecuteSource, initialValue); - } - -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) - - public static UniTask.Awaiter GetAwaiter(this IReactiveCommand command) - { - return command.WaitUntilExecuteAsync(CancellationToken.None).GetAwaiter(); - } - -#endif - -#if !UniRxLibrary - - // for uGUI(from 4.6) -#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) - - /// - /// Bind ReactiveCommand to button's interactable and onClick. - /// - public static IDisposable BindTo(this IReactiveCommand command, UnityEngine.UI.Button button) - { - var d1 = command.CanExecute.SubscribeToInteractable(button); - var d2 = button.OnClickAsObservable().SubscribeWithState(command, (x, c) => c.Execute(x)); - return StableCompositeDisposable.Create(d1, d2); - } - - /// - /// Bind ReactiveCommand to button's interactable and onClick and register onClick action to command. - /// - public static IDisposable BindToOnClick(this IReactiveCommand command, UnityEngine.UI.Button button, Action onClick) - { - var d1 = command.CanExecute.SubscribeToInteractable(button); - var d2 = button.OnClickAsObservable().SubscribeWithState(command, (x, c) => c.Execute(x)); - var d3 = command.Subscribe(onClick); - - return StableCompositeDisposable.Create(d1, d2, d3); - } - - /// - /// Bind canExecuteSource to button's interactable and onClick and register onClick action to command. - /// - public static IDisposable BindToButtonOnClick(this IObservable canExecuteSource, UnityEngine.UI.Button button, Action onClick, bool initialValue = true) - { - return ToReactiveCommand(canExecuteSource, initialValue).BindToOnClick(button, onClick); - } - -#endif - -#endif - } - - public static class AsyncReactiveCommandExtensions - { - public static AsyncReactiveCommand ToAsyncReactiveCommand(this IReactiveProperty sharedCanExecuteSource) - { - return new AsyncReactiveCommand(sharedCanExecuteSource); - } - - public static AsyncReactiveCommand ToAsyncReactiveCommand(this IReactiveProperty sharedCanExecuteSource) - { - return new AsyncReactiveCommand(sharedCanExecuteSource); - } - -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) - - public static UniTask.Awaiter GetAwaiter(this IAsyncReactiveCommand command) - { - return command.WaitUntilExecuteAsync(CancellationToken.None).GetAwaiter(); - } - -#endif - -#if !UniRxLibrary - - // for uGUI(from 4.6) -#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) - - /// - /// Bind AsyncRaectiveCommand to button's interactable and onClick. - /// - public static IDisposable BindTo(this IAsyncReactiveCommand command, UnityEngine.UI.Button button) - { - var d1 = command.CanExecute.SubscribeToInteractable(button); - var d2 = button.OnClickAsObservable().SubscribeWithState(command, (x, c) => c.Execute(x)); - - return StableCompositeDisposable.Create(d1, d2); - } - - /// - /// Bind AsyncRaectiveCommand to button's interactable and onClick and register async action to command. - /// - public static IDisposable BindToOnClick(this IAsyncReactiveCommand command, UnityEngine.UI.Button button, Func> asyncOnClick) - { - var d1 = command.CanExecute.SubscribeToInteractable(button); - var d2 = button.OnClickAsObservable().SubscribeWithState(command, (x, c) => c.Execute(x)); - var d3 = command.Subscribe(asyncOnClick); - - return StableCompositeDisposable.Create(d1, d2, d3); - } - - /// - /// Create AsyncReactiveCommand and bind to button's interactable and onClick and register async action to command. - /// - public static IDisposable BindToOnClick(this UnityEngine.UI.Button button, Func> asyncOnClick) - { - return new AsyncReactiveCommand().BindToOnClick(button, asyncOnClick); - } - - /// - /// Create AsyncReactiveCommand and bind sharedCanExecuteSource source to button's interactable and onClick and register async action to command. - /// - public static IDisposable BindToOnClick(this UnityEngine.UI.Button button, IReactiveProperty sharedCanExecuteSource, Func> asyncOnClick) - { - return sharedCanExecuteSource.ToAsyncReactiveCommand().BindToOnClick(button, asyncOnClick); - } -#endif - -#endif - } -} diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ReactiveCommand.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ReactiveCommand.cs.meta deleted file mode 100644 index 10b2694..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ReactiveCommand.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 939b249fde5252f45a4404e7648931ed -timeCreated: 1462927720 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ReactiveDictionary.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ReactiveDictionary.cs deleted file mode 100644 index dd85597..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ReactiveDictionary.cs +++ /dev/null @@ -1,520 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Runtime.Serialization; - -namespace UniRx -{ - public struct DictionaryAddEvent : IEquatable> - { - public TKey Key { get; private set; } - public TValue Value { get; private set; } - - public DictionaryAddEvent(TKey key, TValue value) - : this() - { - Key = key; - Value = value; - } - - public override string ToString() - { - return string.Format("Key:{0} Value:{1}", Key, Value); - } - - public override int GetHashCode() - { - return EqualityComparer.Default.GetHashCode(Key) ^ EqualityComparer.Default.GetHashCode(Value) << 2; - } - - public bool Equals(DictionaryAddEvent other) - { - return EqualityComparer.Default.Equals(Key, other.Key) && EqualityComparer.Default.Equals(Value, other.Value); - } - } - - public struct DictionaryRemoveEvent : IEquatable> - { - public TKey Key { get; private set; } - public TValue Value { get; private set; } - - public DictionaryRemoveEvent(TKey key, TValue value) - : this() - { - Key = key; - Value = value; - } - - public override string ToString() - { - return string.Format("Key:{0} Value:{1}", Key, Value); - } - - public override int GetHashCode() - { - return EqualityComparer.Default.GetHashCode(Key) ^ EqualityComparer.Default.GetHashCode(Value) << 2; - } - - public bool Equals(DictionaryRemoveEvent other) - { - return EqualityComparer.Default.Equals(Key, other.Key) && EqualityComparer.Default.Equals(Value, other.Value); - } - } - - public struct DictionaryReplaceEvent : IEquatable> - { - public TKey Key { get; private set; } - public TValue OldValue { get; private set; } - public TValue NewValue { get; private set; } - - public DictionaryReplaceEvent(TKey key, TValue oldValue, TValue newValue) - : this() - { - Key = key; - OldValue = oldValue; - NewValue = newValue; - } - - public override string ToString() - { - return string.Format("Key:{0} OldValue:{1} NewValue:{2}", Key, OldValue, NewValue); - } - - public override int GetHashCode() - { - return EqualityComparer.Default.GetHashCode(Key) ^ EqualityComparer.Default.GetHashCode(OldValue) << 2 ^ EqualityComparer.Default.GetHashCode(NewValue) >> 2; - } - - public bool Equals(DictionaryReplaceEvent other) - { - return EqualityComparer.Default.Equals(Key, other.Key) && EqualityComparer.Default.Equals(OldValue, other.OldValue) && EqualityComparer.Default.Equals(NewValue, other.NewValue); - } - } - - // IReadOnlyDictionary is from .NET 4.5 - public interface IReadOnlyReactiveDictionary : IEnumerable> - { - int Count { get; } - TValue this[TKey index] { get; } - bool ContainsKey(TKey key); - bool TryGetValue(TKey key, out TValue value); - - IObservable> ObserveAdd(); - IObservable ObserveCountChanged(bool notifyCurrentCount = false); - IObservable> ObserveRemove(); - IObservable> ObserveReplace(); - IObservable ObserveReset(); - } - - public interface IReactiveDictionary : IReadOnlyReactiveDictionary, IDictionary - { - } - - [Serializable] - public class ReactiveDictionary : IReactiveDictionary, IDictionary, IEnumerable, ICollection>, IEnumerable>, IDictionary, IDisposable -#if !UNITY_METRO - , ISerializable, IDeserializationCallback -#endif - { - [NonSerialized] - bool isDisposed = false; - -#if !UniRxLibrary - [UnityEngine.SerializeField] -#endif - readonly Dictionary inner; - - public ReactiveDictionary() - { - inner = new Dictionary(); - } - - public ReactiveDictionary(IEqualityComparer comparer) - { - inner = new Dictionary(comparer); - } - - public ReactiveDictionary(Dictionary innerDictionary) - { - inner = innerDictionary; - } - - public TValue this[TKey key] - { - get - { - return inner[key]; - } - - set - { - TValue oldValue; - if (TryGetValue(key, out oldValue)) - { - inner[key] = value; - if (dictionaryReplace != null) dictionaryReplace.OnNext(new DictionaryReplaceEvent(key, oldValue, value)); - } - else - { - inner[key] = value; - if (dictionaryAdd != null) dictionaryAdd.OnNext(new DictionaryAddEvent(key, value)); - if (countChanged != null) countChanged.OnNext(Count); - } - } - } - - public int Count - { - get - { - return inner.Count; - } - } - - public Dictionary.KeyCollection Keys - { - get - { - return inner.Keys; - } - } - - public Dictionary.ValueCollection Values - { - get - { - return inner.Values; - } - } - - public void Add(TKey key, TValue value) - { - inner.Add(key, value); - - if (dictionaryAdd != null) dictionaryAdd.OnNext(new DictionaryAddEvent(key, value)); - if (countChanged != null) countChanged.OnNext(Count); - } - - public void Clear() - { - var beforeCount = Count; - inner.Clear(); - - if (collectionReset != null) collectionReset.OnNext(Unit.Default); - if (beforeCount > 0) - { - if (countChanged != null) countChanged.OnNext(Count); - } - } - - public bool Remove(TKey key) - { - TValue oldValue; - if (inner.TryGetValue(key, out oldValue)) - { - var isSuccessRemove = inner.Remove(key); - if (isSuccessRemove) - { - if (dictionaryRemove != null) dictionaryRemove.OnNext(new DictionaryRemoveEvent(key, oldValue)); - if (countChanged != null) countChanged.OnNext(Count); - } - return isSuccessRemove; - } - else - { - return false; - } - } - - public bool ContainsKey(TKey key) - { - return inner.ContainsKey(key); - } - - public bool TryGetValue(TKey key, out TValue value) - { - return inner.TryGetValue(key, out value); - } - - public Dictionary.Enumerator GetEnumerator() - { - return inner.GetEnumerator(); - } - - void DisposeSubject(ref Subject subject) - { - if (subject != null) - { - try - { - subject.OnCompleted(); - } - finally - { - subject.Dispose(); - subject = null; - } - } - } - - #region IDisposable Support - - private bool disposedValue = false; - - protected virtual void Dispose(bool disposing) - { - if (!disposedValue) - { - if (disposing) - { - DisposeSubject(ref countChanged); - DisposeSubject(ref collectionReset); - DisposeSubject(ref dictionaryAdd); - DisposeSubject(ref dictionaryRemove); - DisposeSubject(ref dictionaryReplace); - } - - disposedValue = true; - } - } - - public void Dispose() - { - Dispose(true); - } - - #endregion - - - #region Observe - - [NonSerialized] - Subject countChanged = null; - public IObservable ObserveCountChanged(bool notifyCurrentCount = false) - { - if (isDisposed) return Observable.Empty(); - - var subject = countChanged ?? (countChanged = new Subject()); - if (notifyCurrentCount) - { - return subject.StartWith(() => this.Count); - } - else - { - return subject; - } - } - - [NonSerialized] - Subject collectionReset = null; - public IObservable ObserveReset() - { - if (isDisposed) return Observable.Empty(); - return collectionReset ?? (collectionReset = new Subject()); - } - - [NonSerialized] - Subject> dictionaryAdd = null; - public IObservable> ObserveAdd() - { - if (isDisposed) return Observable.Empty>(); - return dictionaryAdd ?? (dictionaryAdd = new Subject>()); - } - - [NonSerialized] - Subject> dictionaryRemove = null; - public IObservable> ObserveRemove() - { - if (isDisposed) return Observable.Empty>(); - return dictionaryRemove ?? (dictionaryRemove = new Subject>()); - } - - [NonSerialized] - Subject> dictionaryReplace = null; - public IObservable> ObserveReplace() - { - if (isDisposed) return Observable.Empty>(); - return dictionaryReplace ?? (dictionaryReplace = new Subject>()); - } - - #endregion - - #region implement explicit - - object IDictionary.this[object key] - { - get - { - return this[(TKey)key]; - } - - set - { - this[(TKey)key] = (TValue)value; - } - } - - - bool IDictionary.IsFixedSize - { - get - { - return ((IDictionary)inner).IsFixedSize; - } - } - - bool IDictionary.IsReadOnly - { - get - { - return ((IDictionary)inner).IsReadOnly; - } - } - - bool ICollection.IsSynchronized - { - get - { - return ((IDictionary)inner).IsSynchronized; - } - } - - ICollection IDictionary.Keys - { - get - { - return ((IDictionary)inner).Keys; - } - } - - object ICollection.SyncRoot - { - get - { - return ((IDictionary)inner).SyncRoot; - } - } - - ICollection IDictionary.Values - { - get - { - return ((IDictionary)inner).Values; - } - } - - - bool ICollection>.IsReadOnly - { - get - { - return ((ICollection>)inner).IsReadOnly; - } - } - - ICollection IDictionary.Keys - { - get - { - return inner.Keys; - } - } - - ICollection IDictionary.Values - { - get - { - return inner.Values; - } - } - - void IDictionary.Add(object key, object value) - { - Add((TKey)key, (TValue)value); - } - - bool IDictionary.Contains(object key) - { - return ((IDictionary)inner).Contains(key); - } - - void ICollection.CopyTo(Array array, int index) - { - ((IDictionary)inner).CopyTo(array, index); - } - -#if !UNITY_METRO - - public void GetObjectData(SerializationInfo info, StreamingContext context) - { - ((ISerializable)inner).GetObjectData(info, context); - } - - public void OnDeserialization(object sender) - { - ((IDeserializationCallback)inner).OnDeserialization(sender); - } - -#endif - - void IDictionary.Remove(object key) - { - Remove((TKey)key); - } - - void ICollection>.Add(KeyValuePair item) - { - Add((TKey)item.Key, (TValue)item.Value); - } - - bool ICollection>.Contains(KeyValuePair item) - { - return ((ICollection>)inner).Contains(item); - } - - void ICollection>.CopyTo(KeyValuePair[] array, int arrayIndex) - { - ((ICollection>)inner).CopyTo(array, arrayIndex); - } - - IEnumerator> IEnumerable>.GetEnumerator() - { - return ((ICollection>)inner).GetEnumerator(); - } - - IEnumerator IEnumerable.GetEnumerator() - { - return inner.GetEnumerator(); - } - - bool ICollection>.Remove(KeyValuePair item) - { - TValue v; - if (TryGetValue(item.Key, out v)) - { - if (EqualityComparer.Default.Equals(v, item.Value)) - { - Remove(item.Key); - return true; - } - } - - return false; - } - - IDictionaryEnumerator IDictionary.GetEnumerator() - { - return ((IDictionary)inner).GetEnumerator(); - } - - #endregion - } - - public static partial class ReactiveDictionaryExtensions - { - public static ReactiveDictionary ToReactiveDictionary(this Dictionary dictionary) - { - return new ReactiveDictionary(dictionary); - } - } -} diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ReactiveDictionary.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ReactiveDictionary.cs.meta deleted file mode 100644 index 011f925..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ReactiveDictionary.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 12cd1079b0fe33f429f9f174c1f849af -timeCreated: 1455373897 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ReactiveProperty.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ReactiveProperty.cs deleted file mode 100644 index 876c927..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ReactiveProperty.cs +++ /dev/null @@ -1,702 +0,0 @@ -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member -#endif - -using System; -using System.Collections.Generic; -using System.Threading; -#if !UniRxLibrary -using UnityEngine; -#endif -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) -using UniRx.Async; -using UniRx.Async.Internal; -#endif - -namespace UniRx -{ - public interface IReadOnlyReactiveProperty : IObservable - { - T Value { get; } - bool HasValue { get; } - -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) - UniTask WaitUntilValueChangedAsync(CancellationToken cancellationToken); -#endif - } - - public interface IReactiveProperty : IReadOnlyReactiveProperty - { - new T Value { get; set; } - } - - internal interface IObserverLinkedList - { - void UnsubscribeNode(ObserverNode node); - } - - internal sealed class ObserverNode : IObserver, IDisposable - { - readonly IObserver observer; - IObserverLinkedList list; - - public ObserverNode Previous { get; internal set; } - public ObserverNode Next { get; internal set; } - - public ObserverNode(IObserverLinkedList list, IObserver observer) - { - this.list = list; - this.observer = observer; - } - - public void OnNext(T value) - { - observer.OnNext(value); - } - - public void OnError(Exception error) - { - observer.OnError(error); - } - - public void OnCompleted() - { - observer.OnCompleted(); - } - - public void Dispose() - { - var sourceList = Interlocked.Exchange(ref list, null); - if (sourceList != null) - { - sourceList.UnsubscribeNode(this); - sourceList = null; - } - } - } - - /// - /// Lightweight property broker. - /// - [Serializable] - public class ReactiveProperty : IReactiveProperty, IDisposable, IOptimizedObservable, IObserverLinkedList - { -#if !UniRxLibrary - static readonly IEqualityComparer defaultEqualityComparer = UnityEqualityComparer.GetDefault(); -#else - static readonly IEqualityComparer defaultEqualityComparer = EqualityComparer.Default; -#endif - -#if !UniRxLibrary - [SerializeField] -#endif - T value = default(T); - - [NonSerialized] - ObserverNode root; - - [NonSerialized] - ObserverNode last; - - [NonSerialized] - bool isDisposed = false; - - protected virtual IEqualityComparer EqualityComparer - { - get - { - return defaultEqualityComparer; - } - } - - public T Value - { - get - { - return value; - } - set - { - if (!EqualityComparer.Equals(this.value, value)) - { - SetValue(value); - if (isDisposed) - return; - - RaiseOnNext(ref value); - } - } - } - - // always true, allows empty constructor 'can' publish value on subscribe. - // because sometimes value is deserialized from UnityEngine. - public bool HasValue - { - get - { - return true; - } - } - - public ReactiveProperty() - : this(default(T)) - { - } - - public ReactiveProperty(T initialValue) - { - SetValue(initialValue); - } - - void RaiseOnNext(ref T value) - { - var node = root; - while (node != null) - { - node.OnNext(value); - node = node.Next; - } - -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) - commonPromise?.InvokeContinuation(ref value); - if (removablePromises != null) - { - PromiseHelper.TrySetResultAll(removablePromises.Values, value); - } -#endif - } - - protected virtual void SetValue(T value) - { - this.value = value; - } - - public void SetValueAndForceNotify(T value) - { - SetValue(value); - if (isDisposed) - return; - - RaiseOnNext(ref value); - } - - public IDisposable Subscribe(IObserver observer) - { - if (isDisposed) - { - observer.OnCompleted(); - return Disposable.Empty; - } - - // raise latest value on subscribe - observer.OnNext(value); - - // subscribe node, node as subscription. - var next = new ObserverNode(this, observer); - if (root == null) - { - root = last = next; - } - else - { - last.Next = next; - next.Previous = last; - last = next; - } - return next; - } - - void IObserverLinkedList.UnsubscribeNode(ObserverNode node) - { - if (node == root) - { - root = node.Next; - } - if (node == last) - { - last = node.Previous; - } - - if (node.Previous != null) - { - node.Previous.Next = node.Next; - } - if (node.Next != null) - { - node.Next.Previous = node.Previous; - } - } - - public void Dispose() - { - Dispose(true); - GC.SuppressFinalize(this); - } - - protected virtual void Dispose(bool disposing) - { - if (isDisposed) return; - - var node = root; - root = last = null; - isDisposed = true; - - while (node != null) - { - node.OnCompleted(); - node = node.Next; - } -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) - commonPromise?.SetCanceled(); - commonPromise = null; - if (removablePromises != null) - { - foreach (var item in removablePromises) - { - item.Value.SetCanceled(); - } - removablePromises = null; - } -#endif - - } - - public override string ToString() - { - return (value == null) ? "(null)" : value.ToString(); - } - - public bool IsRequiredSubscribeOnCurrentThread() - { - return false; - } - - -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) - - static readonly Action Callback = CancelCallback; - ReactivePropertyReusablePromise commonPromise; - Dictionary> removablePromises; - - public UniTask WaitUntilValueChangedAsync(CancellationToken cancellationToken) - { - if (isDisposed) throw new ObjectDisposedException("ReactiveProperty"); - - if (!cancellationToken.CanBeCanceled) - { - if (commonPromise != null) return commonPromise.Task; - commonPromise = new ReactivePropertyReusablePromise(CancellationToken.None); - return commonPromise.Task; - } - - if (removablePromises == null) - { - removablePromises = new Dictionary>(CancellationTokenEqualityComparer.Default); - } - - if (removablePromises.TryGetValue(cancellationToken, out var newPromise)) - { - return newPromise.Task; - } - - newPromise = new ReactivePropertyReusablePromise(cancellationToken); - removablePromises.Add(cancellationToken, newPromise); - cancellationToken.RegisterWithoutCaptureExecutionContext(Callback, Tuple.Create(this, newPromise)); - - return newPromise.Task; - } - - static void CancelCallback(object state) - { - var tuple = (Tuple, ReactivePropertyReusablePromise>)state; - if (tuple.Item1.isDisposed) return; - - tuple.Item2.SetCanceled(); - tuple.Item1.removablePromises.Remove(tuple.Item2.RegisteredCancelationToken); - } - -#endif - } - - /// - /// Lightweight property broker. - /// - public class ReadOnlyReactiveProperty : IReadOnlyReactiveProperty, IDisposable, IOptimizedObservable, IObserverLinkedList, IObserver - { -#if !UniRxLibrary - static readonly IEqualityComparer defaultEqualityComparer = UnityEqualityComparer.GetDefault(); -#else - static readonly IEqualityComparer defaultEqualityComparer = EqualityComparer.Default; -#endif - - readonly bool distinctUntilChanged = true; - bool canPublishValueOnSubscribe = false; - bool isDisposed = false; - bool isSourceCompleted = false; - - T latestValue = default(T); - Exception lastException = null; - IDisposable sourceConnection = null; - - ObserverNode root; - ObserverNode last; - - public T Value - { - get - { - return latestValue; - } - } - - public bool HasValue - { - get - { - return canPublishValueOnSubscribe; - } - } - - protected virtual IEqualityComparer EqualityComparer - { - get - { - return defaultEqualityComparer; - } - } - - public ReadOnlyReactiveProperty(IObservable source) - { - this.sourceConnection = source.Subscribe(this); - } - - public ReadOnlyReactiveProperty(IObservable source, bool distinctUntilChanged) - { - this.distinctUntilChanged = distinctUntilChanged; - this.sourceConnection = source.Subscribe(this); - } - - public ReadOnlyReactiveProperty(IObservable source, T initialValue) - { - this.latestValue = initialValue; - this.canPublishValueOnSubscribe = true; - this.sourceConnection = source.Subscribe(this); - } - - public ReadOnlyReactiveProperty(IObservable source, T initialValue, bool distinctUntilChanged) - { - this.distinctUntilChanged = distinctUntilChanged; - this.latestValue = initialValue; - this.canPublishValueOnSubscribe = true; - this.sourceConnection = source.Subscribe(this); - } - - public IDisposable Subscribe(IObserver observer) - { - if (lastException != null) - { - observer.OnError(lastException); - return Disposable.Empty; - } - - if (isSourceCompleted) - { - if (canPublishValueOnSubscribe) - { - observer.OnNext(latestValue); - observer.OnCompleted(); - return Disposable.Empty; - } - else - { - observer.OnCompleted(); - return Disposable.Empty; - } - } - - if (isDisposed) - { - observer.OnCompleted(); - return Disposable.Empty; - } - - if (canPublishValueOnSubscribe) - { - observer.OnNext(latestValue); - } - - // subscribe node, node as subscription. - var next = new ObserverNode(this, observer); - if (root == null) - { - root = last = next; - } - else - { - last.Next = next; - next.Previous = last; - last = next; - } - - return next; - } - - public void Dispose() - { - Dispose(true); - GC.SuppressFinalize(this); - } - - protected virtual void Dispose(bool disposing) - { - if (isDisposed) return; - sourceConnection.Dispose(); - - var node = root; - root = last = null; - isDisposed = true; - - while (node != null) - { - node.OnCompleted(); - node = node.Next; - } - -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) - commonPromise?.SetCanceled(); - commonPromise = null; - if (removablePromises != null) - { - foreach (var item in removablePromises) - { - item.Value.SetCanceled(); - } - removablePromises = null; - } -#endif - } - - void IObserverLinkedList.UnsubscribeNode(ObserverNode node) - { - if (node == root) - { - root = node.Next; - } - if (node == last) - { - last = node.Previous; - } - - if (node.Previous != null) - { - node.Previous.Next = node.Next; - } - if (node.Next != null) - { - node.Next.Previous = node.Previous; - } - } - - void IObserver.OnNext(T value) - { - if (isDisposed) return; - - if (canPublishValueOnSubscribe) - { - if (distinctUntilChanged && EqualityComparer.Equals(this.latestValue, value)) - { - return; - } - } - - canPublishValueOnSubscribe = true; - - // SetValue - this.latestValue = value; - - // call source.OnNext - var node = root; - while (node != null) - { - node.OnNext(value); - node = node.Next; - } - -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) - commonPromise?.InvokeContinuation(ref value); - if (removablePromises != null) - { - PromiseHelper.TrySetResultAll(removablePromises.Values, value); - } -#endif - } - - void IObserver.OnError(Exception error) - { - lastException = error; - - // call source.OnError - var node = root; - while (node != null) - { - node.OnError(error); - node = node.Next; - } - - root = last = null; - } - - void IObserver.OnCompleted() - { - isSourceCompleted = true; - root = last = null; - } - - public override string ToString() - { - return (latestValue == null) ? "(null)" : latestValue.ToString(); - } - - public bool IsRequiredSubscribeOnCurrentThread() - { - return false; - } - -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) - - static readonly Action Callback = CancelCallback; - ReactivePropertyReusablePromise commonPromise; - Dictionary> removablePromises; - - public UniTask WaitUntilValueChangedAsync(CancellationToken cancellationToken) - { - if (isDisposed) throw new ObjectDisposedException("ReadOnlyReactiveProperty"); - - if (!cancellationToken.CanBeCanceled) - { - if (commonPromise != null) return commonPromise.Task; - commonPromise = new ReactivePropertyReusablePromise(CancellationToken.None); - return commonPromise.Task; - } - - if (removablePromises == null) - { - removablePromises = new Dictionary>(CancellationTokenEqualityComparer.Default); - } - - if (removablePromises.TryGetValue(cancellationToken, out var newPromise)) - { - return newPromise.Task; - } - - newPromise = new ReactivePropertyReusablePromise(cancellationToken); - removablePromises.Add(cancellationToken, newPromise); - cancellationToken.RegisterWithoutCaptureExecutionContext(Callback, Tuple.Create(this, newPromise)); - - return newPromise.Task; - } - - static void CancelCallback(object state) - { - var tuple = (Tuple, ReactivePropertyReusablePromise>)state; - if (tuple.Item1.isDisposed) return; - - tuple.Item2.SetCanceled(); - tuple.Item1.removablePromises.Remove(tuple.Item2.RegisteredCancelationToken); - } - -#endif - } - - /// - /// Extension methods of ReactiveProperty<T> - /// - public static class ReactivePropertyExtensions - { - public static IReadOnlyReactiveProperty ToReactiveProperty(this IObservable source) - { - return new ReadOnlyReactiveProperty(source); - } - - public static IReadOnlyReactiveProperty ToReactiveProperty(this IObservable source, T initialValue) - { - return new ReadOnlyReactiveProperty(source, initialValue); - } - - public static ReadOnlyReactiveProperty ToReadOnlyReactiveProperty(this IObservable source) - { - return new ReadOnlyReactiveProperty(source); - } - -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) - - public static UniTask.Awaiter GetAwaiter(this IReadOnlyReactiveProperty source) - { - return source.WaitUntilValueChangedAsync(CancellationToken.None).GetAwaiter(); - } - -#endif - - - /// - /// Create ReadOnlyReactiveProperty with distinctUntilChanged: false. - /// - public static ReadOnlyReactiveProperty ToSequentialReadOnlyReactiveProperty(this IObservable source) - { - return new ReadOnlyReactiveProperty(source, distinctUntilChanged: false); - } - - public static ReadOnlyReactiveProperty ToReadOnlyReactiveProperty(this IObservable source, T initialValue) - { - return new ReadOnlyReactiveProperty(source, initialValue); - } - - /// - /// Create ReadOnlyReactiveProperty with distinctUntilChanged: false. - /// - public static ReadOnlyReactiveProperty ToSequentialReadOnlyReactiveProperty(this IObservable source, T initialValue) - { - return new ReadOnlyReactiveProperty(source, initialValue, distinctUntilChanged: false); - } - - public static IObservable SkipLatestValueOnSubscribe(this IReadOnlyReactiveProperty source) - { - return source.HasValue ? source.Skip(1) : source; - } - - // for multiple toggle or etc.. - - /// - /// Lastest values of each sequence are all true. - /// - public static IObservable CombineLatestValuesAreAllTrue(this IEnumerable> sources) - { - return sources.CombineLatest().Select(xs => - { - foreach (var item in xs) - { - if (item == false) - return false; - } - return true; - }); - } - - - /// - /// Lastest values of each sequence are all false. - /// - public static IObservable CombineLatestValuesAreAllFalse(this IEnumerable> sources) - { - return sources.CombineLatest().Select(xs => - { - foreach (var item in xs) - { - if (item == true) - return false; - } - return true; - }); - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ReactiveProperty.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ReactiveProperty.cs.meta deleted file mode 100644 index 7819654..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ReactiveProperty.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 88e12aa895fef434fbe3ea0cc8f57301 -timeCreated: 1455373900 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ReactivePropertyReusablePromise.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ReactivePropertyReusablePromise.cs deleted file mode 100644 index 62ed530..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ReactivePropertyReusablePromise.cs +++ /dev/null @@ -1,140 +0,0 @@ -#if CSHARP_7_OR_LATER || (UNITY_2018_3_OR_NEWER && (NET_STANDARD_2_0 || NET_4_6)) - -#pragma warning disable CS1591 - -using System; -using System.Threading; -using UniRx.Async; -using UniRx.Async.Internal; - -namespace UniRx -{ - internal class ReactivePropertyReusablePromise : IAwaiter, IResolvePromise - { - T result; - object continuation; // Action or Queue - MinimumQueue<(int, T)> queueValues; - bool running; - int waitingContinuationCount; - AwaiterStatus status; - - internal readonly CancellationToken RegisteredCancelationToken; - - public bool IsCompleted => status.IsCompleted(); - public UniTask Task => new UniTask(this); - public AwaiterStatus Status => status; - - public ReactivePropertyReusablePromise(CancellationToken cancellationToken) - { - this.RegisteredCancelationToken = cancellationToken; - this.status = AwaiterStatus.Pending; - - TaskTracker.TrackActiveTask(this, 3); - } - - public T GetResult() - { - if (status == AwaiterStatus.Canceled) throw new OperationCanceledException(); - return result; - } - - void IAwaiter.GetResult() - { - GetResult(); - } - - public void SetCanceled() - { - status = AwaiterStatus.Canceled; - // run rest continuation. - TaskTracker.RemoveTracking(this); - - result = default(T); - InvokeContinuation(ref result); - // clear - continuation = null; - queueValues = null; - } - - public void InvokeContinuation(ref T value) - { - if (continuation == null) return; - - if (continuation is Action act) - { - this.result = value; - continuation = null; - act(); - } - else - { - if (waitingContinuationCount == 0) return; - - var q = (MinimumQueue)continuation; - if (queueValues == null) queueValues = new MinimumQueue<(int, T)>(4); - queueValues.Enqueue((waitingContinuationCount, value)); - waitingContinuationCount = 0; - - if (!running) - { - running = true; - try - { - while (queueValues.Count != 0) - { - var (runCount, v) = queueValues.Dequeue(); - this.result = v; - for (int i = 0; i < runCount; i++) - { - q.Dequeue().Invoke(); - } - } - } - finally - { - running = false; - } - } - } - } - - public void OnCompleted(Action continuation) - { - UnsafeOnCompleted(continuation); - } - - public void UnsafeOnCompleted(Action action) - { - if (continuation == null) - { - continuation = action; - return; - } - else - { - if (continuation is Action act) - { - var q = new MinimumQueue(4); - q.Enqueue(act); - q.Enqueue(action); - continuation = q; - waitingContinuationCount = 2; - return; - } - else - { - ((MinimumQueue)continuation).Enqueue(action); - waitingContinuationCount++; - } - } - } - - bool IResolvePromise.TrySetResult(T value) - { - InvokeContinuation(ref value); - return true; - } - } -} - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ReactivePropertyReusablePromise.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ReactivePropertyReusablePromise.cs.meta deleted file mode 100644 index 21f6553..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ReactivePropertyReusablePromise.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 4c3ce1729c826c047afbd8ae1e85a3ab -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ScenePlaybackDetector.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ScenePlaybackDetector.cs deleted file mode 100644 index 04fda48..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ScenePlaybackDetector.cs +++ /dev/null @@ -1,84 +0,0 @@ -#if UNITY_EDITOR - -using UnityEditor; -using UnityEditor.Callbacks; -using UnityEngine; - -namespace UniRx -{ - [InitializeOnLoad] - public class ScenePlaybackDetector - { - private static bool _isPlaying = false; - - private static bool AboutToStartScene - { - get - { - return EditorPrefs.GetBool("AboutToStartScene"); - } - set - { - EditorPrefs.SetBool("AboutToStartScene", value); - } - } - - public static bool IsPlaying - { - get - { - return _isPlaying; - } - set - { - if (_isPlaying != value) - { - _isPlaying = value; - } - } - } - - // This callback is notified after scripts have been reloaded. - [DidReloadScripts] - public static void OnDidReloadScripts() - { - // Filter DidReloadScripts callbacks to the moment where playmodeState transitions into isPlaying. - if (AboutToStartScene) - { - IsPlaying = true; - } - } - - // InitializeOnLoad ensures that this constructor is called when the Unity Editor is started. - static ScenePlaybackDetector() - { -#if UNITY_2017_2_OR_NEWER - EditorApplication.playModeStateChanged += e => -#else - EditorApplication.playmodeStateChanged += () => -#endif - { - // Before scene start: isPlayingOrWillChangePlaymode = false; isPlaying = false - // Pressed Playback button: isPlayingOrWillChangePlaymode = true; isPlaying = false - // Playing: isPlayingOrWillChangePlaymode = false; isPlaying = true - // Pressed stop button: isPlayingOrWillChangePlaymode = true; isPlaying = true - if (EditorApplication.isPlayingOrWillChangePlaymode && !EditorApplication.isPlaying) - { - AboutToStartScene = true; - } - else - { - AboutToStartScene = false; - } - - // Detect when playback is stopped. - if (!EditorApplication.isPlaying) - { - IsPlaying = false; - } - }; - } - } -} - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ScenePlaybackDetector.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ScenePlaybackDetector.cs.meta deleted file mode 100644 index f090f98..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/ScenePlaybackDetector.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 8d380d86e2ef6674c83ca983a1604273 -timeCreated: 1455373900 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Toolkit.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Toolkit.meta deleted file mode 100644 index 9ae4198..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Toolkit.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 4c4b3c209f488e940b3c038e90517a9a -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Toolkit/ObjectPool.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Toolkit/ObjectPool.cs deleted file mode 100644 index 45b9739..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Toolkit/ObjectPool.cs +++ /dev/null @@ -1,474 +0,0 @@ -#if UNITY_5_3_OR_NEWER - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Threading; - -namespace UniRx.Toolkit -{ - /// - /// Bass class of ObjectPool. - /// - public abstract class ObjectPool : IDisposable - where T : UnityEngine.Component - { - bool isDisposed = false; - Queue q; - - /// - /// Limit of instace count. - /// - protected int MaxPoolCount - { - get - { - return int.MaxValue; - } - } - - /// - /// Create instance when needed. - /// - protected abstract T CreateInstance(); - - /// - /// Called before return to pool, useful for set active object(it is default behavior). - /// - protected virtual void OnBeforeRent(T instance) - { - instance.gameObject.SetActive(true); - } - - /// - /// Called before return to pool, useful for set inactive object(it is default behavior). - /// - protected virtual void OnBeforeReturn(T instance) - { - instance.gameObject.SetActive(false); - } - - /// - /// Called when clear or disposed, useful for destroy instance or other finalize method. - /// - protected virtual void OnClear(T instance) - { - if (instance == null) return; - - var go = instance.gameObject; - if (go == null) return; - UnityEngine.Object.Destroy(go); - } - - /// - /// Current pooled object count. - /// - public int Count - { - get - { - if (q == null) return 0; - return q.Count; - } - } - - /// - /// Get instance from pool. - /// - public T Rent() - { - if (isDisposed) throw new ObjectDisposedException("ObjectPool was already disposed."); - if (q == null) q = new Queue(); - - var instance = (q.Count > 0) - ? q.Dequeue() - : CreateInstance(); - - OnBeforeRent(instance); - return instance; - } - - /// - /// Return instance to pool. - /// - public void Return(T instance) - { - if (isDisposed) throw new ObjectDisposedException("ObjectPool was already disposed."); - if (instance == null) throw new ArgumentNullException("instance"); - - if (q == null) q = new Queue(); - - if ((q.Count + 1) == MaxPoolCount) - { - throw new InvalidOperationException("Reached Max PoolSize"); - } - - OnBeforeReturn(instance); - q.Enqueue(instance); - } - - /// - /// Clear pool. - /// - public void Clear(bool callOnBeforeRent = false) - { - if (q == null) return; - while (q.Count != 0) - { - var instance = q.Dequeue(); - if (callOnBeforeRent) - { - OnBeforeRent(instance); - } - OnClear(instance); - } - } - - /// - /// Trim pool instances. - /// - /// 0.0f = clear all ~ 1.0f = live all. - /// Min pool count. - /// If true, call OnBeforeRent before OnClear. - public void Shrink(float instanceCountRatio, int minSize, bool callOnBeforeRent = false) - { - if (q == null) return; - - if (instanceCountRatio <= 0) instanceCountRatio = 0; - if (instanceCountRatio >= 1.0f) instanceCountRatio = 1.0f; - - var size = (int)(q.Count * instanceCountRatio); - size = Math.Max(minSize, size); - - while (q.Count > size) - { - var instance = q.Dequeue(); - if (callOnBeforeRent) - { - OnBeforeRent(instance); - } - OnClear(instance); - } - } - - /// - /// If needs shrink pool frequently, start check timer. - /// - /// Interval of call Shrink. - /// 0.0f = clearAll ~ 1.0f = live all. - /// Min pool count. - /// If true, call OnBeforeRent before OnClear. - public IDisposable StartShrinkTimer(TimeSpan checkInterval, float instanceCountRatio, int minSize, bool callOnBeforeRent = false) - { - return Observable.Interval(checkInterval) - .TakeWhile(_ => !isDisposed) - .Subscribe(_ => - { - Shrink(instanceCountRatio, minSize, callOnBeforeRent); - }); - } - - /// - /// Fill pool before rent operation. - /// - /// Pool instance count. - /// Create count per frame. - public IObservable PreloadAsync(int preloadCount, int threshold) - { - if (q == null) q = new Queue(preloadCount); - - return Observable.FromMicroCoroutine((observer, cancel) => PreloadCore(preloadCount, threshold, observer, cancel)); - } - - IEnumerator PreloadCore(int preloadCount, int threshold, IObserver observer, CancellationToken cancellationToken) - { - while (Count < preloadCount && !cancellationToken.IsCancellationRequested) - { - var requireCount = preloadCount - Count; - if (requireCount <= 0) break; - - var createCount = Math.Min(requireCount, threshold); - - for (int i = 0; i < createCount; i++) - { - try - { - var instance = CreateInstance(); - Return(instance); - } - catch (Exception ex) - { - observer.OnError(ex); - yield break; - } - } - yield return null; // next frame. - } - - observer.OnNext(Unit.Default); - observer.OnCompleted(); - } - - #region IDisposable Support - - protected virtual void Dispose(bool disposing) - { - if (!isDisposed) - { - if (disposing) - { - Clear(false); - } - - isDisposed = true; - } - } - - public void Dispose() - { - Dispose(true); - } - - #endregion - } - - /// - /// Bass class of ObjectPool. If needs asynchronous initialization, use this instead of standard ObjectPool. - /// - public abstract class AsyncObjectPool : IDisposable - where T : UnityEngine.Component - { - bool isDisposed = false; - Queue q; - - /// - /// Limit of instace count. - /// - protected int MaxPoolCount - { - get - { - return int.MaxValue; - } - } - - /// - /// Create instance when needed. - /// - protected abstract IObservable CreateInstanceAsync(); - - /// - /// Called before return to pool, useful for set active object(it is default behavior). - /// - protected virtual void OnBeforeRent(T instance) - { - instance.gameObject.SetActive(true); - } - - /// - /// Called before return to pool, useful for set inactive object(it is default behavior). - /// - protected virtual void OnBeforeReturn(T instance) - { - instance.gameObject.SetActive(false); - } - - /// - /// Called when clear or disposed, useful for destroy instance or other finalize method. - /// - protected virtual void OnClear(T instance) - { - if (instance == null) return; - - var go = instance.gameObject; - if (go == null) return; - UnityEngine.Object.Destroy(go); - } - - /// - /// Current pooled object count. - /// - public int Count - { - get - { - if (q == null) return 0; - return q.Count; - } - } - - /// - /// Get instance from pool. - /// - public IObservable RentAsync() - { - if (isDisposed) throw new ObjectDisposedException("ObjectPool was already disposed."); - if (q == null) q = new Queue(); - - if (q.Count > 0) - { - var instance = q.Dequeue(); - OnBeforeRent(instance); - return Observable.Return(instance); - } - else - { - var instance = CreateInstanceAsync(); - return instance.Do(x => OnBeforeRent(x)); - } - } - - /// - /// Return instance to pool. - /// - public void Return(T instance) - { - if (isDisposed) throw new ObjectDisposedException("ObjectPool was already disposed."); - if (instance == null) throw new ArgumentNullException("instance"); - - if (q == null) q = new Queue(); - - if ((q.Count + 1) == MaxPoolCount) - { - throw new InvalidOperationException("Reached Max PoolSize"); - } - - OnBeforeReturn(instance); - q.Enqueue(instance); - } - - /// - /// Trim pool instances. - /// - /// 0.0f = clear all ~ 1.0f = live all. - /// Min pool count. - /// If true, call OnBeforeRent before OnClear. - public void Shrink(float instanceCountRatio, int minSize, bool callOnBeforeRent = false) - { - if (q == null) return; - - if (instanceCountRatio <= 0) instanceCountRatio = 0; - if (instanceCountRatio >= 1.0f) instanceCountRatio = 1.0f; - - var size = (int)(q.Count * instanceCountRatio); - size = Math.Max(minSize, size); - - while (q.Count > size) - { - var instance = q.Dequeue(); - if (callOnBeforeRent) - { - OnBeforeRent(instance); - } - OnClear(instance); - } - } - - /// - /// If needs shrink pool frequently, start check timer. - /// - /// Interval of call Shrink. - /// 0.0f = clearAll ~ 1.0f = live all. - /// Min pool count. - /// If true, call OnBeforeRent before OnClear. - public IDisposable StartShrinkTimer(TimeSpan checkInterval, float instanceCountRatio, int minSize, bool callOnBeforeRent = false) - { - return Observable.Interval(checkInterval) - .TakeWhile(_ => !isDisposed) - .Subscribe(_ => - { - Shrink(instanceCountRatio, minSize, callOnBeforeRent); - }); - } - - /// - /// Clear pool. - /// - public void Clear(bool callOnBeforeRent = false) - { - if (q == null) return; - while (q.Count != 0) - { - var instance = q.Dequeue(); - if (callOnBeforeRent) - { - OnBeforeRent(instance); - } - OnClear(instance); - } - } - - /// - /// Fill pool before rent operation. - /// - /// Pool instance count. - /// Create count per frame. - public IObservable PreloadAsync(int preloadCount, int threshold) - { - if (q == null) q = new Queue(preloadCount); - - return Observable.FromMicroCoroutine((observer, cancel) => PreloadCore(preloadCount, threshold, observer, cancel)); - } - - IEnumerator PreloadCore(int preloadCount, int threshold, IObserver observer, CancellationToken cancellationToken) - { - while (Count < preloadCount && !cancellationToken.IsCancellationRequested) - { - var requireCount = preloadCount - Count; - if (requireCount <= 0) break; - - var createCount = Math.Min(requireCount, threshold); - - var loaders = new IObservable[createCount]; - for (int i = 0; i < createCount; i++) - { - var instanceFuture = CreateInstanceAsync(); - loaders[i] = instanceFuture.ForEachAsync(x => Return(x)); - } - - var awaiter = Observable.WhenAll(loaders).ToYieldInstruction(false, cancellationToken); - while (!(awaiter.HasResult || awaiter.IsCanceled || awaiter.HasError)) - { - yield return null; - } - - if (awaiter.HasError) - { - observer.OnError(awaiter.Error); - yield break; - } - else if (awaiter.IsCanceled) - { - yield break; // end. - } - } - - observer.OnNext(Unit.Default); - observer.OnCompleted(); - } - - #region IDisposable Support - - protected virtual void Dispose(bool disposing) - { - if (!isDisposed) - { - if (disposing) - { - Clear(false); - } - - isDisposed = true; - } - } - - public void Dispose() - { - Dispose(true); - } - - #endregion - } -} - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Toolkit/ObjectPool.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Toolkit/ObjectPool.cs.meta deleted file mode 100644 index b3e0709..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Toolkit/ObjectPool.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: f4980e1e001c7e94fab3250ba284dc91 -timeCreated: 1468655394 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers.meta deleted file mode 100644 index 87dbb18..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: a909f63d5ed20b74e9790a7fee48d3f5 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableAnimatorTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableAnimatorTrigger.cs deleted file mode 100644 index cc9c136..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableAnimatorTrigger.cs +++ /dev/null @@ -1,49 +0,0 @@ -using System; // require keep for Windows Universal App -using UnityEngine; - -namespace UniRx.Triggers -{ - [DisallowMultipleComponent] - public class ObservableAnimatorTrigger : ObservableTriggerBase - { - Subject onAnimatorIK; - - /// Callback for setting up animation IK (inverse kinematics). - void OnAnimatorIK(int layerIndex) - { - if (onAnimatorIK != null) onAnimatorIK.OnNext(layerIndex); - } - - /// Callback for setting up animation IK (inverse kinematics). - public IObservable OnAnimatorIKAsObservable() - { - return onAnimatorIK ?? (onAnimatorIK = new Subject()); - } - - Subject onAnimatorMove; - - /// Callback for processing animation movements for modifying root motion. - void OnAnimatorMove() - { - if (onAnimatorMove != null) onAnimatorMove.OnNext(Unit.Default); - } - - /// Callback for processing animation movements for modifying root motion. - public IObservable OnAnimatorMoveAsObservable() - { - return onAnimatorMove ?? (onAnimatorMove = new Subject()); - } - - protected override void RaiseOnCompletedOnDestroy() - { - if (onAnimatorIK != null) - { - onAnimatorIK.OnCompleted(); - } - if (onAnimatorMove != null) - { - onAnimatorMove.OnCompleted(); - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableAnimatorTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableAnimatorTrigger.cs.meta deleted file mode 100644 index 8aff60f..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableAnimatorTrigger.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: e03f9257cc6667f4082439aa77d6f01e -timeCreated: 1455373901 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableBeginDragTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableBeginDragTrigger.cs deleted file mode 100644 index 8b36802..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableBeginDragTrigger.cs +++ /dev/null @@ -1,36 +0,0 @@ -// for uGUI(from 4.6) -#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) - -using System; // require keep for Windows Universal App -using UnityEngine; -using UnityEngine.EventSystems; - -namespace UniRx.Triggers -{ - [DisallowMultipleComponent] - public class ObservableBeginDragTrigger : ObservableTriggerBase, IEventSystemHandler, IBeginDragHandler - { - Subject onBeginDrag; - - void IBeginDragHandler.OnBeginDrag(PointerEventData eventData) - { - if (onBeginDrag != null) onBeginDrag.OnNext(eventData); - } - - public IObservable OnBeginDragAsObservable() - { - return onBeginDrag ?? (onBeginDrag = new Subject()); - } - - protected override void RaiseOnCompletedOnDestroy() - { - if (onBeginDrag != null) - { - onBeginDrag.OnCompleted(); - } - } - } -} - - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableBeginDragTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableBeginDragTrigger.cs.meta deleted file mode 100644 index 2ec62c4..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableBeginDragTrigger.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 3a81a9b6bec6b4f4fba7e0047cd989f6 -timeCreated: 1455373898 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableCancelTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableCancelTrigger.cs deleted file mode 100644 index 1ae59cf..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableCancelTrigger.cs +++ /dev/null @@ -1,36 +0,0 @@ -// for uGUI(from 4.6) -#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) - -using System; // require keep for Windows Universal App -using UnityEngine; -using UnityEngine.EventSystems; - -namespace UniRx.Triggers -{ - [DisallowMultipleComponent] - public class ObservableCancelTrigger : ObservableTriggerBase, IEventSystemHandler, ICancelHandler - { - Subject onCancel; - - void ICancelHandler.OnCancel(BaseEventData eventData) - { - if (onCancel != null) onCancel.OnNext(eventData); - } - - public IObservable OnCancelAsObservable() - { - return onCancel ?? (onCancel = new Subject()); - } - - protected override void RaiseOnCompletedOnDestroy() - { - if (onCancel != null) - { - onCancel.OnCompleted(); - } - } - } -} - - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableCancelTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableCancelTrigger.cs.meta deleted file mode 100644 index 9f3b842..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableCancelTrigger.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 4c0a9070b7cc23746b2c0e2db3ec16cd -timeCreated: 1455373898 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableCanvasGroupChangedTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableCanvasGroupChangedTrigger.cs deleted file mode 100644 index 3127887..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableCanvasGroupChangedTrigger.cs +++ /dev/null @@ -1,36 +0,0 @@ -// after uGUI(from 4.6) -#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) - -using System; -using UnityEngine; - -namespace UniRx.Triggers -{ - [DisallowMultipleComponent] - public class ObservableCanvasGroupChangedTrigger : ObservableTriggerBase - { - Subject onCanvasGroupChanged; - - // Callback that is sent if the canvas group is changed - void OnCanvasGroupChanged() - { - if (onCanvasGroupChanged != null) onCanvasGroupChanged.OnNext(Unit.Default); - } - - /// Callback that is sent if the canvas group is changed. - public IObservable OnCanvasGroupChangedAsObservable() - { - return onCanvasGroupChanged ?? (onCanvasGroupChanged = new Subject()); - } - - protected override void RaiseOnCompletedOnDestroy() - { - if (onCanvasGroupChanged != null) - { - onCanvasGroupChanged.OnCompleted(); - } - } - } -} - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableCanvasGroupChangedTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableCanvasGroupChangedTrigger.cs.meta deleted file mode 100644 index a023c40..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableCanvasGroupChangedTrigger.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 54095d3e740f7714085d0568207cbfe0 -timeCreated: 1455373899 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableCollision2DTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableCollision2DTrigger.cs deleted file mode 100644 index 50a5b04..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableCollision2DTrigger.cs +++ /dev/null @@ -1,67 +0,0 @@ -using System; // require keep for Windows Universal App -using UnityEngine; - -namespace UniRx.Triggers -{ - [DisallowMultipleComponent] - public class ObservableCollision2DTrigger : ObservableTriggerBase - { - Subject onCollisionEnter2D; - - /// Sent when an incoming collider makes contact with this object's collider (2D physics only). - void OnCollisionEnter2D(Collision2D coll) - { - if (onCollisionEnter2D != null) onCollisionEnter2D.OnNext(coll); - } - - /// Sent when an incoming collider makes contact with this object's collider (2D physics only). - public IObservable OnCollisionEnter2DAsObservable() - { - return onCollisionEnter2D ?? (onCollisionEnter2D = new Subject()); - } - - Subject onCollisionExit2D; - - /// Sent when a collider on another object stops touching this object's collider (2D physics only). - void OnCollisionExit2D(Collision2D coll) - { - if (onCollisionExit2D != null) onCollisionExit2D.OnNext(coll); - } - - /// Sent when a collider on another object stops touching this object's collider (2D physics only). - public IObservable OnCollisionExit2DAsObservable() - { - return onCollisionExit2D ?? (onCollisionExit2D = new Subject()); - } - - Subject onCollisionStay2D; - - /// Sent each frame where a collider on another object is touching this object's collider (2D physics only). - void OnCollisionStay2D(Collision2D coll) - { - if (onCollisionStay2D != null) onCollisionStay2D.OnNext(coll); - } - - /// Sent each frame where a collider on another object is touching this object's collider (2D physics only). - public IObservable OnCollisionStay2DAsObservable() - { - return onCollisionStay2D ?? (onCollisionStay2D = new Subject()); - } - - protected override void RaiseOnCompletedOnDestroy() - { - if (onCollisionEnter2D != null) - { - onCollisionEnter2D.OnCompleted(); - } - if (onCollisionExit2D != null) - { - onCollisionExit2D.OnCompleted(); - } - if (onCollisionStay2D != null) - { - onCollisionStay2D.OnCompleted(); - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableCollision2DTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableCollision2DTrigger.cs.meta deleted file mode 100644 index 40ddc3e..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableCollision2DTrigger.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 1be7847b61f30f24daa5762db87a5b19 -timeCreated: 1455373897 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableCollisionTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableCollisionTrigger.cs deleted file mode 100644 index 06490c1..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableCollisionTrigger.cs +++ /dev/null @@ -1,67 +0,0 @@ -using System; // require keep for Windows Universal App -using UnityEngine; - -namespace UniRx.Triggers -{ - [DisallowMultipleComponent] - public class ObservableCollisionTrigger : ObservableTriggerBase - { - Subject onCollisionEnter; - - /// OnCollisionEnter is called when this collider/rigidbody has begun touching another rigidbody/collider. - void OnCollisionEnter(Collision collision) - { - if (onCollisionEnter != null) onCollisionEnter.OnNext(collision); - } - - /// OnCollisionEnter is called when this collider/rigidbody has begun touching another rigidbody/collider. - public IObservable OnCollisionEnterAsObservable() - { - return onCollisionEnter ?? (onCollisionEnter = new Subject()); - } - - Subject onCollisionExit; - - /// OnCollisionExit is called when this collider/rigidbody has stopped touching another rigidbody/collider. - void OnCollisionExit(Collision collisionInfo) - { - if (onCollisionExit != null) onCollisionExit.OnNext(collisionInfo); - } - - /// OnCollisionExit is called when this collider/rigidbody has stopped touching another rigidbody/collider. - public IObservable OnCollisionExitAsObservable() - { - return onCollisionExit ?? (onCollisionExit = new Subject()); - } - - Subject onCollisionStay; - - /// OnCollisionStay is called once per frame for every collider/rigidbody that is touching rigidbody/collider. - void OnCollisionStay(Collision collisionInfo) - { - if (onCollisionStay != null) onCollisionStay.OnNext(collisionInfo); - } - - /// OnCollisionStay is called once per frame for every collider/rigidbody that is touching rigidbody/collider. - public IObservable OnCollisionStayAsObservable() - { - return onCollisionStay ?? (onCollisionStay = new Subject()); - } - - protected override void RaiseOnCompletedOnDestroy() - { - if (onCollisionEnter != null) - { - onCollisionEnter.OnCompleted(); - } - if (onCollisionExit != null) - { - onCollisionExit.OnCompleted(); - } - if (onCollisionStay != null) - { - onCollisionStay.OnCompleted(); - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableCollisionTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableCollisionTrigger.cs.meta deleted file mode 100644 index 09399cc..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableCollisionTrigger.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 10b917196cbfcf74898ce1686e205d04 -timeCreated: 1455373897 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableDeselectTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableDeselectTrigger.cs deleted file mode 100644 index 08bd835..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableDeselectTrigger.cs +++ /dev/null @@ -1,36 +0,0 @@ -// for uGUI(from 4.6) -#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) - -using System; // require keep for Windows Universal App -using UnityEngine; -using UnityEngine.EventSystems; - -namespace UniRx.Triggers -{ - [DisallowMultipleComponent] - public class ObservableDeselectTrigger : ObservableTriggerBase, IEventSystemHandler, IDeselectHandler - { - Subject onDeselect; - - void IDeselectHandler.OnDeselect(BaseEventData eventData) - { - if (onDeselect != null) onDeselect.OnNext(eventData); - } - - public IObservable OnDeselectAsObservable() - { - return onDeselect ?? (onDeselect = new Subject()); - } - - protected override void RaiseOnCompletedOnDestroy() - { - if (onDeselect != null) - { - onDeselect.OnCompleted(); - } - } - } -} - - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableDeselectTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableDeselectTrigger.cs.meta deleted file mode 100644 index 91bdae0..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableDeselectTrigger.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 9fe6f69c4d869c04e8a1924aab1d3694 -timeCreated: 1455373900 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableDestroyTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableDestroyTrigger.cs deleted file mode 100644 index 2c25e02..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableDestroyTrigger.cs +++ /dev/null @@ -1,67 +0,0 @@ -using System; // require keep for Windows Universal App -using UnityEngine; - -namespace UniRx.Triggers -{ - [DisallowMultipleComponent] - public class ObservableDestroyTrigger : MonoBehaviour - { - bool calledDestroy = false; - Subject onDestroy; - CompositeDisposable disposablesOnDestroy; - - [Obsolete("Internal Use.")] - internal bool IsMonitoredActivate { get; set; } - - public bool IsActivated { get; private set; } - - /// - /// Check called OnDestroy. - /// This property does not guarantees GameObject was destroyed, - /// when gameObject is deactive, does not raise OnDestroy. - /// - public bool IsCalledOnDestroy { get { return calledDestroy; } } - - void Awake() - { - IsActivated = true; - } - - /// This function is called when the MonoBehaviour will be destroyed. - void OnDestroy() - { - if (!calledDestroy) - { - calledDestroy = true; - if (disposablesOnDestroy != null) disposablesOnDestroy.Dispose(); - if (onDestroy != null) { onDestroy.OnNext(Unit.Default); onDestroy.OnCompleted(); } - } - } - - /// This function is called when the MonoBehaviour will be destroyed. - public IObservable OnDestroyAsObservable() - { - if (this == null) return Observable.Return(Unit.Default); - if (calledDestroy) return Observable.Return(Unit.Default); - return onDestroy ?? (onDestroy = new Subject()); - } - - /// Invoke OnDestroy, this method is used on internal. - public void ForceRaiseOnDestroy() - { - OnDestroy(); - } - - public void AddDisposableOnDestroy(IDisposable disposable) - { - if (calledDestroy) - { - disposable.Dispose(); - return; - } - - if (disposablesOnDestroy == null) disposablesOnDestroy = new CompositeDisposable(); - disposablesOnDestroy.Add(disposable); - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableDestroyTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableDestroyTrigger.cs.meta deleted file mode 100644 index 68d8b53..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableDestroyTrigger.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: cb219b23cdf4b314f94a27bca3cc8012 -timeCreated: 1455373901 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableDragTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableDragTrigger.cs deleted file mode 100644 index 652aa69..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableDragTrigger.cs +++ /dev/null @@ -1,36 +0,0 @@ -// for uGUI(from 4.6) -#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) - -using System; // require keep for Windows Universal App -using UnityEngine; -using UnityEngine.EventSystems; - -namespace UniRx.Triggers -{ - [DisallowMultipleComponent] - public class ObservableDragTrigger : ObservableTriggerBase, IEventSystemHandler, IDragHandler - { - Subject onDrag; - - void IDragHandler.OnDrag(PointerEventData eventData) - { - if (onDrag != null) onDrag.OnNext(eventData); - } - - public IObservable OnDragAsObservable() - { - return onDrag ?? (onDrag = new Subject()); - } - - protected override void RaiseOnCompletedOnDestroy() - { - if (onDrag != null) - { - onDrag.OnCompleted(); - } - } - } -} - - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableDragTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableDragTrigger.cs.meta deleted file mode 100644 index ba30a30..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableDragTrigger.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 79db090dc9e4db245821e8b89b0e208e -timeCreated: 1455373899 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableDropTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableDropTrigger.cs deleted file mode 100644 index 7499b0b..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableDropTrigger.cs +++ /dev/null @@ -1,36 +0,0 @@ -// for uGUI(from 4.6) -#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) - -using System; // require keep for Windows Universal App -using UnityEngine; -using UnityEngine.EventSystems; - -namespace UniRx.Triggers -{ - [DisallowMultipleComponent] - public class ObservableDropTrigger : ObservableTriggerBase, IEventSystemHandler, IDropHandler - { - Subject onDrop; - - void IDropHandler.OnDrop(PointerEventData eventData) - { - if (onDrop != null) onDrop.OnNext(eventData); - } - - public IObservable OnDropAsObservable() - { - return onDrop ?? (onDrop = new Subject()); - } - - protected override void RaiseOnCompletedOnDestroy() - { - if (onDrop != null) - { - onDrop.OnCompleted(); - } - } - } -} - - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableDropTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableDropTrigger.cs.meta deleted file mode 100644 index 1288eb8..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableDropTrigger.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: f2ffa8b5af3474446a310bb6aa0b180a -timeCreated: 1455373902 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableEnableTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableEnableTrigger.cs deleted file mode 100644 index 4ca9003..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableEnableTrigger.cs +++ /dev/null @@ -1,49 +0,0 @@ -using System; // require keep for Windows Universal App -using UnityEngine; - -namespace UniRx.Triggers -{ - [DisallowMultipleComponent] - public class ObservableEnableTrigger : ObservableTriggerBase - { - Subject onEnable; - - /// This function is called when the object becomes enabled and active. - void OnEnable() - { - if (onEnable != null) onEnable.OnNext(Unit.Default); - } - - /// This function is called when the object becomes enabled and active. - public IObservable OnEnableAsObservable() - { - return onEnable ?? (onEnable = new Subject()); - } - - Subject onDisable; - - /// This function is called when the behaviour becomes disabled () or inactive. - void OnDisable() - { - if (onDisable != null) onDisable.OnNext(Unit.Default); - } - - /// This function is called when the behaviour becomes disabled () or inactive. - public IObservable OnDisableAsObservable() - { - return onDisable ?? (onDisable = new Subject()); - } - - protected override void RaiseOnCompletedOnDestroy() - { - if (onEnable != null) - { - onEnable.OnCompleted(); - } - if (onDisable != null) - { - onDisable.OnCompleted(); - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableEnableTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableEnableTrigger.cs.meta deleted file mode 100644 index 969370b..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableEnableTrigger.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 0d9c7eb607af1fd4aa0e15f52cc0543b -timeCreated: 1455373897 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableEndDragTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableEndDragTrigger.cs deleted file mode 100644 index f63e132..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableEndDragTrigger.cs +++ /dev/null @@ -1,36 +0,0 @@ -// for uGUI(from 4.6) -#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) - -using System; // require keep for Windows Universal App -using UnityEngine; -using UnityEngine.EventSystems; - -namespace UniRx.Triggers -{ - [DisallowMultipleComponent] - public class ObservableEndDragTrigger : ObservableTriggerBase, IEventSystemHandler, IEndDragHandler - { - Subject onEndDrag; - - void IEndDragHandler.OnEndDrag(PointerEventData eventData) - { - if (onEndDrag != null) onEndDrag.OnNext(eventData); - } - - public IObservable OnEndDragAsObservable() - { - return onEndDrag ?? (onEndDrag = new Subject()); - } - - protected override void RaiseOnCompletedOnDestroy() - { - if (onEndDrag != null) - { - onEndDrag.OnCompleted(); - } - } - } -} - - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableEndDragTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableEndDragTrigger.cs.meta deleted file mode 100644 index e55cd9d..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableEndDragTrigger.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: b8ce8424f238d6842bd8b09c0cca1ac4 -timeCreated: 1455373900 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableEventTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableEventTrigger.cs deleted file mode 100644 index b19cdf4..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableEventTrigger.cs +++ /dev/null @@ -1,359 +0,0 @@ -// for uGUI(from 4.6) -#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) - -using System; // require keep for Windows Universal App -using UnityEngine; -using UnityEngine.EventSystems; - -namespace UniRx.Triggers -{ - [DisallowMultipleComponent] - public class ObservableEventTrigger : ObservableTriggerBase, IEventSystemHandler, IPointerEnterHandler, IPointerExitHandler, IPointerDownHandler, IPointerUpHandler, IPointerClickHandler, IBeginDragHandler, IInitializePotentialDragHandler, IDragHandler, IEndDragHandler, IDropHandler, IScrollHandler, IUpdateSelectedHandler, ISelectHandler, IDeselectHandler, IMoveHandler, ISubmitHandler, ICancelHandler - { - #region IDeselectHandler - - Subject onDeselect; - - void IDeselectHandler.OnDeselect(BaseEventData eventData) - { - if (onDeselect != null) onDeselect.OnNext(eventData); - } - - public IObservable OnDeselectAsObservable() - { - return onDeselect ?? (onDeselect = new Subject()); - } - - #endregion - - #region IMoveHandler - - Subject onMove; - - void IMoveHandler.OnMove(AxisEventData eventData) - { - if (onMove != null) onMove.OnNext(eventData); - } - - public IObservable OnMoveAsObservable() - { - return onMove ?? (onMove = new Subject()); - } - - #endregion - - #region IPointerDownHandler - - Subject onPointerDown; - - void IPointerDownHandler.OnPointerDown(PointerEventData eventData) - { - if (onPointerDown != null) onPointerDown.OnNext(eventData); - } - - public IObservable OnPointerDownAsObservable() - { - return onPointerDown ?? (onPointerDown = new Subject()); - } - - #endregion - - #region IPointerEnterHandler - - Subject onPointerEnter; - - void IPointerEnterHandler.OnPointerEnter(PointerEventData eventData) - { - if (onPointerEnter != null) onPointerEnter.OnNext(eventData); - } - - public IObservable OnPointerEnterAsObservable() - { - return onPointerEnter ?? (onPointerEnter = new Subject()); - } - - #endregion - - #region IPointerExitHandler - - Subject onPointerExit; - - void IPointerExitHandler.OnPointerExit(PointerEventData eventData) - { - if (onPointerExit != null) onPointerExit.OnNext(eventData); - } - - public IObservable OnPointerExitAsObservable() - { - return onPointerExit ?? (onPointerExit = new Subject()); - } - - #endregion - - #region IPointerUpHandler - - Subject onPointerUp; - - void IPointerUpHandler.OnPointerUp(PointerEventData eventData) - { - if (onPointerUp != null) onPointerUp.OnNext(eventData); - } - - public IObservable OnPointerUpAsObservable() - { - return onPointerUp ?? (onPointerUp = new Subject()); - } - - #endregion - - #region ISelectHandler - - Subject onSelect; - - void ISelectHandler.OnSelect(BaseEventData eventData) - { - if (onSelect != null) onSelect.OnNext(eventData); - } - - public IObservable OnSelectAsObservable() - { - return onSelect ?? (onSelect = new Subject()); - } - - #endregion - - #region IPointerClickHandler - - Subject onPointerClick; - - void IPointerClickHandler.OnPointerClick(PointerEventData eventData) - { - if (onPointerClick != null) onPointerClick.OnNext(eventData); - } - - public IObservable OnPointerClickAsObservable() - { - return onPointerClick ?? (onPointerClick = new Subject()); - } - - #endregion - - #region ISubmitHandler - - Subject onSubmit; - - void ISubmitHandler.OnSubmit(BaseEventData eventData) - { - if (onSubmit != null) onSubmit.OnNext(eventData); - } - - public IObservable OnSubmitAsObservable() - { - return onSubmit ?? (onSubmit = new Subject()); - } - - #endregion - - #region IDragHandler - - Subject onDrag; - - void IDragHandler.OnDrag(PointerEventData eventData) - { - if (onDrag != null) onDrag.OnNext(eventData); - } - - public IObservable OnDragAsObservable() - { - return onDrag ?? (onDrag = new Subject()); - } - - #endregion - - #region IBeginDragHandler - - Subject onBeginDrag; - - void IBeginDragHandler.OnBeginDrag(PointerEventData eventData) - { - if (onBeginDrag != null) onBeginDrag.OnNext(eventData); - } - - public IObservable OnBeginDragAsObservable() - { - return onBeginDrag ?? (onBeginDrag = new Subject()); - } - - #endregion - - #region IEndDragHandler - - Subject onEndDrag; - - void IEndDragHandler.OnEndDrag(PointerEventData eventData) - { - if (onEndDrag != null) onEndDrag.OnNext(eventData); - } - - public IObservable OnEndDragAsObservable() - { - return onEndDrag ?? (onEndDrag = new Subject()); - } - - #endregion - - #region IDropHandler - - Subject onDrop; - - void IDropHandler.OnDrop(PointerEventData eventData) - { - if (onDrop != null) onDrop.OnNext(eventData); - } - - public IObservable OnDropAsObservable() - { - return onDrop ?? (onDrop = new Subject()); - } - - #endregion - - #region IUpdateSelectedHandler - - Subject onUpdateSelected; - - void IUpdateSelectedHandler.OnUpdateSelected(BaseEventData eventData) - { - if (onUpdateSelected != null) onUpdateSelected.OnNext(eventData); - } - - public IObservable OnUpdateSelectedAsObservable() - { - return onUpdateSelected ?? (onUpdateSelected = new Subject()); - } - - #endregion - - #region IInitializePotentialDragHandler - - Subject onInitializePotentialDrag; - - void IInitializePotentialDragHandler.OnInitializePotentialDrag(PointerEventData eventData) - { - if (onInitializePotentialDrag != null) onInitializePotentialDrag.OnNext(eventData); - } - - public IObservable OnInitializePotentialDragAsObservable() - { - return onInitializePotentialDrag ?? (onInitializePotentialDrag = new Subject()); - } - - #endregion - - #region ICancelHandler - - Subject onCancel; - - void ICancelHandler.OnCancel(BaseEventData eventData) - { - if (onCancel != null) onCancel.OnNext(eventData); - } - - public IObservable OnCancelAsObservable() - { - return onCancel ?? (onCancel = new Subject()); - } - - #endregion - - #region IScrollHandler - - Subject onScroll; - - void IScrollHandler.OnScroll(PointerEventData eventData) - { - if (onScroll != null) onScroll.OnNext(eventData); - } - - public IObservable OnScrollAsObservable() - { - return onScroll ?? (onScroll = new Subject()); - } - - #endregion - - protected override void RaiseOnCompletedOnDestroy() - { - if (onDeselect != null) - { - onDeselect.OnCompleted(); - } - if (onMove != null) - { - onMove.OnCompleted(); - } - if (onPointerDown != null) - { - onPointerDown.OnCompleted(); - } - if (onPointerEnter != null) - { - onPointerEnter.OnCompleted(); - } - if (onPointerExit != null) - { - onPointerExit.OnCompleted(); - } - if (onPointerUp != null) - { - onPointerUp.OnCompleted(); - } - if (onSelect != null) - { - onSelect.OnCompleted(); - } - if (onPointerClick != null) - { - onPointerClick.OnCompleted(); - } - if (onSubmit != null) - { - onSubmit.OnCompleted(); - } - if (onDrag != null) - { - onDrag.OnCompleted(); - } - if (onBeginDrag != null) - { - onBeginDrag.OnCompleted(); - } - if (onEndDrag != null) - { - onEndDrag.OnCompleted(); - } - if (onDrop != null) - { - onDrop.OnCompleted(); - } - if (onUpdateSelected != null) - { - onUpdateSelected.OnCompleted(); - } - if (onInitializePotentialDrag != null) - { - onInitializePotentialDrag.OnCompleted(); - } - if (onCancel != null) - { - onCancel.OnCompleted(); - } - if (onScroll != null) - { - onScroll.OnCompleted(); - } - } - } -} - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableEventTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableEventTrigger.cs.meta deleted file mode 100644 index cc19548..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableEventTrigger.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 48e93426b16d5454c89e8d47ccded1c5 -timeCreated: 1455373898 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableFixedUpdateTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableFixedUpdateTrigger.cs deleted file mode 100644 index 9e3fe29..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableFixedUpdateTrigger.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System; // require keep for Windows Universal App -using UnityEngine; - -namespace UniRx.Triggers -{ - [DisallowMultipleComponent] - public class ObservableFixedUpdateTrigger : ObservableTriggerBase - { - Subject fixedUpdate; - - /// This function is called every fixed framerate frame, if the MonoBehaviour is enabled. - void FixedUpdate() - { - if (fixedUpdate != null) fixedUpdate.OnNext(Unit.Default); - } - - /// This function is called every fixed framerate frame, if the MonoBehaviour is enabled. - public IObservable FixedUpdateAsObservable() - { - return fixedUpdate ?? (fixedUpdate = new Subject()); - } - - protected override void RaiseOnCompletedOnDestroy() - { - if (fixedUpdate != null) - { - fixedUpdate.OnCompleted(); - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableFixedUpdateTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableFixedUpdateTrigger.cs.meta deleted file mode 100644 index aabc769..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableFixedUpdateTrigger.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: d525c42c11d945f4398061ed8f84e5f4 -timeCreated: 1455373901 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableInitializePotentialDragTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableInitializePotentialDragTrigger.cs deleted file mode 100644 index dfd2daa..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableInitializePotentialDragTrigger.cs +++ /dev/null @@ -1,36 +0,0 @@ -// for uGUI(from 4.6) -#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) - -using System; // require keep for Windows Universal App -using UnityEngine; -using UnityEngine.EventSystems; - -namespace UniRx.Triggers -{ - [DisallowMultipleComponent] - public class ObservableInitializePotentialDragTrigger : ObservableTriggerBase, IEventSystemHandler, IInitializePotentialDragHandler - { - Subject onInitializePotentialDrag; - - void IInitializePotentialDragHandler.OnInitializePotentialDrag(PointerEventData eventData) - { - if (onInitializePotentialDrag != null) onInitializePotentialDrag.OnNext(eventData); - } - - public IObservable OnInitializePotentialDragAsObservable() - { - return onInitializePotentialDrag ?? (onInitializePotentialDrag = new Subject()); - } - - protected override void RaiseOnCompletedOnDestroy() - { - if (onInitializePotentialDrag != null) - { - onInitializePotentialDrag.OnCompleted(); - } - } - } -} - - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableInitializePotentialDragTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableInitializePotentialDragTrigger.cs.meta deleted file mode 100644 index a14ffba..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableInitializePotentialDragTrigger.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 3f3148a9e1b8b21409f54d2b0c2c81de -timeCreated: 1455373898 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableJointTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableJointTrigger.cs deleted file mode 100644 index b7521f2..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableJointTrigger.cs +++ /dev/null @@ -1,47 +0,0 @@ -using System; // require keep for Windows Universal App -using UnityEngine; - -namespace UniRx.Triggers -{ - [DisallowMultipleComponent] - public class ObservableJointTrigger : ObservableTriggerBase - { - Subject onJointBreak; - - void OnJointBreak(float breakForce) - { - if (onJointBreak != null) onJointBreak.OnNext(breakForce); - } - - public IObservable OnJointBreakAsObservable() - { - return onJointBreak ?? (onJointBreak = new Subject()); - } - - - Subject onJointBreak2D; - - void OnJointBreak2D(Joint2D brokenJoint) - { - if (onJointBreak2D != null) onJointBreak2D.OnNext(brokenJoint); - } - - public IObservable OnJointBreak2DAsObservable() - { - return onJointBreak2D ?? (onJointBreak2D = new Subject()); - } - - - protected override void RaiseOnCompletedOnDestroy() - { - if (onJointBreak != null) - { - onJointBreak.OnCompleted(); - } - if (onJointBreak2D != null) - { - onJointBreak2D.OnCompleted(); - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableJointTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableJointTrigger.cs.meta deleted file mode 100644 index 765bbcb..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableJointTrigger.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 79b758631951cbc42b40ea87072e1ab3 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableLateUpdateTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableLateUpdateTrigger.cs deleted file mode 100644 index 74eda99..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableLateUpdateTrigger.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System; // require keep for Windows Universal App -using UnityEngine; - -namespace UniRx.Triggers -{ - [DisallowMultipleComponent] - public class ObservableLateUpdateTrigger : ObservableTriggerBase - { - Subject lateUpdate; - - /// LateUpdate is called every frame, if the Behaviour is enabled. - void LateUpdate() - { - if (lateUpdate != null) lateUpdate.OnNext(Unit.Default); - } - - /// LateUpdate is called every frame, if the Behaviour is enabled. - public IObservable LateUpdateAsObservable() - { - return lateUpdate ?? (lateUpdate = new Subject()); - } - - protected override void RaiseOnCompletedOnDestroy() - { - if (lateUpdate != null) - { - lateUpdate.OnCompleted(); - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableLateUpdateTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableLateUpdateTrigger.cs.meta deleted file mode 100644 index a62624a..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableLateUpdateTrigger.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 176ace24965d0c744bc61c8aad8b3fc7 -timeCreated: 1455373897 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableMouseTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableMouseTrigger.cs deleted file mode 100644 index 17ad908..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableMouseTrigger.cs +++ /dev/null @@ -1,143 +0,0 @@ -#if !(UNITY_IPHONE || UNITY_ANDROID || UNITY_METRO) - -using System; // require keep for Windows Universal App -using UnityEngine; - -namespace UniRx.Triggers -{ - [DisallowMultipleComponent] - public class ObservableMouseTrigger : ObservableTriggerBase - { - Subject onMouseDown; - - /// OnMouseDown is called when the user has pressed the mouse button while over the GUIElement or Collider. - void OnMouseDown() - { - if (onMouseDown != null) onMouseDown.OnNext(Unit.Default); - } - - /// OnMouseDown is called when the user has pressed the mouse button while over the GUIElement or Collider. - public IObservable OnMouseDownAsObservable() - { - return onMouseDown ?? (onMouseDown = new Subject()); - } - - Subject onMouseDrag; - - /// OnMouseDrag is called when the user has clicked on a GUIElement or Collider and is still holding down the mouse. - void OnMouseDrag() - { - if (onMouseDrag != null) onMouseDrag.OnNext(Unit.Default); - } - - /// OnMouseDrag is called when the user has clicked on a GUIElement or Collider and is still holding down the mouse. - public IObservable OnMouseDragAsObservable() - { - return onMouseDrag ?? (onMouseDrag = new Subject()); - } - - Subject onMouseEnter; - - /// OnMouseEnter is called when the mouse entered the GUIElement or Collider. - void OnMouseEnter() - { - if (onMouseEnter != null) onMouseEnter.OnNext(Unit.Default); - } - - /// OnMouseEnter is called when the mouse entered the GUIElement or Collider. - public IObservable OnMouseEnterAsObservable() - { - return onMouseEnter ?? (onMouseEnter = new Subject()); - } - - Subject onMouseExit; - - /// OnMouseExit is called when the mouse is not any longer over the GUIElement or Collider. - void OnMouseExit() - { - if (onMouseExit != null) onMouseExit.OnNext(Unit.Default); - } - - /// OnMouseExit is called when the mouse is not any longer over the GUIElement or Collider. - public IObservable OnMouseExitAsObservable() - { - return onMouseExit ?? (onMouseExit = new Subject()); - } - - Subject onMouseOver; - - /// OnMouseOver is called every frame while the mouse is over the GUIElement or Collider. - void OnMouseOver() - { - if (onMouseOver != null) onMouseOver.OnNext(Unit.Default); - } - - /// OnMouseOver is called every frame while the mouse is over the GUIElement or Collider. - public IObservable OnMouseOverAsObservable() - { - return onMouseOver ?? (onMouseOver = new Subject()); - } - - Subject onMouseUp; - - /// OnMouseUp is called when the user has released the mouse button. - void OnMouseUp() - { - if (onMouseUp != null) onMouseUp.OnNext(Unit.Default); - } - - /// OnMouseUp is called when the user has released the mouse button. - public IObservable OnMouseUpAsObservable() - { - return onMouseUp ?? (onMouseUp = new Subject()); - } - - Subject onMouseUpAsButton; - - /// OnMouseUpAsButton is only called when the mouse is released over the same GUIElement or Collider as it was pressed. - void OnMouseUpAsButton() - { - if (onMouseUpAsButton != null) onMouseUpAsButton.OnNext(Unit.Default); - } - - /// OnMouseUpAsButton is only called when the mouse is released over the same GUIElement or Collider as it was pressed. - public IObservable OnMouseUpAsButtonAsObservable() - { - return onMouseUpAsButton ?? (onMouseUpAsButton = new Subject()); - } - - protected override void RaiseOnCompletedOnDestroy() - { - if (onMouseDown != null) - { - onMouseDown.OnCompleted(); - } - if (onMouseDrag != null) - { - onMouseDrag.OnCompleted(); - } - if (onMouseEnter != null) - { - onMouseEnter.OnCompleted(); - } - if (onMouseExit != null) - { - onMouseExit.OnCompleted(); - } - if (onMouseOver != null) - { - onMouseOver.OnCompleted(); - } - if (onMouseUp != null) - { - onMouseUp.OnCompleted(); - } - if (onMouseUpAsButton != null) - { - onMouseUpAsButton.OnCompleted(); - } - } - } -} - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableMouseTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableMouseTrigger.cs.meta deleted file mode 100644 index 9611b63..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableMouseTrigger.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: c5f30958c5509bc4f9c14ea261a1567c -timeCreated: 1455373901 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableMoveTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableMoveTrigger.cs deleted file mode 100644 index 583b2c0..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableMoveTrigger.cs +++ /dev/null @@ -1,36 +0,0 @@ -// for uGUI(from 4.6) -#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) - -using System; // require keep for Windows Universal App -using UnityEngine; -using UnityEngine.EventSystems; - -namespace UniRx.Triggers -{ - [DisallowMultipleComponent] - public class ObservableMoveTrigger : ObservableTriggerBase, IEventSystemHandler, IMoveHandler - { - Subject onMove; - - void IMoveHandler.OnMove(AxisEventData eventData) - { - if (onMove != null) onMove.OnNext(eventData); - } - - public IObservable OnMoveAsObservable() - { - return onMove ?? (onMove = new Subject()); - } - - protected override void RaiseOnCompletedOnDestroy() - { - if (onMove != null) - { - onMove.OnCompleted(); - } - } - } -} - - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableMoveTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableMoveTrigger.cs.meta deleted file mode 100644 index 1964275..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableMoveTrigger.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 3e1feec0f10dcea4d9c779a81a0ee3dc -timeCreated: 1455373898 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableParticleTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableParticleTrigger.cs deleted file mode 100644 index eda1eb7..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableParticleTrigger.cs +++ /dev/null @@ -1,56 +0,0 @@ -using System; // require keep for Windows Universal App -using UnityEngine; - -namespace UniRx.Triggers -{ - [DisallowMultipleComponent] - public class ObservableParticleTrigger : ObservableTriggerBase - { - Subject onParticleCollision; -#if UNITY_5_4_OR_NEWER - Subject onParticleTrigger; -#endif - - /// OnParticleCollision is called when a particle hits a collider. - void OnParticleCollision(GameObject other) - { - if (onParticleCollision != null) onParticleCollision.OnNext(other); - } - - /// OnParticleCollision is called when a particle hits a collider. - public IObservable OnParticleCollisionAsObservable() - { - return onParticleCollision ?? (onParticleCollision = new Subject()); - } - -#if UNITY_5_4_OR_NEWER - - /// OnParticleTrigger is called when any particles in a particle system meet the conditions in the trigger module. - void OnParticleTrigger() - { - if (onParticleTrigger != null) onParticleTrigger.OnNext(Unit.Default); - } - - /// OnParticleTrigger is called when any particles in a particle system meet the conditions in the trigger module. - public IObservable OnParticleTriggerAsObservable() - { - return onParticleTrigger ?? (onParticleTrigger = new Subject()); - } - -#endif - - protected override void RaiseOnCompletedOnDestroy() - { - if (onParticleCollision != null) - { - onParticleCollision.OnCompleted(); - } -#if UNITY_5_4_OR_NEWER - if (onParticleTrigger != null) - { - onParticleTrigger.OnCompleted(); - } -#endif - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableParticleTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableParticleTrigger.cs.meta deleted file mode 100644 index 0c405cb..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableParticleTrigger.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 9e6a20494274d5045a1b36a770ea76b4 -timeCreated: 1468669952 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservablePointerClickTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservablePointerClickTrigger.cs deleted file mode 100644 index 339d4f1..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservablePointerClickTrigger.cs +++ /dev/null @@ -1,36 +0,0 @@ -// for uGUI(from 4.6) -#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) - -using System; // require keep for Windows Universal App -using UnityEngine; -using UnityEngine.EventSystems; - -namespace UniRx.Triggers -{ - [DisallowMultipleComponent] - public class ObservablePointerClickTrigger : ObservableTriggerBase, IEventSystemHandler, IPointerClickHandler - { - Subject onPointerClick; - - void IPointerClickHandler.OnPointerClick(PointerEventData eventData) - { - if (onPointerClick != null) onPointerClick.OnNext(eventData); - } - - public IObservable OnPointerClickAsObservable() - { - return onPointerClick ?? (onPointerClick = new Subject()); - } - - protected override void RaiseOnCompletedOnDestroy() - { - if (onPointerClick != null) - { - onPointerClick.OnCompleted(); - } - } - } -} - - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservablePointerClickTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservablePointerClickTrigger.cs.meta deleted file mode 100644 index b6d86b7..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservablePointerClickTrigger.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: aa69c313aba23f945b760e79c45083ad -timeCreated: 1455373900 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservablePointerDownTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservablePointerDownTrigger.cs deleted file mode 100644 index 7966861..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservablePointerDownTrigger.cs +++ /dev/null @@ -1,36 +0,0 @@ -// for uGUI(from 4.6) -#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) - -using System; // require keep for Windows Universal App -using UnityEngine; -using UnityEngine.EventSystems; - -namespace UniRx.Triggers -{ - [DisallowMultipleComponent] - public class ObservablePointerDownTrigger : ObservableTriggerBase, IEventSystemHandler, IPointerDownHandler - { - Subject onPointerDown; - - void IPointerDownHandler.OnPointerDown(PointerEventData eventData) - { - if (onPointerDown != null) onPointerDown.OnNext(eventData); - } - - public IObservable OnPointerDownAsObservable() - { - return onPointerDown ?? (onPointerDown = new Subject()); - } - - protected override void RaiseOnCompletedOnDestroy() - { - if (onPointerDown != null) - { - onPointerDown.OnCompleted(); - } - } - } -} - - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservablePointerDownTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservablePointerDownTrigger.cs.meta deleted file mode 100644 index 8ca694a..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservablePointerDownTrigger.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: c7ae5b5965df2344d99ef7792521b937 -timeCreated: 1455373901 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservablePointerEnterTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservablePointerEnterTrigger.cs deleted file mode 100644 index 7859f24..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservablePointerEnterTrigger.cs +++ /dev/null @@ -1,36 +0,0 @@ -// for uGUI(from 4.6) -#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) - -using System; // require keep for Windows Universal App -using UnityEngine; -using UnityEngine.EventSystems; - -namespace UniRx.Triggers -{ - [DisallowMultipleComponent] - public class ObservablePointerEnterTrigger : ObservableTriggerBase, IEventSystemHandler, IPointerEnterHandler - { - Subject onPointerEnter; - - void IPointerEnterHandler.OnPointerEnter(PointerEventData eventData) - { - if (onPointerEnter != null) onPointerEnter.OnNext(eventData); - } - - public IObservable OnPointerEnterAsObservable() - { - return onPointerEnter ?? (onPointerEnter = new Subject()); - } - - protected override void RaiseOnCompletedOnDestroy() - { - if (onPointerEnter != null) - { - onPointerEnter.OnCompleted(); - } - } - } -} - - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservablePointerEnterTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservablePointerEnterTrigger.cs.meta deleted file mode 100644 index 655ddb2..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservablePointerEnterTrigger.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 3468b3db8d419c745b12124f6432696b -timeCreated: 1455373898 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservablePointerExitTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservablePointerExitTrigger.cs deleted file mode 100644 index dfa2249..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservablePointerExitTrigger.cs +++ /dev/null @@ -1,36 +0,0 @@ -// for uGUI(from 4.6) -#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) - -using System; // require keep for Windows Universal App -using UnityEngine; -using UnityEngine.EventSystems; - -namespace UniRx.Triggers -{ - [DisallowMultipleComponent] - public class ObservablePointerExitTrigger : ObservableTriggerBase, IEventSystemHandler, IPointerExitHandler - { - Subject onPointerExit; - - void IPointerExitHandler.OnPointerExit(PointerEventData eventData) - { - if (onPointerExit != null) onPointerExit.OnNext(eventData); - } - - public IObservable OnPointerExitAsObservable() - { - return onPointerExit ?? (onPointerExit = new Subject()); - } - - protected override void RaiseOnCompletedOnDestroy() - { - if (onPointerExit != null) - { - onPointerExit.OnCompleted(); - } - } - } -} - - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservablePointerExitTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservablePointerExitTrigger.cs.meta deleted file mode 100644 index 5365e5b..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservablePointerExitTrigger.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 9643e74593988274bbed9adf40384e48 -timeCreated: 1455373900 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservablePointerUpTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservablePointerUpTrigger.cs deleted file mode 100644 index 2156713..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservablePointerUpTrigger.cs +++ /dev/null @@ -1,36 +0,0 @@ -// for uGUI(from 4.6) -#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) - -using System; // require keep for Windows Universal App -using UnityEngine; -using UnityEngine.EventSystems; - -namespace UniRx.Triggers -{ - [DisallowMultipleComponent] - public class ObservablePointerUpTrigger : ObservableTriggerBase, IEventSystemHandler, IPointerUpHandler - { - Subject onPointerUp; - - void IPointerUpHandler.OnPointerUp(PointerEventData eventData) - { - if (onPointerUp != null) onPointerUp.OnNext(eventData); - } - - public IObservable OnPointerUpAsObservable() - { - return onPointerUp ?? (onPointerUp = new Subject()); - } - - protected override void RaiseOnCompletedOnDestroy() - { - if (onPointerUp != null) - { - onPointerUp.OnCompleted(); - } - } - } -} - - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservablePointerUpTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservablePointerUpTrigger.cs.meta deleted file mode 100644 index ed50e6c..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservablePointerUpTrigger.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 41b0031b2e409894aacafa49d8583617 -timeCreated: 1455373898 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableRectTransformTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableRectTransformTrigger.cs deleted file mode 100644 index cb23d8d..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableRectTransformTrigger.cs +++ /dev/null @@ -1,55 +0,0 @@ -// after uGUI(from 4.6) -#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) - -using System; -using UnityEngine; - -namespace UniRx.Triggers -{ - [DisallowMultipleComponent] - public class ObservableRectTransformTrigger : ObservableTriggerBase - { - Subject onRectTransformDimensionsChange; - - // Callback that is sent if an associated RectTransform has it's dimensions changed - void OnRectTransformDimensionsChange() - { - if (onRectTransformDimensionsChange != null) onRectTransformDimensionsChange.OnNext(Unit.Default); - } - - /// Callback that is sent if an associated RectTransform has it's dimensions changed. - public IObservable OnRectTransformDimensionsChangeAsObservable() - { - return onRectTransformDimensionsChange ?? (onRectTransformDimensionsChange = new Subject()); - } - - Subject onRectTransformRemoved; - - // Callback that is sent if an associated RectTransform is removed - void OnRectTransformRemoved() - { - if (onRectTransformRemoved != null) onRectTransformRemoved.OnNext(Unit.Default); - } - - /// Callback that is sent if an associated RectTransform is removed. - public IObservable OnRectTransformRemovedAsObservable() - { - return onRectTransformRemoved ?? (onRectTransformRemoved = new Subject()); - } - - protected override void RaiseOnCompletedOnDestroy() - { - if (onRectTransformDimensionsChange != null) - { - onRectTransformDimensionsChange.OnCompleted(); - } - if (onRectTransformRemoved != null) - { - onRectTransformRemoved.OnCompleted(); - } - } - - } -} - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableRectTransformTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableRectTransformTrigger.cs.meta deleted file mode 100644 index 2cd2e43..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableRectTransformTrigger.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 20b97bcdd98f27346851c3a690ec7faf -timeCreated: 1455373897 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableScrollTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableScrollTrigger.cs deleted file mode 100644 index 33573e5..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableScrollTrigger.cs +++ /dev/null @@ -1,36 +0,0 @@ -// for uGUI(from 4.6) -#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) - -using System; // require keep for Windows Universal App -using UnityEngine; -using UnityEngine.EventSystems; - -namespace UniRx.Triggers -{ - [DisallowMultipleComponent] - public class ObservableScrollTrigger : ObservableTriggerBase, IEventSystemHandler, IScrollHandler - { - Subject onScroll; - - void IScrollHandler.OnScroll(PointerEventData eventData) - { - if (onScroll != null) onScroll.OnNext(eventData); - } - - public IObservable OnScrollAsObservable() - { - return onScroll ?? (onScroll = new Subject()); - } - - protected override void RaiseOnCompletedOnDestroy() - { - if (onScroll != null) - { - onScroll.OnCompleted(); - } - } - } -} - - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableScrollTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableScrollTrigger.cs.meta deleted file mode 100644 index 67afed9..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableScrollTrigger.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 2231ec04e488f7443ae7acf609ac5f00 -timeCreated: 1455373897 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableSelectTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableSelectTrigger.cs deleted file mode 100644 index 9f4a349..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableSelectTrigger.cs +++ /dev/null @@ -1,36 +0,0 @@ -// for uGUI(from 4.6) -#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) - -using System; // require keep for Windows Universal App -using UnityEngine; -using UnityEngine.EventSystems; - -namespace UniRx.Triggers -{ - [DisallowMultipleComponent] - public class ObservableSelectTrigger : ObservableTriggerBase, IEventSystemHandler, ISelectHandler - { - Subject onSelect; - - void ISelectHandler.OnSelect(BaseEventData eventData) - { - if (onSelect != null) onSelect.OnNext(eventData); - } - - public IObservable OnSelectAsObservable() - { - return onSelect ?? (onSelect = new Subject()); - } - - protected override void RaiseOnCompletedOnDestroy() - { - if (onSelect != null) - { - onSelect.OnCompleted(); - } - } - } -} - - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableSelectTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableSelectTrigger.cs.meta deleted file mode 100644 index 3230e07..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableSelectTrigger.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 1e4cb287d3ab8274885ed05748f26329 -timeCreated: 1455373897 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableStateMachineTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableStateMachineTrigger.cs deleted file mode 100644 index 26e7e1f..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableStateMachineTrigger.cs +++ /dev/null @@ -1,143 +0,0 @@ -// over Unity5 added StateMachineBehaviour -#if !(UNITY_4_7 || UNITY_4_6 || UNITY_4_5 || UNITY_4_4 || UNITY_4_3 || UNITY_4_2 || UNITY_4_1 || UNITY_4_0_1 || UNITY_4_0 || UNITY_3_5 || UNITY_3_4 || UNITY_3_3 || UNITY_3_2 || UNITY_3_1 || UNITY_3_0_0 || UNITY_3_0 || UNITY_2_6_1 || UNITY_2_6) - -using System; // require keep for Windows Universal App -using UnityEngine; - -namespace UniRx.Triggers -{ - [DisallowMultipleComponent] - public class ObservableStateMachineTrigger : StateMachineBehaviour - { - public class OnStateInfo - { - public Animator Animator { get; private set; } - public AnimatorStateInfo StateInfo { get; private set; } - public int LayerIndex { get; private set; } - - public OnStateInfo(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) - { - Animator = animator; - StateInfo = stateInfo; - LayerIndex = layerIndex; - } - } - - public class OnStateMachineInfo - { - public Animator Animator { get; private set; } - public int StateMachinePathHash { get; private set; } - - public OnStateMachineInfo(Animator animator, int stateMachinePathHash) - { - Animator = animator; - StateMachinePathHash = stateMachinePathHash; - } - } - - // OnStateExit - - Subject onStateExit; - - public override void OnStateExit(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) - { - if (onStateExit != null) onStateExit.OnNext(new OnStateInfo(animator, stateInfo, layerIndex)); - } - - public IObservable OnStateExitAsObservable() - { - return onStateExit ?? (onStateExit = new Subject()); - } - - // OnStateEnter - - Subject onStateEnter; - - public override void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) - { - if (onStateEnter != null) onStateEnter.OnNext(new OnStateInfo(animator, stateInfo, layerIndex)); - } - - public IObservable OnStateEnterAsObservable() - { - return onStateEnter ?? (onStateEnter = new Subject()); - } - - // OnStateIK - - Subject onStateIK; - - public override void OnStateIK(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) - { - if(onStateIK !=null) onStateIK.OnNext(new OnStateInfo(animator, stateInfo, layerIndex)); - } - - public IObservable OnStateIKAsObservable() - { - return onStateIK ?? (onStateIK = new Subject()); - } - - // Does not implments OnStateMove. - // ObservableStateMachine Trigger makes stop animating. - // By defining OnAnimatorMove, you are signifying that you want to intercept the movement of the root object and apply it yourself. - // http://fogbugz.unity3d.com/default.asp?700990_9jqaim4ev33i8e9h - - //// OnStateMove - - //Subject onStateMove; - - //public override void OnStateMove(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) - //{ - // if (onStateMove != null) onStateMove.OnNext(new OnStateInfo(animator, stateInfo, layerIndex)); - //} - - //public IObservable OnStateMoveAsObservable() - //{ - // return onStateMove ?? (onStateMove = new Subject()); - //} - - // OnStateUpdate - - Subject onStateUpdate; - - public override void OnStateUpdate(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) - { - if (onStateUpdate != null) onStateUpdate.OnNext(new OnStateInfo(animator, stateInfo, layerIndex)); - } - - public IObservable OnStateUpdateAsObservable() - { - return onStateUpdate ?? (onStateUpdate = new Subject()); - } - - // OnStateMachineEnter - - Subject onStateMachineEnter; - - public override void OnStateMachineEnter(Animator animator, int stateMachinePathHash) - { - if (onStateMachineEnter != null) onStateMachineEnter.OnNext(new OnStateMachineInfo(animator, stateMachinePathHash)); - } - - public IObservable OnStateMachineEnterAsObservable() - { - return onStateMachineEnter ?? (onStateMachineEnter = new Subject()); - } - - // OnStateMachineExit - - Subject onStateMachineExit; - - public override void OnStateMachineExit(Animator animator, int stateMachinePathHash) - { - if (onStateMachineExit != null) onStateMachineExit.OnNext(new OnStateMachineInfo(animator, stateMachinePathHash)); - } - - public IObservable OnStateMachineExitAsObservable() - { - return onStateMachineExit ?? (onStateMachineExit = new Subject()); - } - } -} - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableStateMachineTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableStateMachineTrigger.cs.meta deleted file mode 100644 index 48921b1..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableStateMachineTrigger.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 1e29959e46c7ea7409560769cde085ae -timeCreated: 1455373897 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableSubmitTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableSubmitTrigger.cs deleted file mode 100644 index fe5b8fe..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableSubmitTrigger.cs +++ /dev/null @@ -1,36 +0,0 @@ -// for uGUI(from 4.6) -#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) - -using System; // require keep for Windows Universal App -using UnityEngine; -using UnityEngine.EventSystems; - -namespace UniRx.Triggers -{ - [DisallowMultipleComponent] - public class ObservableSubmitTrigger : ObservableTriggerBase, IEventSystemHandler, ISubmitHandler - { - Subject onSubmit; - - void ISubmitHandler.OnSubmit(BaseEventData eventData) - { - if (onSubmit != null) onSubmit.OnNext(eventData); - } - - public IObservable OnSubmitAsObservable() - { - return onSubmit ?? (onSubmit = new Subject()); - } - - protected override void RaiseOnCompletedOnDestroy() - { - if (onSubmit != null) - { - onSubmit.OnCompleted(); - } - } - } -} - - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableSubmitTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableSubmitTrigger.cs.meta deleted file mode 100644 index fb7cc88..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableSubmitTrigger.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 655296fedabd6004ab699ab9749e369c -timeCreated: 1455373899 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTransformChangedTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTransformChangedTrigger.cs deleted file mode 100644 index a51e9c3..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTransformChangedTrigger.cs +++ /dev/null @@ -1,72 +0,0 @@ -// after uGUI(from 4.6) -#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) - -using System; -using UnityEngine; - -namespace UniRx.Triggers -{ - [DisallowMultipleComponent] - public class ObservableTransformChangedTrigger : ObservableTriggerBase - { - Subject onBeforeTransformParentChanged; - - // Callback sent to the graphic before a Transform parent change occurs - void OnBeforeTransformParentChanged() - { - if (onBeforeTransformParentChanged != null) onBeforeTransformParentChanged.OnNext(Unit.Default); - } - - /// Callback sent to the graphic before a Transform parent change occurs. - public IObservable OnBeforeTransformParentChangedAsObservable() - { - return onBeforeTransformParentChanged ?? (onBeforeTransformParentChanged = new Subject()); - } - - Subject onTransformParentChanged; - - // This function is called when the parent property of the transform of the GameObject has changed - void OnTransformParentChanged() - { - if (onTransformParentChanged != null) onTransformParentChanged.OnNext(Unit.Default); - } - - /// This function is called when the parent property of the transform of the GameObject has changed. - public IObservable OnTransformParentChangedAsObservable() - { - return onTransformParentChanged ?? (onTransformParentChanged = new Subject()); - } - - Subject onTransformChildrenChanged; - - // This function is called when the list of children of the transform of the GameObject has changed - void OnTransformChildrenChanged() - { - if (onTransformChildrenChanged != null) onTransformChildrenChanged.OnNext(Unit.Default); - } - - /// This function is called when the list of children of the transform of the GameObject has changed. - public IObservable OnTransformChildrenChangedAsObservable() - { - return onTransformChildrenChanged ?? (onTransformChildrenChanged = new Subject()); - } - - protected override void RaiseOnCompletedOnDestroy() - { - if (onBeforeTransformParentChanged != null) - { - onBeforeTransformParentChanged.OnCompleted(); - } - if (onTransformParentChanged != null) - { - onTransformParentChanged.OnCompleted(); - } - if (onTransformChildrenChanged != null) - { - onTransformChildrenChanged.OnCompleted(); - } - } - } -} - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTransformChangedTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTransformChangedTrigger.cs.meta deleted file mode 100644 index 27fbaa5..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTransformChangedTrigger.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 835e244a602942c4c84a09c9bdedf229 -timeCreated: 1455373899 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTrigger2DTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTrigger2DTrigger.cs deleted file mode 100644 index 567421d..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTrigger2DTrigger.cs +++ /dev/null @@ -1,67 +0,0 @@ -using System; // require keep for Windows Universal App -using UnityEngine; - -namespace UniRx.Triggers -{ - [DisallowMultipleComponent] - public class ObservableTrigger2DTrigger : ObservableTriggerBase - { - Subject onTriggerEnter2D; - - /// Sent when another object enters a trigger collider attached to this object (2D physics only). - void OnTriggerEnter2D(Collider2D other) - { - if (onTriggerEnter2D != null) onTriggerEnter2D.OnNext(other); - } - - /// Sent when another object enters a trigger collider attached to this object (2D physics only). - public IObservable OnTriggerEnter2DAsObservable() - { - return onTriggerEnter2D ?? (onTriggerEnter2D = new Subject()); - } - - Subject onTriggerExit2D; - - /// Sent when another object leaves a trigger collider attached to this object (2D physics only). - void OnTriggerExit2D(Collider2D other) - { - if (onTriggerExit2D != null) onTriggerExit2D.OnNext(other); - } - - /// Sent when another object leaves a trigger collider attached to this object (2D physics only). - public IObservable OnTriggerExit2DAsObservable() - { - return onTriggerExit2D ?? (onTriggerExit2D = new Subject()); - } - - Subject onTriggerStay2D; - - /// Sent each frame where another object is within a trigger collider attached to this object (2D physics only). - void OnTriggerStay2D(Collider2D other) - { - if (onTriggerStay2D != null) onTriggerStay2D.OnNext(other); - } - - /// Sent each frame where another object is within a trigger collider attached to this object (2D physics only). - public IObservable OnTriggerStay2DAsObservable() - { - return onTriggerStay2D ?? (onTriggerStay2D = new Subject()); - } - - protected override void RaiseOnCompletedOnDestroy() - { - if (onTriggerEnter2D != null) - { - onTriggerEnter2D.OnCompleted(); - } - if (onTriggerExit2D != null) - { - onTriggerExit2D.OnCompleted(); - } - if (onTriggerStay2D != null) - { - onTriggerStay2D.OnCompleted(); - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTrigger2DTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTrigger2DTrigger.cs.meta deleted file mode 100644 index 38a7ee3..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTrigger2DTrigger.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 1aad3129752ef804999a880a7b2d72ef -timeCreated: 1455373897 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTriggerBase.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTriggerBase.cs deleted file mode 100644 index 50bf742..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTriggerBase.cs +++ /dev/null @@ -1,65 +0,0 @@ -using System; // require keep for Windows Universal App -using UnityEngine; - -namespace UniRx.Triggers -{ - public abstract class ObservableTriggerBase : MonoBehaviour - { - bool calledAwake = false; - Subject awake; - - /// Awake is called when the script instance is being loaded. - void Awake() - { - calledAwake = true; - if (awake != null) { awake.OnNext(Unit.Default); awake.OnCompleted(); } - } - - /// Awake is called when the script instance is being loaded. - public IObservable AwakeAsObservable() - { - if (calledAwake) return Observable.Return(Unit.Default); - return awake ?? (awake = new Subject()); - } - - bool calledStart = false; - Subject start; - - /// Start is called on the frame when a script is enabled just before any of the Update methods is called the first time. - void Start() - { - calledStart = true; - if (start != null) { start.OnNext(Unit.Default); start.OnCompleted(); } - } - - /// Start is called on the frame when a script is enabled just before any of the Update methods is called the first time. - public IObservable StartAsObservable() - { - if (calledStart) return Observable.Return(Unit.Default); - return start ?? (start = new Subject()); - } - - - bool calledDestroy = false; - Subject onDestroy; - - /// This function is called when the MonoBehaviour will be destroyed. - void OnDestroy() - { - calledDestroy = true; - if (onDestroy != null) { onDestroy.OnNext(Unit.Default); onDestroy.OnCompleted(); } - - RaiseOnCompletedOnDestroy(); - } - - /// This function is called when the MonoBehaviour will be destroyed. - public IObservable OnDestroyAsObservable() - { - if (this == null) return Observable.Return(Unit.Default); - if (calledDestroy) return Observable.Return(Unit.Default); - return onDestroy ?? (onDestroy = new Subject()); - } - - protected abstract void RaiseOnCompletedOnDestroy(); - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTriggerBase.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTriggerBase.cs.meta deleted file mode 100644 index 00d1d1a..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTriggerBase.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 850bc951297608e4fb0722795c21ed16 -timeCreated: 1455373900 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTriggerExtensions.Component.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTriggerExtensions.Component.cs deleted file mode 100644 index bdb7b2c..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTriggerExtensions.Component.cs +++ /dev/null @@ -1,461 +0,0 @@ -using System; // require keep for Windows Universal App -using UnityEngine; - -#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) -using UnityEngine.EventSystems; -#endif - -namespace UniRx.Triggers -{ - // for Component - public static partial class ObservableTriggerExtensions - { - #region ObservableAnimatorTrigger - - /// Callback for setting up animation IK (inverse kinematics). - public static IObservable OnAnimatorIKAsObservable(this Component component) - { - if (component == null || component.gameObject == null) return Observable.Empty(); - return GetOrAddComponent(component.gameObject).OnAnimatorIKAsObservable(); - } - - /// Callback for processing animation movements for modifying root motion. - public static IObservable OnAnimatorMoveAsObservable(this Component component) - { - if (component == null || component.gameObject == null) return Observable.Empty(); - return GetOrAddComponent(component.gameObject).OnAnimatorMoveAsObservable(); - } - - #endregion - - #region ObservableCollision2DTrigger - - /// Sent when an incoming collider makes contact with this object's collider (2D physics only). - public static IObservable OnCollisionEnter2DAsObservable(this Component component) - { - if (component == null || component.gameObject == null) return Observable.Empty(); - return GetOrAddComponent(component.gameObject).OnCollisionEnter2DAsObservable(); - } - - - /// Sent when a collider on another object stops touching this object's collider (2D physics only). - public static IObservable OnCollisionExit2DAsObservable(this Component component) - { - if (component == null || component.gameObject == null) return Observable.Empty(); - return GetOrAddComponent(component.gameObject).OnCollisionExit2DAsObservable(); - } - - /// Sent each frame where a collider on another object is touching this object's collider (2D physics only). - public static IObservable OnCollisionStay2DAsObservable(this Component component) - { - if (component == null || component.gameObject == null) return Observable.Empty(); - return GetOrAddComponent(component.gameObject).OnCollisionStay2DAsObservable(); - } - - #endregion - - #region ObservableCollisionTrigger - - /// OnCollisionEnter is called when this collider/rigidbody has begun touching another rigidbody/collider. - public static IObservable OnCollisionEnterAsObservable(this Component component) - { - if (component == null || component.gameObject == null) return Observable.Empty(); - return GetOrAddComponent(component.gameObject).OnCollisionEnterAsObservable(); - } - - - /// OnCollisionExit is called when this collider/rigidbody has stopped touching another rigidbody/collider. - public static IObservable OnCollisionExitAsObservable(this Component component) - { - if (component == null || component.gameObject == null) return Observable.Empty(); - return GetOrAddComponent(component.gameObject).OnCollisionExitAsObservable(); - } - - /// OnCollisionStay is called once per frame for every collider/rigidbody that is touching rigidbody/collider. - public static IObservable OnCollisionStayAsObservable(this Component component) - { - if (component == null || component.gameObject == null) return Observable.Empty(); - return GetOrAddComponent(component.gameObject).OnCollisionStayAsObservable(); - } - - #endregion - - #region ObservableDestroyTrigger - - /// This function is called when the MonoBehaviour will be destroyed. - public static IObservable OnDestroyAsObservable(this Component component) - { - if (component == null || component.gameObject == null) return Observable.Return(Unit.Default); // send destroy message - return GetOrAddComponent(component.gameObject).OnDestroyAsObservable(); - } - - #endregion - - - #region ObservableEnableTrigger - - /// This function is called when the object becomes enabled and active. - public static IObservable OnEnableAsObservable(this Component component) - { - if (component == null || component.gameObject == null) return Observable.Empty(); - return GetOrAddComponent(component.gameObject).OnEnableAsObservable(); - } - - /// This function is called when the behaviour becomes disabled () or inactive. - public static IObservable OnDisableAsObservable(this Component component) - { - if (component == null || component.gameObject == null) return Observable.Empty(); - return GetOrAddComponent(component.gameObject).OnDisableAsObservable(); - } - - #endregion - - #region ObservableFixedUpdateTrigger - - /// This function is called every fixed framerate frame, if the MonoBehaviour is enabled. - public static IObservable FixedUpdateAsObservable(this Component component) - { - if (component == null || component.gameObject == null) return Observable.Empty(); - return GetOrAddComponent(component.gameObject).FixedUpdateAsObservable(); - } - - #endregion - - #region ObservableLateUpdateTrigger - - /// LateUpdate is called every frame, if the Behaviour is enabled. - public static IObservable LateUpdateAsObservable(this Component component) - { - if (component == null || component.gameObject == null) return Observable.Empty(); - return GetOrAddComponent(component.gameObject).LateUpdateAsObservable(); - } - - #endregion - -#if !(UNITY_IPHONE || UNITY_ANDROID || UNITY_METRO) - - #region ObservableMouseTrigger - - /// OnMouseDown is called when the user has pressed the mouse button while over the GUIElement or Collider. - public static IObservable OnMouseDownAsObservable(this Component component) - { - if (component == null || component.gameObject == null) return Observable.Empty(); - return GetOrAddComponent(component.gameObject).OnMouseDownAsObservable(); - } - - /// OnMouseDrag is called when the user has clicked on a GUIElement or Collider and is still holding down the mouse. - public static IObservable OnMouseDragAsObservable(this Component component) - { - if (component == null || component.gameObject == null) return Observable.Empty(); - return GetOrAddComponent(component.gameObject).OnMouseDragAsObservable(); - } - - /// OnMouseEnter is called when the mouse entered the GUIElement or Collider. - public static IObservable OnMouseEnterAsObservable(this Component component) - { - if (component == null || component.gameObject == null) return Observable.Empty(); - return GetOrAddComponent(component.gameObject).OnMouseEnterAsObservable(); - } - - /// OnMouseExit is called when the mouse is not any longer over the GUIElement or Collider. - public static IObservable OnMouseExitAsObservable(this Component component) - { - if (component == null || component.gameObject == null) return Observable.Empty(); - return GetOrAddComponent(component.gameObject).OnMouseExitAsObservable(); - } - - /// OnMouseOver is called every frame while the mouse is over the GUIElement or Collider. - public static IObservable OnMouseOverAsObservable(this Component component) - { - if (component == null || component.gameObject == null) return Observable.Empty(); - return GetOrAddComponent(component.gameObject).OnMouseOverAsObservable(); - } - - /// OnMouseUp is called when the user has released the mouse button. - public static IObservable OnMouseUpAsObservable(this Component component) - { - if (component == null || component.gameObject == null) return Observable.Empty(); - return GetOrAddComponent(component.gameObject).OnMouseUpAsObservable(); - } - - /// OnMouseUpAsButton is only called when the mouse is released over the same GUIElement or Collider as it was pressed. - public static IObservable OnMouseUpAsButtonAsObservable(this Component component) - { - if (component == null || component.gameObject == null) return Observable.Empty(); - return GetOrAddComponent(component.gameObject).OnMouseUpAsButtonAsObservable(); - } - - #endregion - -#endif - - #region ObservableTrigger2DTrigger - - /// Sent when another object enters a trigger collider attached to this object (2D physics only). - public static IObservable OnTriggerEnter2DAsObservable(this Component component) - { - if (component == null || component.gameObject == null) return Observable.Empty(); - return GetOrAddComponent(component.gameObject).OnTriggerEnter2DAsObservable(); - } - - - /// Sent when another object leaves a trigger collider attached to this object (2D physics only). - public static IObservable OnTriggerExit2DAsObservable(this Component component) - { - if (component == null || component.gameObject == null) return Observable.Empty(); - return GetOrAddComponent(component.gameObject).OnTriggerExit2DAsObservable(); - } - - /// Sent each frame where another object is within a trigger collider attached to this object (2D physics only). - public static IObservable OnTriggerStay2DAsObservable(this Component component) - { - if (component == null || component.gameObject == null) return Observable.Empty(); - return GetOrAddComponent(component.gameObject).OnTriggerStay2DAsObservable(); - } - - #endregion - - #region ObservableTriggerTrigger - - /// OnTriggerEnter is called when the Collider other enters the trigger. - public static IObservable OnTriggerEnterAsObservable(this Component component) - { - if (component == null || component.gameObject == null) return Observable.Empty(); - return GetOrAddComponent(component.gameObject).OnTriggerEnterAsObservable(); - } - - - /// OnTriggerExit is called when the Collider other has stopped touching the trigger. - public static IObservable OnTriggerExitAsObservable(this Component component) - { - if (component == null || component.gameObject == null) return Observable.Empty(); - return GetOrAddComponent(component.gameObject).OnTriggerExitAsObservable(); - } - - /// OnTriggerStay is called once per frame for every Collider other that is touching the trigger. - public static IObservable OnTriggerStayAsObservable(this Component component) - { - if (component == null || component.gameObject == null) return Observable.Empty(); - return GetOrAddComponent(component.gameObject).OnTriggerStayAsObservable(); - } - - #endregion - - #region ObservableUpdateTrigger - - /// Update is called every frame, if the MonoBehaviour is enabled. - public static IObservable UpdateAsObservable(this Component component) - { - if (component == null || component.gameObject == null) return Observable.Empty(); - return GetOrAddComponent(component.gameObject).UpdateAsObservable(); - } - - #endregion - - #region ObservableVisibleTrigger - - /// OnBecameInvisible is called when the renderer is no longer visible by any camera. - public static IObservable OnBecameInvisibleAsObservable(this Component component) - { - if (component == null || component.gameObject == null) return Observable.Empty(); - return GetOrAddComponent(component.gameObject).OnBecameInvisibleAsObservable(); - } - - /// OnBecameVisible is called when the renderer became visible by any camera. - public static IObservable OnBecameVisibleAsObservable(this Component component) - { - if (component == null || component.gameObject == null) return Observable.Empty(); - return GetOrAddComponent(component.gameObject).OnBecameVisibleAsObservable(); - } - - #endregion - -#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) - - #region ObservableTransformChangedTrigger - - /// Callback sent to the graphic before a Transform parent change occurs. - public static IObservable OnBeforeTransformParentChangedAsObservable(this Component component) - { - if (component == null || component.gameObject == null) return Observable.Empty(); - return GetOrAddComponent(component.gameObject).OnBeforeTransformParentChangedAsObservable(); - } - - /// This function is called when the parent property of the transform of the GameObject has changed. - public static IObservable OnTransformParentChangedAsObservable(this Component component) - { - if (component == null || component.gameObject == null) return Observable.Empty(); - return GetOrAddComponent(component.gameObject).OnTransformParentChangedAsObservable(); - } - - /// This function is called when the list of children of the transform of the GameObject has changed. - public static IObservable OnTransformChildrenChangedAsObservable(this Component component) - { - if (component == null || component.gameObject == null) return Observable.Empty(); - return GetOrAddComponent(component.gameObject).OnTransformChildrenChangedAsObservable(); - } - - #endregion - - #region ObservableCanvasGroupChangedTrigger - - /// Callback that is sent if the canvas group is changed. - public static IObservable OnCanvasGroupChangedAsObservable(this Component component) - { - if (component == null || component.gameObject == null) return Observable.Empty(); - return GetOrAddComponent(component.gameObject).OnCanvasGroupChangedAsObservable(); - } - - #endregion - - #region ObservableRectTransformTrigger - - /// Callback that is sent if an associated RectTransform has it's dimensions changed. - public static IObservable OnRectTransformDimensionsChangeAsObservable(this Component component) - { - if (component == null || component.gameObject == null) return Observable.Empty(); - return GetOrAddComponent(component.gameObject).OnRectTransformDimensionsChangeAsObservable(); - } - - /// Callback that is sent if an associated RectTransform is removed. - public static IObservable OnRectTransformRemovedAsObservable(this Component component) - { - if (component == null || component.gameObject == null) return Observable.Empty(); - return GetOrAddComponent(component.gameObject).OnRectTransformRemovedAsObservable(); - } - - #endregion - - // uGUI - - #region ObservableEventTrigger classes - - public static IObservable OnDeselectAsObservable(this UIBehaviour component) - { - if (component == null || component.gameObject == null) return Observable.Empty(); - return GetOrAddComponent(component.gameObject).OnDeselectAsObservable(); - } - - public static IObservable OnMoveAsObservable(this UIBehaviour component) - { - if (component == null || component.gameObject == null) return Observable.Empty(); - return GetOrAddComponent(component.gameObject).OnMoveAsObservable(); - } - - public static IObservable OnPointerDownAsObservable(this UIBehaviour component) - { - if (component == null || component.gameObject == null) return Observable.Empty(); - return GetOrAddComponent(component.gameObject).OnPointerDownAsObservable(); - } - - public static IObservable OnPointerEnterAsObservable(this UIBehaviour component) - { - if (component == null || component.gameObject == null) return Observable.Empty(); - return GetOrAddComponent(component.gameObject).OnPointerEnterAsObservable(); - } - - public static IObservable OnPointerExitAsObservable(this UIBehaviour component) - { - if (component == null || component.gameObject == null) return Observable.Empty(); - return GetOrAddComponent(component.gameObject).OnPointerExitAsObservable(); - } - - public static IObservable OnPointerUpAsObservable(this UIBehaviour component) - { - if (component == null || component.gameObject == null) return Observable.Empty(); - return GetOrAddComponent(component.gameObject).OnPointerUpAsObservable(); - } - - public static IObservable OnSelectAsObservable(this UIBehaviour component) - { - if (component == null || component.gameObject == null) return Observable.Empty(); - return GetOrAddComponent(component.gameObject).OnSelectAsObservable(); - } - - public static IObservable OnPointerClickAsObservable(this UIBehaviour component) - { - if (component == null || component.gameObject == null) return Observable.Empty(); - return GetOrAddComponent(component.gameObject).OnPointerClickAsObservable(); - } - - public static IObservable OnSubmitAsObservable(this UIBehaviour component) - { - if (component == null || component.gameObject == null) return Observable.Empty(); - return GetOrAddComponent(component.gameObject).OnSubmitAsObservable(); - } - - public static IObservable OnDragAsObservable(this UIBehaviour component) - { - if (component == null || component.gameObject == null) return Observable.Empty(); - return GetOrAddComponent(component.gameObject).OnDragAsObservable(); - } - - public static IObservable OnBeginDragAsObservable(this UIBehaviour component) - { - if (component == null || component.gameObject == null) return Observable.Empty(); - return GetOrAddComponent(component.gameObject).OnBeginDragAsObservable(); - } - - public static IObservable OnEndDragAsObservable(this UIBehaviour component) - { - if (component == null || component.gameObject == null) return Observable.Empty(); - return GetOrAddComponent(component.gameObject).OnEndDragAsObservable(); - } - - public static IObservable OnDropAsObservable(this UIBehaviour component) - { - if (component == null || component.gameObject == null) return Observable.Empty(); - return GetOrAddComponent(component.gameObject).OnDropAsObservable(); - } - - public static IObservable OnUpdateSelectedAsObservable(this UIBehaviour component) - { - if (component == null || component.gameObject == null) return Observable.Empty(); - return GetOrAddComponent(component.gameObject).OnUpdateSelectedAsObservable(); - } - - public static IObservable OnInitializePotentialDragAsObservable(this UIBehaviour component) - { - if (component == null || component.gameObject == null) return Observable.Empty(); - return GetOrAddComponent(component.gameObject).OnInitializePotentialDragAsObservable(); - } - - public static IObservable OnCancelAsObservable(this UIBehaviour component) - { - if (component == null || component.gameObject == null) return Observable.Empty(); - return GetOrAddComponent(component.gameObject).OnCancelAsObservable(); - } - - public static IObservable OnScrollAsObservable(this UIBehaviour component) - { - if (component == null || component.gameObject == null) return Observable.Empty(); - return GetOrAddComponent(component.gameObject).OnScrollAsObservable(); - } - - #endregion - -#endif - - #region ObservableParticleTrigger - - /// OnParticleCollision is called when a particle hits a collider. - public static IObservable OnParticleCollisionAsObservable(this Component component) - { - if (component == null || component.gameObject == null) return Observable.Empty(); - return GetOrAddComponent(component.gameObject).OnParticleCollisionAsObservable(); - } - -#if UNITY_5_4_OR_NEWER - - /// OnParticleTrigger is called when any particles in a particle system meet the conditions in the trigger module. - public static IObservable OnParticleTriggerAsObservable(this Component component) - { - if (component == null || component.gameObject == null) return Observable.Empty(); - return GetOrAddComponent(component.gameObject).OnParticleTriggerAsObservable(); - } - -#endif - - #endregion - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTriggerExtensions.Component.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTriggerExtensions.Component.cs.meta deleted file mode 100644 index ded96f4..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTriggerExtensions.Component.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: d10150b3ca6f3924baae5bce4343f6c4 -timeCreated: 1455373901 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTriggerExtensions.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTriggerExtensions.cs deleted file mode 100644 index 82ba718..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTriggerExtensions.cs +++ /dev/null @@ -1,361 +0,0 @@ -using System; // require keep for Windows Universal App -using UnityEngine; - -namespace UniRx.Triggers -{ - // for GameObject - public static partial class ObservableTriggerExtensions - { - #region ObservableAnimatorTrigger - - /// Callback for setting up animation IK (inverse kinematics). - public static IObservable OnAnimatorIKAsObservable(this GameObject gameObject) - { - if (gameObject == null) return Observable.Empty(); - return GetOrAddComponent(gameObject).OnAnimatorIKAsObservable(); - } - - /// Callback for processing animation movements for modifying root motion. - public static IObservable OnAnimatorMoveAsObservable(this GameObject gameObject) - { - if (gameObject == null) return Observable.Empty(); - return GetOrAddComponent(gameObject).OnAnimatorMoveAsObservable(); - } - - #endregion - - #region ObservableCollision2DTrigger - - /// Sent when an incoming collider makes contact with this object's collider (2D physics only). - public static IObservable OnCollisionEnter2DAsObservable(this GameObject gameObject) - { - if (gameObject == null) return Observable.Empty(); - return GetOrAddComponent(gameObject).OnCollisionEnter2DAsObservable(); - } - - - /// Sent when a collider on another object stops touching this object's collider (2D physics only). - public static IObservable OnCollisionExit2DAsObservable(this GameObject gameObject) - { - if (gameObject == null) return Observable.Empty(); - return GetOrAddComponent(gameObject).OnCollisionExit2DAsObservable(); - } - - /// Sent each frame where a collider on another object is touching this object's collider (2D physics only). - public static IObservable OnCollisionStay2DAsObservable(this GameObject gameObject) - { - if (gameObject == null) return Observable.Empty(); - return GetOrAddComponent(gameObject).OnCollisionStay2DAsObservable(); - } - - #endregion - - #region ObservableCollisionTrigger - - /// OnCollisionEnter is called when this collider/rigidbody has begun touching another rigidbody/collider. - public static IObservable OnCollisionEnterAsObservable(this GameObject gameObject) - { - if (gameObject == null) return Observable.Empty(); - return GetOrAddComponent(gameObject).OnCollisionEnterAsObservable(); - } - - - /// OnCollisionExit is called when this collider/rigidbody has stopped touching another rigidbody/collider. - public static IObservable OnCollisionExitAsObservable(this GameObject gameObject) - { - if (gameObject == null) return Observable.Empty(); - return GetOrAddComponent(gameObject).OnCollisionExitAsObservable(); - } - - /// OnCollisionStay is called once per frame for every collider/rigidbody that is touching rigidbody/collider. - public static IObservable OnCollisionStayAsObservable(this GameObject gameObject) - { - if (gameObject == null) return Observable.Empty(); - return GetOrAddComponent(gameObject).OnCollisionStayAsObservable(); - } - - #endregion - - #region ObservableDestroyTrigger - - /// This function is called when the MonoBehaviour will be destroyed. - public static IObservable OnDestroyAsObservable(this GameObject gameObject) - { - if (gameObject == null) return Observable.Return(Unit.Default); // send destroy message - return GetOrAddComponent(gameObject).OnDestroyAsObservable(); - } - - #endregion - - - #region ObservableEnableTrigger - - /// This function is called when the object becomes enabled and active. - public static IObservable OnEnableAsObservable(this GameObject gameObject) - { - if (gameObject == null) return Observable.Empty(); - return GetOrAddComponent(gameObject).OnEnableAsObservable(); - } - - /// This function is called when the behaviour becomes disabled () or inactive. - public static IObservable OnDisableAsObservable(this GameObject gameObject) - { - if (gameObject == null) return Observable.Empty(); - return GetOrAddComponent(gameObject).OnDisableAsObservable(); - } - - #endregion - - #region ObservableFixedUpdateTrigger - - /// This function is called every fixed framerate frame, if the MonoBehaviour is enabled. - public static IObservable FixedUpdateAsObservable(this GameObject gameObject) - { - if (gameObject == null) return Observable.Empty(); - return GetOrAddComponent(gameObject).FixedUpdateAsObservable(); - } - - #endregion - - #region ObservableLateUpdateTrigger - - /// LateUpdate is called every frame, if the Behaviour is enabled. - public static IObservable LateUpdateAsObservable(this GameObject gameObject) - { - if (gameObject == null) return Observable.Empty(); - return GetOrAddComponent(gameObject).LateUpdateAsObservable(); - } - - #endregion - -#if !(UNITY_IPHONE || UNITY_ANDROID || UNITY_METRO) - - #region ObservableMouseTrigger - - /// OnMouseDown is called when the user has pressed the mouse button while over the GUIElement or Collider. - public static IObservable OnMouseDownAsObservable(this GameObject gameObject) - { - if (gameObject == null) return Observable.Empty(); - return GetOrAddComponent(gameObject).OnMouseDownAsObservable(); - } - - /// OnMouseDrag is called when the user has clicked on a GUIElement or Collider and is still holding down the mouse. - public static IObservable OnMouseDragAsObservable(this GameObject gameObject) - { - if (gameObject == null) return Observable.Empty(); - return GetOrAddComponent(gameObject).OnMouseDragAsObservable(); - } - - /// OnMouseEnter is called when the mouse entered the GUIElement or Collider. - public static IObservable OnMouseEnterAsObservable(this GameObject gameObject) - { - if (gameObject == null) return Observable.Empty(); - return GetOrAddComponent(gameObject).OnMouseEnterAsObservable(); - } - - /// OnMouseExit is called when the mouse is not any longer over the GUIElement or Collider. - public static IObservable OnMouseExitAsObservable(this GameObject gameObject) - { - if (gameObject == null) return Observable.Empty(); - return GetOrAddComponent(gameObject).OnMouseExitAsObservable(); - } - - /// OnMouseOver is called every frame while the mouse is over the GUIElement or Collider. - public static IObservable OnMouseOverAsObservable(this GameObject gameObject) - { - if (gameObject == null) return Observable.Empty(); - return GetOrAddComponent(gameObject).OnMouseOverAsObservable(); - } - - /// OnMouseUp is called when the user has released the mouse button. - public static IObservable OnMouseUpAsObservable(this GameObject gameObject) - { - if (gameObject == null) return Observable.Empty(); - return GetOrAddComponent(gameObject).OnMouseUpAsObservable(); - } - - /// OnMouseUpAsButton is only called when the mouse is released over the same GUIElement or Collider as it was pressed. - public static IObservable OnMouseUpAsButtonAsObservable(this GameObject gameObject) - { - if (gameObject == null) return Observable.Empty(); - return GetOrAddComponent(gameObject).OnMouseUpAsButtonAsObservable(); - } - - #endregion - -#endif - - #region ObservableTrigger2DTrigger - - /// Sent when another object enters a trigger collider attached to this object (2D physics only). - public static IObservable OnTriggerEnter2DAsObservable(this GameObject gameObject) - { - if (gameObject == null) return Observable.Empty(); - return GetOrAddComponent(gameObject).OnTriggerEnter2DAsObservable(); - } - - - /// Sent when another object leaves a trigger collider attached to this object (2D physics only). - public static IObservable OnTriggerExit2DAsObservable(this GameObject gameObject) - { - if (gameObject == null) return Observable.Empty(); - return GetOrAddComponent(gameObject).OnTriggerExit2DAsObservable(); - } - - /// Sent each frame where another object is within a trigger collider attached to this object (2D physics only). - public static IObservable OnTriggerStay2DAsObservable(this GameObject gameObject) - { - if (gameObject == null) return Observable.Empty(); - return GetOrAddComponent(gameObject).OnTriggerStay2DAsObservable(); - } - - #endregion - - #region ObservableTriggerTrigger - - /// OnTriggerEnter is called when the Collider other enters the trigger. - public static IObservable OnTriggerEnterAsObservable(this GameObject gameObject) - { - if (gameObject == null) return Observable.Empty(); - return GetOrAddComponent(gameObject).OnTriggerEnterAsObservable(); - } - - - /// OnTriggerExit is called when the Collider other has stopped touching the trigger. - public static IObservable OnTriggerExitAsObservable(this GameObject gameObject) - { - if (gameObject == null) return Observable.Empty(); - return GetOrAddComponent(gameObject).OnTriggerExitAsObservable(); - } - - /// OnTriggerStay is called once per frame for every Collider other that is touching the trigger. - public static IObservable OnTriggerStayAsObservable(this GameObject gameObject) - { - if (gameObject == null) return Observable.Empty(); - return GetOrAddComponent(gameObject).OnTriggerStayAsObservable(); - } - - #endregion - - #region ObservableUpdateTrigger - - /// Update is called every frame, if the MonoBehaviour is enabled. - public static IObservable UpdateAsObservable(this GameObject gameObject) - { - if (gameObject == null) return Observable.Empty(); - return GetOrAddComponent(gameObject).UpdateAsObservable(); - } - - #endregion - - #region ObservableVisibleTrigger - - /// OnBecameInvisible is called when the renderer is no longer visible by any camera. - public static IObservable OnBecameInvisibleAsObservable(this GameObject gameObject) - { - if (gameObject == null) return Observable.Empty(); - return GetOrAddComponent(gameObject).OnBecameInvisibleAsObservable(); - } - - /// OnBecameVisible is called when the renderer became visible by any camera. - public static IObservable OnBecameVisibleAsObservable(this GameObject gameObject) - { - if (gameObject == null) return Observable.Empty(); - return GetOrAddComponent(gameObject).OnBecameVisibleAsObservable(); - } - - #endregion - -#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) - - #region ObservableTransformChangedTrigger - - /// Callback sent to the graphic before a Transform parent change occurs. - public static IObservable OnBeforeTransformParentChangedAsObservable(this GameObject gameObject) - { - if (gameObject == null) return Observable.Empty(); - return GetOrAddComponent(gameObject).OnBeforeTransformParentChangedAsObservable(); - } - - /// This function is called when the parent property of the transform of the GameObject has changed. - public static IObservable OnTransformParentChangedAsObservable(this GameObject gameObject) - { - if (gameObject == null) return Observable.Empty(); - return GetOrAddComponent(gameObject).OnTransformParentChangedAsObservable(); - } - - /// This function is called when the list of children of the transform of the GameObject has changed. - public static IObservable OnTransformChildrenChangedAsObservable(this GameObject gameObject) - { - if (gameObject == null) return Observable.Empty(); - return GetOrAddComponent(gameObject).OnTransformChildrenChangedAsObservable(); - } - - #endregion - - #region ObservableCanvasGroupChangedTrigger - - /// Callback that is sent if the canvas group is changed. - public static IObservable OnCanvasGroupChangedAsObservable(this GameObject gameObject) - { - if (gameObject == null) return Observable.Empty(); - return GetOrAddComponent(gameObject).OnCanvasGroupChangedAsObservable(); - } - - #endregion - - #region ObservableRectTransformTrigger - - /// Callback that is sent if an associated RectTransform has it's dimensions changed. - public static IObservable OnRectTransformDimensionsChangeAsObservable(this GameObject gameObject) - { - if (gameObject == null) return Observable.Empty(); - return GetOrAddComponent(gameObject).OnRectTransformDimensionsChangeAsObservable(); - } - - /// Callback that is sent if an associated RectTransform is removed. - public static IObservable OnRectTransformRemovedAsObservable(this GameObject gameObject) - { - if (gameObject == null) return Observable.Empty(); - return GetOrAddComponent(gameObject).OnRectTransformRemovedAsObservable(); - } - - #endregion -#endif - - #region ObservableParticleTrigger - - /// OnParticleCollision is called when a particle hits a collider. - public static IObservable OnParticleCollisionAsObservable(this GameObject gameObject) - { - if (gameObject == null) return Observable.Empty(); - return GetOrAddComponent(gameObject).OnParticleCollisionAsObservable(); - } - -#if UNITY_5_4_OR_NEWER - - /// OnParticleTrigger is called when any particles in a particle system meet the conditions in the trigger module. - public static IObservable OnParticleTriggerAsObservable(this GameObject gameObject) - { - if (gameObject == null) return Observable.Empty(); - return GetOrAddComponent(gameObject).OnParticleTriggerAsObservable(); - } - -#endif - - #endregion - - - static T GetOrAddComponent(GameObject gameObject) - where T : Component - { - var component = gameObject.GetComponent(); - if (component == null) - { - component = gameObject.AddComponent(); - } - - return component; - } - } -} diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTriggerExtensions.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTriggerExtensions.cs.meta deleted file mode 100644 index 830b73d..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTriggerExtensions.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 3ee4df960144b9042874516111cf2d6c -timeCreated: 1455373898 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTriggerTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTriggerTrigger.cs deleted file mode 100644 index 9371417..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTriggerTrigger.cs +++ /dev/null @@ -1,67 +0,0 @@ -using System; // require keep for Windows Universal App -using UnityEngine; - -namespace UniRx.Triggers -{ - [DisallowMultipleComponent] - public class ObservableTriggerTrigger : ObservableTriggerBase - { - Subject onTriggerEnter; - - /// OnTriggerEnter is called when the Collider other enters the trigger. - void OnTriggerEnter(Collider other) - { - if (onTriggerEnter != null) onTriggerEnter.OnNext(other); - } - - /// OnTriggerEnter is called when the Collider other enters the trigger. - public IObservable OnTriggerEnterAsObservable() - { - return onTriggerEnter ?? (onTriggerEnter = new Subject()); - } - - Subject onTriggerExit; - - /// OnTriggerExit is called when the Collider other has stopped touching the trigger. - void OnTriggerExit(Collider other) - { - if (onTriggerExit != null) onTriggerExit.OnNext(other); - } - - /// OnTriggerExit is called when the Collider other has stopped touching the trigger. - public IObservable OnTriggerExitAsObservable() - { - return onTriggerExit ?? (onTriggerExit = new Subject()); - } - - Subject onTriggerStay; - - /// OnTriggerStay is called once per frame for every Collider other that is touching the trigger. - void OnTriggerStay(Collider other) - { - if (onTriggerStay != null) onTriggerStay.OnNext(other); - } - - /// OnTriggerStay is called once per frame for every Collider other that is touching the trigger. - public IObservable OnTriggerStayAsObservable() - { - return onTriggerStay ?? (onTriggerStay = new Subject()); - } - - protected override void RaiseOnCompletedOnDestroy() - { - if (onTriggerEnter != null) - { - onTriggerEnter.OnCompleted(); - } - if (onTriggerExit != null) - { - onTriggerExit.OnCompleted(); - } - if (onTriggerStay != null) - { - onTriggerStay.OnCompleted(); - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTriggerTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTriggerTrigger.cs.meta deleted file mode 100644 index b5dd3fe..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableTriggerTrigger.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: cadcfd987fed8a044b75709fc19ad0f7 -timeCreated: 1455373901 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableUpdateSelectedTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableUpdateSelectedTrigger.cs deleted file mode 100644 index b15807f..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableUpdateSelectedTrigger.cs +++ /dev/null @@ -1,36 +0,0 @@ -// for uGUI(from 4.6) -#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) - -using System; // require keep for Windows Universal App -using UnityEngine; -using UnityEngine.EventSystems; - -namespace UniRx.Triggers -{ - [DisallowMultipleComponent] - public class ObservableUpdateSelectedTrigger : ObservableTriggerBase, IEventSystemHandler, IUpdateSelectedHandler - { - Subject onUpdateSelected; - - void IUpdateSelectedHandler.OnUpdateSelected(BaseEventData eventData) - { - if (onUpdateSelected != null) onUpdateSelected.OnNext(eventData); - } - - public IObservable OnUpdateSelectedAsObservable() - { - return onUpdateSelected ?? (onUpdateSelected = new Subject()); - } - - protected override void RaiseOnCompletedOnDestroy() - { - if (onUpdateSelected != null) - { - onUpdateSelected.OnCompleted(); - } - } - } -} - - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableUpdateSelectedTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableUpdateSelectedTrigger.cs.meta deleted file mode 100644 index 1f3c83c..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableUpdateSelectedTrigger.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 4d207a04db328fd4d970c1457530deb3 -timeCreated: 1455373898 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableUpdateTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableUpdateTrigger.cs deleted file mode 100644 index 86a40a3..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableUpdateTrigger.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System; // require keep for Windows Universal App -using UnityEngine; - -namespace UniRx.Triggers -{ - [DisallowMultipleComponent] - public class ObservableUpdateTrigger : ObservableTriggerBase - { - Subject update; - - /// Update is called every frame, if the MonoBehaviour is enabled. - void Update() - { - if (update != null) update.OnNext(Unit.Default); - } - - /// Update is called every frame, if the MonoBehaviour is enabled. - public IObservable UpdateAsObservable() - { - return update ?? (update = new Subject()); - } - - protected override void RaiseOnCompletedOnDestroy() - { - if (update != null) - { - update.OnCompleted(); - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableUpdateTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableUpdateTrigger.cs.meta deleted file mode 100644 index 3a2de1a..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableUpdateTrigger.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: ceb5e5014f40d6948815a7be8b174ff2 -timeCreated: 1455373901 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableVisibleTrigger.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableVisibleTrigger.cs deleted file mode 100644 index 4c6a503..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableVisibleTrigger.cs +++ /dev/null @@ -1,49 +0,0 @@ -using System; // require keep for Windows Universal App -using UnityEngine; - -namespace UniRx.Triggers -{ - [DisallowMultipleComponent] - public class ObservableVisibleTrigger : ObservableTriggerBase - { - Subject onBecameInvisible; - - /// OnBecameInvisible is called when the renderer is no longer visible by any camera. - void OnBecameInvisible() - { - if (onBecameInvisible != null) onBecameInvisible.OnNext(Unit.Default); - } - - /// OnBecameInvisible is called when the renderer is no longer visible by any camera. - public IObservable OnBecameInvisibleAsObservable() - { - return onBecameInvisible ?? (onBecameInvisible = new Subject()); - } - - Subject onBecameVisible; - - /// OnBecameVisible is called when the renderer became visible by any camera. - void OnBecameVisible() - { - if (onBecameVisible != null) onBecameVisible.OnNext(Unit.Default); - } - - /// OnBecameVisible is called when the renderer became visible by any camera. - public IObservable OnBecameVisibleAsObservable() - { - return onBecameVisible ?? (onBecameVisible = new Subject()); - } - - protected override void RaiseOnCompletedOnDestroy() - { - if (onBecameInvisible != null) - { - onBecameInvisible.OnCompleted(); - } - if (onBecameVisible != null) - { - onBecameVisible.OnCompleted(); - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableVisibleTrigger.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableVisibleTrigger.cs.meta deleted file mode 100644 index 9bff2e2..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/Triggers/ObservableVisibleTrigger.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 03515121745b2d74c8782ce92eb2a1a0 -timeCreated: 1455373897 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/UnityEventExtensions.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/UnityEventExtensions.cs deleted file mode 100644 index 56e0d0b..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/UnityEventExtensions.cs +++ /dev/null @@ -1,58 +0,0 @@ -// for uGUI(from 4.6) -#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) - -using System; -using System.Collections.Generic; -using System.Text; -using UnityEngine.Events; - -namespace UniRx -{ - public static partial class UnityEventExtensions - { - public static IObservable AsObservable(this UnityEngine.Events.UnityEvent unityEvent) - { - return Observable.FromEvent(h => new UnityAction(h), h => unityEvent.AddListener(h), h => unityEvent.RemoveListener(h)); - } - - public static IObservable AsObservable(this UnityEngine.Events.UnityEvent unityEvent) - { - return Observable.FromEvent, T>(h => new UnityAction(h), h => unityEvent.AddListener(h), h => unityEvent.RemoveListener(h)); - } - - public static IObservable> AsObservable(this UnityEngine.Events.UnityEvent unityEvent) - { - return Observable.FromEvent, Tuple>(h => - { - return new UnityAction((t0, t1) => - { - h(Tuple.Create(t0, t1)); - }); - }, h => unityEvent.AddListener(h), h => unityEvent.RemoveListener(h)); - } - - public static IObservable> AsObservable(this UnityEngine.Events.UnityEvent unityEvent) - { - return Observable.FromEvent, Tuple>(h => - { - return new UnityAction((t0, t1, t2) => - { - h(Tuple.Create(t0, t1, t2)); - }); - }, h => unityEvent.AddListener(h), h => unityEvent.RemoveListener(h)); - } - - public static IObservable> AsObservable(this UnityEngine.Events.UnityEvent unityEvent) - { - return Observable.FromEvent, Tuple>(h => - { - return new UnityAction((t0, t1, t2, t3) => - { - h(Tuple.Create(t0, t1, t2, t3)); - }); - }, h => unityEvent.AddListener(h), h => unityEvent.RemoveListener(h)); - } - } -} - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/UnityEventExtensions.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/UnityEventExtensions.cs.meta deleted file mode 100644 index ffe6ade..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/UnityEventExtensions.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: e3c4861cc04ac524484d0730a3a5bd4a -timeCreated: 1455373901 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/UnityGraphicExtensions.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/UnityGraphicExtensions.cs deleted file mode 100644 index d8416f8..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/UnityGraphicExtensions.cs +++ /dev/null @@ -1,44 +0,0 @@ -// for uGUI(from 4.6) -#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) - -using System; -using UnityEngine.Events; -using UnityEngine.UI; - -namespace UniRx -{ - public static partial class UnityGraphicExtensions - { - public static IObservable DirtyLayoutCallbackAsObservable(this Graphic graphic) - { - return Observable.Create(observer => - { - UnityAction registerHandler = () => observer.OnNext(Unit.Default); - graphic.RegisterDirtyLayoutCallback(registerHandler); - return Disposable.Create(() => graphic.UnregisterDirtyLayoutCallback(registerHandler)); - }); - } - - public static IObservable DirtyMaterialCallbackAsObservable(this Graphic graphic) - { - return Observable.Create(observer => - { - UnityAction registerHandler = () => observer.OnNext(Unit.Default); - graphic.RegisterDirtyMaterialCallback(registerHandler); - return Disposable.Create(() => graphic.UnregisterDirtyMaterialCallback(registerHandler)); - }); - } - - public static IObservable DirtyVerticesCallbackAsObservable(this Graphic graphic) - { - return Observable.Create(observer => - { - UnityAction registerHandler = () => observer.OnNext(Unit.Default); - graphic.RegisterDirtyVerticesCallback(registerHandler); - return Disposable.Create(() => graphic.UnregisterDirtyVerticesCallback(registerHandler)); - }); - } - } -} - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/UnityGraphicExtensions.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/UnityGraphicExtensions.cs.meta deleted file mode 100644 index e52e1b3..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/UnityGraphicExtensions.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 99be646df339108498ebb70efa1b7bd4 -timeCreated: 1455373900 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/UnityUIComponentExtensions.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/UnityUIComponentExtensions.cs deleted file mode 100644 index cbbbe7f..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/UnityUIComponentExtensions.cs +++ /dev/null @@ -1,123 +0,0 @@ -// for uGUI(from 4.6) -#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5) - -using System; -using UnityEngine; -using UnityEngine.UI; - -namespace UniRx -{ - public static partial class UnityUIComponentExtensions - { - public static IDisposable SubscribeToText(this IObservable source, Text text) - { - return source.SubscribeWithState(text, (x, t) => t.text = x); - } - - public static IDisposable SubscribeToText(this IObservable source, Text text) - { - return source.SubscribeWithState(text, (x, t) => t.text = x.ToString()); - } - - public static IDisposable SubscribeToText(this IObservable source, Text text, Func selector) - { - return source.SubscribeWithState2(text, selector, (x, t, s) => t.text = s(x)); - } - - public static IDisposable SubscribeToInteractable(this IObservable source, Selectable selectable) - { - return source.SubscribeWithState(selectable, (x, s) => s.interactable = x); - } - - /// Observe onClick event. - public static IObservable OnClickAsObservable(this Button button) - { - return button.onClick.AsObservable(); - } - - /// Observe onValueChanged with current `isOn` value on subscribe. - public static IObservable OnValueChangedAsObservable(this Toggle toggle) - { - // Optimized Defer + StartWith - return Observable.CreateWithState(toggle, (t, observer) => - { - observer.OnNext(t.isOn); - return t.onValueChanged.AsObservable().Subscribe(observer); - }); - } - - /// Observe onValueChanged with current `value` on subscribe. - public static IObservable OnValueChangedAsObservable(this Scrollbar scrollbar) - { - return Observable.CreateWithState(scrollbar, (s, observer) => - { - observer.OnNext(s.value); - return s.onValueChanged.AsObservable().Subscribe(observer); - }); - } - - /// Observe onValueChanged with current `normalizedPosition` value on subscribe. - public static IObservable OnValueChangedAsObservable(this ScrollRect scrollRect) - { - return Observable.CreateWithState(scrollRect, (s, observer) => - { - observer.OnNext(s.normalizedPosition); - return s.onValueChanged.AsObservable().Subscribe(observer); - }); - } - - /// Observe onValueChanged with current `value` on subscribe. - public static IObservable OnValueChangedAsObservable(this Slider slider) - { - return Observable.CreateWithState(slider, (s, observer) => - { - observer.OnNext(s.value); - return s.onValueChanged.AsObservable().Subscribe(observer); - }); - } - - /// Observe onEndEdit(Submit) event. - public static IObservable OnEndEditAsObservable(this InputField inputField) - { - return inputField.onEndEdit.AsObservable(); - } - -#if (UNITY_4_6 || UNITY_4_7 || UNITY_5_0 || UNITY_5_1 || UNITY_5_2) - /// Observe onValueChange with current `text` value on subscribe. - public static IObservable OnValueChangeAsObservable(this InputField inputField) - { - return Observable.CreateWithState(inputField, (i, observer) => - { - observer.OnNext(i.text); - return i.onValueChange.AsObservable().Subscribe(observer); - }); - } -#else - /// Observe onValueChanged with current `text` value on subscribe. - public static IObservable OnValueChangedAsObservable(this InputField inputField) - { - return Observable.CreateWithState(inputField, (i, observer) => - { - observer.OnNext(i.text); - return i.onValueChanged.AsObservable().Subscribe(observer); - }); - } -#endif - -#if UNITY_5_3_OR_NEWER - - /// Observe onValueChanged with current `value` on subscribe. - public static IObservable OnValueChangedAsObservable(this Dropdown dropdown) - { - return Observable.CreateWithState(dropdown, (d, observer) => - { - observer.OnNext(d.value); - return d.onValueChanged.AsObservable().Subscribe(observer); - }); - } - -#endif - } -} - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/UnityUIComponentExtensions.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/UnityUIComponentExtensions.cs.meta deleted file mode 100644 index 30075fd..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/UnityUIComponentExtensions.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 7645084659bc779448e384456805d251 -timeCreated: 1455373899 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/YieldInstructionCache.cs b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/YieldInstructionCache.cs deleted file mode 100644 index c1c8510..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/YieldInstructionCache.cs +++ /dev/null @@ -1,10 +0,0 @@ -using UnityEngine; - -namespace UniRx -{ - internal static class YieldInstructionCache - { - public static readonly WaitForEndOfFrame WaitForEndOfFrame = new WaitForEndOfFrame(); - public static readonly WaitForFixedUpdate WaitForFixedUpdate = new WaitForFixedUpdate(); - } -} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/YieldInstructionCache.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/YieldInstructionCache.cs.meta deleted file mode 100644 index 9fac1b1..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityEngineBridge/YieldInstructionCache.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 2493deaccf35b0542800b0851771e665 -timeCreated: 1455373897 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityWinRTBridge.meta b/Assets/Plugins/UniRx/Scripts/UnityWinRTBridge.meta deleted file mode 100644 index 3894710..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityWinRTBridge.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 7c63c1bd97868b24a8cdc48026d702f2 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityWinRTBridge/Thread.cs b/Assets/Plugins/UniRx/Scripts/UnityWinRTBridge/Thread.cs deleted file mode 100644 index 0a733ed..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityWinRTBridge/Thread.cs +++ /dev/null @@ -1,26 +0,0 @@ -#if UNITY_METRO - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading; - -namespace UniRx -{ - public static class Thread - { - public static void Sleep(TimeSpan wait) - { - new System.Threading.ManualResetEvent(false).WaitOne(wait); - } - - public static void Sleep(int ms) - { - new System.Threading.ManualResetEvent(false).WaitOne(ms); - } - } -} - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityWinRTBridge/Thread.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityWinRTBridge/Thread.cs.meta deleted file mode 100644 index a46af85..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityWinRTBridge/Thread.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: bf1175d5dd9b5904d898eb4c9dd7e0c5 -timeCreated: 1455373901 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/UniRx/Scripts/UnityWinRTBridge/ThreadPoolScheduler_UnityWinRT.cs b/Assets/Plugins/UniRx/Scripts/UnityWinRTBridge/ThreadPoolScheduler_UnityWinRT.cs deleted file mode 100644 index 74c9598..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityWinRTBridge/ThreadPoolScheduler_UnityWinRT.cs +++ /dev/null @@ -1,100 +0,0 @@ -#if UNITY_METRO - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading; - -#if NETFX_CORE -using System.Threading.Tasks; -#endif - -namespace UniRx -{ - public static partial class Scheduler - { - public static readonly IScheduler ThreadPool = new ThreadPoolScheduler(); - - class ThreadPoolScheduler : IScheduler - { - public DateTimeOffset Now - { - get { return Scheduler.Now; } - } - - public IDisposable Schedule(Action action) - { - var d = new BooleanDisposable(); -#if NETFX_CORE - - Task.Run(()=> - { - if (!d.IsDisposed) - { - action(); - } - }); - -#else - Action act = () => - { - if (!d.IsDisposed) - { - action(); - } - }; - - act.BeginInvoke(ar => act.EndInvoke(ar), null); - -#endif - - return d; - } - - public IDisposable Schedule(TimeSpan dueTime, Action action) - { - var wait = Scheduler.Normalize(dueTime); - - var d = new BooleanDisposable(); - -#if NETFX_CORE - - Task.Run(()=> - { - if (!d.IsDisposed) - { - if (wait.Ticks > 0) - { - Thread.Sleep(wait); - } - action(); - } - }); - -#else - - Action act = () => - { - if (!d.IsDisposed) - { - if (wait.Ticks > 0) - { - Thread.Sleep(wait); - } - action(); - } - }; - - act.BeginInvoke(ar => act.EndInvoke(ar), null); - -#endif - - return d; - } - } - } -} - -#endif \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UnityWinRTBridge/ThreadPoolScheduler_UnityWinRT.cs.meta b/Assets/Plugins/UniRx/Scripts/UnityWinRTBridge/ThreadPoolScheduler_UnityWinRT.cs.meta deleted file mode 100644 index dfa8aab..0000000 --- a/Assets/Plugins/UniRx/Scripts/UnityWinRTBridge/ThreadPoolScheduler_UnityWinRT.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 2c36c9256c17bbb40854ef9b9e4d51c7 -timeCreated: 1455373898 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/websocket-sharp/websocket-sharp.dll b/Assets/Plugins/websocket-sharp/websocket-sharp.dll index 799fcbc..6ec719f 100644 Binary files a/Assets/Plugins/websocket-sharp/websocket-sharp.dll and b/Assets/Plugins/websocket-sharp/websocket-sharp.dll differ diff --git a/Assets/Plugins/UniRx.meta b/Assets/TORISOUP.meta similarity index 77% rename from Assets/Plugins/UniRx.meta rename to Assets/TORISOUP.meta index 9403b13..4b481cb 100644 --- a/Assets/Plugins/UniRx.meta +++ b/Assets/TORISOUP.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: e58e77b98f220a849adf066d584281d0 +guid: 45f3201f92c4c8643a2dc19d5be00579 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Assets/NicoliveClient.meta b/Assets/TORISOUP/NicoliveClient.meta similarity index 100% rename from Assets/NicoliveClient.meta rename to Assets/TORISOUP/NicoliveClient.meta diff --git a/Assets/NicoliveClient/Example.meta b/Assets/TORISOUP/NicoliveClient/Example.meta similarity index 100% rename from Assets/NicoliveClient/Example.meta rename to Assets/TORISOUP/NicoliveClient/Example.meta diff --git a/Assets/NicoliveClient/Example/Console.meta b/Assets/TORISOUP/NicoliveClient/Example/Console.meta similarity index 100% rename from Assets/NicoliveClient/Example/Console.meta rename to Assets/TORISOUP/NicoliveClient/Example/Console.meta diff --git a/Assets/NicoliveClient/Example/Console/NicoliveSampleScene.unity b/Assets/TORISOUP/NicoliveClient/Example/Console/NicoliveSampleScene.unity similarity index 79% rename from Assets/NicoliveClient/Example/Console/NicoliveSampleScene.unity rename to Assets/TORISOUP/NicoliveClient/Example/Console/NicoliveSampleScene.unity index 59b4669..101e3c7 100644 --- a/Assets/NicoliveClient/Example/Console/NicoliveSampleScene.unity +++ b/Assets/TORISOUP/NicoliveClient/Example/Console/NicoliveSampleScene.unity @@ -43,19 +43,18 @@ RenderSettings: --- !u!157 &3 LightmapSettings: m_ObjectHideFlags: 0 - serializedVersion: 11 + serializedVersion: 12 m_GIWorkflowMode: 0 m_GISettings: serializedVersion: 2 m_BounceScale: 1 m_IndirectOutputScale: 1 m_AlbedoBoost: 1 - m_TemporalCoherenceThreshold: 1 m_EnvironmentLightingMode: 0 m_EnableBakedLightmaps: 1 m_EnableRealtimeLightmaps: 1 m_LightmapEditorSettings: - serializedVersion: 10 + serializedVersion: 12 m_Resolution: 2 m_BakeResolution: 40 m_AtlasSize: 1024 @@ -63,6 +62,7 @@ LightmapSettings: m_AOMaxDistance: 1 m_CompAOExponent: 1 m_CompAOExponentDirect: 0 + m_ExtractAmbientOcclusion: 0 m_Padding: 2 m_LightmapParameters: {fileID: 0} m_LightmapsBakeMode: 1 @@ -77,10 +77,16 @@ LightmapSettings: m_PVRDirectSampleCount: 32 m_PVRSampleCount: 500 m_PVRBounces: 2 + m_PVREnvironmentSampleCount: 500 + m_PVREnvironmentReferencePointCount: 2048 + m_PVRFilteringMode: 2 + m_PVRDenoiserTypeDirect: 0 + m_PVRDenoiserTypeIndirect: 0 + m_PVRDenoiserTypeAO: 0 m_PVRFilterTypeDirect: 0 m_PVRFilterTypeIndirect: 0 m_PVRFilterTypeAO: 0 - m_PVRFilteringMode: 1 + m_PVREnvironmentMIS: 0 m_PVRCulling: 1 m_PVRFilteringGaussRadiusDirect: 1 m_PVRFilteringGaussRadiusIndirect: 5 @@ -88,9 +94,11 @@ LightmapSettings: m_PVRFilteringAtrousPositionSigmaDirect: 0.5 m_PVRFilteringAtrousPositionSigmaIndirect: 2 m_PVRFilteringAtrousPositionSigmaAO: 1 - m_ShowResolutionOverlay: 1 + m_ExportTrainingData: 0 + m_TrainingDataDestination: TrainingData + m_LightProbeSampleCountMultiplier: 4 m_LightingDataAsset: {fileID: 0} - m_UseShadowmask: 1 + m_LightingSettings: {fileID: 901721210} --- !u!196 &4 NavMeshSettings: serializedVersion: 2 @@ -110,6 +118,8 @@ NavMeshSettings: manualTileSize: 0 tileSize: 256 accuratePlacement: 0 + maxJobWorkers: 0 + preserveTilesOutsideBounds: 0 debug: m_Flags: 0 m_NavMeshData: {fileID: 0} @@ -117,7 +127,8 @@ NavMeshSettings: GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 467051} @@ -134,11 +145,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 467050} 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: 591267481} m_RootOrder: 0 @@ -152,21 +165,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 467050} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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: 0.5} m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 14 @@ -185,14 +199,16 @@ MonoBehaviour: CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 467050} m_CullTransparentMesh: 0 --- !u!1 &7557747 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 7557748} @@ -210,11 +226,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 7557747} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1.0000001, y: 1.0000001, z: 1.0000001} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 654707479} m_Father: {fileID: 802075596} @@ -229,15 +247,17 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 7557747} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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} @@ -247,44 +267,46 @@ MonoBehaviour: 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: 7557750} m_OnClick: m_PersistentCalls: m_Calls: [] - m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, - Culture=neutral, PublicKeyToken=null --- !u!114 &7557750 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 7557747} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} m_Type: 1 m_PreserveAspect: 0 @@ -293,18 +315,22 @@ MonoBehaviour: m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 --- !u!222 &7557751 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 7557747} m_CullTransparentMesh: 0 --- !u!1 &12360866 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 12360867} @@ -321,11 +347,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 12360866} 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: 459219026} m_RootOrder: 0 @@ -339,21 +367,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 12360866} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 14 @@ -372,14 +401,16 @@ MonoBehaviour: CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 12360866} m_CullTransparentMesh: 0 --- !u!1 &14355600 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 14355601} @@ -396,11 +427,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 14355600} 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: 1372320181} m_RootOrder: 1 @@ -414,21 +447,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 14355600} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 30 @@ -447,14 +481,16 @@ MonoBehaviour: CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 14355600} m_CullTransparentMesh: 0 --- !u!1 &28674241 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 28674242} @@ -469,11 +505,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 28674241} 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: 709547419} m_Father: {fileID: 191374747} @@ -488,7 +526,8 @@ RectTransform: GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 32152857} @@ -506,11 +545,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 32152856} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1.0000001, y: 1.0000001, z: 1.0000001} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 1935900091} - {fileID: 1763269153} @@ -526,15 +567,17 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 32152856} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 575553740, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Script: {fileID: 11500000, guid: d199490a83bb2b844b9695cbf13b01ef, 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} @@ -544,17 +587,20 @@ MonoBehaviour: 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: 32152859} @@ -568,16 +614,15 @@ MonoBehaviour: m_HideMobileInput: 0 m_CharacterValidation: 0 m_CharacterLimit: 0 - m_OnEndEdit: + m_OnSubmit: + m_PersistentCalls: + m_Calls: [] + m_OnDidEndEdit: m_PersistentCalls: m_Calls: [] - m_TypeName: UnityEngine.UI.InputField+SubmitEvent, UnityEngine.UI, Version=1.0.0.0, - Culture=neutral, PublicKeyToken=null m_OnValueChanged: m_PersistentCalls: m_Calls: [] - m_TypeName: UnityEngine.UI.InputField+OnChangeEvent, UnityEngine.UI, Version=1.0.0.0, - Culture=neutral, PublicKeyToken=null m_CaretColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} m_CustomCaretColor: 0 m_SelectionColor: {r: 0.65882355, g: 0.80784315, b: 1, a: 0.7529412} @@ -585,25 +630,27 @@ MonoBehaviour: m_CaretBlinkRate: 0.85 m_CaretWidth: 1 m_ReadOnly: 0 + m_ShouldActivateOnSelect: 1 --- !u!114 &32152859 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 32152856} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Sprite: {fileID: 10911, guid: 0000000000000000f000000000000000, type: 0} m_Type: 1 m_PreserveAspect: 0 @@ -612,18 +659,22 @@ MonoBehaviour: m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 --- !u!222 &32152860 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 32152856} m_CullTransparentMesh: 0 --- !u!1 &39895822 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 39895823} @@ -641,11 +692,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 39895822} 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: 881789641} m_Father: {fileID: 1792793820} @@ -660,21 +713,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 39895822} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Sprite: {fileID: 10917, guid: 0000000000000000f000000000000000, type: 0} m_Type: 1 m_PreserveAspect: 0 @@ -683,22 +737,26 @@ MonoBehaviour: m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 --- !u!222 &39895825 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 39895822} m_CullTransparentMesh: 0 --- !u!114 &39895826 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 39895822} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: -1200242548, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Script: {fileID: 11500000, guid: 31a19414c41e5ae4aae2af33fee712f6, type: 3} m_Name: m_EditorClassIdentifier: m_ShowMaskGraphic: 0 @@ -706,7 +764,8 @@ MonoBehaviour: GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 58352544} @@ -723,11 +782,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 58352543} 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: 1297529473} m_RootOrder: 0 @@ -741,21 +802,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 58352543} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 14 @@ -774,14 +836,16 @@ MonoBehaviour: CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 58352543} m_CullTransparentMesh: 0 --- !u!1 &75585768 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 75585769} @@ -798,11 +862,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 75585768} 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: 459548715} m_RootOrder: 0 @@ -816,21 +882,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 75585768} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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: 0.5} m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 14 @@ -849,14 +916,16 @@ MonoBehaviour: CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 75585768} m_CullTransparentMesh: 0 --- !u!1 &139773839 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 139773840} @@ -873,11 +942,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 139773839} 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: 933803496} m_RootOrder: 1 @@ -891,21 +962,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 139773839} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Sprite: {fileID: 10915, guid: 0000000000000000f000000000000000, type: 0} m_Type: 0 m_PreserveAspect: 0 @@ -914,18 +986,22 @@ MonoBehaviour: m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 --- !u!222 &139773842 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 139773839} m_CullTransparentMesh: 0 --- !u!1 &148170506 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 148170507} @@ -942,11 +1018,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 148170506} 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: 715688974} - {fileID: 971798209} @@ -966,21 +1044,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 148170506} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Sprite: {fileID: 10911, guid: 0000000000000000f000000000000000, type: 0} m_Type: 1 m_PreserveAspect: 0 @@ -989,18 +1068,22 @@ MonoBehaviour: m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 --- !u!222 &148170509 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 148170506} m_CullTransparentMesh: 0 --- !u!1 &158921563 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 158921564} @@ -1017,11 +1100,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 158921563} 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: 1746167129} m_RootOrder: 0 @@ -1035,21 +1120,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 158921563} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 14 @@ -1068,14 +1154,16 @@ MonoBehaviour: CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 158921563} m_CullTransparentMesh: 0 --- !u!1 &166035397 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 166035398} @@ -1092,11 +1180,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 166035397} 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: 292540601} m_RootOrder: 0 @@ -1110,21 +1200,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 166035397} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Sprite: {fileID: 10901, guid: 0000000000000000f000000000000000, type: 0} m_Type: 0 m_PreserveAspect: 0 @@ -1133,18 +1224,22 @@ MonoBehaviour: m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 --- !u!222 &166035400 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 166035397} m_CullTransparentMesh: 0 --- !u!1 &173865762 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 173865763} @@ -1161,11 +1256,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 173865762} 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: 1645528591} m_RootOrder: 1 @@ -1179,21 +1276,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 173865762} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 14 @@ -1212,14 +1310,16 @@ MonoBehaviour: CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 173865762} m_CullTransparentMesh: 0 --- !u!1 &184258737 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 184258738} @@ -1236,11 +1336,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 184258737} 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: 1377608435} m_RootOrder: 0 @@ -1254,21 +1356,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 184258737} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 41 @@ -1287,14 +1390,16 @@ MonoBehaviour: CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 184258737} m_CullTransparentMesh: 0 --- !u!1 &191374746 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 191374747} @@ -1312,11 +1417,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 191374746} 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: 28674242} m_Father: {fileID: 1792793820} @@ -1331,15 +1438,17 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 191374746} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: -2061169968, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Script: {fileID: 11500000, guid: 2a4db7a114972834c8e4117be1d82ba3, type: 3} m_Name: m_EditorClassIdentifier: m_Navigation: m_Mode: 3 + m_WrapAround: 0 m_SelectOnUp: {fileID: 0} m_SelectOnDown: {fileID: 0} m_SelectOnLeft: {fileID: 0} @@ -1349,17 +1458,20 @@ MonoBehaviour: 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: 709547420} @@ -1371,27 +1483,26 @@ MonoBehaviour: m_OnValueChanged: m_PersistentCalls: m_Calls: [] - m_TypeName: UnityEngine.UI.Scrollbar+ScrollEvent, UnityEngine.UI, Version=1.0.0.0, - Culture=neutral, PublicKeyToken=null --- !u!114 &191374749 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 191374746} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0} m_Type: 1 m_PreserveAspect: 0 @@ -1400,18 +1511,22 @@ MonoBehaviour: m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 --- !u!222 &191374750 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 191374746} m_CullTransparentMesh: 0 --- !u!1 &225160229 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 225160230} @@ -1428,11 +1543,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 225160229} 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: 1462386918} m_RootOrder: 0 @@ -1446,21 +1563,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 225160229} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 14 @@ -1479,14 +1597,16 @@ MonoBehaviour: CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 225160229} m_CullTransparentMesh: 0 --- !u!1 &255764546 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 255764547} @@ -1503,11 +1623,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 255764546} 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: 948271707} m_RootOrder: 0 @@ -1521,21 +1643,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 255764546} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 14 @@ -1554,14 +1677,16 @@ MonoBehaviour: CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 255764546} m_CullTransparentMesh: 0 --- !u!1 &264003821 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 264003822} @@ -1578,11 +1703,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 264003821} 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: 1007261524} m_RootOrder: 0 @@ -1596,21 +1723,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 264003821} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 14 @@ -1629,14 +1757,16 @@ MonoBehaviour: CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 264003821} m_CullTransparentMesh: 0 --- !u!1 &292540600 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 292540601} @@ -1653,11 +1783,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 292540600} 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: 166035398} m_Father: {fileID: 861266158} @@ -1672,21 +1804,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 292540600} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} m_Type: 1 m_PreserveAspect: 0 @@ -1695,18 +1828,22 @@ MonoBehaviour: m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 --- !u!222 &292540603 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 292540600} m_CullTransparentMesh: 0 --- !u!1 &295524481 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 295524482} @@ -1723,11 +1860,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 295524481} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1.0000001, y: 1.0000001, z: 1.0000001} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 1992812697} m_Father: {fileID: 357773227} @@ -1742,21 +1881,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 295524481} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Sprite: {fileID: 10911, guid: 0000000000000000f000000000000000, type: 0} m_Type: 1 m_PreserveAspect: 0 @@ -1765,18 +1905,22 @@ MonoBehaviour: m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 --- !u!222 &295524484 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 295524481} m_CullTransparentMesh: 0 --- !u!1 &313561598 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 313561599} @@ -1793,11 +1937,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 313561598} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1.0000001, y: 1.0000001, z: 1.0000001} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 1762825486} m_Father: {fileID: 357773227} @@ -1812,21 +1958,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 313561598} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Sprite: {fileID: 10911, guid: 0000000000000000f000000000000000, type: 0} m_Type: 1 m_PreserveAspect: 0 @@ -1835,18 +1982,22 @@ MonoBehaviour: m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 --- !u!222 &313561601 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 313561598} m_CullTransparentMesh: 0 --- !u!1 &342601479 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 342601480} @@ -1864,11 +2015,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 342601479} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1.0000001, y: 1.0000001, z: 1.0000001} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 694328848} m_Father: {fileID: 610860377} @@ -1883,15 +2036,17 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 342601479} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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} @@ -1901,44 +2056,46 @@ MonoBehaviour: 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: 342601482} m_OnClick: m_PersistentCalls: m_Calls: [] - m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, - Culture=neutral, PublicKeyToken=null --- !u!114 &342601482 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 342601479} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} m_Type: 1 m_PreserveAspect: 0 @@ -1947,18 +2104,22 @@ MonoBehaviour: m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 --- !u!222 &342601483 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 342601479} m_CullTransparentMesh: 0 --- !u!1 &357773226 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 357773227} @@ -1976,11 +2137,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 357773226} 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: 1746167129} - {fileID: 313561599} @@ -2003,11 +2166,12 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 357773226} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 1297475563, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3} m_Name: m_EditorClassIdentifier: m_Padding: @@ -2021,25 +2185,29 @@ MonoBehaviour: m_ChildForceExpandHeight: 1 m_ChildControlWidth: 1 m_ChildControlHeight: 1 + m_ChildScaleWidth: 0 + m_ChildScaleHeight: 0 + m_ReverseArrangement: 0 --- !u!114 &357773229 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 357773226} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 12 @@ -2058,14 +2226,16 @@ MonoBehaviour: CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 357773226} m_CullTransparentMesh: 0 --- !u!1 &380702495 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 380702496} @@ -2082,11 +2252,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 380702495} 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: 610860377} m_RootOrder: 5 @@ -2100,21 +2272,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 380702495} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 14 @@ -2133,14 +2306,16 @@ MonoBehaviour: CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 380702495} m_CullTransparentMesh: 0 --- !u!1 &386749637 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 386749638} @@ -2157,11 +2332,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 386749637} 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: 2067706381} m_RootOrder: 1 @@ -2175,21 +2352,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 386749637} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 14 @@ -2208,14 +2386,16 @@ MonoBehaviour: CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 386749637} m_CullTransparentMesh: 0 --- !u!1 &423913666 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 423913667} @@ -2232,11 +2412,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 423913666} 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: 813744963} m_RootOrder: 0 @@ -2250,21 +2432,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 423913666} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 14 @@ -2283,14 +2466,16 @@ MonoBehaviour: CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 423913666} m_CullTransparentMesh: 0 --- !u!1 &448957224 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 448957225} @@ -2307,11 +2492,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 448957224} 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: 1788976541} m_RootOrder: 2 @@ -2325,21 +2512,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 448957224} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 12 @@ -2358,14 +2546,16 @@ MonoBehaviour: CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 448957224} m_CullTransparentMesh: 0 --- !u!1 &453085656 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 453085657} @@ -2381,11 +2571,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 453085656} 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: 1103028173} - {fileID: 1531648481} @@ -2402,15 +2594,17 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 453085656} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 2109663825, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Script: {fileID: 11500000, guid: 9085046f02f69544eb97fd06b6048fe2, type: 3} m_Name: m_EditorClassIdentifier: m_Navigation: m_Mode: 3 + m_WrapAround: 0 m_SelectOnUp: {fileID: 0} m_SelectOnDown: {fileID: 0} m_SelectOnLeft: {fileID: 0} @@ -2420,17 +2614,20 @@ MonoBehaviour: 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: 1103028174} @@ -2440,14 +2637,13 @@ MonoBehaviour: onValueChanged: m_PersistentCalls: m_Calls: [] - m_TypeName: UnityEngine.UI.Toggle+ToggleEvent, UnityEngine.UI, Version=1.0.0.0, - Culture=neutral, PublicKeyToken=null m_IsOn: 1 --- !u!1 &459219025 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 459219026} @@ -2465,11 +2661,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 459219025} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1.0000001, y: 1.0000001, z: 1.0000001} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 12360867} m_Father: {fileID: 1602116060} @@ -2484,15 +2682,17 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 459219025} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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} @@ -2502,44 +2702,46 @@ MonoBehaviour: 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: 459219028} m_OnClick: m_PersistentCalls: m_Calls: [] - m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, - Culture=neutral, PublicKeyToken=null --- !u!114 &459219028 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 459219025} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} m_Type: 1 m_PreserveAspect: 0 @@ -2548,18 +2750,22 @@ MonoBehaviour: m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 --- !u!222 &459219029 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 459219025} m_CullTransparentMesh: 0 --- !u!1 &459548714 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 459548715} @@ -2577,11 +2783,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 459548714} 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: 75585769} - {fileID: 1679403783} @@ -2597,15 +2805,17 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 459548714} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 575553740, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Script: {fileID: 11500000, guid: d199490a83bb2b844b9695cbf13b01ef, 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} @@ -2615,17 +2825,20 @@ MonoBehaviour: 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: 459548717} @@ -2639,16 +2852,15 @@ MonoBehaviour: m_HideMobileInput: 0 m_CharacterValidation: 0 m_CharacterLimit: 0 - m_OnEndEdit: + m_OnSubmit: + m_PersistentCalls: + m_Calls: [] + m_OnDidEndEdit: m_PersistentCalls: m_Calls: [] - m_TypeName: UnityEngine.UI.InputField+SubmitEvent, UnityEngine.UI, Version=1.0.0.0, - Culture=neutral, PublicKeyToken=null m_OnValueChanged: m_PersistentCalls: m_Calls: [] - m_TypeName: UnityEngine.UI.InputField+OnChangeEvent, UnityEngine.UI, Version=1.0.0.0, - Culture=neutral, PublicKeyToken=null m_CaretColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} m_CustomCaretColor: 0 m_SelectionColor: {r: 0.65882355, g: 0.80784315, b: 1, a: 0.7529412} @@ -2656,25 +2868,27 @@ MonoBehaviour: m_CaretBlinkRate: 0.85 m_CaretWidth: 1 m_ReadOnly: 0 + m_ShouldActivateOnSelect: 1 --- !u!114 &459548717 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 459548714} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Sprite: {fileID: 10911, guid: 0000000000000000f000000000000000, type: 0} m_Type: 1 m_PreserveAspect: 0 @@ -2683,18 +2897,22 @@ MonoBehaviour: m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 --- !u!222 &459548718 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 459548714} m_CullTransparentMesh: 0 --- !u!1 &469201797 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 469201799} @@ -2713,7 +2931,8 @@ GameObject: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 469201797} m_Enabled: 1 m_EditorHideFlags: 0 @@ -2728,11 +2947,13 @@ MonoBehaviour: Transform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 469201797} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 846.7137, y: 184.11436, z: -14} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} m_RootOrder: 4 @@ -2741,7 +2962,8 @@ Transform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 469201797} m_Enabled: 1 m_EditorHideFlags: 0 @@ -2757,7 +2979,8 @@ MonoBehaviour: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 469201797} m_Enabled: 1 m_EditorHideFlags: 0 @@ -2768,7 +2991,8 @@ MonoBehaviour: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 469201797} m_Enabled: 1 m_EditorHideFlags: 0 @@ -2784,7 +3008,8 @@ MonoBehaviour: GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 486313555} @@ -2801,11 +3026,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 486313554} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1.0000001, y: 1.0000001, z: 1.0000001} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1661872749} m_RootOrder: 2 @@ -2819,21 +3046,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 486313554} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 14 @@ -2852,14 +3080,16 @@ MonoBehaviour: CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 486313554} m_CullTransparentMesh: 0 --- !u!1 &494227248 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 494227249} @@ -2876,11 +3106,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 494227248} 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: 148170507} m_RootOrder: 4 @@ -2894,21 +3126,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 494227248} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 14 @@ -2927,14 +3160,16 @@ MonoBehaviour: CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 494227248} m_CullTransparentMesh: 0 --- !u!1 &499359668 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 499359669} @@ -2952,11 +3187,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 499359668} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1.0000001, y: 1.0000001, z: 1.0000001} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 1419317688} m_Father: {fileID: 610860377} @@ -2971,15 +3208,17 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 499359668} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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} @@ -2989,44 +3228,46 @@ MonoBehaviour: 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: 499359671} m_OnClick: m_PersistentCalls: m_Calls: [] - m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, - Culture=neutral, PublicKeyToken=null --- !u!114 &499359671 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 499359668} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} m_Type: 1 m_PreserveAspect: 0 @@ -3035,18 +3276,22 @@ MonoBehaviour: m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 --- !u!222 &499359672 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 499359668} m_CullTransparentMesh: 0 --- !u!1 &514997952 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 514997953} @@ -3063,11 +3308,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 514997952} 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: 675632735} - {fileID: 1377608435} @@ -3085,21 +3332,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 514997952} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0} m_Type: 1 m_PreserveAspect: 0 @@ -3108,18 +3356,22 @@ MonoBehaviour: m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 --- !u!222 &514997955 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 514997952} m_CullTransparentMesh: 0 --- !u!1 &519724245 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 519724246} @@ -3136,11 +3388,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 519724245} 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: 1602116060} - {fileID: 885138532} @@ -3165,21 +3419,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 519724245} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0} m_Type: 1 m_PreserveAspect: 0 @@ -3188,18 +3443,22 @@ MonoBehaviour: m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 --- !u!222 &519724248 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 519724245} m_CullTransparentMesh: 0 --- !u!1 &526135852 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 526135853} @@ -3216,11 +3475,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 526135852} 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: 1773566057} m_RootOrder: 0 @@ -3234,21 +3495,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 526135852} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 14 @@ -3267,14 +3529,16 @@ MonoBehaviour: CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 526135852} m_CullTransparentMesh: 0 --- !u!1 &529322735 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 529322736} @@ -3292,11 +3556,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 529322735} 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: 679159956} - {fileID: 901643033} @@ -3312,11 +3578,12 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 529322735} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 1367256648, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Script: {fileID: 11500000, guid: 1aa08ab6e0800fa44ae55d278d1423e3, type: 3} m_Name: m_EditorClassIdentifier: m_Content: {fileID: 729587718} @@ -3337,27 +3604,26 @@ MonoBehaviour: m_OnValueChanged: m_PersistentCalls: m_Calls: [] - m_TypeName: UnityEngine.UI.ScrollRect+ScrollRectEvent, UnityEngine.UI, Version=1.0.0.0, - Culture=neutral, PublicKeyToken=null --- !u!114 &529322738 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 529322735} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} m_Type: 1 m_PreserveAspect: 0 @@ -3366,18 +3632,22 @@ MonoBehaviour: m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 --- !u!222 &529322739 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 529322735} m_CullTransparentMesh: 0 --- !u!1 &542649014 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 542649015} @@ -3394,11 +3664,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 542649014} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1.0000001, y: 1.0000001, z: 1.0000001} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 1984799697} m_Father: {fileID: 357773227} @@ -3413,21 +3685,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 542649014} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Sprite: {fileID: 10911, guid: 0000000000000000f000000000000000, type: 0} m_Type: 1 m_PreserveAspect: 0 @@ -3436,18 +3709,22 @@ MonoBehaviour: m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 --- !u!222 &542649017 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 542649014} m_CullTransparentMesh: 0 --- !u!1 &549082319 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 549082320} @@ -3464,11 +3741,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 549082319} 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: 519724246} m_RootOrder: 8 @@ -3482,21 +3761,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 549082319} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} m_Color: {r: 0, g: 0, b: 0, a: 0.678} m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Sprite: {fileID: 0} m_Type: 0 m_PreserveAspect: 0 @@ -3505,18 +3785,22 @@ MonoBehaviour: m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 --- !u!222 &549082322 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 549082319} m_CullTransparentMesh: 0 --- !u!1 &562949576 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 562949577} @@ -3533,11 +3817,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 562949576} 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: 1547853531} m_RootOrder: 1 @@ -3551,21 +3837,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 562949576} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 14 @@ -3584,14 +3871,16 @@ MonoBehaviour: CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 562949576} m_CullTransparentMesh: 0 --- !u!1 &572334162 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 572334163} @@ -3608,11 +3897,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 572334162} 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: 861266158} m_RootOrder: 1 @@ -3626,21 +3917,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 572334162} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 14 @@ -3659,14 +3951,16 @@ MonoBehaviour: CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 572334162} m_CullTransparentMesh: 0 --- !u!1 &591267480 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 591267481} @@ -3684,11 +3978,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 591267480} 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: 467051} - {fileID: 2102519930} @@ -3704,15 +4000,17 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 591267480} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 575553740, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Script: {fileID: 11500000, guid: d199490a83bb2b844b9695cbf13b01ef, 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} @@ -3722,17 +4020,20 @@ MonoBehaviour: 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: 591267483} @@ -3746,16 +4047,15 @@ MonoBehaviour: m_HideMobileInput: 0 m_CharacterValidation: 0 m_CharacterLimit: 0 - m_OnEndEdit: + m_OnSubmit: + m_PersistentCalls: + m_Calls: [] + m_OnDidEndEdit: m_PersistentCalls: m_Calls: [] - m_TypeName: UnityEngine.UI.InputField+SubmitEvent, UnityEngine.UI, Version=1.0.0.0, - Culture=neutral, PublicKeyToken=null m_OnValueChanged: m_PersistentCalls: m_Calls: [] - m_TypeName: UnityEngine.UI.InputField+OnChangeEvent, UnityEngine.UI, Version=1.0.0.0, - Culture=neutral, PublicKeyToken=null m_CaretColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} m_CustomCaretColor: 0 m_SelectionColor: {r: 0.65882355, g: 0.80784315, b: 1, a: 0.7529412} @@ -3763,25 +4063,27 @@ MonoBehaviour: m_CaretBlinkRate: 0.85 m_CaretWidth: 1 m_ReadOnly: 0 + m_ShouldActivateOnSelect: 1 --- !u!114 &591267483 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 591267480} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Sprite: {fileID: 10911, guid: 0000000000000000f000000000000000, type: 0} m_Type: 1 m_PreserveAspect: 0 @@ -3790,18 +4092,22 @@ MonoBehaviour: m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 --- !u!222 &591267484 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 591267480} m_CullTransparentMesh: 0 --- !u!1 &604025647 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 604025648} @@ -3818,11 +4124,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 604025647} 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: 745468077} m_RootOrder: 0 @@ -3836,21 +4144,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 604025647} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 37 @@ -3869,14 +4178,16 @@ MonoBehaviour: CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 604025647} m_CullTransparentMesh: 0 --- !u!1 &610860376 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 610860377} @@ -3894,11 +4205,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 610860376} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 0.999999, y: 0.999999, z: 0.999999} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 626522234} - {fileID: 970936925} @@ -3918,7 +4231,8 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 610860376} m_Enabled: 1 m_EditorHideFlags: 0 @@ -3935,21 +4249,22 @@ MonoBehaviour: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 610860376} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Sprite: {fileID: 10911, guid: 0000000000000000f000000000000000, type: 0} m_Type: 1 m_PreserveAspect: 0 @@ -3958,18 +4273,22 @@ MonoBehaviour: m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 --- !u!222 &610860380 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 610860376} m_CullTransparentMesh: 0 --- !u!1 &626522233 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 626522234} @@ -3986,11 +4305,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 626522233} 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: 610860377} m_RootOrder: 0 @@ -4004,21 +4325,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 626522233} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 14 @@ -4037,14 +4359,16 @@ MonoBehaviour: CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 626522233} m_CullTransparentMesh: 0 --- !u!1 &654707478 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 654707479} @@ -4061,11 +4385,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 654707478} 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: 7557748} m_RootOrder: 0 @@ -4079,21 +4405,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 654707478} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 14 @@ -4112,14 +4439,16 @@ MonoBehaviour: CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 654707478} m_CullTransparentMesh: 0 --- !u!1 &675632734 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 675632735} @@ -4134,11 +4463,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 675632734} 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: 1354017175} - {fileID: 1728613560} @@ -4154,7 +4485,8 @@ RectTransform: GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 679159956} @@ -4172,11 +4504,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 679159955} 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: 729587718} m_Father: {fileID: 529322736} @@ -4191,21 +4525,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 679159955} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Sprite: {fileID: 10917, guid: 0000000000000000f000000000000000, type: 0} m_Type: 1 m_PreserveAspect: 0 @@ -4214,22 +4549,26 @@ MonoBehaviour: m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 --- !u!222 &679159958 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 679159955} m_CullTransparentMesh: 0 --- !u!114 &679159959 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 679159955} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: -1200242548, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Script: {fileID: 11500000, guid: 31a19414c41e5ae4aae2af33fee712f6, type: 3} m_Name: m_EditorClassIdentifier: m_ShowMaskGraphic: 0 @@ -4237,7 +4576,8 @@ MonoBehaviour: GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 694328848} @@ -4254,11 +4594,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 694328847} 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: 342601480} m_RootOrder: 0 @@ -4272,21 +4614,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 694328847} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 14 @@ -4305,14 +4648,16 @@ MonoBehaviour: CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 694328847} m_CullTransparentMesh: 0 --- !u!1 &695412682 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 695412683} @@ -4329,11 +4674,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 695412682} 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: 453085657} m_RootOrder: 2 @@ -4347,21 +4694,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 695412682} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 14 @@ -4380,14 +4728,16 @@ MonoBehaviour: CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 695412682} m_CullTransparentMesh: 0 --- !u!1 &696240452 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 696240453} @@ -4403,11 +4753,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 696240452} 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: 1676764246} - {fileID: 1311706834} @@ -4424,15 +4776,17 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 696240452} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 2109663825, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Script: {fileID: 11500000, guid: 9085046f02f69544eb97fd06b6048fe2, type: 3} m_Name: m_EditorClassIdentifier: m_Navigation: m_Mode: 3 + m_WrapAround: 0 m_SelectOnUp: {fileID: 0} m_SelectOnDown: {fileID: 0} m_SelectOnLeft: {fileID: 0} @@ -4442,17 +4796,20 @@ MonoBehaviour: 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: 1676764247} @@ -4462,14 +4819,13 @@ MonoBehaviour: onValueChanged: m_PersistentCalls: m_Calls: [] - m_TypeName: UnityEngine.UI.Toggle+ToggleEvent, UnityEngine.UI, Version=1.0.0.0, - Culture=neutral, PublicKeyToken=null m_IsOn: 1 --- !u!1 &709547418 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 709547419} @@ -4486,11 +4842,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 709547418} 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: 28674242} m_RootOrder: 0 @@ -4504,21 +4862,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 709547418} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} m_Type: 1 m_PreserveAspect: 0 @@ -4527,18 +4886,22 @@ MonoBehaviour: m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 --- !u!222 &709547421 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 709547418} m_CullTransparentMesh: 0 --- !u!1 &709729718 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 709729719} @@ -4555,11 +4918,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 709729718} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 0.999999, y: 0.999999, z: 0.999999} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 148170507} m_RootOrder: 5 @@ -4573,21 +4938,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 709729718} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 14 @@ -4606,14 +4972,16 @@ MonoBehaviour: CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 709729718} m_CullTransparentMesh: 0 --- !u!1 &715688973 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 715688974} @@ -4630,11 +4998,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 715688973} 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: 148170507} m_RootOrder: 0 @@ -4648,21 +5018,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 715688973} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 14 @@ -4681,14 +5052,16 @@ MonoBehaviour: CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 715688973} m_CullTransparentMesh: 0 --- !u!1 &729587717 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 729587718} @@ -4703,11 +5076,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 729587717} 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: 453085657} m_Father: {fileID: 679159956} @@ -4722,7 +5097,8 @@ RectTransform: GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 745468077} @@ -4740,11 +5116,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 745468076} 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: 604025648} m_Father: {fileID: 514997953} @@ -4759,15 +5137,17 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 745468076} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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} @@ -4777,44 +5157,46 @@ MonoBehaviour: 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: 745468079} m_OnClick: m_PersistentCalls: m_Calls: [] - m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, - Culture=neutral, PublicKeyToken=null --- !u!114 &745468079 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 745468076} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} m_Type: 1 m_PreserveAspect: 0 @@ -4823,18 +5205,22 @@ MonoBehaviour: m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 --- !u!222 &745468080 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 745468076} m_CullTransparentMesh: 0 --- !u!1 &753852440 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 753852441} @@ -4851,11 +5237,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 753852440} 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: 1099340621} m_RootOrder: 0 @@ -4869,21 +5257,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 753852440} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 14 @@ -4902,14 +5291,16 @@ MonoBehaviour: CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 753852440} m_CullTransparentMesh: 0 --- !u!1 &756968993 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 756968994} @@ -4926,11 +5317,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 756968993} 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: 1602116060} m_RootOrder: 0 @@ -4944,21 +5337,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 756968993} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 14 @@ -4977,14 +5371,16 @@ MonoBehaviour: CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 756968993} m_CullTransparentMesh: 0 --- !u!1 &777081573 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 777081574} @@ -5001,11 +5397,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 777081573} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1.0000001, y: 1.0000001, z: 1.0000001} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 2067684049} m_Father: {fileID: 357773227} @@ -5020,21 +5418,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 777081573} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Sprite: {fileID: 10911, guid: 0000000000000000f000000000000000, type: 0} m_Type: 1 m_PreserveAspect: 0 @@ -5043,18 +5442,22 @@ MonoBehaviour: m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 --- !u!222 &777081576 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 777081573} m_CullTransparentMesh: 0 --- !u!1 &802075595 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 802075596} @@ -5072,11 +5475,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 802075595} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 0.999999, y: 0.999999, z: 0.999999} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 1732014182} - {fileID: 1086359496} @@ -5097,14 +5502,15 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 802075595} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 8f2d13799763db34d85a608089368842, type: 3} m_Name: m_EditorClassIdentifier: - _manager: {fileID: 0} + _manager: {fileID: 469201798} StartButton: {fileID: 2127601753} ShowResultButton: {fileID: 7557749} EndButton: {fileID: 1351240001} @@ -5118,21 +5524,22 @@ MonoBehaviour: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 802075595} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Sprite: {fileID: 10911, guid: 0000000000000000f000000000000000, type: 0} m_Type: 1 m_PreserveAspect: 0 @@ -5141,18 +5548,22 @@ MonoBehaviour: m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 --- !u!222 &802075599 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 802075595} m_CullTransparentMesh: 0 --- !u!1 &813744962 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 813744963} @@ -5170,11 +5581,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 813744962} 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: 423913667} m_Father: {fileID: 1773953146} @@ -5189,15 +5602,17 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 813744962} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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} @@ -5207,44 +5622,46 @@ MonoBehaviour: 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: 813744965} m_OnClick: m_PersistentCalls: m_Calls: [] - m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, - Culture=neutral, PublicKeyToken=null --- !u!114 &813744965 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 813744962} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} m_Type: 1 m_PreserveAspect: 0 @@ -5253,18 +5670,22 @@ MonoBehaviour: m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 --- !u!222 &813744966 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 813744962} m_CullTransparentMesh: 0 --- !u!1 &827257450 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 827257451} @@ -5282,11 +5703,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 827257450} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1.0000001, y: 1.0000001, z: 1.0000001} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 1495845465} - {fileID: 2051233643} @@ -5302,15 +5725,17 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 827257450} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 575553740, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Script: {fileID: 11500000, guid: d199490a83bb2b844b9695cbf13b01ef, 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} @@ -5320,17 +5745,20 @@ MonoBehaviour: 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: 827257453} @@ -5344,16 +5772,15 @@ MonoBehaviour: m_HideMobileInput: 0 m_CharacterValidation: 0 m_CharacterLimit: 0 - m_OnEndEdit: + m_OnSubmit: + m_PersistentCalls: + m_Calls: [] + m_OnDidEndEdit: m_PersistentCalls: m_Calls: [] - m_TypeName: UnityEngine.UI.InputField+SubmitEvent, UnityEngine.UI, Version=1.0.0.0, - Culture=neutral, PublicKeyToken=null m_OnValueChanged: m_PersistentCalls: m_Calls: [] - m_TypeName: UnityEngine.UI.InputField+OnChangeEvent, UnityEngine.UI, Version=1.0.0.0, - Culture=neutral, PublicKeyToken=null m_CaretColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} m_CustomCaretColor: 0 m_SelectionColor: {r: 0.65882355, g: 0.80784315, b: 1, a: 0.7529412} @@ -5361,25 +5788,27 @@ MonoBehaviour: m_CaretBlinkRate: 0.85 m_CaretWidth: 1 m_ReadOnly: 0 + m_ShouldActivateOnSelect: 1 --- !u!114 &827257453 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 827257450} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Sprite: {fileID: 10911, guid: 0000000000000000f000000000000000, type: 0} m_Type: 1 m_PreserveAspect: 0 @@ -5388,18 +5817,22 @@ MonoBehaviour: m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 --- !u!222 &827257454 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 827257450} m_CullTransparentMesh: 0 --- !u!1 &832629802 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 832629803} @@ -5416,11 +5849,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 832629802} 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: 1728613560} m_RootOrder: 0 @@ -5434,21 +5869,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 832629802} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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: 0.5} m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 30 @@ -5467,14 +5903,16 @@ MonoBehaviour: CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 832629802} m_CullTransparentMesh: 0 --- !u!1 &842394376 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 842394377} @@ -5491,11 +5929,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 842394376} 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: 696240453} m_RootOrder: 2 @@ -5509,21 +5949,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 842394376} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 14 @@ -5542,14 +5983,16 @@ MonoBehaviour: CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 842394376} m_CullTransparentMesh: 0 --- !u!1 &857164995 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 857164996} @@ -5566,11 +6009,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 857164995} 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: 885138532} m_RootOrder: 2 @@ -5584,21 +6029,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 857164995} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 12 @@ -5617,14 +6063,16 @@ MonoBehaviour: CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 857164995} m_CullTransparentMesh: 0 --- !u!1 &861266157 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 861266158} @@ -5640,11 +6088,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 861266157} 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: 292540601} - {fileID: 572334163} @@ -5660,15 +6110,17 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 861266157} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 2109663825, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Script: {fileID: 11500000, guid: 9085046f02f69544eb97fd06b6048fe2, type: 3} m_Name: m_EditorClassIdentifier: m_Navigation: m_Mode: 3 + m_WrapAround: 0 m_SelectOnUp: {fileID: 0} m_SelectOnDown: {fileID: 0} m_SelectOnLeft: {fileID: 0} @@ -5678,17 +6130,20 @@ MonoBehaviour: 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: 292540602} @@ -5698,14 +6153,13 @@ MonoBehaviour: onValueChanged: m_PersistentCalls: m_Calls: [] - m_TypeName: UnityEngine.UI.Toggle+ToggleEvent, UnityEngine.UI, Version=1.0.0.0, - Culture=neutral, PublicKeyToken=null m_IsOn: 0 --- !u!1 &881789640 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 881789641} @@ -5720,11 +6174,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 881789640} 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: 696240453} m_Father: {fileID: 39895823} @@ -5739,7 +6195,8 @@ RectTransform: GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 885138532} @@ -5757,11 +6214,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 885138531} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 0.999999, y: 0.999999, z: 0.999999} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 1027212884} - {fileID: 1431946273} @@ -5778,21 +6237,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 885138531} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Sprite: {fileID: 10911, guid: 0000000000000000f000000000000000, type: 0} m_Type: 1 m_PreserveAspect: 0 @@ -5801,18 +6261,22 @@ MonoBehaviour: m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 --- !u!222 &885138534 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 885138531} m_CullTransparentMesh: 0 --- !u!114 &885138535 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 885138531} m_Enabled: 1 m_EditorHideFlags: 0 @@ -5826,7 +6290,8 @@ MonoBehaviour: GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 888952471} @@ -5844,11 +6309,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 888952470} 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: 1104772070} m_Father: {fileID: 1099340621} @@ -5863,15 +6330,17 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 888952470} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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} @@ -5881,44 +6350,46 @@ MonoBehaviour: 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: 888952473} m_OnClick: m_PersistentCalls: m_Calls: [] - m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, - Culture=neutral, PublicKeyToken=null --- !u!114 &888952473 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 888952470} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} m_Type: 1 m_PreserveAspect: 0 @@ -5927,18 +6398,22 @@ MonoBehaviour: m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 --- !u!222 &888952474 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 888952470} m_CullTransparentMesh: 0 --- !u!1 &900325378 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 900325379} @@ -5955,11 +6430,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 900325378} 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: 1407383748} m_RootOrder: 0 @@ -5973,21 +6450,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 900325378} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 14 @@ -6006,14 +6484,16 @@ MonoBehaviour: CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 900325378} m_CullTransparentMesh: 0 --- !u!1 &901643032 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 901643033} @@ -6031,11 +6511,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 901643032} 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: 1513622264} m_Father: {fileID: 529322736} @@ -6050,15 +6532,17 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 901643032} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: -2061169968, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Script: {fileID: 11500000, guid: 2a4db7a114972834c8e4117be1d82ba3, type: 3} m_Name: m_EditorClassIdentifier: m_Navigation: m_Mode: 3 + m_WrapAround: 0 m_SelectOnUp: {fileID: 0} m_SelectOnDown: {fileID: 0} m_SelectOnLeft: {fileID: 0} @@ -6068,17 +6552,20 @@ MonoBehaviour: 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: 2013350247} @@ -6090,27 +6577,26 @@ MonoBehaviour: m_OnValueChanged: m_PersistentCalls: m_Calls: [] - m_TypeName: UnityEngine.UI.Scrollbar+ScrollEvent, UnityEngine.UI, Version=1.0.0.0, - Culture=neutral, PublicKeyToken=null --- !u!114 &901643035 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 901643032} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0} m_Type: 1 m_PreserveAspect: 0 @@ -6119,18 +6605,84 @@ MonoBehaviour: m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 --- !u!222 &901643036 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 901643032} m_CullTransparentMesh: 0 +--- !u!850595691 &901721210 +LightingSettings: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Settings.lighting + serializedVersion: 4 + m_GIWorkflowMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 1 + m_RealtimeEnvironmentLighting: 1 + m_BounceScale: 1 + m_AlbedoBoost: 1 + m_IndirectOutputScale: 1 + m_UsingShadowmask: 1 + m_BakeBackend: 0 + m_LightmapMaxSize: 1024 + m_BakeResolution: 40 + m_Padding: 2 + m_LightmapCompression: 3 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_ExtractAO: 0 + m_MixedBakeMode: 2 + m_LightmapsBakeMode: 1 + m_FilterMode: 1 + m_LightmapParameters: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} + m_ExportTrainingData: 0 + m_TrainingDataDestination: TrainingData + m_RealtimeResolution: 2 + m_ForceWhiteAlbedo: 0 + m_ForceUpdates: 0 + m_FinalGather: 0 + m_FinalGatherRayCount: 256 + m_FinalGatherFiltering: 1 + m_PVRCulling: 1 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVREnvironmentSampleCount: 500 + m_PVREnvironmentReferencePointCount: 2048 + m_LightProbeSampleCountMultiplier: 4 + m_PVRBounces: 2 + m_PVRMinBounces: 2 + m_PVREnvironmentMIS: 0 + m_PVRFilteringMode: 2 + m_PVRDenoiserTypeDirect: 0 + m_PVRDenoiserTypeIndirect: 0 + m_PVRDenoiserTypeAO: 0 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_PVRTiledBaking: 0 --- !u!1 &933803495 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 933803496} @@ -6148,11 +6700,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 933803495} 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: 1181102601} - {fileID: 139773840} @@ -6169,15 +6723,17 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 933803495} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 853051423, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Script: {fileID: 11500000, guid: 0d0b652f32a2cc243917e4028fa0f046, 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} @@ -6187,17 +6743,20 @@ MonoBehaviour: 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: 933803498} @@ -6232,27 +6791,27 @@ MonoBehaviour: m_OnValueChanged: m_PersistentCalls: m_Calls: [] - m_TypeName: UnityEngine.UI.Dropdown+DropdownEvent, UnityEngine.UI, Version=1.0.0.0, - Culture=neutral, PublicKeyToken=null + m_AlphaFadeSpeed: 0.15 --- !u!114 &933803498 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 933803495} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} m_Type: 1 m_PreserveAspect: 0 @@ -6261,18 +6820,22 @@ MonoBehaviour: m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 --- !u!222 &933803499 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 933803495} m_CullTransparentMesh: 0 --- !u!1 &948271706 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 948271707} @@ -6290,11 +6853,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 948271706} 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: 255764547} m_Father: {fileID: 148170507} @@ -6309,15 +6874,17 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 948271706} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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} @@ -6327,44 +6894,46 @@ MonoBehaviour: 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: 948271709} m_OnClick: m_PersistentCalls: m_Calls: [] - m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, - Culture=neutral, PublicKeyToken=null --- !u!114 &948271709 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 948271706} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} m_Type: 1 m_PreserveAspect: 0 @@ -6373,18 +6942,22 @@ MonoBehaviour: m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 --- !u!222 &948271710 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 948271706} m_CullTransparentMesh: 0 --- !u!1 &970936924 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 970936925} @@ -6402,11 +6975,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 970936924} 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: 1676673907} m_Father: {fileID: 610860377} @@ -6421,15 +6996,17 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 970936924} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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} @@ -6439,44 +7016,46 @@ MonoBehaviour: 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: 970936927} m_OnClick: m_PersistentCalls: m_Calls: [] - m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, - Culture=neutral, PublicKeyToken=null --- !u!114 &970936927 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 970936924} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} m_Type: 1 m_PreserveAspect: 0 @@ -6485,18 +7064,22 @@ MonoBehaviour: m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 --- !u!222 &970936928 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 970936924} m_CullTransparentMesh: 0 --- !u!1 &971798208 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 971798209} @@ -6514,11 +7097,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 971798208} 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: 1139456584} - {fileID: 1264394339} @@ -6534,15 +7119,17 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 971798208} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 575553740, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Script: {fileID: 11500000, guid: d199490a83bb2b844b9695cbf13b01ef, 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} @@ -6552,17 +7139,20 @@ MonoBehaviour: 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: 971798211} @@ -6576,16 +7166,15 @@ MonoBehaviour: m_HideMobileInput: 0 m_CharacterValidation: 0 m_CharacterLimit: 0 - m_OnEndEdit: + m_OnSubmit: + m_PersistentCalls: + m_Calls: [] + m_OnDidEndEdit: m_PersistentCalls: m_Calls: [] - m_TypeName: UnityEngine.UI.InputField+SubmitEvent, UnityEngine.UI, Version=1.0.0.0, - Culture=neutral, PublicKeyToken=null m_OnValueChanged: m_PersistentCalls: m_Calls: [] - m_TypeName: UnityEngine.UI.InputField+OnChangeEvent, UnityEngine.UI, Version=1.0.0.0, - Culture=neutral, PublicKeyToken=null m_CaretColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} m_CustomCaretColor: 0 m_SelectionColor: {r: 0.65882355, g: 0.80784315, b: 1, a: 0.7529412} @@ -6593,25 +7182,27 @@ MonoBehaviour: m_CaretBlinkRate: 0.85 m_CaretWidth: 1 m_ReadOnly: 0 + m_ShouldActivateOnSelect: 1 --- !u!114 &971798211 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 971798208} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Sprite: {fileID: 10911, guid: 0000000000000000f000000000000000, type: 0} m_Type: 1 m_PreserveAspect: 0 @@ -6620,18 +7211,22 @@ MonoBehaviour: m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 --- !u!222 &971798212 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 971798208} m_CullTransparentMesh: 0 --- !u!1 &1007261523 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1007261524} @@ -6649,11 +7244,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1007261523} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 0.99999547, y: 0.99999547, z: 0.99999547} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 264003822} m_Father: {fileID: 1661872749} @@ -6668,15 +7265,17 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1007261523} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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} @@ -6686,44 +7285,46 @@ MonoBehaviour: 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: 1007261526} m_OnClick: m_PersistentCalls: m_Calls: [] - m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, - Culture=neutral, PublicKeyToken=null --- !u!114 &1007261526 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1007261523} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} m_Type: 1 m_PreserveAspect: 0 @@ -6732,18 +7333,22 @@ MonoBehaviour: m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 --- !u!222 &1007261527 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1007261523} m_CullTransparentMesh: 0 --- !u!1 &1027149101 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1027149102} @@ -6760,11 +7365,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1027149101} 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: 1968196753} m_RootOrder: 1 @@ -6778,21 +7385,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1027149101} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Sprite: {fileID: 10915, guid: 0000000000000000f000000000000000, type: 0} m_Type: 0 m_PreserveAspect: 0 @@ -6801,18 +7409,22 @@ MonoBehaviour: m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 --- !u!222 &1027149104 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1027149101} m_CullTransparentMesh: 0 --- !u!1 &1027212883 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1027212884} @@ -6829,11 +7441,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1027212883} 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: 885138532} m_RootOrder: 0 @@ -6847,21 +7461,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1027212883} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 14 @@ -6880,14 +7495,16 @@ MonoBehaviour: CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1027212883} m_CullTransparentMesh: 0 --- !u!1 &1058637406 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1058637407} @@ -6904,11 +7521,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1058637406} 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: 1230515443} m_RootOrder: 0 @@ -6922,21 +7541,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1058637406} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 14 @@ -6955,14 +7575,16 @@ MonoBehaviour: CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1058637406} m_CullTransparentMesh: 0 --- !u!1 &1063840802 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1063840803} @@ -6979,11 +7601,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1063840802} 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: 1728613560} m_RootOrder: 1 @@ -6997,21 +7621,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1063840802} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 30 @@ -7030,14 +7655,16 @@ MonoBehaviour: CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1063840802} m_CullTransparentMesh: 0 --- !u!1 &1083342409 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1083342410} @@ -7054,11 +7681,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1083342409} 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: 1773953146} m_RootOrder: 0 @@ -7072,21 +7701,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1083342409} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 14 @@ -7105,14 +7735,16 @@ MonoBehaviour: CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1083342409} m_CullTransparentMesh: 0 --- !u!1 &1086359495 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1086359496} @@ -7130,11 +7762,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1086359495} 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: 2053101023} - {fileID: 1947698605} @@ -7150,15 +7784,17 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1086359495} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 575553740, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Script: {fileID: 11500000, guid: d199490a83bb2b844b9695cbf13b01ef, 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} @@ -7168,17 +7804,20 @@ MonoBehaviour: 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: 1086359498} @@ -7192,16 +7831,15 @@ MonoBehaviour: m_HideMobileInput: 0 m_CharacterValidation: 0 m_CharacterLimit: 0 - m_OnEndEdit: + m_OnSubmit: + m_PersistentCalls: + m_Calls: [] + m_OnDidEndEdit: m_PersistentCalls: m_Calls: [] - m_TypeName: UnityEngine.UI.InputField+SubmitEvent, UnityEngine.UI, Version=1.0.0.0, - Culture=neutral, PublicKeyToken=null m_OnValueChanged: m_PersistentCalls: m_Calls: [] - m_TypeName: UnityEngine.UI.InputField+OnChangeEvent, UnityEngine.UI, Version=1.0.0.0, - Culture=neutral, PublicKeyToken=null m_CaretColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} m_CustomCaretColor: 0 m_SelectionColor: {r: 0.65882355, g: 0.80784315, b: 1, a: 0.7529412} @@ -7209,25 +7847,27 @@ MonoBehaviour: m_CaretBlinkRate: 0.85 m_CaretWidth: 1 m_ReadOnly: 0 + m_ShouldActivateOnSelect: 1 --- !u!114 &1086359498 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1086359495} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Sprite: {fileID: 10911, guid: 0000000000000000f000000000000000, type: 0} m_Type: 1 m_PreserveAspect: 0 @@ -7236,18 +7876,22 @@ MonoBehaviour: m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 --- !u!222 &1086359499 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1086359495} m_CullTransparentMesh: 0 --- !u!1 &1099340620 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1099340621} @@ -7260,16 +7904,18 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!224 &1099340621 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1099340620} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 0.999999, y: 0.999999, z: 0.999999} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 753852441} - {fileID: 1645528591} @@ -7288,37 +7934,34 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1099340620} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 23bb9aea8ca30bc499a7633672254236, type: 3} m_Name: m_EditorClassIdentifier: - _manager: {fileID: 469201798} - _nameInputField: {fileID: 1547853532} - _bodyInputField: {fileID: 1645528592} - _colorDropdown: {fileID: 1968196754} - _sendButton: {fileID: 888952472} --- !u!114 &1099340623 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1099340620} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Sprite: {fileID: 10911, guid: 0000000000000000f000000000000000, type: 0} m_Type: 1 m_PreserveAspect: 0 @@ -7327,18 +7970,22 @@ MonoBehaviour: m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 --- !u!222 &1099340624 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1099340620} m_CullTransparentMesh: 0 --- !u!1 &1103028172 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1103028173} @@ -7355,11 +8002,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1103028172} 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: 453085657} m_RootOrder: 0 @@ -7373,21 +8022,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1103028172} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} m_Color: {r: 0.9607843, g: 0.9607843, b: 0.9607843, 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Sprite: {fileID: 0} m_Type: 0 m_PreserveAspect: 0 @@ -7396,18 +8046,22 @@ MonoBehaviour: m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 --- !u!222 &1103028175 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1103028172} m_CullTransparentMesh: 0 --- !u!1 &1104772069 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1104772070} @@ -7424,11 +8078,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1104772069} 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: 888952471} m_RootOrder: 0 @@ -7442,21 +8098,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1104772069} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 14 @@ -7475,14 +8132,16 @@ MonoBehaviour: CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1104772069} m_CullTransparentMesh: 0 --- !u!1 &1139456583 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1139456584} @@ -7499,11 +8158,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1139456583} 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: 971798209} m_RootOrder: 0 @@ -7517,21 +8178,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1139456583} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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: 0.5} m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 14 @@ -7550,14 +8212,16 @@ MonoBehaviour: CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1139456583} m_CullTransparentMesh: 0 --- !u!1 &1148302348 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1148302349} @@ -7574,11 +8238,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1148302348} 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: 1645528591} m_RootOrder: 0 @@ -7592,21 +8258,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1148302348} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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: 0.5} m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 14 @@ -7625,14 +8292,16 @@ MonoBehaviour: CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1148302348} m_CullTransparentMesh: 0 --- !u!1 &1171728679 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1171728680} @@ -7649,11 +8318,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1171728679} 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: 1351240000} m_RootOrder: 0 @@ -7667,21 +8338,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1171728679} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 14 @@ -7700,14 +8372,16 @@ MonoBehaviour: CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1171728679} m_CullTransparentMesh: 0 --- !u!1 &1181102600 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1181102601} @@ -7724,11 +8398,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1181102600} 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: 933803496} m_RootOrder: 0 @@ -7742,21 +8418,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1181102600} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 14 @@ -7775,14 +8452,16 @@ MonoBehaviour: CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1181102600} m_CullTransparentMesh: 0 --- !u!1 &1230515442 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1230515443} @@ -7800,11 +8479,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1230515442} 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: 1058637407} m_Father: {fileID: 148170507} @@ -7819,15 +8500,17 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1230515442} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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} @@ -7837,44 +8520,46 @@ MonoBehaviour: 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: 1230515445} m_OnClick: m_PersistentCalls: m_Calls: [] - m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, - Culture=neutral, PublicKeyToken=null --- !u!114 &1230515445 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1230515442} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} m_Type: 1 m_PreserveAspect: 0 @@ -7883,18 +8568,22 @@ MonoBehaviour: m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 --- !u!222 &1230515446 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1230515442} m_CullTransparentMesh: 0 --- !u!1 &1264394338 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1264394339} @@ -7911,11 +8600,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1264394338} 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: 971798209} m_RootOrder: 1 @@ -7929,21 +8620,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1264394338} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 14 @@ -7962,14 +8654,16 @@ MonoBehaviour: CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1264394338} m_CullTransparentMesh: 0 --- !u!1 &1297529472 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1297529473} @@ -7987,11 +8681,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1297529472} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 0.999999, y: 0.999999, z: 0.999999} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 58352544} - {fileID: 357773227} @@ -8007,7 +8703,8 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1297529472} m_Enabled: 1 m_EditorHideFlags: 0 @@ -8020,21 +8717,22 @@ MonoBehaviour: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1297529472} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Sprite: {fileID: 10911, guid: 0000000000000000f000000000000000, type: 0} m_Type: 1 m_PreserveAspect: 0 @@ -8043,18 +8741,22 @@ MonoBehaviour: m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 --- !u!222 &1297529476 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1297529472} m_CullTransparentMesh: 0 --- !u!1 &1311706833 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1311706834} @@ -8071,11 +8773,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1311706833} 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: 696240453} m_RootOrder: 1 @@ -8089,21 +8793,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1311706833} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Sprite: {fileID: 10901, guid: 0000000000000000f000000000000000, type: 0} m_Type: 0 m_PreserveAspect: 0 @@ -8112,18 +8817,22 @@ MonoBehaviour: m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 --- !u!222 &1311706836 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1311706833} m_CullTransparentMesh: 0 --- !u!1 &1313477207 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1313477208} @@ -8140,11 +8849,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1313477207} 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: 1619840175} m_RootOrder: 0 @@ -8158,21 +8869,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1313477207} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 14 @@ -8191,14 +8903,16 @@ MonoBehaviour: CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1313477207} m_CullTransparentMesh: 0 --- !u!1 &1351239999 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1351240000} @@ -8216,11 +8930,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1351239999} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1.0000001, y: 1.0000001, z: 1.0000001} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 1171728680} m_Father: {fileID: 802075596} @@ -8235,15 +8951,17 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1351239999} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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} @@ -8253,44 +8971,46 @@ MonoBehaviour: 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: 1351240002} m_OnClick: m_PersistentCalls: m_Calls: [] - m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, - Culture=neutral, PublicKeyToken=null --- !u!114 &1351240002 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1351239999} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} m_Type: 1 m_PreserveAspect: 0 @@ -8299,18 +9019,22 @@ MonoBehaviour: m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 --- !u!222 &1351240003 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1351239999} m_CullTransparentMesh: 0 --- !u!1 &1354017174 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1354017175} @@ -8327,11 +9051,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1354017174} 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: 675632735} m_RootOrder: 0 @@ -8345,21 +9071,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1354017174} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 41 @@ -8378,14 +9105,16 @@ MonoBehaviour: CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1354017174} m_CullTransparentMesh: 0 --- !u!1 &1372320180 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1372320181} @@ -8403,11 +9132,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1372320180} 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: 1895017807} - {fileID: 14355601} @@ -8423,15 +9154,17 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1372320180} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 575553740, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Script: {fileID: 11500000, guid: d199490a83bb2b844b9695cbf13b01ef, 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} @@ -8441,17 +9174,20 @@ MonoBehaviour: 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: 1372320183} @@ -8465,16 +9201,15 @@ MonoBehaviour: m_HideMobileInput: 0 m_CharacterValidation: 0 m_CharacterLimit: 0 - m_OnEndEdit: + m_OnSubmit: + m_PersistentCalls: + m_Calls: [] + m_OnDidEndEdit: m_PersistentCalls: m_Calls: [] - m_TypeName: UnityEngine.UI.InputField+SubmitEvent, UnityEngine.UI, Version=1.0.0.0, - Culture=neutral, PublicKeyToken=null m_OnValueChanged: m_PersistentCalls: m_Calls: [] - m_TypeName: UnityEngine.UI.InputField+OnChangeEvent, UnityEngine.UI, Version=1.0.0.0, - Culture=neutral, PublicKeyToken=null m_CaretColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} m_CustomCaretColor: 0 m_SelectionColor: {r: 0.65882355, g: 0.80784315, b: 1, a: 0.7529412} @@ -8482,25 +9217,27 @@ MonoBehaviour: m_CaretBlinkRate: 0.85 m_CaretWidth: 1 m_ReadOnly: 0 + m_ShouldActivateOnSelect: 1 --- !u!114 &1372320183 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1372320180} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Sprite: {fileID: 10911, guid: 0000000000000000f000000000000000, type: 0} m_Type: 1 m_PreserveAspect: 0 @@ -8509,18 +9246,22 @@ MonoBehaviour: m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 --- !u!222 &1372320184 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1372320180} m_CullTransparentMesh: 0 --- !u!1 &1377608434 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1377608435} @@ -8535,11 +9276,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1377608434} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 0.999999, y: 0.999999, z: 0.999999} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 184258738} - {fileID: 1372320181} @@ -8555,7 +9298,8 @@ RectTransform: GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1407383748} @@ -8573,11 +9317,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1407383747} 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: 900325379} m_Father: {fileID: 1788976541} @@ -8592,15 +9338,17 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1407383747} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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} @@ -8610,44 +9358,46 @@ MonoBehaviour: 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: 1407383750} m_OnClick: m_PersistentCalls: m_Calls: [] - m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, - Culture=neutral, PublicKeyToken=null --- !u!114 &1407383750 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1407383747} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} m_Type: 1 m_PreserveAspect: 0 @@ -8656,18 +9406,22 @@ MonoBehaviour: m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 --- !u!222 &1407383751 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1407383747} m_CullTransparentMesh: 0 --- !u!1 &1419317687 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1419317688} @@ -8684,11 +9438,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1419317687} 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: 499359669} m_RootOrder: 0 @@ -8702,21 +9458,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1419317687} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 14 @@ -8735,14 +9492,16 @@ MonoBehaviour: CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1419317687} m_CullTransparentMesh: 0 --- !u!1 &1429499798 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1429499799} @@ -8759,11 +9518,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1429499798} 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: 1661872749} m_RootOrder: 0 @@ -8777,21 +9538,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1429499798} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 14 @@ -8810,14 +9572,16 @@ MonoBehaviour: CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1429499798} m_CullTransparentMesh: 0 --- !u!1 &1431946272 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1431946273} @@ -8835,11 +9599,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1431946272} 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: 1756073022} m_Father: {fileID: 885138532} @@ -8854,15 +9620,17 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1431946272} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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} @@ -8872,44 +9640,46 @@ MonoBehaviour: 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: 1431946275} m_OnClick: m_PersistentCalls: m_Calls: [] - m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, - Culture=neutral, PublicKeyToken=null --- !u!114 &1431946275 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1431946272} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} m_Type: 1 m_PreserveAspect: 0 @@ -8918,18 +9688,22 @@ MonoBehaviour: m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 --- !u!222 &1431946276 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1431946272} m_CullTransparentMesh: 0 --- !u!1 &1434664405 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1434664409} @@ -8947,27 +9721,32 @@ GameObject: AudioListener: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1434664405} m_Enabled: 1 --- !u!124 &1434664407 Behaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1434664405} m_Enabled: 1 --- !u!20 &1434664408 Camera: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1434664405} m_Enabled: 1 serializedVersion: 2 m_ClearFlags: 2 m_BackGroundColor: {r: 0.42647058, g: 0.42647058, b: 0.42647058, 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 @@ -9001,11 +9780,13 @@ Camera: Transform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1434664405} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 1, z: -10} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} m_RootOrder: 0 @@ -9014,7 +9795,8 @@ Transform: GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1444940924} @@ -9031,11 +9813,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1444940923} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1.0000001, y: 1.0000001, z: 1.0000001} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 1916972717} m_Father: {fileID: 357773227} @@ -9050,21 +9834,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1444940923} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Sprite: {fileID: 10911, guid: 0000000000000000f000000000000000, type: 0} m_Type: 1 m_PreserveAspect: 0 @@ -9073,18 +9858,22 @@ MonoBehaviour: m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 --- !u!222 &1444940926 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1444940923} m_CullTransparentMesh: 0 --- !u!1 &1447952805 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1447952806} @@ -9101,11 +9890,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1447952805} 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: 1547853531} m_RootOrder: 0 @@ -9119,21 +9910,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1447952805} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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: 0.5} m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 14 @@ -9152,14 +9944,16 @@ MonoBehaviour: CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1447952805} m_CullTransparentMesh: 0 --- !u!1 &1462386917 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1462386918} @@ -9176,11 +9970,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1462386917} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1.0000001, y: 1.0000001, z: 1.0000001} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 225160230} m_Father: {fileID: 357773227} @@ -9195,21 +9991,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1462386917} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Sprite: {fileID: 10911, guid: 0000000000000000f000000000000000, type: 0} m_Type: 1 m_PreserveAspect: 0 @@ -9218,18 +10015,22 @@ MonoBehaviour: m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 --- !u!222 &1462386920 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1462386917} m_CullTransparentMesh: 0 --- !u!1 &1465874625 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1465874629} @@ -9247,11 +10048,12 @@ GameObject: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1465874625} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 1301386320, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3} m_Name: m_EditorClassIdentifier: m_IgnoreReversedGraphics: 1 @@ -9263,11 +10065,12 @@ MonoBehaviour: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1465874625} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 1980459831, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} m_Name: m_EditorClassIdentifier: m_UiScaleMode: 1 @@ -9280,11 +10083,13 @@ MonoBehaviour: m_FallbackScreenDPI: 96 m_DefaultSpriteDPI: 96 m_DynamicPixelsPerUnit: 1 + m_PresetInfoIsWorld: 0 --- !u!223 &1465874628 Canvas: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1465874625} m_Enabled: 1 serializedVersion: 3 @@ -9304,11 +10109,13 @@ Canvas: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1465874625} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 0, y: 0, z: 0} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 514997953} - {fileID: 519724246} @@ -9324,7 +10131,8 @@ RectTransform: GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1486162349} @@ -9341,11 +10149,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1486162348} 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: 514997953} m_RootOrder: 3 @@ -9359,21 +10169,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1486162348} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} m_Color: {r: 1, 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 28 @@ -9394,14 +10205,16 @@ MonoBehaviour: CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1486162348} m_CullTransparentMesh: 0 --- !u!1 &1495845464 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1495845465} @@ -9418,11 +10231,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1495845464} 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: 827257451} m_RootOrder: 0 @@ -9436,21 +10251,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1495845464} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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: 0.5} m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 14 @@ -9469,14 +10285,16 @@ MonoBehaviour: CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1495845464} m_CullTransparentMesh: 0 --- !u!1 &1513622263 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1513622264} @@ -9491,11 +10309,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1513622263} 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: 2013350246} m_Father: {fileID: 901643033} @@ -9510,7 +10330,8 @@ RectTransform: GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1531648481} @@ -9527,11 +10348,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1531648480} 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: 453085657} m_RootOrder: 1 @@ -9545,21 +10368,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1531648480} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Sprite: {fileID: 10901, guid: 0000000000000000f000000000000000, type: 0} m_Type: 0 m_PreserveAspect: 0 @@ -9568,18 +10392,22 @@ MonoBehaviour: m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 --- !u!222 &1531648483 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1531648480} m_CullTransparentMesh: 0 --- !u!1 &1547853530 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1547853531} @@ -9597,11 +10425,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1547853530} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1.0000001, y: 1.0000001, z: 1.0000001} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 1447952806} - {fileID: 562949577} @@ -9617,15 +10447,17 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1547853530} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 575553740, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Script: {fileID: 11500000, guid: d199490a83bb2b844b9695cbf13b01ef, 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} @@ -9635,17 +10467,20 @@ MonoBehaviour: 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: 1547853533} @@ -9659,16 +10494,15 @@ MonoBehaviour: m_HideMobileInput: 0 m_CharacterValidation: 0 m_CharacterLimit: 0 - m_OnEndEdit: + m_OnSubmit: + m_PersistentCalls: + m_Calls: [] + m_OnDidEndEdit: m_PersistentCalls: m_Calls: [] - m_TypeName: UnityEngine.UI.InputField+SubmitEvent, UnityEngine.UI, Version=1.0.0.0, - Culture=neutral, PublicKeyToken=null m_OnValueChanged: m_PersistentCalls: m_Calls: [] - m_TypeName: UnityEngine.UI.InputField+OnChangeEvent, UnityEngine.UI, Version=1.0.0.0, - Culture=neutral, PublicKeyToken=null m_CaretColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} m_CustomCaretColor: 0 m_SelectionColor: {r: 0.65882355, g: 0.80784315, b: 1, a: 0.7529412} @@ -9676,25 +10510,27 @@ MonoBehaviour: m_CaretBlinkRate: 0.85 m_CaretWidth: 1 m_ReadOnly: 0 + m_ShouldActivateOnSelect: 1 --- !u!114 &1547853533 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1547853530} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Sprite: {fileID: 10911, guid: 0000000000000000f000000000000000, type: 0} m_Type: 1 m_PreserveAspect: 0 @@ -9703,18 +10539,22 @@ MonoBehaviour: m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 --- !u!222 &1547853534 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1547853530} m_CullTransparentMesh: 0 --- !u!1 &1577010318 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1577010319} @@ -9730,11 +10570,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1577010318} 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: 459548715} - {fileID: 827257451} @@ -9751,11 +10593,12 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1577010318} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 1297475563, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3} m_Name: m_EditorClassIdentifier: m_Padding: @@ -9769,11 +10612,15 @@ MonoBehaviour: m_ChildForceExpandHeight: 1 m_ChildControlWidth: 1 m_ChildControlHeight: 1 + m_ChildScaleWidth: 0 + m_ChildScaleHeight: 0 + m_ReverseArrangement: 0 --- !u!1 &1602116059 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1602116060} @@ -9791,11 +10638,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1602116059} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 0.999999, y: 0.999999, z: 0.999999} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 756968994} - {fileID: 591267481} @@ -9816,21 +10665,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1602116059} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Sprite: {fileID: 10911, guid: 0000000000000000f000000000000000, type: 0} m_Type: 1 m_PreserveAspect: 0 @@ -9839,18 +10689,22 @@ MonoBehaviour: m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 --- !u!222 &1602116062 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1602116059} m_CullTransparentMesh: 0 --- !u!114 &1602116063 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1602116059} m_Enabled: 1 m_EditorHideFlags: 0 @@ -9868,7 +10722,8 @@ MonoBehaviour: GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1619840175} @@ -9886,11 +10741,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1619840174} 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: 1313477208} m_Father: {fileID: 1602116060} @@ -9905,15 +10762,17 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1619840174} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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} @@ -9923,44 +10782,46 @@ MonoBehaviour: 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: 1619840177} m_OnClick: m_PersistentCalls: m_Calls: [] - m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, - Culture=neutral, PublicKeyToken=null --- !u!114 &1619840177 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1619840174} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} m_Type: 1 m_PreserveAspect: 0 @@ -9969,18 +10830,22 @@ MonoBehaviour: m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 --- !u!222 &1619840178 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1619840174} m_CullTransparentMesh: 0 --- !u!1 &1645528590 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1645528591} @@ -9998,11 +10863,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1645528590} 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: 1148302349} - {fileID: 173865763} @@ -10018,15 +10885,17 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1645528590} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 575553740, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Script: {fileID: 11500000, guid: d199490a83bb2b844b9695cbf13b01ef, 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} @@ -10036,17 +10905,20 @@ MonoBehaviour: 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: 1645528593} @@ -10060,16 +10932,15 @@ MonoBehaviour: m_HideMobileInput: 0 m_CharacterValidation: 0 m_CharacterLimit: 0 - m_OnEndEdit: + m_OnSubmit: + m_PersistentCalls: + m_Calls: [] + m_OnDidEndEdit: m_PersistentCalls: m_Calls: [] - m_TypeName: UnityEngine.UI.InputField+SubmitEvent, UnityEngine.UI, Version=1.0.0.0, - Culture=neutral, PublicKeyToken=null m_OnValueChanged: m_PersistentCalls: m_Calls: [] - m_TypeName: UnityEngine.UI.InputField+OnChangeEvent, UnityEngine.UI, Version=1.0.0.0, - Culture=neutral, PublicKeyToken=null m_CaretColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} m_CustomCaretColor: 0 m_SelectionColor: {r: 0.65882355, g: 0.80784315, b: 1, a: 0.7529412} @@ -10077,25 +10948,27 @@ MonoBehaviour: m_CaretBlinkRate: 0.85 m_CaretWidth: 1 m_ReadOnly: 0 + m_ShouldActivateOnSelect: 1 --- !u!114 &1645528593 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1645528590} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Sprite: {fileID: 10911, guid: 0000000000000000f000000000000000, type: 0} m_Type: 1 m_PreserveAspect: 0 @@ -10104,18 +10977,22 @@ MonoBehaviour: m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 --- !u!222 &1645528594 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1645528590} m_CullTransparentMesh: 0 --- !u!1 &1661872748 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1661872749} @@ -10133,11 +11010,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1661872748} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 0.999999, y: 0.999999, z: 0.999999} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 1429499799} - {fileID: 1808163911} @@ -10156,21 +11035,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1661872748} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Sprite: {fileID: 10911, guid: 0000000000000000f000000000000000, type: 0} m_Type: 1 m_PreserveAspect: 0 @@ -10179,18 +11059,22 @@ MonoBehaviour: m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 --- !u!222 &1661872752 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1661872748} m_CullTransparentMesh: 0 --- !u!114 &1661872753 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1661872748} m_Enabled: 1 m_EditorHideFlags: 0 @@ -10206,7 +11090,8 @@ MonoBehaviour: GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1676673907} @@ -10223,11 +11108,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1676673906} 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: 970936925} m_RootOrder: 0 @@ -10241,21 +11128,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1676673906} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 14 @@ -10274,14 +11162,16 @@ MonoBehaviour: CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1676673906} m_CullTransparentMesh: 0 --- !u!1 &1676764245 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1676764246} @@ -10298,11 +11188,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1676764245} 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: 696240453} m_RootOrder: 0 @@ -10316,21 +11208,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1676764245} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} m_Color: {r: 0.9607843, g: 0.9607843, b: 0.9607843, 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Sprite: {fileID: 0} m_Type: 0 m_PreserveAspect: 0 @@ -10339,18 +11232,22 @@ MonoBehaviour: m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 --- !u!222 &1676764248 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1676764245} m_CullTransparentMesh: 0 --- !u!1 &1679403782 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1679403783} @@ -10367,11 +11264,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1679403782} 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: 459548715} m_RootOrder: 1 @@ -10385,21 +11284,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1679403782} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 14 @@ -10418,14 +11318,16 @@ MonoBehaviour: CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1679403782} m_CullTransparentMesh: 0 --- !u!1 &1689567721 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1689567722} @@ -10442,11 +11344,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1689567721} 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: 1788976541} m_RootOrder: 0 @@ -10460,21 +11364,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1689567721} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 14 @@ -10493,14 +11398,16 @@ MonoBehaviour: CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1689567721} m_CullTransparentMesh: 0 --- !u!1 &1710804046 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1710804047} @@ -10517,11 +11424,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1710804046} 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: 2067706381} m_RootOrder: 0 @@ -10535,21 +11444,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1710804046} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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: 0.5} m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 14 @@ -10568,14 +11478,16 @@ MonoBehaviour: CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1710804046} m_CullTransparentMesh: 0 --- !u!1 &1728613559 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1728613560} @@ -10593,11 +11505,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1728613559} 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: 832629803} - {fileID: 1063840803} @@ -10613,15 +11527,17 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1728613559} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 575553740, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Script: {fileID: 11500000, guid: d199490a83bb2b844b9695cbf13b01ef, 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} @@ -10631,17 +11547,20 @@ MonoBehaviour: 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: 1728613562} @@ -10655,16 +11574,15 @@ MonoBehaviour: m_HideMobileInput: 0 m_CharacterValidation: 0 m_CharacterLimit: 0 - m_OnEndEdit: + m_OnSubmit: + m_PersistentCalls: + m_Calls: [] + m_OnDidEndEdit: m_PersistentCalls: m_Calls: [] - m_TypeName: UnityEngine.UI.InputField+SubmitEvent, UnityEngine.UI, Version=1.0.0.0, - Culture=neutral, PublicKeyToken=null m_OnValueChanged: m_PersistentCalls: m_Calls: [] - m_TypeName: UnityEngine.UI.InputField+OnChangeEvent, UnityEngine.UI, Version=1.0.0.0, - Culture=neutral, PublicKeyToken=null m_CaretColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} m_CustomCaretColor: 0 m_SelectionColor: {r: 0.65882355, g: 0.80784315, b: 1, a: 0.7529412} @@ -10672,25 +11590,27 @@ MonoBehaviour: m_CaretBlinkRate: 0.85 m_CaretWidth: 1 m_ReadOnly: 0 + m_ShouldActivateOnSelect: 1 --- !u!114 &1728613562 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1728613559} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Sprite: {fileID: 10911, guid: 0000000000000000f000000000000000, type: 0} m_Type: 1 m_PreserveAspect: 0 @@ -10699,18 +11619,22 @@ MonoBehaviour: m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 --- !u!222 &1728613563 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1728613559} m_CullTransparentMesh: 0 --- !u!1 &1732014181 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1732014182} @@ -10727,11 +11651,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1732014181} 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: 802075596} m_RootOrder: 0 @@ -10745,21 +11671,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1732014181} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 14 @@ -10778,14 +11705,16 @@ MonoBehaviour: CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1732014181} m_CullTransparentMesh: 0 --- !u!1 &1746167128 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1746167129} @@ -10802,11 +11731,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1746167128} 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: 158921564} m_Father: {fileID: 357773227} @@ -10821,21 +11752,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1746167128} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Sprite: {fileID: 10911, guid: 0000000000000000f000000000000000, type: 0} m_Type: 1 m_PreserveAspect: 0 @@ -10844,18 +11776,22 @@ MonoBehaviour: m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 --- !u!222 &1746167131 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1746167128} m_CullTransparentMesh: 0 --- !u!1 &1756073021 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1756073022} @@ -10872,11 +11808,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1756073021} 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: 1431946273} m_RootOrder: 0 @@ -10890,21 +11828,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1756073021} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 14 @@ -10923,14 +11862,16 @@ MonoBehaviour: CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1756073021} m_CullTransparentMesh: 0 --- !u!1 &1762825485 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1762825486} @@ -10947,11 +11888,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1762825485} 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: 313561599} m_RootOrder: 0 @@ -10965,21 +11908,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1762825485} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 14 @@ -10998,14 +11942,16 @@ MonoBehaviour: CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1762825485} m_CullTransparentMesh: 0 --- !u!1 &1763269152 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1763269153} @@ -11022,11 +11968,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1763269152} 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: 32152857} m_RootOrder: 1 @@ -11040,21 +11988,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1763269152} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 14 @@ -11073,14 +12022,16 @@ MonoBehaviour: CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1763269152} m_CullTransparentMesh: 0 --- !u!1 &1773566056 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1773566057} @@ -11098,11 +12049,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1773566056} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1.0000001, y: 1.0000001, z: 1.0000001} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 526135853} m_Father: {fileID: 610860377} @@ -11117,15 +12070,17 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1773566056} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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} @@ -11135,44 +12090,46 @@ MonoBehaviour: 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: 1773566059} m_OnClick: m_PersistentCalls: m_Calls: [] - m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, - Culture=neutral, PublicKeyToken=null --- !u!114 &1773566059 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1773566056} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} m_Type: 1 m_PreserveAspect: 0 @@ -11181,18 +12138,22 @@ MonoBehaviour: m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 --- !u!222 &1773566060 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1773566056} m_CullTransparentMesh: 0 --- !u!1 &1773953145 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1773953146} @@ -11210,11 +12171,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1773953145} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 0.999999, y: 0.999999, z: 0.999999} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 1083342410} - {fileID: 813744963} @@ -11231,7 +12194,8 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1773953145} m_Enabled: 1 m_EditorHideFlags: 0 @@ -11245,21 +12209,22 @@ MonoBehaviour: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1773953145} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Sprite: {fileID: 10911, guid: 0000000000000000f000000000000000, type: 0} m_Type: 1 m_PreserveAspect: 0 @@ -11268,18 +12233,22 @@ MonoBehaviour: m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 --- !u!222 &1773953149 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1773953145} m_CullTransparentMesh: 0 --- !u!1 &1788976540 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1788976541} @@ -11297,11 +12266,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1788976540} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 0.9999936, y: 0.9999936, z: 0.9999936} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 1689567722} - {fileID: 1407383748} @@ -11318,7 +12289,8 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1788976540} m_Enabled: 1 m_EditorHideFlags: 0 @@ -11332,21 +12304,22 @@ MonoBehaviour: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1788976540} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Sprite: {fileID: 10911, guid: 0000000000000000f000000000000000, type: 0} m_Type: 1 m_PreserveAspect: 0 @@ -11355,18 +12328,22 @@ MonoBehaviour: m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 --- !u!222 &1788976544 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1788976540} m_CullTransparentMesh: 0 --- !u!1 &1792793819 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1792793820} @@ -11384,11 +12361,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1792793819} 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: 39895823} - {fileID: 191374747} @@ -11404,11 +12383,12 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1792793819} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 1367256648, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Script: {fileID: 11500000, guid: 1aa08ab6e0800fa44ae55d278d1423e3, type: 3} m_Name: m_EditorClassIdentifier: m_Content: {fileID: 881789641} @@ -11429,27 +12409,26 @@ MonoBehaviour: m_OnValueChanged: m_PersistentCalls: m_Calls: [] - m_TypeName: UnityEngine.UI.ScrollRect+ScrollRectEvent, UnityEngine.UI, Version=1.0.0.0, - Culture=neutral, PublicKeyToken=null --- !u!114 &1792793822 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1792793819} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} m_Type: 1 m_PreserveAspect: 0 @@ -11458,18 +12437,22 @@ MonoBehaviour: m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 --- !u!222 &1792793823 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1792793819} m_CullTransparentMesh: 0 --- !u!1 &1808163910 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1808163911} @@ -11487,11 +12470,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1808163910} 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: 2104642231} m_Father: {fileID: 1661872749} @@ -11506,15 +12491,17 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1808163910} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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} @@ -11524,44 +12511,46 @@ MonoBehaviour: 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: 1808163913} m_OnClick: m_PersistentCalls: m_Calls: [] - m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, - Culture=neutral, PublicKeyToken=null --- !u!114 &1808163913 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1808163910} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} m_Type: 1 m_PreserveAspect: 0 @@ -11570,18 +12559,22 @@ MonoBehaviour: m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 --- !u!222 &1808163914 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1808163910} m_CullTransparentMesh: 0 --- !u!1 &1895017806 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1895017807} @@ -11598,11 +12591,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1895017806} 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: 1372320181} m_RootOrder: 0 @@ -11616,21 +12611,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1895017806} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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: 0.5} m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 30 @@ -11649,14 +12645,16 @@ MonoBehaviour: CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1895017806} m_CullTransparentMesh: 0 --- !u!1 &1898744072 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1898744073} @@ -11673,11 +12671,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1898744072} 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: 1968196753} m_RootOrder: 0 @@ -11691,21 +12691,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1898744072} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 14 @@ -11724,14 +12725,16 @@ MonoBehaviour: CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1898744072} m_CullTransparentMesh: 0 --- !u!1 &1916972716 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1916972717} @@ -11748,11 +12751,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1916972716} 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: 1444940924} m_RootOrder: 0 @@ -11766,21 +12771,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1916972716} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 14 @@ -11799,14 +12805,16 @@ MonoBehaviour: CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1916972716} m_CullTransparentMesh: 0 --- !u!1 &1935900090 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1935900091} @@ -11823,11 +12831,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1935900090} 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: 32152857} m_RootOrder: 0 @@ -11841,21 +12851,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1935900090} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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: 0.5} m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 14 @@ -11874,14 +12885,16 @@ MonoBehaviour: CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1935900090} m_CullTransparentMesh: 0 --- !u!1 &1947698604 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1947698605} @@ -11898,11 +12911,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1947698604} 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: 1086359496} m_RootOrder: 1 @@ -11916,21 +12931,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1947698604} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 14 @@ -11949,14 +12965,16 @@ MonoBehaviour: CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1947698604} m_CullTransparentMesh: 0 --- !u!1 &1968196752 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1968196753} @@ -11974,11 +12992,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1968196752} 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: 1898744073} - {fileID: 1027149102} @@ -11995,15 +13015,17 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1968196752} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 853051423, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Script: {fileID: 11500000, guid: 0d0b652f32a2cc243917e4028fa0f046, 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} @@ -12013,17 +13035,20 @@ MonoBehaviour: 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: 1968196755} @@ -12058,27 +13083,27 @@ MonoBehaviour: m_OnValueChanged: m_PersistentCalls: m_Calls: [] - m_TypeName: UnityEngine.UI.Dropdown+DropdownEvent, UnityEngine.UI, Version=1.0.0.0, - Culture=neutral, PublicKeyToken=null + m_AlphaFadeSpeed: 0.15 --- !u!114 &1968196755 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1968196752} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} m_Type: 1 m_PreserveAspect: 0 @@ -12087,18 +13112,22 @@ MonoBehaviour: m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 --- !u!222 &1968196756 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1968196752} m_CullTransparentMesh: 0 --- !u!1 &1970250034 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1970250037} @@ -12115,13 +13144,15 @@ GameObject: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1970250034} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 1077351063, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3} m_Name: m_EditorClassIdentifier: + m_SendPointerHoverToParent: 1 m_HorizontalAxis: Horizontal m_VerticalAxis: Vertical m_SubmitButton: Submit @@ -12133,11 +13164,12 @@ MonoBehaviour: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1970250034} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: -619905303, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3} m_Name: m_EditorClassIdentifier: m_FirstSelected: {fileID: 0} @@ -12147,11 +13179,13 @@ MonoBehaviour: Transform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1970250034} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} m_RootOrder: 3 @@ -12160,7 +13194,8 @@ Transform: GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1974095643} @@ -12177,11 +13212,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1974095642} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1.0000001, y: 1.0000001, z: 1.0000001} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 802075596} m_RootOrder: 6 @@ -12195,21 +13232,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1974095642} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 14 @@ -12230,14 +13268,16 @@ MonoBehaviour: CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1974095642} m_CullTransparentMesh: 0 --- !u!1 &1984799696 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1984799697} @@ -12254,11 +13294,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1984799696} 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: 542649015} m_RootOrder: 0 @@ -12272,21 +13314,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1984799696} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 14 @@ -12305,14 +13348,16 @@ MonoBehaviour: CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1984799696} m_CullTransparentMesh: 0 --- !u!1 &1992812696 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 1992812697} @@ -12329,11 +13374,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1992812696} 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: 295524482} m_RootOrder: 0 @@ -12347,21 +13394,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1992812696} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 14 @@ -12380,14 +13428,16 @@ MonoBehaviour: CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1992812696} m_CullTransparentMesh: 0 --- !u!1 &2012964984 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 2012964985} @@ -12404,11 +13454,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2012964984} 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: 2132104704} m_RootOrder: 0 @@ -12422,21 +13474,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2012964984} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 14 @@ -12455,14 +13508,16 @@ MonoBehaviour: CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2012964984} m_CullTransparentMesh: 0 --- !u!1 &2013350245 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 2013350246} @@ -12479,11 +13534,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2013350245} 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: 1513622264} m_RootOrder: 0 @@ -12497,21 +13554,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2013350245} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} m_Type: 1 m_PreserveAspect: 0 @@ -12520,18 +13578,22 @@ MonoBehaviour: m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 --- !u!222 &2013350248 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2013350245} m_CullTransparentMesh: 0 --- !u!1 &2036583022 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 2036583023} @@ -12549,11 +13611,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2036583022} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1.0000001, y: 1.0000001, z: 1.0000001} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 2056789247} m_Father: {fileID: 1661872749} @@ -12568,15 +13632,17 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2036583022} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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} @@ -12586,44 +13652,46 @@ MonoBehaviour: 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: 2036583025} m_OnClick: m_PersistentCalls: m_Calls: [] - m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, - Culture=neutral, PublicKeyToken=null --- !u!114 &2036583025 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2036583022} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} m_Type: 1 m_PreserveAspect: 0 @@ -12632,18 +13700,22 @@ MonoBehaviour: m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 --- !u!222 &2036583026 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2036583022} m_CullTransparentMesh: 0 --- !u!1 &2051233642 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 2051233643} @@ -12660,11 +13732,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2051233642} 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: 827257451} m_RootOrder: 1 @@ -12678,21 +13752,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2051233642} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 14 @@ -12711,14 +13786,16 @@ MonoBehaviour: CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2051233642} m_CullTransparentMesh: 0 --- !u!1 &2053101022 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 2053101023} @@ -12735,11 +13812,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2053101022} 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: 1086359496} m_RootOrder: 0 @@ -12753,21 +13832,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2053101022} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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: 0.5} m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 14 @@ -12786,14 +13866,16 @@ MonoBehaviour: CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2053101022} m_CullTransparentMesh: 0 --- !u!1 &2056789246 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 2056789247} @@ -12810,11 +13892,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2056789246} 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: 2036583023} m_RootOrder: 0 @@ -12828,21 +13912,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2056789246} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 14 @@ -12861,14 +13946,16 @@ MonoBehaviour: CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2056789246} m_CullTransparentMesh: 0 --- !u!1 &2065071847 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 2065071849} @@ -12884,15 +13971,18 @@ GameObject: Light: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2065071847} m_Enabled: 1 - serializedVersion: 8 + 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 @@ -12902,6 +13992,24 @@ Light: 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} @@ -12909,23 +14017,29 @@ Light: 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 &2065071849 Transform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2065071847} m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} m_LocalPosition: {x: 0, y: 3, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} m_RootOrder: 1 @@ -12934,7 +14048,8 @@ Transform: GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 2067684049} @@ -12951,11 +14066,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2067684048} 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: 777081574} m_RootOrder: 0 @@ -12969,21 +14086,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2067684048} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 14 @@ -13002,14 +14120,16 @@ MonoBehaviour: CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2067684048} m_CullTransparentMesh: 0 --- !u!1 &2067706380 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 2067706381} @@ -13027,11 +14147,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2067706380} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1.0000001, y: 1.0000001, z: 1.0000001} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 1710804047} - {fileID: 386749638} @@ -13047,15 +14169,17 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2067706380} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 575553740, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Script: {fileID: 11500000, guid: d199490a83bb2b844b9695cbf13b01ef, 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} @@ -13065,17 +14189,20 @@ MonoBehaviour: 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: 2067706383} @@ -13089,16 +14216,15 @@ MonoBehaviour: m_HideMobileInput: 0 m_CharacterValidation: 0 m_CharacterLimit: 0 - m_OnEndEdit: + m_OnSubmit: + m_PersistentCalls: + m_Calls: [] + m_OnDidEndEdit: m_PersistentCalls: m_Calls: [] - m_TypeName: UnityEngine.UI.InputField+SubmitEvent, UnityEngine.UI, Version=1.0.0.0, - Culture=neutral, PublicKeyToken=null m_OnValueChanged: m_PersistentCalls: m_Calls: [] - m_TypeName: UnityEngine.UI.InputField+OnChangeEvent, UnityEngine.UI, Version=1.0.0.0, - Culture=neutral, PublicKeyToken=null m_CaretColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} m_CustomCaretColor: 0 m_SelectionColor: {r: 0.65882355, g: 0.80784315, b: 1, a: 0.7529412} @@ -13106,25 +14232,27 @@ MonoBehaviour: m_CaretBlinkRate: 0.85 m_CaretWidth: 1 m_ReadOnly: 0 + m_ShouldActivateOnSelect: 1 --- !u!114 &2067706383 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2067706380} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Sprite: {fileID: 10911, guid: 0000000000000000f000000000000000, type: 0} m_Type: 1 m_PreserveAspect: 0 @@ -13133,18 +14261,22 @@ MonoBehaviour: m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 --- !u!222 &2067706384 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2067706380} m_CullTransparentMesh: 0 --- !u!1 &2074313682 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 2074313683} @@ -13161,11 +14293,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2074313682} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1.0000001, y: 1.0000001, z: 1.0000001} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 2123094415} m_Father: {fileID: 357773227} @@ -13180,21 +14314,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2074313682} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Sprite: {fileID: 10911, guid: 0000000000000000f000000000000000, type: 0} m_Type: 1 m_PreserveAspect: 0 @@ -13203,18 +14338,22 @@ MonoBehaviour: m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 --- !u!222 &2074313685 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2074313682} m_CullTransparentMesh: 0 --- !u!1 &2089934155 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 2089934156} @@ -13231,11 +14370,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2089934155} 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: 2127601752} m_RootOrder: 0 @@ -13249,21 +14390,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2089934155} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 14 @@ -13282,14 +14424,16 @@ MonoBehaviour: CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2089934155} m_CullTransparentMesh: 0 --- !u!1 &2102040995 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 2102040996} @@ -13306,39 +14450,42 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2102040995} 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: 1773953146} m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 155.65, y: -211.74} - m_SizeDelta: {x: 296.22, y: 280.84} + m_AnchoredPosition: {x: 155.65, y: -97.70238} + m_SizeDelta: {x: 296.22, y: 52.7647} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &2102040997 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2102040995} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_RaycastTarget: 0 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 12 @@ -13357,14 +14504,16 @@ MonoBehaviour: CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2102040995} m_CullTransparentMesh: 0 --- !u!1 &2102519929 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 2102519930} @@ -13381,11 +14530,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2102519929} 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: 591267481} m_RootOrder: 1 @@ -13399,21 +14550,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2102519929} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 14 @@ -13432,14 +14584,16 @@ MonoBehaviour: CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2102519929} m_CullTransparentMesh: 0 --- !u!1 &2104642230 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 2104642231} @@ -13456,11 +14610,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2104642230} 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: 1808163911} m_RootOrder: 0 @@ -13474,21 +14630,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2104642230} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 14 @@ -13507,14 +14664,16 @@ MonoBehaviour: CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2104642230} m_CullTransparentMesh: 0 --- !u!1 &2123094414 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 2123094415} @@ -13531,11 +14690,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2123094414} 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: 2074313683} m_RootOrder: 0 @@ -13549,21 +14710,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2123094414} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 14 @@ -13582,14 +14744,16 @@ MonoBehaviour: CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2123094414} m_CullTransparentMesh: 0 --- !u!1 &2127601751 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 2127601752} @@ -13607,11 +14771,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2127601751} 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: 2089934156} m_Father: {fileID: 802075596} @@ -13626,15 +14792,17 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2127601751} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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} @@ -13644,44 +14812,46 @@ MonoBehaviour: 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: 2127601754} m_OnClick: m_PersistentCalls: m_Calls: [] - m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, - Culture=neutral, PublicKeyToken=null --- !u!114 &2127601754 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2127601751} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} m_Type: 1 m_PreserveAspect: 0 @@ -13690,18 +14860,22 @@ MonoBehaviour: m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 --- !u!222 &2127601755 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2127601751} m_CullTransparentMesh: 0 --- !u!1 &2132104703 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - component: {fileID: 2132104704} @@ -13718,11 +14892,13 @@ GameObject: RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2132104703} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1.0000001, y: 1.0000001, z: 1.0000001} + m_ConstrainProportionsScale: 0 m_Children: - {fileID: 2012964985} m_Father: {fileID: 357773227} @@ -13737,21 +14913,22 @@ RectTransform: MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2132104703} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + 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_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, - Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_Sprite: {fileID: 10911, guid: 0000000000000000f000000000000000, type: 0} m_Type: 1 m_PreserveAspect: 0 @@ -13760,10 +14937,13 @@ MonoBehaviour: m_FillAmount: 1 m_FillClockwise: 1 m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 --- !u!222 &2132104706 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2132104703} m_CullTransparentMesh: 0 diff --git a/Assets/NicoliveClient/Example/Console/NicoliveSampleScene.unity.meta b/Assets/TORISOUP/NicoliveClient/Example/Console/NicoliveSampleScene.unity.meta similarity index 100% rename from Assets/NicoliveClient/Example/Console/NicoliveSampleScene.unity.meta rename to Assets/TORISOUP/NicoliveClient/Example/Console/NicoliveSampleScene.unity.meta diff --git a/Assets/NicoliveClient/Example/Console/Scripts.meta b/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts.meta similarity index 100% rename from Assets/NicoliveClient/Example/Console/Scripts.meta rename to Assets/TORISOUP/NicoliveClient/Example/Console/Scripts.meta diff --git a/Assets/NicoliveClient/Example/Console/Scripts/LoginPanel.meta b/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/LoginPanel.meta similarity index 100% rename from Assets/NicoliveClient/Example/Console/Scripts/LoginPanel.meta rename to Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/LoginPanel.meta diff --git a/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/LoginPanel/LoginManager.cs b/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/LoginPanel/LoginManager.cs new file mode 100644 index 0000000..9cf6e70 --- /dev/null +++ b/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/LoginPanel/LoginManager.cs @@ -0,0 +1,45 @@ +using System; +using System.Threading; +using Cysharp.Threading.Tasks; +using TORISOUP.NicoliveClient.Client; +using UniRx; +using UnityEngine; + +namespace TORISOUP.NicoliveClient.Example.Console.Scripts.LoginPanel +{ + /// + /// ログイン状態の管理 + /// + public class LoginManager : MonoBehaviour + { + /// + /// ログイン中のユーザ情報 + /// + public NiconicoUser CurrentUser { get; private set; } + + private readonly ReactiveProperty _isLoggedIn = new ReactiveProperty(); + + + /// + /// ログイン状態であるか + /// + public IReadOnlyReactiveProperty IsLoggedIn => _isLoggedIn; + + /// + /// ログイン処理を実行する + /// + public async UniTask LoginAsync(string mail, string pass, CancellationToken ct) + { + try + { + CurrentUser = await NiconicoUserClient.LoginAsync(mail, pass, ct); + _isLoggedIn.Value = true; + } + catch (Exception ex) when (ex is not OperationCanceledException) + { + CurrentUser = default; + _isLoggedIn.Value = false; + } + } + } +} \ No newline at end of file diff --git a/Assets/NicoliveClient/Example/Console/Scripts/LoginPanel/LoginManager.cs.meta b/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/LoginPanel/LoginManager.cs.meta similarity index 100% rename from Assets/NicoliveClient/Example/Console/Scripts/LoginPanel/LoginManager.cs.meta rename to Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/LoginPanel/LoginManager.cs.meta diff --git a/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/LoginPanel/LoginPresenter.cs b/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/LoginPanel/LoginPresenter.cs new file mode 100644 index 0000000..b68ae21 --- /dev/null +++ b/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/LoginPanel/LoginPresenter.cs @@ -0,0 +1,45 @@ +using System; +using Cysharp.Threading.Tasks; +using Cysharp.Threading.Tasks.Linq; +using UniRx; +using UnityEngine; +using UnityEngine.UI; + +namespace TORISOUP.NicoliveClient.Example.Console.Scripts.LoginPanel +{ + /// + /// ログイン画面のUIとの接合部 + /// + public class LoginPresenter : MonoBehaviour + { + [SerializeField] private LoginManager _loginManager; + + [SerializeField] private InputField _mail; + [SerializeField] private InputField _pass; + [SerializeField] private Button _singIn; + [SerializeField] private Text _errorMessage; + + void Start() + { + //ログインボタンが押された + + _singIn + .OnClickAsAsyncEnumerable(this.GetCancellationTokenOnDestroy()) + .ForEachAwaitWithCancellationAsync( + async (_, ct) => + { + try + { + _errorMessage.text = ""; + await _loginManager.LoginAsync(_mail.text, _pass.text, ct); + } + catch (Exception e) + { + _errorMessage.text = e.Message; + } + }, + this.GetCancellationTokenOnDestroy()) + .Forget(); + } + } +} \ No newline at end of file diff --git a/Assets/NicoliveClient/Example/Console/Scripts/LoginPanel/LoginPresenter.cs.meta b/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/LoginPanel/LoginPresenter.cs.meta similarity index 100% rename from Assets/NicoliveClient/Example/Console/Scripts/LoginPanel/LoginPresenter.cs.meta rename to Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/LoginPanel/LoginPresenter.cs.meta diff --git a/Assets/NicoliveClient/Example/Console/Scripts/MainPanel.meta b/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel.meta similarity index 100% rename from Assets/NicoliveClient/Example/Console/Scripts/MainPanel.meta rename to Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel.meta diff --git a/Assets/NicoliveClient/Example/Console/Scripts/MainPanel/CommentPanel.meta b/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/CommentPanel.meta similarity index 100% rename from Assets/NicoliveClient/Example/Console/Scripts/MainPanel/CommentPanel.meta rename to Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/CommentPanel.meta diff --git a/Assets/NicoliveClient/Example/Console/Scripts/MainPanel/CommentPanel/CommentPanel.cs b/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/CommentPanel/CommentPanel.cs similarity index 66% rename from Assets/NicoliveClient/Example/Console/Scripts/MainPanel/CommentPanel/CommentPanel.cs rename to Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/CommentPanel/CommentPanel.cs index 8eb2ef0..ea0302e 100644 --- a/Assets/NicoliveClient/Example/Console/Scripts/MainPanel/CommentPanel/CommentPanel.cs +++ b/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/CommentPanel/CommentPanel.cs @@ -1,12 +1,17 @@ using System; using System.Collections.Generic; using System.Linq; -using UnityEngine; -using UnityEngine.UI; +using Cysharp.Threading.Tasks; +using Cysharp.Threading.Tasks.Linq; +using TORISOUP.NicoliveClient.Client; +using TORISOUP.NicoliveClient.Comment; +using TORISOUP.NicoliveClient.Response; using UniRx; using UniRx.Triggers; +using UnityEngine; +using UnityEngine.UI; -namespace NicoliveClient.Example +namespace TORISOUP.NicoliveClient.Example.Console.Scripts.MainPanel.CommentPanel { /// /// 接続可能な部屋に繋いでコメントを受信するサンプル @@ -14,20 +19,15 @@ namespace NicoliveClient.Example /// public class CommentPanel : MonoBehaviour { - [SerializeField] - private NicoliveSampleManager _manager; + [SerializeField] private NicoliveSampleManager _manager; - [SerializeField] - private Button _connectButton; + [SerializeField] private Button _connectButton; - [SerializeField] - private Button _disconnectButton; + [SerializeField] private Button _disconnectButton; - [SerializeField] - private Text _roomCountText; + [SerializeField] private Text _roomCountText; - [SerializeField] - private Button _getRoomButton; + [SerializeField] private Button _getRoomButton; /// /// 受信したコメント情報 @@ -41,31 +41,35 @@ public IObservable OnCommentRecieved private ReactiveProperty _isConnected = new BoolReactiveProperty(); //接続しているObservableを切断する時に必要 - private IDisposable _reciveDisposable; + private IDisposable _recieveDisposable; //全クランアントから配送されたコメント情報を全てこのSubjectに集約する private Subject _onCommentRecieved = new Subject(); private IEnumerable _commentClients; - private ReactiveProperty _commentServerInfos = new ReactiveProperty(); + private readonly ReactiveProperty _commentServerInfos = + new ReactiveProperty(); void Start() { + var ct = this.GetCancellationTokenOnDestroy(); + // 接続先情報を取得する - _getRoomButton.OnClickAsObservable() - .ThrottleFirst(TimeSpan.FromSeconds(2)) - .Subscribe(_ => + _getRoomButton.OnClickAsAsyncEnumerable(ct) + .ForEachAwaitWithCancellationAsync(async (_, c) => { - // ユーザ生放送のAPIを先に実行し、失敗したら公式側のAPIを叩く - Observable.Catch(new[] + try { - _manager.NicoliveApiClient.GetProgramInfoAsync().Select(x => x.Rooms.Select(r => r.CommentServerInfo)), - }).Subscribe(comments => + var info = await _manager.NicoliveApiClient.GetProgramInfoAsync(c); + _commentServerInfos.Value = info.Rooms.Select(r => r.CommentServerInfo).ToArray(); + } + catch (Exception e)when (e is not OperationCanceledException) { - _commentServerInfos.Value = comments.ToArray(); - }, ex => _commentServerInfos.Value = new CommentServerInfo[0]); - }); + _commentServerInfos.Value = Array.Empty(); + } + }, cancellationToken: ct) + .Forget(); //部屋数が更新されたらUIへ反映する _commentServerInfos @@ -77,14 +81,16 @@ void Start() //接続していない かつ 部屋数が1以上のときのみ接続できる _connectButton.interactable = !_isConnected.Value && x > 0; _roomCountText.text = string.Format("現在の部屋数:{0}", x); - }); + }) + .AddTo(ct); //接続状態が更新されたらボタンに反映する _isConnected.Subscribe(x => - { - _connectButton.interactable = !x && _manager.CurrentRooms.Count > 0; - _disconnectButton.interactable = x; - }); + { + _connectButton.interactable = !x && _manager.CurrentRooms.Count > 0; + _disconnectButton.interactable = x; + }) + .AddTo(ct); //コメントサーバに接続 _connectButton.OnClickAsObservable() @@ -92,7 +98,8 @@ void Start() { Connect(); _isConnected.Value = true; - }); + }) + .AddTo(ct); //コメントサーバから切断 _disconnectButton.OnClickAsObservable() @@ -100,11 +107,13 @@ void Start() { Disconnect(); _isConnected.Value = false; - }); + }) + .AddTo(ct); //GameObjectが破棄されたら切断する this.OnDestroyAsObservable() - .Subscribe(_ => Disconnect()); + .Subscribe(_ => Disconnect()) + .AddTo(ct); } /// @@ -115,7 +124,7 @@ private void Connect() Disconnect(); if (_commentServerInfos.Value == null) return; - + //各部屋ごとのクライアント作成 _commentClients = _commentServerInfos.Value .Select(x => new NicoliveCommentClient(x, _manager.CurrentUser.UserId)) @@ -124,7 +133,7 @@ private void Connect() if (_commentClients == null) return; //全部屋の情報をまとめて1つのObservableにする - _reciveDisposable = + _recieveDisposable = _commentClients .Select(x => x.OnMessageAsObservable) .Merge() @@ -145,7 +154,7 @@ private void Connect() private void Disconnect() { //先にObservableを停止 - if (_reciveDisposable != null) _reciveDisposable.Dispose(); + if (_recieveDisposable != null) _recieveDisposable.Dispose(); //各クライアントを破棄 if (_commentClients != null) @@ -159,4 +168,4 @@ private void Disconnect() } } } -} +} \ No newline at end of file diff --git a/Assets/NicoliveClient/Example/Console/Scripts/MainPanel/CommentPanel/CommentPanel.cs.meta b/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/CommentPanel/CommentPanel.cs.meta similarity index 100% rename from Assets/NicoliveClient/Example/Console/Scripts/MainPanel/CommentPanel/CommentPanel.cs.meta rename to Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/CommentPanel/CommentPanel.cs.meta diff --git a/Assets/NicoliveClient/Example/Console/Scripts/MainPanel/CommentRenderPanel.meta b/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/CommentRenderPanel.meta similarity index 100% rename from Assets/NicoliveClient/Example/Console/Scripts/MainPanel/CommentRenderPanel.meta rename to Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/CommentRenderPanel.meta diff --git a/Assets/NicoliveClient/Example/Console/Scripts/MainPanel/CommentRenderPanel/CommentRenderPanel.cs b/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/CommentRenderPanel/CommentRenderPanel.cs similarity index 81% rename from Assets/NicoliveClient/Example/Console/Scripts/MainPanel/CommentRenderPanel/CommentRenderPanel.cs rename to Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/CommentRenderPanel/CommentRenderPanel.cs index 5d0c6f7..5a7f5c4 100644 --- a/Assets/NicoliveClient/Example/Console/Scripts/MainPanel/CommentRenderPanel/CommentRenderPanel.cs +++ b/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/CommentRenderPanel/CommentRenderPanel.cs @@ -1,15 +1,15 @@ -using UnityEngine; -using UniRx; +using UniRx; +using UnityEngine; using UnityEngine.UI; -namespace NicoliveClient.Example +namespace TORISOUP.NicoliveClient.Example.Console.Scripts.MainPanel.CommentRenderPanel { /// /// コメントを描画する(重い) /// public class CommentRenderPanel : MonoBehaviour { - [SerializeField] private CommentPanel _commentPanelManager; + [SerializeField] private CommentPanel.CommentPanel _commentPanelManager; [SerializeField] private Transform _renderAreaParent; diff --git a/Assets/NicoliveClient/Example/Console/Scripts/MainPanel/CommentRenderPanel/CommentRenderPanel.cs.meta b/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/CommentRenderPanel/CommentRenderPanel.cs.meta similarity index 100% rename from Assets/NicoliveClient/Example/Console/Scripts/MainPanel/CommentRenderPanel/CommentRenderPanel.cs.meta rename to Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/CommentRenderPanel/CommentRenderPanel.cs.meta diff --git a/Assets/NicoliveClient/Example/Console/Scripts/MainPanel/EnquetePanel.meta b/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/EnquetePanel.meta similarity index 100% rename from Assets/NicoliveClient/Example/Console/Scripts/MainPanel/EnquetePanel.meta rename to Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/EnquetePanel.meta diff --git a/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/EnquetePanel/EnquetePanel.cs b/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/EnquetePanel/EnquetePanel.cs new file mode 100644 index 0000000..9d5974e --- /dev/null +++ b/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/EnquetePanel/EnquetePanel.cs @@ -0,0 +1,88 @@ +using System; +using System.Linq; +using Cysharp.Threading.Tasks; +using Cysharp.Threading.Tasks.Linq; +using UniRx; +using UnityEngine; +using UnityEngine.UI; + +namespace TORISOUP.NicoliveClient.Example.Console.Scripts.MainPanel.EnquetePanel +{ + public class EnquetePanel : MonoBehaviour + { + [SerializeField] private NicoliveSampleManager _manager; + + [SerializeField] private Button StartButton; + [SerializeField] private Button ShowResultButton; + [SerializeField] private Button EndButton; + + [SerializeField] private InputField QuestionTitleInputField; + [SerializeField] private InputField[] itemInputFields; + + [SerializeField] private Text ResultLabel; + + void Start() + { + var ct = this.GetCancellationTokenOnDestroy(); + + //アンケート開始 + StartButton.OnClickAsAsyncEnumerable(ct) + .ForEachAwaitWithCancellationAsync(async (_, c) => + { + try + { + var title = QuestionTitleInputField.text; + var items = itemInputFields.Select(x => x.text); + + await _manager.NicoliveApiClient + .StartEnqueteAsync(title, items, c); + + await UniTask.Delay(TimeSpan.FromSeconds(3), cancellationToken: c); + } + catch (Exception e) when (e is not OperationCanceledException) + { + Debug.LogError(e); + } + }, cancellationToken: ct) + .Forget(); + + //アンケート結果の表示&取得 + ShowResultButton.OnClickAsAsyncEnumerable(ct) + .ForEachAwaitWithCancellationAsync(async (_, c) => + { + try + { + var result = await _manager.NicoliveApiClient.ShowResultEnqueteAsync(c); + + var message = result.Items.Select(x => $"{x.Name}:{x.Rate}%") + .Aggregate((p, c) => p + " / " + c); + ResultLabel.text = message; + await UniTask.Delay(TimeSpan.FromSeconds(3), cancellationToken: c); + } + catch (Exception e) when (e is not OperationCanceledException) + { + Debug.LogError(e); + } + }, cancellationToken: ct) + .Forget(); + + + //アンケートの終了 + EndButton.OnClickAsAsyncEnumerable(ct) + .ForEachAwaitWithCancellationAsync(async (_, c) => + { + try + { + await _manager.NicoliveApiClient.FinishEnqueteAsync(c); + ResultLabel.text = "アンケートを終了しました"; + await UniTask.Delay(TimeSpan.FromSeconds(3), cancellationToken: c); + } + catch (Exception e) when (e is not OperationCanceledException) + { + Debug.LogError(e); + } + }, cancellationToken: ct) + .Forget(); + } + } +} \ No newline at end of file diff --git a/Assets/NicoliveClient/Example/Console/Scripts/MainPanel/EnquetePanel/EnquetePanel.cs.meta b/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/EnquetePanel/EnquetePanel.cs.meta similarity index 95% rename from Assets/NicoliveClient/Example/Console/Scripts/MainPanel/EnquetePanel/EnquetePanel.cs.meta rename to Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/EnquetePanel/EnquetePanel.cs.meta index 63ae217..32fbe41 100644 --- a/Assets/NicoliveClient/Example/Console/Scripts/MainPanel/EnquetePanel/EnquetePanel.cs.meta +++ b/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/EnquetePanel/EnquetePanel.cs.meta @@ -1,13 +1,13 @@ -fileFormatVersion: 2 -guid: 8f2d13799763db34d85a608089368842 -timeCreated: 1518102814 -licenseType: Pro -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: +fileFormatVersion: 2 +guid: 8f2d13799763db34d85a608089368842 +timeCreated: 1518102814 +licenseType: Pro +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/NicoliveClient/Example/Console/Scripts/MainPanel/OperatorCommentPanel.meta b/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/OperatorCommentPanel.meta similarity index 100% rename from Assets/NicoliveClient/Example/Console/Scripts/MainPanel/OperatorCommentPanel.meta rename to Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/OperatorCommentPanel.meta diff --git a/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/OperatorCommentPanel/OperatorCommentPanel.cs b/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/OperatorCommentPanel/OperatorCommentPanel.cs new file mode 100644 index 0000000..f56eb92 --- /dev/null +++ b/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/OperatorCommentPanel/OperatorCommentPanel.cs @@ -0,0 +1,66 @@ +using System; +using Cysharp.Threading.Tasks; +using Cysharp.Threading.Tasks.Linq; +using UnityEngine; +using UnityEngine.UI; + +namespace TORISOUP.NicoliveClient.Example.Console.Scripts.MainPanel.OperatorCommentPanel +{ + /// + /// 運営コメントパネルのUI + /// + public class OperatorCommentPanel : MonoBehaviour + { + [SerializeField] private NicoliveSampleManager _manager; + + [SerializeField] private InputField _nameInputField; + [SerializeField] private InputField _bodyInputField; + [SerializeField] private Dropdown _colorDropdown; + [SerializeField] private Toggle _isPermanentToggle; + [SerializeField] private Button _sendButton; + [SerializeField] private Button _deleteButton; + + void Start() + { + var ct = this.GetCancellationTokenOnDestroy(); + + _sendButton.OnClickAsAsyncEnumerable(ct) + .ForEachAwaitWithCancellationAsync(async (_, c) => + { + try + { + //運営コメント送信 + await _manager.NicoliveApiClient + .SendOperatorCommentAsync( + _bodyInputField.text, + _nameInputField.text, + _colorDropdown.options[_colorDropdown.value].text, + _isPermanentToggle.isOn, c); + + await UniTask.Delay(TimeSpan.FromSeconds(1), cancellationToken: c); + } + catch (Exception e) when (e is not OperationCanceledException) + { + Debug.LogError(e); + } + }, cancellationToken: ct) + .Forget(); + + _deleteButton.OnClickAsAsyncEnumerable(ct) + .ForEachAwaitWithCancellationAsync(async (_, c) => + { + try + { + //運営コメント削除 + await _manager.NicoliveApiClient + .DeleteOperatorCommentAsync(c); + } + catch (Exception e) when (e is not OperationCanceledException) + { + Debug.LogError(e); + } + }, cancellationToken: ct) + .Forget(); + } + } +} \ No newline at end of file diff --git a/Assets/NicoliveClient/Example/Console/Scripts/MainPanel/OperatorCommentPanel/OperatorCommentPanel.cs.meta b/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/OperatorCommentPanel/OperatorCommentPanel.cs.meta similarity index 100% rename from Assets/NicoliveClient/Example/Console/Scripts/MainPanel/OperatorCommentPanel/OperatorCommentPanel.cs.meta rename to Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/OperatorCommentPanel/OperatorCommentPanel.cs.meta diff --git a/Assets/NicoliveClient/Example/Console/Scripts/MainPanel/ProgramIdPanel.meta b/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/ProgramIdPanel.meta similarity index 100% rename from Assets/NicoliveClient/Example/Console/Scripts/MainPanel/ProgramIdPanel.meta rename to Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/ProgramIdPanel.meta diff --git a/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/ProgramIdPanel/ProgramIdPanel.cs b/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/ProgramIdPanel/ProgramIdPanel.cs new file mode 100644 index 0000000..d791d6a --- /dev/null +++ b/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/ProgramIdPanel/ProgramIdPanel.cs @@ -0,0 +1,59 @@ +using System; +using System.Linq; +using Cysharp.Threading.Tasks; +using Cysharp.Threading.Tasks.Linq; +using UniRx; +using UnityEngine; +using UnityEngine.UI; + +namespace TORISOUP.NicoliveClient.Example.Console.Scripts.MainPanel.ProgramIdPanel +{ + /// + /// 番組ID部分のUI表示 + /// + public class ProgramIdPanel : MonoBehaviour + { + [SerializeField] private NicoliveSampleManager _manager; + + [SerializeField] private InputField _programIdInputField; + [SerializeField] private Button _getCurrentProgramIdButton; + [SerializeField] private Button _setProgramIdButton; + [SerializeField] private Text _currentProgramIdText; + + void Start() + { + var ct = this.GetCancellationTokenOnDestroy(); + _getCurrentProgramIdButton.OnClickAsAsyncEnumerable(ct) + .ForEachAwaitWithCancellationAsync(async (_, c) => + { + try + { + //取得したIDは一旦UIに反映 + var programs = await _manager.GetCurrentProgramIdAsync(c); + if (programs.Length == 0) + { + Debug.LogError("番組IDが取得できませんでした"); + _programIdInputField.text = ""; + return; + } + _programIdInputField.text = programs.Last(); + } + catch (Exception e) when (e is not OperationCanceledException) + { + Debug.LogError(e); + } + }, cancellationToken: ct) + .Forget(); + + //設定ボタンが押されたらUIの値を反映する + _setProgramIdButton.OnClickAsObservable() + .Subscribe(_ => _manager.SetTargetProgramId(_programIdInputField.text)) + .AddTo(ct); + + //現在の操作対象lv表示 + _manager.CurrentProgramId + .SubscribeToText(_currentProgramIdText) + .AddTo(ct); + } + } +} \ No newline at end of file diff --git a/Assets/NicoliveClient/Example/Console/Scripts/MainPanel/ProgramIdPanel/ProgramIdPanel.cs.meta b/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/ProgramIdPanel/ProgramIdPanel.cs.meta similarity index 100% rename from Assets/NicoliveClient/Example/Console/Scripts/MainPanel/ProgramIdPanel/ProgramIdPanel.cs.meta rename to Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/ProgramIdPanel/ProgramIdPanel.cs.meta diff --git a/Assets/NicoliveClient/Example/Console/Scripts/MainPanel/ProgramInfoPanel.meta b/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/ProgramInfoPanel.meta similarity index 100% rename from Assets/NicoliveClient/Example/Console/Scripts/MainPanel/ProgramInfoPanel.meta rename to Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/ProgramInfoPanel.meta diff --git a/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/ProgramInfoPanel/ProgramInfoPanel.cs b/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/ProgramInfoPanel/ProgramInfoPanel.cs new file mode 100644 index 0000000..5894670 --- /dev/null +++ b/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/ProgramInfoPanel/ProgramInfoPanel.cs @@ -0,0 +1,56 @@ +using System; +using System.Linq; +using System.Text; +using Cysharp.Threading.Tasks; +using Cysharp.Threading.Tasks.Linq; +using UniRx; +using UnityEngine; +using UnityEngine.UI; + +namespace TORISOUP.NicoliveClient.Example.Console.Scripts.MainPanel.ProgramInfoPanel +{ + public class ProgramInfoPanel : MonoBehaviour + { + [SerializeField] private NicoliveSampleManager _manager; + + [SerializeField] private Button _getButton; + [SerializeField] private Text _programInfoLabel; + + void Start() + { + var ct = this.GetCancellationTokenOnDestroy(); + + _getButton.OnClickAsAsyncEnumerable(ct) + .ForEachAwaitWithCancellationAsync(async (_, c) => + { + try + { + var programInfo = await _manager.NicoliveApiClient.GetProgramInfoAsync(c); + //番組情報を取得して一部を表示する + var builder = new StringBuilder(); + builder.Append("title:" + programInfo.Title + "\n"); + builder.Append("type:" + programInfo.SocialGroup.Type.ToString() + "\n"); + builder.Append("socialGroupId:" + programInfo.SocialGroup.Id + "\n"); + builder.Append("tags:" + programInfo.Categories.Aggregate((p, c) => p + "," + c) + "\n"); + builder.Append("room count:" + programInfo.Rooms.Length + "\n"); + builder.Append("status:" + programInfo.Status.ToString() + "\n"); + _programInfoLabel.text = builder.ToString(); + + //部屋一覧を登録する + foreach (var room in programInfo.Rooms) + { + if (!_manager.CurrentRooms.ContainsKey(room.Id)) + { + _manager.CurrentRooms[room.Id] = room; + } + } + } + catch (Exception e) when (e is not OperationCanceledException) + { + Debug.LogError(e); + } + }, ct) + .Forget(); + } + } +} \ No newline at end of file diff --git a/Assets/NicoliveClient/Example/Console/Scripts/MainPanel/ProgramInfoPanel/ProgramInfoPanel.cs.meta b/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/ProgramInfoPanel/ProgramInfoPanel.cs.meta similarity index 100% rename from Assets/NicoliveClient/Example/Console/Scripts/MainPanel/ProgramInfoPanel/ProgramInfoPanel.cs.meta rename to Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/ProgramInfoPanel/ProgramInfoPanel.cs.meta diff --git a/Assets/NicoliveClient/Example/Console/Scripts/MainPanel/ProgramStatisticsPanel.meta b/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/ProgramStatisticsPanel.meta similarity index 100% rename from Assets/NicoliveClient/Example/Console/Scripts/MainPanel/ProgramStatisticsPanel.meta rename to Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/ProgramStatisticsPanel.meta diff --git a/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/ProgramStatisticsPanel/ProgramStatisticsPanel.cs b/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/ProgramStatisticsPanel/ProgramStatisticsPanel.cs new file mode 100644 index 0000000..04c73c9 --- /dev/null +++ b/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/ProgramStatisticsPanel/ProgramStatisticsPanel.cs @@ -0,0 +1,39 @@ +using System; +using Cysharp.Threading.Tasks; +using UniRx; +using UnityEngine; +using UnityEngine.UI; + +namespace TORISOUP.NicoliveClient.Example.Console.Scripts.MainPanel.ProgramStatisticsPanel +{ + public class ProgramStatisticsPanel : MonoBehaviour + { + [SerializeField] private NicoliveSampleManager _manager; + + [SerializeField] private Button _getButton; + [SerializeField] private Text _programStatisticsLabel; + + void Start() + { + var ct = this.GetCancellationTokenOnDestroy(); + + var command = _manager.IsSetProgramId.ToReactiveCommand(); + + _getButton.OnClickAsObservable() + .ThrottleFirst(TimeSpan.FromSeconds(5)) + .Subscribe(_ => command.Execute()) + .AddTo(ct); + + command.Subscribe(_ => + { + UniTask.Void(async () => + { + var result = await _manager.NicoliveApiClient.GetProgramStatisticsAsync(ct); + _programStatisticsLabel.text = + $"来場者数:{result.WatchCount} / コメント数:{result.CommentCount}"; + }); + }) + .AddTo(ct); + } + } +} \ No newline at end of file diff --git a/Assets/NicoliveClient/Example/Console/Scripts/MainPanel/ProgramStatisticsPanel/ProgramStatisticsPanel.cs.meta b/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/ProgramStatisticsPanel/ProgramStatisticsPanel.cs.meta similarity index 100% rename from Assets/NicoliveClient/Example/Console/Scripts/MainPanel/ProgramStatisticsPanel/ProgramStatisticsPanel.cs.meta rename to Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/ProgramStatisticsPanel/ProgramStatisticsPanel.cs.meta diff --git a/Assets/NicoliveClient/Example/Console/Scripts/MainPanel/ScheduledProgramPanel.meta b/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/ScheduledProgramPanel.meta similarity index 100% rename from Assets/NicoliveClient/Example/Console/Scripts/MainPanel/ScheduledProgramPanel.meta rename to Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/ScheduledProgramPanel.meta diff --git a/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/ScheduledProgramPanel/ScheduledProgramPanel.cs b/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/ScheduledProgramPanel/ScheduledProgramPanel.cs new file mode 100644 index 0000000..499dcf6 --- /dev/null +++ b/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/ScheduledProgramPanel/ScheduledProgramPanel.cs @@ -0,0 +1,53 @@ +using System; +using System.Text; +using Cysharp.Threading.Tasks; +using Cysharp.Threading.Tasks.Linq; +using UniRx; +using UnityEngine; +using UnityEngine.UI; + +namespace TORISOUP.NicoliveClient.Example.Console.Scripts.MainPanel.ScheduledProgramPanel +{ + public class ScheduledProgramPanel : MonoBehaviour + { + [SerializeField] private NicoliveSampleManager _manager; + + [SerializeField] private Button _getButton; + + [SerializeField] private Text _resultLabel; + + void Start() + { + var ct = this.GetCancellationTokenOnDestroy(); + _getButton.OnClickAsAsyncEnumerable(ct) + .ForEachAwaitWithCancellationAsync(async (_, c) => + { + try + { + var list = await _manager.NicoliveApiClient.GetScheduledProgramListAsync(c); + if (list.Length == 0) + { + _resultLabel.text = "現在予定されている番組はありません"; + return; + } + + var builder = new StringBuilder(); + foreach (var schedule in list) + { + builder.Append($"{schedule.ProgramId}:{schedule.SocialGroupId}:{schedule.Status}\n"); + } + + _resultLabel.text = builder.ToString(); + + // Delay + await UniTask.Delay(TimeSpan.FromSeconds(5), cancellationToken: c); + } + catch (Exception e) when (e is not OperationCanceledException) + { + Debug.LogError(e); + } + }, ct) + .Forget(); + } + } +} \ No newline at end of file diff --git a/Assets/NicoliveClient/Example/Console/Scripts/MainPanel/ScheduledProgramPanel/ScheduledProgramPanel.cs.meta b/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/ScheduledProgramPanel/ScheduledProgramPanel.cs.meta similarity index 100% rename from Assets/NicoliveClient/Example/Console/Scripts/MainPanel/ScheduledProgramPanel/ScheduledProgramPanel.cs.meta rename to Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/ScheduledProgramPanel/ScheduledProgramPanel.cs.meta diff --git a/Assets/NicoliveClient/Example/Console/Scripts/MainPanel/SegmentPanel.meta b/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/SegmentPanel.meta similarity index 100% rename from Assets/NicoliveClient/Example/Console/Scripts/MainPanel/SegmentPanel.meta rename to Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/SegmentPanel.meta diff --git a/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/SegmentPanel/SegmentPanel.cs b/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/SegmentPanel/SegmentPanel.cs new file mode 100644 index 0000000..172bf73 --- /dev/null +++ b/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/SegmentPanel/SegmentPanel.cs @@ -0,0 +1,92 @@ +using System; +using System.Linq; +using Cysharp.Threading.Tasks; +using Cysharp.Threading.Tasks.Linq; +using UniRx; +using UnityEngine; +using UnityEngine.UI; + +namespace TORISOUP.NicoliveClient.Example.Console.Scripts.MainPanel.SegmentPanel +{ + /// + /// 番組時間に関係する操作 + /// + public class SegmentPanel : MonoBehaviour + { + [SerializeField] private NicoliveSampleManager _manager; + + [SerializeField] private Button _startButton; + [SerializeField] private Button _endButton; + [SerializeField] private Button _getExtensionButton; + [SerializeField] private Button _extendButton; + [SerializeField] private Text _extendLabel; + + void Start() + { + var ct = this.GetCancellationTokenOnDestroy(); + + _startButton.OnClickAsAsyncEnumerable(ct) + .ForEachAwaitWithCancellationAsync( + async (_, c) => + { + try + { + await _manager.NicoliveApiClient.StartProgramAsync(c); + } + catch (Exception e) when (e is not OperationCanceledException) + { + Debug.LogError(e); + } + }, ct) + .Forget(); + + _endButton.OnClickAsAsyncEnumerable(ct) + .ForEachAwaitWithCancellationAsync( + async (_, c) => + { + try + { + await _manager.NicoliveApiClient.EndProgramAsync(c); + } + catch (Exception e) when (e is not OperationCanceledException) + { + Debug.LogError(e); + } + }, ct) + .Forget(); + + _getExtensionButton.OnClickAsAsyncEnumerable(ct) + .ForEachAwaitWithCancellationAsync( + async (_, c) => + { + try + { + var extensions = + await _manager.NicoliveApiClient.GetExtensionAsync(c); + var max = extensions.Max(x => x.Minutes); + _extendLabel.text = max + "分延長可能"; + } + catch (Exception e) when (e is not OperationCanceledException) + { + Debug.LogError(e); + } + }, ct) + .Forget(); + + _extendButton.OnClickAsAsyncEnumerable(ct) + .ForEachAwaitWithCancellationAsync( + async (_, c) => + { + try + { + await _manager.NicoliveApiClient.ExtendProgramAsync(30, c); + } + catch (Exception e) when (e is not OperationCanceledException) + { + Debug.LogError(e); + } + }, ct) + .Forget(); + } + } +} \ No newline at end of file diff --git a/Assets/NicoliveClient/Example/Console/Scripts/MainPanel/SegmentPanel/SegmentPanel.cs.meta b/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/SegmentPanel/SegmentPanel.cs.meta similarity index 100% rename from Assets/NicoliveClient/Example/Console/Scripts/MainPanel/SegmentPanel/SegmentPanel.cs.meta rename to Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/MainPanel/SegmentPanel/SegmentPanel.cs.meta diff --git a/Assets/NicoliveClient/Example/Console/Scripts/NicoliveSampleManager.cs b/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/NicoliveSampleManager.cs similarity index 77% rename from Assets/NicoliveClient/Example/Console/Scripts/NicoliveSampleManager.cs rename to Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/NicoliveSampleManager.cs index a162059..7633466 100644 --- a/Assets/NicoliveClient/Example/Console/Scripts/NicoliveSampleManager.cs +++ b/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/NicoliveSampleManager.cs @@ -1,9 +1,14 @@ using System; 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 UnityEngine; -namespace NicoliveClient.Example +namespace TORISOUP.NicoliveClient.Example.Console.Scripts { public class NicoliveSampleManager : MonoBehaviour { @@ -14,7 +19,10 @@ public class NicoliveSampleManager : MonoBehaviour private Regex _lvRegex = new Regex(@"^lv\d+$"); - public NicoliveApiClient NicoliveApiClient { get { return _nicoliveApiClient; } } + public NicoliveApiClient NicoliveApiClient + { + get { return _nicoliveApiClient; } + } /// /// 現在の部屋情報 @@ -54,9 +62,9 @@ public IReadOnlyReactiveProperty IsSetProgramId { get { - return _isSetProgramId ?? - (_isSetProgramId = CurrentProgramId.Select(x => !string.IsNullOrEmpty(x)) - .ToReadOnlyReactiveProperty()); + return _isSetProgramId ??= + CurrentProgramId.Select(x => !string.IsNullOrEmpty(x)) + .ToReadOnlyReactiveProperty(); } } @@ -78,29 +86,25 @@ private void Start() }); //対象番組設定 - _currentProgramId.Subscribe(x => - { - if (_nicoliveApiClient != null) _nicoliveApiClient.SetNicoliveProgramId(x); - }); + _currentProgramId.Subscribe(x => { _nicoliveApiClient?.SetNicoliveProgramId(x); }); IsSetProgramId .Subscribe(x => _blockPanel.SetActive(!x)); - } /// /// 現在のユーザに紐づく番組IDを取得する /// - public IObservable GetCurrentProgramIdAsync() + public async UniTask GetCurrentProgramIdAsync(CancellationToken ct) { if (!_loginManager.IsLoggedIn.Value) { Debug.LogWarning("ログインしていません"); - return Observable.Return(""); + throw new Exception("Not logged in."); } //番組ID取得 - return _nicoliveApiClient.GetCurrentCommunityProgramIdAsync(); + return await _nicoliveApiClient.GetCurrentCommunityProgramIdAsync(ct); } /// @@ -118,6 +122,5 @@ public void SetTargetProgramId(string programId) Debug.LogError("不正な番組IDです"); } } - } -} +} \ No newline at end of file diff --git a/Assets/NicoliveClient/Example/Console/Scripts/NicoliveSampleManager.cs.meta b/Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/NicoliveSampleManager.cs.meta similarity index 100% rename from Assets/NicoliveClient/Example/Console/Scripts/NicoliveSampleManager.cs.meta rename to Assets/TORISOUP/NicoliveClient/Example/Console/Scripts/NicoliveSampleManager.cs.meta diff --git a/Assets/TORISOUP/NicoliveClient/Example/TORISOUP.NicoliveClient.Example.asmdef b/Assets/TORISOUP/NicoliveClient/Example/TORISOUP.NicoliveClient.Example.asmdef new file mode 100644 index 0000000..05488f4 --- /dev/null +++ b/Assets/TORISOUP/NicoliveClient/Example/TORISOUP.NicoliveClient.Example.asmdef @@ -0,0 +1,19 @@ +{ + "name": "TORISOUP.NicoliveClient.Example", + "rootNamespace": "", + "references": [ + "GUID:560b04d1a97f54a4e82edc0cbbb69285", + "GUID:f51ebe6a0ceec4240a699833d6309b23", + "GUID:d973473ad59dc49459586b82e5bd4bc1", + "GUID:5c01796d064528144a599661eaab93a6" + ], + "includePlatforms": [], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": true, + "defineConstraints": [], + "versionDefines": [], + "noEngineReferences": false +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/Async/UniRx.Async.asmdef.meta b/Assets/TORISOUP/NicoliveClient/Example/TORISOUP.NicoliveClient.Example.asmdef.meta similarity index 76% rename from Assets/Plugins/UniRx/Scripts/Async/UniRx.Async.asmdef.meta rename to Assets/TORISOUP/NicoliveClient/Example/TORISOUP.NicoliveClient.Example.asmdef.meta index e497045..0f2bebe 100644 --- a/Assets/Plugins/UniRx/Scripts/Async/UniRx.Async.asmdef.meta +++ b/Assets/TORISOUP/NicoliveClient/Example/TORISOUP.NicoliveClient.Example.asmdef.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: f51ebe6a0ceec4240a699833d6309b23 +guid: defb1ffb414198a4cb4e009b679dd877 AssemblyDefinitionImporter: externalObjects: {} userData: diff --git a/Assets/NicoliveClient/Plugins.meta b/Assets/TORISOUP/NicoliveClient/Plugins.meta similarity index 80% rename from Assets/NicoliveClient/Plugins.meta rename to Assets/TORISOUP/NicoliveClient/Plugins.meta index a311e12..02835ba 100644 --- a/Assets/NicoliveClient/Plugins.meta +++ b/Assets/TORISOUP/NicoliveClient/Plugins.meta @@ -1,8 +1,6 @@ fileFormatVersion: 2 guid: 633e44d43ab1db14bbe400e0ee146395 folderAsset: yes -timeCreated: 1517412960 -licenseType: Pro DefaultImporter: externalObjects: {} userData: diff --git a/Assets/NicoliveClient/Plugins/Client.meta b/Assets/TORISOUP/NicoliveClient/Plugins/Client.meta similarity index 95% rename from Assets/NicoliveClient/Plugins/Client.meta rename to Assets/TORISOUP/NicoliveClient/Plugins/Client.meta index 8bd8e52..5b613d4 100644 --- a/Assets/NicoliveClient/Plugins/Client.meta +++ b/Assets/TORISOUP/NicoliveClient/Plugins/Client.meta @@ -1,10 +1,10 @@ -fileFormatVersion: 2 -guid: f8f1e19611451d64a8bd79f967ee1c62 -folderAsset: yes -timeCreated: 1517318511 -licenseType: Pro -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: +fileFormatVersion: 2 +guid: f8f1e19611451d64a8bd79f967ee1c62 +folderAsset: yes +timeCreated: 1517318511 +licenseType: Pro +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/TORISOUP/NicoliveClient/Plugins/Client/NicoliveApiClient.cs b/Assets/TORISOUP/NicoliveClient/Plugins/Client/NicoliveApiClient.cs new file mode 100644 index 0000000..0acf553 --- /dev/null +++ b/Assets/TORISOUP/NicoliveClient/Plugins/Client/NicoliveApiClient.cs @@ -0,0 +1,545 @@ +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; + +namespace TORISOUP.NicoliveClient.Client +{ + public class NicoliveApiClient + { + private NiconicoUser _niconicoUser; + + /// + /// 現在の操作対象となっている番組ID + /// + public string NicoliveProgramId { get; private set; } + + private string _userAgent = "UnityNicoliveClient"; + + #region Setup + + /// + /// NicoliveApiClientを初期化する + /// + /// ユーザ情報 + public NicoliveApiClient(NiconicoUser niconicoUser) + { + _niconicoUser = niconicoUser; + } + + /// + /// NicoliveApiClientを初期化する + /// + /// ユーザ情報 + /// 操作対象の番組ID(lv) + public NicoliveApiClient(NiconicoUser niconicoUser, string nicoliveProgramId) + { + _niconicoUser = niconicoUser; + NicoliveProgramId = nicoliveProgramId; + } + + /// + /// 操作対象とする番組IDを設定する + /// + public void SetNicoliveProgramId(string id) + { + NicoliveProgramId = id; + } + + /// + /// UserAgentを設定する + /// + public void SetCustomUserAgent(string userAgent) + { + _userAgent = userAgent; + } + + #endregion + + + #region 放送中番組取得 + + /// + /// 現在放送中(テスト中含む)のコミュニティ番組の番組IDを取得する。 + /// 更新頻度が遅めのAPIなので、数分待たないと最新情報が取得できない場合がある。 + /// チャンネル番組の放送中IDを取得する場合はGetScheduledProgramListAsync()を使うこと。 + /// + public async UniTask GetCurrentCommunityProgramIdAsync(CancellationToken ct) + { + var schedules = await GetScheduledProgramListAsync(ct); + return schedules + .Where(x => x.Status == ProgramStatus.Test || x.Status == ProgramStatus.OnAir) + .Select(x => x.ProgramId) + .ToArray(); + } + + #endregion + + #region 放送予定番組一覧取得 + + /// + /// 放送予定、現在放送中の番組一覧を取得する + /// (更新頻度が遅めのAPIなので、数分待たないと最新値が取得できない場合がある) + /// + public async UniTask GetScheduledProgramListAsync(CancellationToken ct) + { + var url = "https://live2.nicovideo.jp/unama/tool/v1/program_schedules"; + + using var uwr = UnityWebRequest.Get(url); + uwr.SetRequestHeader("Content-type", "application/json"); + uwr.SetRequestHeader("Cookie", "user_session=" + _niconicoUser.UserSession); + uwr.SetRequestHeader("User-Agent", _userAgent); + + try + { + await uwr.SendWebRequest().ToUniTask(cancellationToken: ct); + } + catch (Exception ex) when (ex is not OperationCanceledException) + { + throw new NicoliveApiClientException(uwr.downloadHandler.text, ex); + } + + var json = uwr.downloadHandler.text; + var dto = JsonUtility.FromJson>(json); + var schedules = dto.data.Select(x => x.ToProgramSchedule()).ToArray(); + return schedules; + } + + #endregion + + #region 運営コメント + + /// + /// 運営コメントを投稿する + /// + /// 本文 + /// 投稿者名(nullで非表示) + /// 表示色 + /// 永続表示するか + /// + public async UniTask SendOperatorCommentAsync( + string name, + string text, + string color, + bool isPermanent, + CancellationToken ct) + { + var url = $"https://live2.nicovideo.jp/watch/{NicoliveProgramId}/operator_comment"; + + var json = JsonUtility.ToJson(new OperatorCommentRequest + { + text = text, + userName = name, + isPermanent = isPermanent, + color = color + }); + + using var uwr = UnityWebRequest.Put(url, Encoding.UTF8.GetBytes(json)); + uwr.SetRequestHeader("Content-type", "application/json"); + uwr.SetRequestHeader("Cookie", "user_session=" + _niconicoUser.UserSession); + uwr.SetRequestHeader("User-Agent", _userAgent); + + try + { + await uwr.SendWebRequest().ToUniTask(cancellationToken: ct); + } + catch (Exception ex) when (ex is not OperationCanceledException) + { + throw new NicoliveApiClientException(uwr.downloadHandler.text, ex); + } + } + + + /// + /// 運営コメントの表示をやめる + /// + public async UniTask DeleteOperatorCommentAsync(CancellationToken ct) + { + var url = string.Format("https://live2.nicovideo.jp/watch/{0}/operator_comment", NicoliveProgramId); + + using var uwr = UnityWebRequest.Delete(url); + uwr.SetRequestHeader("Cookie", "user_session=" + _niconicoUser.UserSession); + uwr.SetRequestHeader("User-Agent", _userAgent); + + try + { + await uwr.SendWebRequest().ToUniTask(cancellationToken: ct); + } + catch (Exception ex) when (ex is not OperationCanceledException) + { + throw new NicoliveApiClientException(uwr.downloadHandler.text, ex); + } + } + + #endregion + + #region 番組開始/終了 + + /// + /// 番組を開始する + /// + /// + public async UniTask StartProgramAsync(CancellationToken ct) + { + await SegmentAsync("on_air", ct); + } + + /// + /// 番組を終了する + /// + /// + public async UniTask EndProgramAsync(CancellationToken ct) + { + await SegmentAsync("end", ct); + } + + private async UniTask SegmentAsync(string state, CancellationToken ct) + { + var url = string.Format("https://live2.nicovideo.jp/watch/{0}/segment", NicoliveProgramId); + + var json = "{\"state\":\"" + state + "\"}"; + + + using var uwr = UnityWebRequest.Put(url, json); + uwr.SetRequestHeader("Content-type", "application/json"); + uwr.SetRequestHeader("Cookie", "user_session=" + _niconicoUser.UserSession); + uwr.SetRequestHeader("User-Agent", _userAgent); + try + { + await uwr.SendWebRequest().ToUniTask(cancellationToken: ct); + } + catch (Exception ex) when (ex is not OperationCanceledException) + { + throw new NicoliveApiClientException(uwr.downloadHandler.text, ex); + } + } + + #endregion + + #region 番組延長 + + /// + /// 延長手段を取得する + /// + public async UniTask GetExtensionAsync(CancellationToken ct) + { + var url = $"https://live2.nicovideo.jp/watch/{NicoliveProgramId}/extension"; + + using var uwr = UnityWebRequest.Get(url); + uwr.SetRequestHeader("Content-type", "application/json"); + uwr.SetRequestHeader("Cookie", "user_session=" + _niconicoUser.UserSession); + uwr.SetRequestHeader("User-Agent", _userAgent); + try + { + await uwr.SendWebRequest().ToUniTask(cancellationToken: ct); + var json = uwr.downloadHandler.text; + var extensions = JsonUtility.FromJson>(json); + + return extensions.data.methods.Select(x => x.ToExtensionMethods()).ToArray(); + } + catch (Exception ex) when (ex is not OperationCanceledException) + { + throw new NicoliveApiClientException(uwr.downloadHandler.text, ex); + } + } + + + /// + /// 番組延長を行う + /// + /// 分数(30分単位) + /// + public async UniTask ExtendProgramAsync(int minutes, CancellationToken ct) + { + var url = string.Format("https://live2.nicovideo.jp/watch/{0}/extension", NicoliveProgramId); + + using var uwr = UnityWebRequest.Post(url, "POST"); + var data = Encoding.UTF8.GetBytes("{\"minutes\":" + minutes + "}"); + uwr.uploadHandler = new UploadHandlerRaw(data); + uwr.SetRequestHeader("Content-type", "application/json"); + uwr.SetRequestHeader("Cookie", "user_session=" + _niconicoUser.UserSession); + uwr.SetRequestHeader("User-Agent", _userAgent); + + try + { + await uwr.SendWebRequest().ToUniTask(cancellationToken: ct); + var json = uwr.downloadHandler.text; + var extendDto = JsonUtility.FromJson>(json); + return new ExtendResult(extendDto.data.end_time); + } + catch (Exception ex) when (ex is not OperationCanceledException) + { + throw new NicoliveApiClientException(uwr.downloadHandler.text, ex); + } + } + + #endregion + + #region 番組情報取得 + + /// + /// 番組情報を取得する + /// + public async UniTask GetProgramInfoAsync(string programId, CancellationToken ct) + { + return await _GetProgramInfoAsync(programId, ct); + } + + /// + /// 番組情報を取得する + /// SetNicoliveProgramId()で設定された番組IDを対象とする + /// + public async UniTask GetProgramInfoAsync(CancellationToken ct) + { + return await _GetProgramInfoAsync(NicoliveProgramId, ct); + } + + private async UniTask _GetProgramInfoAsync(string programId, CancellationToken ct) + { + var lv = programId; + var url = $"https://live2.nicovideo.jp/watch/{lv}/programinfo"; + + using var uwr = UnityWebRequest.Get(url); + uwr.SetRequestHeader("Content-type", "application/json"); + uwr.SetRequestHeader("Cookie", "user_session=" + _niconicoUser.UserSession); + uwr.SetRequestHeader("User-Agent", _userAgent); + try + { + try + { + await uwr.SendWebRequest().ToUniTask(cancellationToken: ct); + } + catch (Exception) + { + throw new ProgramNotFoundException($"{lv} is not found."); + } + + var json = uwr.downloadHandler.text; + var dto = JsonUtility.FromJson>(json); + var programInfo = dto.data.ToProgramInfo(); + return programInfo; + } + catch (Exception ex) when (ex is not OperationCanceledException) + { + throw new NicoliveApiClientException(uwr.downloadHandler.text, ex); + } + } + + #endregion + + #region 番組統計情報取得 + + /// + /// 番組統計情報を取得する + /// + public async UniTask GetProgramStatisticsAsync(CancellationToken ct) + { + var url = $"https://live2.nicovideo.jp/watch/{NicoliveProgramId}/statistics"; + + using var uwr = UnityWebRequest.Get(url); + uwr.SetRequestHeader("Content-type", "application/json"); + uwr.SetRequestHeader("Cookie", "user_session=" + _niconicoUser.UserSession); + uwr.SetRequestHeader("User-Agent", _userAgent); + try + { + await uwr.SendWebRequest().ToUniTask(cancellationToken: ct); + var json = uwr.downloadHandler.text; + var dto = JsonUtility.FromJson>(json); + return dto.data.ToStatisticsResult(); + } + catch (Exception ex) when (ex is not OperationCanceledException) + { + throw new NicoliveApiClientException(uwr.downloadHandler.text, ex); + } + } + + #endregion + + #region アンケート + + /// + /// アンケートを開始する + /// + /// アンケートタイトル + /// 設問 + /// + public async UniTask StartEnqueteAsync( + string title, + IEnumerable questions, + CancellationToken ct) + { + await StartEnqueteAsync(NicoliveProgramId, title, questions, ct); + } + + /// + /// アンケートを開始する + /// + /// lvから始まる方のID + /// アンケートタイトル + /// 設問 + /// + public async UniTask StartEnqueteAsync(string nicoliveProgramId, + string title, + IEnumerable questions, + CancellationToken ct) + { + await _StartEnqueteAsync(nicoliveProgramId, title, questions, ct); + } + + private async UniTask _StartEnqueteAsync(string lv, + string title, + IEnumerable questions, + CancellationToken ct) + { + var url = $"https://live2.nicovideo.jp/unama/watch/{lv}/enquete"; + + var items = questions as string[] ?? questions.ToArray(); + + if (items.Length < 2) + { + throw new InvalidEnqueteException("設問は2つ以上必要です"); + } + + var json = JsonUtility.ToJson(new EnqueteRequest + { + question = title, + items = items + }); + + using var uwr = UnityWebRequest.Post(url, "POST"); + var data = Encoding.UTF8.GetBytes(json); + uwr.uploadHandler = new UploadHandlerRaw(data); + uwr.SetRequestHeader("Content-type", "application/json"); + uwr.SetRequestHeader("Cookie", "user_session=" + _niconicoUser.UserSession); + uwr.SetRequestHeader("User-Agent", _userAgent); + + try + { + await uwr.SendWebRequest().ToUniTask(cancellationToken: ct); + } + catch (Exception ex) when (ex is not OperationCanceledException) + { + throw new NicoliveApiClientException(uwr.downloadHandler.text, ex); + } + } + + + /// + /// アンケートの結果を表示する + /// + /// + public async UniTask ShowResultEnqueteAsync(CancellationToken ct) + { + return await ShowResultEnqueteAsync(NicoliveProgramId, ct); + } + + + /// + /// アンケートの結果を表示する + /// + /// + public async UniTask ShowResultEnqueteAsync(string nicoliveProgramId, CancellationToken ct) + { + return await _ShowResultEnqueteAsync(nicoliveProgramId, ct); + } + + private async UniTask _ShowResultEnqueteAsync(string lv, CancellationToken ct) + { + var url = $"https://live2.nicovideo.jp/unama/watch/{lv}/enquete/result"; + + using var uwr = UnityWebRequest.Post(url, "POST"); + uwr.SetRequestHeader("Content-type", "application/json"); + uwr.SetRequestHeader("Cookie", "user_session=" + _niconicoUser.UserSession); + uwr.SetRequestHeader("User-Agent", _userAgent); + + try + { + await uwr.SendWebRequest().ToUniTask(cancellationToken: ct); + var result = uwr.downloadHandler.text; + var dto = JsonUtility.FromJson>(result); + return dto.data.ToEnqueteResult(); + } + catch (Exception ex) when (ex is not OperationCanceledException) + { + throw new NicoliveApiClientException(uwr.downloadHandler.text, ex); + } + } + + /// + /// アンケートを終了する + /// + /// + public async UniTask FinishEnqueteAsync(CancellationToken ct) + { + await FinishEnqueteAsync(NicoliveProgramId, ct); + } + + /// + /// アンケートを終了する + /// + /// + public async UniTask FinishEnqueteAsync(string nicoliveProgramId, CancellationToken ct) + { + await _FinishEnqueteCoroutine(nicoliveProgramId,ct); + } + + private async UniTask _FinishEnqueteCoroutine(string nicoliveProgramId, CancellationToken ct) + { + var url = $"https://live2.nicovideo.jp/unama/watch/{nicoliveProgramId}/enquete"; + + + using var uwr = UnityWebRequest.Delete(url); + uwr.SetRequestHeader("Content-type", "application/json"); + uwr.SetRequestHeader("Cookie", "user_session=" + _niconicoUser.UserSession); + uwr.SetRequestHeader("User-Agent", _userAgent); + + try + { + await uwr.SendWebRequest().ToUniTask(cancellationToken: ct); + } + catch (Exception ex) when (ex is not OperationCanceledException) + { + throw new NicoliveApiClientException(uwr.downloadHandler.text, ex); + } + } + + #endregion + + } + + + public class NicoliveApiClientException : Exception + { + public NicoliveApiClientException(string message) : base(message) + { + } + + public NicoliveApiClientException(string message, Exception ex) : base(message, ex) + { + } + } + + public class ProgramNotFoundException : NicoliveApiClientException + { + public ProgramNotFoundException(string message) : base(message) + { + } + } + + public class InvalidEnqueteException : NicoliveApiClientException + { + public InvalidEnqueteException(string message) : base(message) + { + } + } +} \ No newline at end of file diff --git a/Assets/NicoliveClient/Plugins/Client/NicoliveApiClient.cs.meta b/Assets/TORISOUP/NicoliveClient/Plugins/Client/NicoliveApiClient.cs.meta similarity index 95% rename from Assets/NicoliveClient/Plugins/Client/NicoliveApiClient.cs.meta rename to Assets/TORISOUP/NicoliveClient/Plugins/Client/NicoliveApiClient.cs.meta index 268c8e3..c227755 100644 --- a/Assets/NicoliveClient/Plugins/Client/NicoliveApiClient.cs.meta +++ b/Assets/TORISOUP/NicoliveClient/Plugins/Client/NicoliveApiClient.cs.meta @@ -1,13 +1,13 @@ -fileFormatVersion: 2 -guid: 44018d8a44e893943b66f27a1e71df12 -timeCreated: 1517326296 -licenseType: Pro -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: +fileFormatVersion: 2 +guid: 44018d8a44e893943b66f27a1e71df12 +timeCreated: 1517326296 +licenseType: Pro +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/NicoliveClient/Plugins/Client/NicoliveCommentClient.cs b/Assets/TORISOUP/NicoliveClient/Plugins/Client/NicoliveCommentClient.cs similarity index 68% rename from Assets/NicoliveClient/Plugins/Client/NicoliveCommentClient.cs rename to Assets/TORISOUP/NicoliveClient/Plugins/Client/NicoliveCommentClient.cs index 4d25213..c67f632 100644 --- a/Assets/NicoliveClient/Plugins/Client/NicoliveCommentClient.cs +++ b/Assets/TORISOUP/NicoliveClient/Plugins/Client/NicoliveCommentClient.cs @@ -1,9 +1,14 @@ using System; +using System.Threading; +using System.Threading.Tasks; +using Cysharp.Threading.Tasks; +using TORISOUP.NicoliveClient.Comment; +using TORISOUP.NicoliveClient.Response; using UniRx; using UnityEngine; using WebSocketSharp; -namespace NicoliveClient +namespace TORISOUP.NicoliveClient.Client { /// /// コメントサーバに接続してコメントを受信するクライアント @@ -31,7 +36,8 @@ public class NicoliveCommentClient : IDisposable public string ThreadId { get; private set; } private IObservable _onMessageAsObservable; - private object lockObject = new object(); + private readonly object _lockObject = new object(); + private CancellationTokenSource _cancellationTokenSource = new CancellationTokenSource(); /// /// 受信したコメントオブジェクトを通知する @@ -40,7 +46,7 @@ public IObservable OnMessageAsObservable { get { - lock (lockObject) + lock (_lockObject) { return !_isDisposed ? _onMessageAsObservable : Observable.Empty(); } @@ -101,19 +107,37 @@ private void Initialize() /// 過去何件分取得するか public void Connect(int resFrom) { + Disconnect(); + _cancellationTokenSource = new CancellationTokenSource(); + if (resFrom < 0) resFrom = 0; - Observable.Start(() => + + ConnectAsync(resFrom, _cancellationTokenSource.Token).Forget(); + } + + private async UniTaskVoid ConnectAsync(int resFrom, CancellationToken ct) + { + if (_ws == null) return; + + await UniTask.SwitchToThreadPool(); + + _ws.Connect(); + + //初期化のJson + _ws.Send( + "[{\"ping\":{\"content\":\"rs:0\"}},{\"ping\":{\"content\":\"ps:0\"}}," + + "{\"thread\":{\"thread\":\"" + ThreadId + "\",\"version\":\"20061206\",\"fork\":0," + + "\"user_id\":\"" + _userId + "\",\"res_from\":-" + resFrom + + ",\"with_global\":1,\"scores\":1,\"nicoru\":0}}," + + "{\"ping\":{\"content\":\"pf:0\"}},{\"ping\":{\"content\":\"rf:0\"}}]" + ); + + // pingを定期的に投げる + while (!ct.IsCancellationRequested) { - _ws.Connect(); - - //初期化のJson - _ws.Send( - "[{\"ping\":{\"content\":\"rs:0\"}},{\"ping\":{\"content\":\"ps:0\"}}," - + "{\"thread\":{\"thread\":\"" + ThreadId + "\",\"version\":\"20061206\",\"fork\":0," - + "\"user_id\":\"" + _userId + "\",\"res_from\":-" + resFrom + ",\"with_global\":1,\"scores\":1,\"nicoru\":0}}," - + "{\"ping\":{\"content\":\"pf:0\"}},{\"ping\":{\"content\":\"rf:0\"}}]" - ); - }).Subscribe(); + await Task.Delay(TimeSpan.FromSeconds(10), cancellationToken: ct).ConfigureAwait(false); + if (_ws != null && _ws.IsAlive) _ws.Ping(); + } } /// @@ -121,7 +145,13 @@ public void Connect(int resFrom) /// public void Disconnect() { - _ws.CloseAsync(); + _cancellationTokenSource?.Cancel(); + _cancellationTokenSource?.Dispose(); + + if (_ws != null && _ws.IsAlive) + { + _ws.CloseAsync(); + } } /// @@ -129,12 +159,9 @@ public void Disconnect() /// public void Dispose() { - lock (lockObject) + lock (_lockObject) { - if (_ws != null) - { - _ws.CloseAsync(); - } + Disconnect(); if (_disposedEventAsyncSubject != null) { @@ -148,4 +175,4 @@ public void Dispose() } } } -} +} \ No newline at end of file diff --git a/Assets/NicoliveClient/Plugins/Client/NicoliveCommentClient.cs.meta b/Assets/TORISOUP/NicoliveClient/Plugins/Client/NicoliveCommentClient.cs.meta similarity index 95% rename from Assets/NicoliveClient/Plugins/Client/NicoliveCommentClient.cs.meta rename to Assets/TORISOUP/NicoliveClient/Plugins/Client/NicoliveCommentClient.cs.meta index 8494b8c..45947f6 100644 --- a/Assets/NicoliveClient/Plugins/Client/NicoliveCommentClient.cs.meta +++ b/Assets/TORISOUP/NicoliveClient/Plugins/Client/NicoliveCommentClient.cs.meta @@ -1,13 +1,13 @@ -fileFormatVersion: 2 -guid: 550074654b9cbc04da12fe440660a172 -timeCreated: 1517664563 -licenseType: Pro -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: +fileFormatVersion: 2 +guid: 550074654b9cbc04da12fe440660a172 +timeCreated: 1517664563 +licenseType: Pro +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/TORISOUP/NicoliveClient/Plugins/Client/NiconicoUserClient.cs b/Assets/TORISOUP/NicoliveClient/Plugins/Client/NiconicoUserClient.cs new file mode 100644 index 0000000..318dee7 --- /dev/null +++ b/Assets/TORISOUP/NicoliveClient/Plugins/Client/NiconicoUserClient.cs @@ -0,0 +1,56 @@ +using System; +using System.Collections; +using System.Text.RegularExpressions; +using System.Threading; +using Cysharp.Threading.Tasks; +using UniRx; +using UnityEngine; +using UnityEngine.Networking; + +namespace TORISOUP.NicoliveClient.Client +{ + /// + /// ニコニコのアカウント系APIを実行してユーザ情報を返すクライアント + /// + public static class NiconicoUserClient + { + /// + /// ニコニコにログインする + /// 2段階認証は未対応 + /// + /// メールアドレス + /// パスワード + /// 成功時:NiconicoUser,失敗時:NiconicoLoginException + public static async UniTask LoginAsync(string mail, string password, CancellationToken ct) + { + var url = "https://account.nicovideo.jp/api/v1/login"; + + var userSessionRegex = new Regex(@"user_session=user_session_(\w+);"); + + var form = new WWWForm(); + form.AddField("mail", mail); + form.AddField("password", password); + + using var uwr = UnityWebRequest.Post(url, form); + uwr.redirectLimit = 0; + + await uwr.SendWebRequest().ToUniTask(cancellationToken: ct); + + var cookie = uwr.GetResponseHeader("Set-Cookie"); + var match = userSessionRegex.Match(cookie); + + if (!match.Success) throw new NiconicoLoginException("ログインに失敗しました"); + + var userSession = "user_session_" + match.Groups[1]; + var userId = match.Groups[1].ToString().Split('_')[0]; + return new NiconicoUser(userId, userSession); + } + } + + public class NiconicoLoginException : Exception + { + public NiconicoLoginException(string message) : base(message) + { + } + } +} \ No newline at end of file diff --git a/Assets/NicoliveClient/Plugins/Client/NiconicoUserClient.cs.meta b/Assets/TORISOUP/NicoliveClient/Plugins/Client/NiconicoUserClient.cs.meta similarity index 95% rename from Assets/NicoliveClient/Plugins/Client/NiconicoUserClient.cs.meta rename to Assets/TORISOUP/NicoliveClient/Plugins/Client/NiconicoUserClient.cs.meta index e721f81..2ecfbac 100644 --- a/Assets/NicoliveClient/Plugins/Client/NiconicoUserClient.cs.meta +++ b/Assets/TORISOUP/NicoliveClient/Plugins/Client/NiconicoUserClient.cs.meta @@ -1,13 +1,13 @@ -fileFormatVersion: 2 -guid: 4051aaed8277a60408c931e47bbbdeca -timeCreated: 1517318511 -licenseType: Pro -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: +fileFormatVersion: 2 +guid: 4051aaed8277a60408c931e47bbbdeca +timeCreated: 1517318511 +licenseType: Pro +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/TORISOUP/NicoliveClient/Plugins/Client/NicovideoApiClient.cs b/Assets/TORISOUP/NicoliveClient/Plugins/Client/NicovideoApiClient.cs new file mode 100644 index 0000000..a7a0563 --- /dev/null +++ b/Assets/TORISOUP/NicoliveClient/Plugins/Client/NicovideoApiClient.cs @@ -0,0 +1,95 @@ +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 +{ + /// + /// ニコニコ動画向けAPIClient + /// + public static class NicovideoApiClient + { + public static async UniTask GetNicovideoInfoFromMylistAsync(ulong mylistId, CancellationToken ct) + { + return await _GetNicovideoInfoFromMylistAsync(mylistId, null, ct); + } + + public static async UniTask GetNicovideoInfoFromMylistAsync(ulong mylistId, + NiconicoUser user, + CancellationToken ct) + { + return await _GetNicovideoInfoFromMylistAsync(mylistId, user.UserSession, ct); + } + + private static async UniTask _GetNicovideoInfoFromMylistAsync( + ulong mylistId, + string session, + CancellationToken ct) + { + var url = $"https://www.nicovideo.jp/mylist/{mylistId}?rss=2.0"; + + using var uwr = UnityWebRequest.Get(url); + if (!string.IsNullOrEmpty(session)) uwr.SetRequestHeader("Cookie", "user_session=" + session); + + + try + { + await uwr.SendWebRequest().ToUniTask(cancellationToken: ct); + } + catch (Exception ex) when (ex is not OperationCanceledException) + { + throw new NicovideoApiClientException(uwr.downloadHandler.text, ex); + } + + var titleRegex = new Regex(@"マイリスト (\w+)‐ニコニコ動画"); + var uriRegex = new Regex(@"src=""(https?://[\w/:%#\$&\?\(\)~\.=\+\-]+)"""); + var viodeIdRegex = new Regex(@"(sm\d+)"); + + var xml = uwr.downloadHandler.text; + + // XMLをパースして動画情報を取得 + var xdoc = XDocument.Parse(xml); + var rss = xdoc.Element("rss"); + var channel = rss.Element("channel"); + var t = channel.Element("title").Value; + var mylistTitle = titleRegex.Match(t).Groups[1].Value; + + var videos = channel.Elements("item") + .Select(i => + { + try + { + var title = i.Element("title").Value; + var link = i.Element("link").Value; + var des = i.Element("description").Value; + var thumbnailUri = uriRegex.Match(des).Groups[1].Value; + var videoId = viodeIdRegex.Match(link).Groups[1].Value; + return new VideoInfo(title, videoId, thumbnailUri); + } + catch + { + return default(VideoInfo); + } + }) + .Where(x => !string.IsNullOrEmpty(x.VideoId)) + .ToArray(); + + return (new MylistInfo(mylistTitle, videos)); + } + } + + public class NicovideoApiClientException : Exception + { + public NicovideoApiClientException(string message, Exception ex) : base(message, ex) + { + } + } +} \ No newline at end of file diff --git a/Assets/NicoliveClient/Plugins/Client/NicovideoApiClient.cs.meta b/Assets/TORISOUP/NicoliveClient/Plugins/Client/NicovideoApiClient.cs.meta similarity index 95% rename from Assets/NicoliveClient/Plugins/Client/NicovideoApiClient.cs.meta rename to Assets/TORISOUP/NicoliveClient/Plugins/Client/NicovideoApiClient.cs.meta index 1555b22..5ce1a57 100644 --- a/Assets/NicoliveClient/Plugins/Client/NicovideoApiClient.cs.meta +++ b/Assets/TORISOUP/NicoliveClient/Plugins/Client/NicovideoApiClient.cs.meta @@ -1,13 +1,13 @@ -fileFormatVersion: 2 -guid: 43462618193eef7499565a04699fa1fb -timeCreated: 1543129557 -licenseType: Pro -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: +fileFormatVersion: 2 +guid: 43462618193eef7499565a04699fa1fb +timeCreated: 1543129557 +licenseType: Pro +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/NicoliveClient/Plugins/Comment.meta b/Assets/TORISOUP/NicoliveClient/Plugins/Comment.meta similarity index 95% rename from Assets/NicoliveClient/Plugins/Comment.meta rename to Assets/TORISOUP/NicoliveClient/Plugins/Comment.meta index 181f078..0758896 100644 --- a/Assets/NicoliveClient/Plugins/Comment.meta +++ b/Assets/TORISOUP/NicoliveClient/Plugins/Comment.meta @@ -1,10 +1,10 @@ -fileFormatVersion: 2 -guid: ca862365d75d23340b1308b5447236dd -folderAsset: yes -timeCreated: 1518016780 -licenseType: Pro -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: +fileFormatVersion: 2 +guid: ca862365d75d23340b1308b5447236dd +folderAsset: yes +timeCreated: 1518016780 +licenseType: Pro +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/NicoliveClient/Plugins/Comment/Chat.cs b/Assets/TORISOUP/NicoliveClient/Plugins/Comment/Chat.cs similarity index 56% rename from Assets/NicoliveClient/Plugins/Comment/Chat.cs rename to Assets/TORISOUP/NicoliveClient/Plugins/Comment/Chat.cs index c852749..8c70ba2 100644 --- a/Assets/NicoliveClient/Plugins/Comment/Chat.cs +++ b/Assets/TORISOUP/NicoliveClient/Plugins/Comment/Chat.cs @@ -1,11 +1,11 @@ using System; -namespace NicoliveClient +namespace TORISOUP.NicoliveClient.Comment { /// /// コメントブジェクト /// - public struct Chat + public struct Chat : IEquatable { /// /// ThreadId @@ -63,7 +63,17 @@ public struct Chat /// public int Score { get; private set; } - public Chat(string thread, long vpos, long date, string mail, string userId, int premium, bool anonymity, string content, int no, int roomId, int score) : this() + public Chat(string thread, + long vpos, + long date, + string mail, + string userId, + int premium, + bool anonymity, + string content, + int no, + int roomId, + int score) : this() { Thread = thread; Vpos = vpos; @@ -93,10 +103,39 @@ public bool IsStaff { get { return (Premium & 2) != 0; } } + + public bool Equals(Chat other) + { + return Thread == other.Thread && Vpos == other.Vpos && Date == other.Date && Mail == other.Mail && + UserId == other.UserId && Premium == other.Premium && Anonymity == other.Anonymity && + Content == other.Content && No == other.No && RoomId == other.RoomId && Score == other.Score; + } + + public override bool Equals(object obj) + { + return obj is Chat other && Equals(other); + } + + public override int GetHashCode() + { + var hashCode = new HashCode(); + hashCode.Add(Thread); + hashCode.Add(Vpos); + hashCode.Add(Date); + hashCode.Add(Mail); + hashCode.Add(UserId); + hashCode.Add(Premium); + hashCode.Add(Anonymity); + hashCode.Add(Content); + hashCode.Add(No); + hashCode.Add(RoomId); + hashCode.Add(Score); + return hashCode.ToHashCode(); + } } [Serializable] - internal struct ChatDto + internal struct ChatDto : IEquatable { public string thread; public long vpos; @@ -128,7 +167,35 @@ public Chat ToChat(int roomId) no, roomId, score - ); + ); + } + + public bool Equals(ChatDto other) + { + return thread == other.thread && vpos == other.vpos && date == other.date && mail == other.mail && + user_id == other.user_id && premium == other.premium && anonymity == other.anonymity && + content == other.content && no == other.no && score == other.score; + } + + public override bool Equals(object obj) + { + return obj is ChatDto other && Equals(other); + } + + public override int GetHashCode() + { + var hashCode = new HashCode(); + hashCode.Add(thread); + hashCode.Add(vpos); + hashCode.Add(date); + hashCode.Add(mail); + hashCode.Add(user_id); + hashCode.Add(premium); + hashCode.Add(anonymity); + hashCode.Add(content); + hashCode.Add(no); + hashCode.Add(score); + return hashCode.ToHashCode(); } } @@ -137,4 +204,4 @@ internal struct CommentDto { public ChatDto chat; } -} +} \ No newline at end of file diff --git a/Assets/NicoliveClient/Plugins/Comment/Chat.cs.meta b/Assets/TORISOUP/NicoliveClient/Plugins/Comment/Chat.cs.meta similarity index 95% rename from Assets/NicoliveClient/Plugins/Comment/Chat.cs.meta rename to Assets/TORISOUP/NicoliveClient/Plugins/Comment/Chat.cs.meta index 4ee0f95..86a15a2 100644 --- a/Assets/NicoliveClient/Plugins/Comment/Chat.cs.meta +++ b/Assets/TORISOUP/NicoliveClient/Plugins/Comment/Chat.cs.meta @@ -1,13 +1,13 @@ -fileFormatVersion: 2 -guid: 08eff1b9f6874454db2bad2d64e99a4f -timeCreated: 1518016780 -licenseType: Pro -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: +fileFormatVersion: 2 +guid: 08eff1b9f6874454db2bad2d64e99a4f +timeCreated: 1518016780 +licenseType: Pro +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/TORISOUP/NicoliveClient/Plugins/NiconicoUser.cs b/Assets/TORISOUP/NicoliveClient/Plugins/NiconicoUser.cs new file mode 100644 index 0000000..97055e8 --- /dev/null +++ b/Assets/TORISOUP/NicoliveClient/Plugins/NiconicoUser.cs @@ -0,0 +1,38 @@ +using System; + +namespace TORISOUP.NicoliveClient +{ + public struct NiconicoUser : IEquatable + { + /// + /// ユーザID + /// + public string UserId { get; private set; } + + /// + /// ユーザセッション(APIの実行に必要) + /// + public string UserSession { get; private set; } + + public NiconicoUser(string userId, string userSession) : this() + { + UserId = userId; + UserSession = userSession; + } + + public bool Equals(NiconicoUser other) + { + return UserId == other.UserId && UserSession == other.UserSession; + } + + public override bool Equals(object obj) + { + return obj is NiconicoUser other && Equals(other); + } + + public override int GetHashCode() + { + return HashCode.Combine(UserId, UserSession); + } + } +} \ No newline at end of file diff --git a/Assets/NicoliveClient/Plugins/NiconicoUser.cs.meta b/Assets/TORISOUP/NicoliveClient/Plugins/NiconicoUser.cs.meta similarity index 95% rename from Assets/NicoliveClient/Plugins/NiconicoUser.cs.meta rename to Assets/TORISOUP/NicoliveClient/Plugins/NiconicoUser.cs.meta index 27d92b7..aef8aa9 100644 --- a/Assets/NicoliveClient/Plugins/NiconicoUser.cs.meta +++ b/Assets/TORISOUP/NicoliveClient/Plugins/NiconicoUser.cs.meta @@ -1,13 +1,13 @@ -fileFormatVersion: 2 -guid: 076ffc9106454a047a364e9ef364f611 -timeCreated: 1517315478 -licenseType: Pro -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: +fileFormatVersion: 2 +guid: 076ffc9106454a047a364e9ef364f611 +timeCreated: 1517315478 +licenseType: Pro +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/NicoliveClient/Plugins/Request.meta b/Assets/TORISOUP/NicoliveClient/Plugins/Request.meta similarity index 95% rename from Assets/NicoliveClient/Plugins/Request.meta rename to Assets/TORISOUP/NicoliveClient/Plugins/Request.meta index e23c022..6b7dbbc 100644 --- a/Assets/NicoliveClient/Plugins/Request.meta +++ b/Assets/TORISOUP/NicoliveClient/Plugins/Request.meta @@ -1,10 +1,10 @@ -fileFormatVersion: 2 -guid: 9e05ae6bc56a8b945b83210270058f01 -folderAsset: yes -timeCreated: 1517327447 -licenseType: Pro -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: +fileFormatVersion: 2 +guid: 9e05ae6bc56a8b945b83210270058f01 +folderAsset: yes +timeCreated: 1517327447 +licenseType: Pro +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/NicoliveClient/Plugins/Request/Request.cs b/Assets/TORISOUP/NicoliveClient/Plugins/Request/Request.cs similarity index 92% rename from Assets/NicoliveClient/Plugins/Request/Request.cs rename to Assets/TORISOUP/NicoliveClient/Plugins/Request/Request.cs index db8436b..76e1de3 100644 --- a/Assets/NicoliveClient/Plugins/Request/Request.cs +++ b/Assets/TORISOUP/NicoliveClient/Plugins/Request/Request.cs @@ -1,6 +1,6 @@ using System; -namespace NicoliveClient +namespace TORISOUP.NicoliveClient.Request { [Serializable] internal struct OperatorCommentRequest diff --git a/Assets/NicoliveClient/Plugins/Request/Request.cs.meta b/Assets/TORISOUP/NicoliveClient/Plugins/Request/Request.cs.meta similarity index 95% rename from Assets/NicoliveClient/Plugins/Request/Request.cs.meta rename to Assets/TORISOUP/NicoliveClient/Plugins/Request/Request.cs.meta index 726bb40..29c4124 100644 --- a/Assets/NicoliveClient/Plugins/Request/Request.cs.meta +++ b/Assets/TORISOUP/NicoliveClient/Plugins/Request/Request.cs.meta @@ -1,13 +1,13 @@ -fileFormatVersion: 2 -guid: f8550346069929a46b27bb25b4d53fe2 -timeCreated: 1517327447 -licenseType: Pro -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: +fileFormatVersion: 2 +guid: f8550346069929a46b27bb25b4d53fe2 +timeCreated: 1517327447 +licenseType: Pro +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/NicoliveClient/Plugins/Response.meta b/Assets/TORISOUP/NicoliveClient/Plugins/Response.meta similarity index 95% rename from Assets/NicoliveClient/Plugins/Response.meta rename to Assets/TORISOUP/NicoliveClient/Plugins/Response.meta index 4ef1140..bab9e91 100644 --- a/Assets/NicoliveClient/Plugins/Response.meta +++ b/Assets/TORISOUP/NicoliveClient/Plugins/Response.meta @@ -1,10 +1,10 @@ -fileFormatVersion: 2 -guid: fcf5ad9278f639740ac89d1c512e77a9 -folderAsset: yes -timeCreated: 1517495812 -licenseType: Pro -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: +fileFormatVersion: 2 +guid: fcf5ad9278f639740ac89d1c512e77a9 +folderAsset: yes +timeCreated: 1517495812 +licenseType: Pro +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/NicoliveClient/Plugins/Response/ApiResponse.cs b/Assets/TORISOUP/NicoliveClient/Plugins/Response/ApiResponse.cs similarity index 95% rename from Assets/NicoliveClient/Plugins/Response/ApiResponse.cs rename to Assets/TORISOUP/NicoliveClient/Plugins/Response/ApiResponse.cs index 688f423..ef3fb6d 100644 --- a/Assets/NicoliveClient/Plugins/Response/ApiResponse.cs +++ b/Assets/TORISOUP/NicoliveClient/Plugins/Response/ApiResponse.cs @@ -1,6 +1,6 @@ using System; -namespace NicoliveClient +namespace TORISOUP.NicoliveClient.Response { [Serializable] internal struct ApiResponseDto diff --git a/Assets/NicoliveClient/Plugins/Response/ApiResponse.cs.meta b/Assets/TORISOUP/NicoliveClient/Plugins/Response/ApiResponse.cs.meta similarity index 95% rename from Assets/NicoliveClient/Plugins/Response/ApiResponse.cs.meta rename to Assets/TORISOUP/NicoliveClient/Plugins/Response/ApiResponse.cs.meta index 2d64f67..12a7a1e 100644 --- a/Assets/NicoliveClient/Plugins/Response/ApiResponse.cs.meta +++ b/Assets/TORISOUP/NicoliveClient/Plugins/Response/ApiResponse.cs.meta @@ -1,13 +1,13 @@ -fileFormatVersion: 2 -guid: 5d3843486766af94f8ee15c059e8b030 -timeCreated: 1517495812 -licenseType: Pro -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: +fileFormatVersion: 2 +guid: 5d3843486766af94f8ee15c059e8b030 +timeCreated: 1517495812 +licenseType: Pro +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/NicoliveClient/Plugins/Response/CommentServerInfo.cs b/Assets/TORISOUP/NicoliveClient/Plugins/Response/CommentServerInfo.cs similarity index 65% rename from Assets/NicoliveClient/Plugins/Response/CommentServerInfo.cs rename to Assets/TORISOUP/NicoliveClient/Plugins/Response/CommentServerInfo.cs index 45505d7..e0adfc0 100644 --- a/Assets/NicoliveClient/Plugins/Response/CommentServerInfo.cs +++ b/Assets/TORISOUP/NicoliveClient/Plugins/Response/CommentServerInfo.cs @@ -1,6 +1,6 @@ using System; -namespace NicoliveClient +namespace TORISOUP.NicoliveClient.Response { /// /// コメントサーバ情報 @@ -8,24 +8,21 @@ namespace NicoliveClient public struct CommentServerInfo { public string RoomName { get; } - public Uri XmlSocketUri { get; } public Uri WebSocketUri { get; } public string Thread { get; } public CommentServerInfo(string address, int port, string threadId, string roomName) { - XmlSocketUri = new Uri(string.Format("xmlsocket://{0}:{1}", address, port)); - WebSocketUri = new Uri(string.Format("ws://{0}:{1}/websocket", address, port)); + WebSocketUri = new Uri($"ws://{address}:{port}/websocket"); RoomName = roomName; Thread = threadId; } - public CommentServerInfo(string roomName, Uri webSocketUri,Uri xmlSocketUri, string thread) + public CommentServerInfo(string roomName, Uri webSocketUri, string thread) { RoomName = roomName; WebSocketUri = webSocketUri; - XmlSocketUri = xmlSocketUri; Thread = thread; } } -} +} \ No newline at end of file diff --git a/Assets/NicoliveClient/Plugins/Response/CommentServerInfo.cs.meta b/Assets/TORISOUP/NicoliveClient/Plugins/Response/CommentServerInfo.cs.meta similarity index 97% rename from Assets/NicoliveClient/Plugins/Response/CommentServerInfo.cs.meta rename to Assets/TORISOUP/NicoliveClient/Plugins/Response/CommentServerInfo.cs.meta index c590a9c..ebbd628 100644 --- a/Assets/NicoliveClient/Plugins/Response/CommentServerInfo.cs.meta +++ b/Assets/TORISOUP/NicoliveClient/Plugins/Response/CommentServerInfo.cs.meta @@ -1,3 +1,3 @@ -fileFormatVersion: 2 -guid: 6c4c9ef091ed4716b4ada171187d38f8 +fileFormatVersion: 2 +guid: 6c4c9ef091ed4716b4ada171187d38f8 timeCreated: 1541589711 \ No newline at end of file diff --git a/Assets/NicoliveClient/Plugins/Response/EnqueteResult.cs b/Assets/TORISOUP/NicoliveClient/Plugins/Response/EnqueteResult.cs similarity index 97% rename from Assets/NicoliveClient/Plugins/Response/EnqueteResult.cs rename to Assets/TORISOUP/NicoliveClient/Plugins/Response/EnqueteResult.cs index 3a7d778..072c073 100644 --- a/Assets/NicoliveClient/Plugins/Response/EnqueteResult.cs +++ b/Assets/TORISOUP/NicoliveClient/Plugins/Response/EnqueteResult.cs @@ -1,7 +1,7 @@ using System; using System.Linq; -namespace NicoliveClient +namespace TORISOUP.NicoliveClient.Response { /// /// アンケート実行結果 diff --git a/Assets/NicoliveClient/Plugins/Response/EnqueteResult.cs.meta b/Assets/TORISOUP/NicoliveClient/Plugins/Response/EnqueteResult.cs.meta similarity index 95% rename from Assets/NicoliveClient/Plugins/Response/EnqueteResult.cs.meta rename to Assets/TORISOUP/NicoliveClient/Plugins/Response/EnqueteResult.cs.meta index 6a6a0b6..a8ffd06 100644 --- a/Assets/NicoliveClient/Plugins/Response/EnqueteResult.cs.meta +++ b/Assets/TORISOUP/NicoliveClient/Plugins/Response/EnqueteResult.cs.meta @@ -1,13 +1,13 @@ -fileFormatVersion: 2 -guid: 38d490f62acbbd14c9c99aeff5e5ccb5 -timeCreated: 1518103847 -licenseType: Pro -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: +fileFormatVersion: 2 +guid: 38d490f62acbbd14c9c99aeff5e5ccb5 +timeCreated: 1518103847 +licenseType: Pro +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/NicoliveClient/Plugins/Response/ExtendResult.cs b/Assets/TORISOUP/NicoliveClient/Plugins/Response/ExtendResult.cs similarity index 89% rename from Assets/NicoliveClient/Plugins/Response/ExtendResult.cs rename to Assets/TORISOUP/NicoliveClient/Plugins/Response/ExtendResult.cs index bc1ef72..363e9b9 100644 --- a/Assets/NicoliveClient/Plugins/Response/ExtendResult.cs +++ b/Assets/TORISOUP/NicoliveClient/Plugins/Response/ExtendResult.cs @@ -1,6 +1,6 @@ using System; -namespace NicoliveClient +namespace TORISOUP.NicoliveClient.Response { public struct ExtendResult { diff --git a/Assets/NicoliveClient/Plugins/Response/ExtendResult.cs.meta b/Assets/TORISOUP/NicoliveClient/Plugins/Response/ExtendResult.cs.meta similarity index 95% rename from Assets/NicoliveClient/Plugins/Response/ExtendResult.cs.meta rename to Assets/TORISOUP/NicoliveClient/Plugins/Response/ExtendResult.cs.meta index 855c2e4..5af15b9 100644 --- a/Assets/NicoliveClient/Plugins/Response/ExtendResult.cs.meta +++ b/Assets/TORISOUP/NicoliveClient/Plugins/Response/ExtendResult.cs.meta @@ -1,13 +1,13 @@ -fileFormatVersion: 2 -guid: 8bf8d9e0a5dc47c47bbfb09dacd18447 -timeCreated: 1517502443 -licenseType: Pro -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: +fileFormatVersion: 2 +guid: 8bf8d9e0a5dc47c47bbfb09dacd18447 +timeCreated: 1517502443 +licenseType: Pro +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/NicoliveClient/Plugins/Response/ExtensionMethods.cs b/Assets/TORISOUP/NicoliveClient/Plugins/Response/ExtensionMethods.cs similarity index 95% rename from Assets/NicoliveClient/Plugins/Response/ExtensionMethods.cs rename to Assets/TORISOUP/NicoliveClient/Plugins/Response/ExtensionMethods.cs index c1563bf..edbf6dc 100644 --- a/Assets/NicoliveClient/Plugins/Response/ExtensionMethods.cs +++ b/Assets/TORISOUP/NicoliveClient/Plugins/Response/ExtensionMethods.cs @@ -1,6 +1,6 @@ using System; -namespace NicoliveClient +namespace TORISOUP.NicoliveClient.Response { /// /// 延長種別 diff --git a/Assets/NicoliveClient/Plugins/Response/ExtensionMethods.cs.meta b/Assets/TORISOUP/NicoliveClient/Plugins/Response/ExtensionMethods.cs.meta similarity index 95% rename from Assets/NicoliveClient/Plugins/Response/ExtensionMethods.cs.meta rename to Assets/TORISOUP/NicoliveClient/Plugins/Response/ExtensionMethods.cs.meta index 5325506..bd389dc 100644 --- a/Assets/NicoliveClient/Plugins/Response/ExtensionMethods.cs.meta +++ b/Assets/TORISOUP/NicoliveClient/Plugins/Response/ExtensionMethods.cs.meta @@ -1,13 +1,13 @@ -fileFormatVersion: 2 -guid: bc21fa25a067a6549b6ef1e6f38f02bf -timeCreated: 1517502443 -licenseType: Pro -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: +fileFormatVersion: 2 +guid: bc21fa25a067a6549b6ef1e6f38f02bf +timeCreated: 1517502443 +licenseType: Pro +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/NicoliveClient/Plugins/Response/MylistInfo.cs b/Assets/TORISOUP/NicoliveClient/Plugins/Response/MylistInfo.cs similarity index 90% rename from Assets/NicoliveClient/Plugins/Response/MylistInfo.cs rename to Assets/TORISOUP/NicoliveClient/Plugins/Response/MylistInfo.cs index 0d42c9d..63002e6 100644 --- a/Assets/NicoliveClient/Plugins/Response/MylistInfo.cs +++ b/Assets/TORISOUP/NicoliveClient/Plugins/Response/MylistInfo.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace NicoliveClient.Nicovideo +namespace TORISOUP.NicoliveClient.Response { /// /// ニコニコ動画のマイリスト情報 diff --git a/Assets/NicoliveClient/Plugins/Response/MylistInfo.cs.meta b/Assets/TORISOUP/NicoliveClient/Plugins/Response/MylistInfo.cs.meta similarity index 95% rename from Assets/NicoliveClient/Plugins/Response/MylistInfo.cs.meta rename to Assets/TORISOUP/NicoliveClient/Plugins/Response/MylistInfo.cs.meta index 549e6cd..e4048cb 100644 --- a/Assets/NicoliveClient/Plugins/Response/MylistInfo.cs.meta +++ b/Assets/TORISOUP/NicoliveClient/Plugins/Response/MylistInfo.cs.meta @@ -1,13 +1,13 @@ -fileFormatVersion: 2 -guid: b50abb0f8ea279649ae5dbccd9af802f -timeCreated: 1543129557 -licenseType: Pro -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: +fileFormatVersion: 2 +guid: b50abb0f8ea279649ae5dbccd9af802f +timeCreated: 1543129557 +licenseType: Pro +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/NicoliveClient/Plugins/Response/ProgramInfo.cs b/Assets/TORISOUP/NicoliveClient/Plugins/Response/ProgramInfo.cs similarity index 94% rename from Assets/NicoliveClient/Plugins/Response/ProgramInfo.cs rename to Assets/TORISOUP/NicoliveClient/Plugins/Response/ProgramInfo.cs index db70ff7..fd88755 100644 --- a/Assets/NicoliveClient/Plugins/Response/ProgramInfo.cs +++ b/Assets/TORISOUP/NicoliveClient/Plugins/Response/ProgramInfo.cs @@ -1,8 +1,7 @@ using System; -using System.Diagnostics; using System.Linq; -namespace NicoliveClient +namespace TORISOUP.NicoliveClient.Response { public struct ProgramInfo { @@ -175,11 +174,6 @@ public struct Room /// public Uri WebSocketUri { get; private set; } - /// - /// コメントサーバのURI(XmlSocket) - /// - public Uri XmlSocketUri { get; private set; } - /// /// スレッドID /// @@ -187,14 +181,13 @@ public struct Room public CommentServerInfo CommentServerInfo { get; } - public Room(string name, int id, string webSocketUri, string xmlSocketUri, string threadId) : this() + public Room(string name, int id, string webSocketUri, string threadId) : this() { Name = name; Id = id; WebSocketUri = new Uri(webSocketUri); - XmlSocketUri = new Uri(xmlSocketUri); ThreadId = threadId; - CommentServerInfo = new CommentServerInfo(Name, WebSocketUri, XmlSocketUri, ThreadId); + CommentServerInfo = new CommentServerInfo(Name, WebSocketUri, ThreadId); } } @@ -292,12 +285,11 @@ internal struct RoomDto public string name; public int id; public string webSocketUri; - public string xmlSocketUri; public string threadId; public Room ToRoom() { - return new Room(name, id, webSocketUri, xmlSocketUri, threadId); + return new Room(name, id, webSocketUri, threadId); } } diff --git a/Assets/NicoliveClient/Plugins/Response/ProgramInfo.cs.meta b/Assets/TORISOUP/NicoliveClient/Plugins/Response/ProgramInfo.cs.meta similarity index 95% rename from Assets/NicoliveClient/Plugins/Response/ProgramInfo.cs.meta rename to Assets/TORISOUP/NicoliveClient/Plugins/Response/ProgramInfo.cs.meta index 013d647..2060e91 100644 --- a/Assets/NicoliveClient/Plugins/Response/ProgramInfo.cs.meta +++ b/Assets/TORISOUP/NicoliveClient/Plugins/Response/ProgramInfo.cs.meta @@ -1,13 +1,13 @@ -fileFormatVersion: 2 -guid: 8980c34ceaf017f4ebd6ac85c99155c2 -timeCreated: 1517497463 -licenseType: Pro -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: +fileFormatVersion: 2 +guid: 8980c34ceaf017f4ebd6ac85c99155c2 +timeCreated: 1517497463 +licenseType: Pro +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/NicoliveClient/Plugins/Response/ProgramSchedule.cs b/Assets/TORISOUP/NicoliveClient/Plugins/Response/ProgramSchedule.cs similarity index 98% rename from Assets/NicoliveClient/Plugins/Response/ProgramSchedule.cs rename to Assets/TORISOUP/NicoliveClient/Plugins/Response/ProgramSchedule.cs index e4d3db6..cfd3cea 100644 --- a/Assets/NicoliveClient/Plugins/Response/ProgramSchedule.cs +++ b/Assets/TORISOUP/NicoliveClient/Plugins/Response/ProgramSchedule.cs @@ -1,6 +1,6 @@ using System; -namespace NicoliveClient +namespace TORISOUP.NicoliveClient.Response { public struct ProgramSchedule { diff --git a/Assets/NicoliveClient/Plugins/Response/ProgramSchedule.cs.meta b/Assets/TORISOUP/NicoliveClient/Plugins/Response/ProgramSchedule.cs.meta similarity index 97% rename from Assets/NicoliveClient/Plugins/Response/ProgramSchedule.cs.meta rename to Assets/TORISOUP/NicoliveClient/Plugins/Response/ProgramSchedule.cs.meta index 5de65fd..7552700 100644 --- a/Assets/NicoliveClient/Plugins/Response/ProgramSchedule.cs.meta +++ b/Assets/TORISOUP/NicoliveClient/Plugins/Response/ProgramSchedule.cs.meta @@ -1,3 +1,3 @@ -fileFormatVersion: 2 -guid: acb9f2b82fc24c9d83088cf8f713393a +fileFormatVersion: 2 +guid: acb9f2b82fc24c9d83088cf8f713393a timeCreated: 1536136312 \ No newline at end of file diff --git a/Assets/NicoliveClient/Plugins/Response/StatisticsResult.cs b/Assets/TORISOUP/NicoliveClient/Plugins/Response/StatisticsResult.cs similarity index 95% rename from Assets/NicoliveClient/Plugins/Response/StatisticsResult.cs rename to Assets/TORISOUP/NicoliveClient/Plugins/Response/StatisticsResult.cs index bd4824f..cc350e4 100644 --- a/Assets/NicoliveClient/Plugins/Response/StatisticsResult.cs +++ b/Assets/TORISOUP/NicoliveClient/Plugins/Response/StatisticsResult.cs @@ -1,6 +1,6 @@ using System; -namespace NicoliveClient +namespace TORISOUP.NicoliveClient.Response { public struct StatisticsResult { diff --git a/Assets/NicoliveClient/Plugins/Response/StatisticsResult.cs.meta b/Assets/TORISOUP/NicoliveClient/Plugins/Response/StatisticsResult.cs.meta similarity index 95% rename from Assets/NicoliveClient/Plugins/Response/StatisticsResult.cs.meta rename to Assets/TORISOUP/NicoliveClient/Plugins/Response/StatisticsResult.cs.meta index 5abf0a8..d5bb4fd 100644 --- a/Assets/NicoliveClient/Plugins/Response/StatisticsResult.cs.meta +++ b/Assets/TORISOUP/NicoliveClient/Plugins/Response/StatisticsResult.cs.meta @@ -1,13 +1,13 @@ -fileFormatVersion: 2 -guid: 7a39db9d4c7c8f44694bd5521b0f8a02 -timeCreated: 1519825797 -licenseType: Pro -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: +fileFormatVersion: 2 +guid: 7a39db9d4c7c8f44694bd5521b0f8a02 +timeCreated: 1519825797 +licenseType: Pro +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/TORISOUP/NicoliveClient/Plugins/TORISOUP.NicoliveClient.asmdef b/Assets/TORISOUP/NicoliveClient/Plugins/TORISOUP.NicoliveClient.asmdef new file mode 100644 index 0000000..e70e97d --- /dev/null +++ b/Assets/TORISOUP/NicoliveClient/Plugins/TORISOUP.NicoliveClient.asmdef @@ -0,0 +1,17 @@ +{ + "name": "TORISOUP.NicoliveClient", + "rootNamespace": "", + "references": [ + "GUID:560b04d1a97f54a4e82edc0cbbb69285", + "GUID:f51ebe6a0ceec4240a699833d6309b23" + ], + "includePlatforms": [], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": true, + "defineConstraints": [], + "versionDefines": [], + "noEngineReferences": false +} \ No newline at end of file diff --git a/Assets/Plugins/UniRx/Scripts/UniRx.asmdef.meta b/Assets/TORISOUP/NicoliveClient/Plugins/TORISOUP.NicoliveClient.asmdef.meta similarity index 76% rename from Assets/Plugins/UniRx/Scripts/UniRx.asmdef.meta rename to Assets/TORISOUP/NicoliveClient/Plugins/TORISOUP.NicoliveClient.asmdef.meta index aaf3bd2..b6a510b 100644 --- a/Assets/Plugins/UniRx/Scripts/UniRx.asmdef.meta +++ b/Assets/TORISOUP/NicoliveClient/Plugins/TORISOUP.NicoliveClient.asmdef.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 560b04d1a97f54a4e82edc0cbbb69285 +guid: d973473ad59dc49459586b82e5bd4bc1 AssemblyDefinitionImporter: externalObjects: {} userData: diff --git a/Assets/NicoliveClient/Plugins/Utilities.meta b/Assets/TORISOUP/NicoliveClient/Plugins/Utilities.meta similarity index 95% rename from Assets/NicoliveClient/Plugins/Utilities.meta rename to Assets/TORISOUP/NicoliveClient/Plugins/Utilities.meta index 37d022b..dee0803 100644 --- a/Assets/NicoliveClient/Plugins/Utilities.meta +++ b/Assets/TORISOUP/NicoliveClient/Plugins/Utilities.meta @@ -1,10 +1,10 @@ -fileFormatVersion: 2 -guid: 1628287b59bf0ca41807ae573e21ba26 -folderAsset: yes -timeCreated: 1517416928 -licenseType: Pro -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: +fileFormatVersion: 2 +guid: 1628287b59bf0ca41807ae573e21ba26 +folderAsset: yes +timeCreated: 1517416928 +licenseType: Pro +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/NicoliveClient/Plugins/Utilities/IObservableExtension.cs b/Assets/TORISOUP/NicoliveClient/Plugins/Utilities/IObservableExtension.cs similarity index 89% rename from Assets/NicoliveClient/Plugins/Utilities/IObservableExtension.cs rename to Assets/TORISOUP/NicoliveClient/Plugins/Utilities/IObservableExtension.cs index 298f5d1..9c979bf 100644 --- a/Assets/NicoliveClient/Plugins/Utilities/IObservableExtension.cs +++ b/Assets/TORISOUP/NicoliveClient/Plugins/Utilities/IObservableExtension.cs @@ -1,7 +1,7 @@ using System; using UniRx; -namespace Assets.NicoliveClient.Plugins.Utilities +namespace TORISOUP.NicoliveClient.Utilities { internal static class IObservableExtension { diff --git a/Assets/NicoliveClient/Plugins/Utilities/IObservableExtension.cs.meta b/Assets/TORISOUP/NicoliveClient/Plugins/Utilities/IObservableExtension.cs.meta similarity index 95% rename from Assets/NicoliveClient/Plugins/Utilities/IObservableExtension.cs.meta rename to Assets/TORISOUP/NicoliveClient/Plugins/Utilities/IObservableExtension.cs.meta index c5f60f7..417d041 100644 --- a/Assets/NicoliveClient/Plugins/Utilities/IObservableExtension.cs.meta +++ b/Assets/TORISOUP/NicoliveClient/Plugins/Utilities/IObservableExtension.cs.meta @@ -1,13 +1,13 @@ -fileFormatVersion: 2 -guid: b71d7e8dc83f82745859bf305c8fb67e -timeCreated: 1517416928 -licenseType: Pro -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: +fileFormatVersion: 2 +guid: b71d7e8dc83f82745859bf305c8fb67e +timeCreated: 1517416928 +licenseType: Pro +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/TORISOUP/NicoliveClient/version.txt b/Assets/TORISOUP/NicoliveClient/version.txt new file mode 100644 index 0000000..52fb896 --- /dev/null +++ b/Assets/TORISOUP/NicoliveClient/version.txt @@ -0,0 +1 @@ +2023.8.27 \ No newline at end of file diff --git a/Assets/NicoliveClient/Plugins/version.txt.meta b/Assets/TORISOUP/NicoliveClient/version.txt.meta similarity index 95% rename from Assets/NicoliveClient/Plugins/version.txt.meta rename to Assets/TORISOUP/NicoliveClient/version.txt.meta index 76f41ea..70aa359 100644 --- a/Assets/NicoliveClient/Plugins/version.txt.meta +++ b/Assets/TORISOUP/NicoliveClient/version.txt.meta @@ -1,9 +1,9 @@ -fileFormatVersion: 2 -guid: 420e4324d934f4941b63a05b8355bdb1 -timeCreated: 1517504505 -licenseType: Pro -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: +fileFormatVersion: 2 +guid: 420e4324d934f4941b63a05b8355bdb1 +timeCreated: 1517504505 +licenseType: Pro +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/manifest.json b/Packages/manifest.json new file mode 100644 index 0000000..ac5d6f0 --- /dev/null +++ b/Packages/manifest.json @@ -0,0 +1,46 @@ +{ + "dependencies": { + "com.unity.collab-proxy": "1.17.7", + "com.unity.ide.rider": "3.0.18", + "com.unity.ide.visualstudio": "2.0.17", + "com.unity.ide.vscode": "1.2.5", + "com.unity.test-framework": "1.1.31", + "com.unity.textmeshpro": "3.0.6", + "com.unity.timeline": "1.6.4", + "com.unity.ugui": "1.0.0", + "com.unity.visualscripting": "1.8.0", + "com.unity.modules.ai": "1.0.0", + "com.unity.modules.androidjni": "1.0.0", + "com.unity.modules.animation": "1.0.0", + "com.unity.modules.assetbundle": "1.0.0", + "com.unity.modules.audio": "1.0.0", + "com.unity.modules.cloth": "1.0.0", + "com.unity.modules.director": "1.0.0", + "com.unity.modules.imageconversion": "1.0.0", + "com.unity.modules.imgui": "1.0.0", + "com.unity.modules.jsonserialize": "1.0.0", + "com.unity.modules.particlesystem": "1.0.0", + "com.unity.modules.physics": "1.0.0", + "com.unity.modules.physics2d": "1.0.0", + "com.unity.modules.screencapture": "1.0.0", + "com.unity.modules.terrain": "1.0.0", + "com.unity.modules.terrainphysics": "1.0.0", + "com.unity.modules.tilemap": "1.0.0", + "com.unity.modules.ui": "1.0.0", + "com.unity.modules.uielements": "1.0.0", + "com.unity.modules.umbra": "1.0.0", + "com.unity.modules.unityanalytics": "1.0.0", + "com.unity.modules.unitywebrequest": "1.0.0", + "com.unity.modules.unitywebrequestassetbundle": "1.0.0", + "com.unity.modules.unitywebrequestaudio": "1.0.0", + "com.unity.modules.unitywebrequesttexture": "1.0.0", + "com.unity.modules.unitywebrequestwww": "1.0.0", + "com.unity.modules.vehicles": "1.0.0", + "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" + } +} diff --git a/Packages/packages-lock.json b/Packages/packages-lock.json new file mode 100644 index 0000000..d57ddad --- /dev/null +++ b/Packages/packages-lock.json @@ -0,0 +1,382 @@ +{ + "dependencies": { + "com.cysharp.unitask": { + "version": "https://github.com/Cysharp/UniTask.git?path=src/UniTask/Assets/Plugins/UniTask", + "depth": 0, + "source": "git", + "dependencies": {}, + "hash": "d210e3d76adc0cce77f4ad2af1ade88dad6b1d5a" + }, + "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, + "source": "registry", + "dependencies": { + "com.unity.services.core": "1.0.1" + }, + "url": "https://packages.unity.com" + }, + "com.unity.ext.nunit": { + "version": "1.0.6", + "depth": 1, + "source": "registry", + "dependencies": {}, + "url": "https://packages.unity.com" + }, + "com.unity.ide.rider": { + "version": "3.0.18", + "depth": 0, + "source": "registry", + "dependencies": { + "com.unity.ext.nunit": "1.0.6" + }, + "url": "https://packages.unity.com" + }, + "com.unity.ide.visualstudio": { + "version": "2.0.17", + "depth": 0, + "source": "registry", + "dependencies": { + "com.unity.test-framework": "1.1.9" + }, + "url": "https://packages.unity.com" + }, + "com.unity.ide.vscode": { + "version": "1.2.5", + "depth": 0, + "source": "registry", + "dependencies": {}, + "url": "https://packages.unity.com" + }, + "com.unity.nuget.newtonsoft-json": { + "version": "3.0.2", + "depth": 2, + "source": "registry", + "dependencies": {}, + "url": "https://packages.unity.com" + }, + "com.unity.services.core": { + "version": "1.7.0", + "depth": 1, + "source": "registry", + "dependencies": { + "com.unity.modules.unitywebrequest": "1.0.0", + "com.unity.nuget.newtonsoft-json": "3.0.2", + "com.unity.modules.androidjni": "1.0.0" + }, + "url": "https://packages.unity.com" + }, + "com.unity.test-framework": { + "version": "1.1.31", + "depth": 0, + "source": "registry", + "dependencies": { + "com.unity.ext.nunit": "1.0.6", + "com.unity.modules.imgui": "1.0.0", + "com.unity.modules.jsonserialize": "1.0.0" + }, + "url": "https://packages.unity.com" + }, + "com.unity.textmeshpro": { + "version": "3.0.6", + "depth": 0, + "source": "registry", + "dependencies": { + "com.unity.ugui": "1.0.0" + }, + "url": "https://packages.unity.com" + }, + "com.unity.timeline": { + "version": "1.6.4", + "depth": 0, + "source": "registry", + "dependencies": { + "com.unity.modules.director": "1.0.0", + "com.unity.modules.animation": "1.0.0", + "com.unity.modules.audio": "1.0.0", + "com.unity.modules.particlesystem": "1.0.0" + }, + "url": "https://packages.unity.com" + }, + "com.unity.ugui": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": { + "com.unity.modules.ui": "1.0.0", + "com.unity.modules.imgui": "1.0.0" + } + }, + "com.unity.visualscripting": { + "version": "1.8.0", + "depth": 0, + "source": "registry", + "dependencies": { + "com.unity.ugui": "1.0.0", + "com.unity.modules.jsonserialize": "1.0.0" + }, + "url": "https://packages.unity.com" + }, + "com.unity.modules.ai": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": {} + }, + "com.unity.modules.androidjni": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": {} + }, + "com.unity.modules.animation": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": {} + }, + "com.unity.modules.assetbundle": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": {} + }, + "com.unity.modules.audio": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": {} + }, + "com.unity.modules.cloth": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": { + "com.unity.modules.physics": "1.0.0" + } + }, + "com.unity.modules.director": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": { + "com.unity.modules.audio": "1.0.0", + "com.unity.modules.animation": "1.0.0" + } + }, + "com.unity.modules.imageconversion": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": {} + }, + "com.unity.modules.imgui": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": {} + }, + "com.unity.modules.jsonserialize": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": {} + }, + "com.unity.modules.particlesystem": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": {} + }, + "com.unity.modules.physics": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": {} + }, + "com.unity.modules.physics2d": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": {} + }, + "com.unity.modules.screencapture": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": { + "com.unity.modules.imageconversion": "1.0.0" + } + }, + "com.unity.modules.subsystems": { + "version": "1.0.0", + "depth": 1, + "source": "builtin", + "dependencies": { + "com.unity.modules.jsonserialize": "1.0.0" + } + }, + "com.unity.modules.terrain": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": {} + }, + "com.unity.modules.terrainphysics": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": { + "com.unity.modules.physics": "1.0.0", + "com.unity.modules.terrain": "1.0.0" + } + }, + "com.unity.modules.tilemap": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": { + "com.unity.modules.physics2d": "1.0.0" + } + }, + "com.unity.modules.ui": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": {} + }, + "com.unity.modules.uielements": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": { + "com.unity.modules.ui": "1.0.0", + "com.unity.modules.imgui": "1.0.0", + "com.unity.modules.jsonserialize": "1.0.0", + "com.unity.modules.uielementsnative": "1.0.0" + } + }, + "com.unity.modules.uielementsnative": { + "version": "1.0.0", + "depth": 1, + "source": "builtin", + "dependencies": { + "com.unity.modules.ui": "1.0.0", + "com.unity.modules.imgui": "1.0.0", + "com.unity.modules.jsonserialize": "1.0.0" + } + }, + "com.unity.modules.umbra": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": {} + }, + "com.unity.modules.unityanalytics": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": { + "com.unity.modules.unitywebrequest": "1.0.0", + "com.unity.modules.jsonserialize": "1.0.0" + } + }, + "com.unity.modules.unitywebrequest": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": {} + }, + "com.unity.modules.unitywebrequestassetbundle": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": { + "com.unity.modules.assetbundle": "1.0.0", + "com.unity.modules.unitywebrequest": "1.0.0" + } + }, + "com.unity.modules.unitywebrequestaudio": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": { + "com.unity.modules.unitywebrequest": "1.0.0", + "com.unity.modules.audio": "1.0.0" + } + }, + "com.unity.modules.unitywebrequesttexture": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": { + "com.unity.modules.unitywebrequest": "1.0.0", + "com.unity.modules.imageconversion": "1.0.0" + } + }, + "com.unity.modules.unitywebrequestwww": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": { + "com.unity.modules.unitywebrequest": "1.0.0", + "com.unity.modules.unitywebrequestassetbundle": "1.0.0", + "com.unity.modules.unitywebrequestaudio": "1.0.0", + "com.unity.modules.audio": "1.0.0", + "com.unity.modules.assetbundle": "1.0.0", + "com.unity.modules.imageconversion": "1.0.0" + } + }, + "com.unity.modules.vehicles": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": { + "com.unity.modules.physics": "1.0.0" + } + }, + "com.unity.modules.video": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": { + "com.unity.modules.audio": "1.0.0", + "com.unity.modules.ui": "1.0.0", + "com.unity.modules.unitywebrequest": "1.0.0" + } + }, + "com.unity.modules.vr": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": { + "com.unity.modules.jsonserialize": "1.0.0", + "com.unity.modules.physics": "1.0.0", + "com.unity.modules.xr": "1.0.0" + } + }, + "com.unity.modules.wind": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": {} + }, + "com.unity.modules.xr": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": { + "com.unity.modules.physics": "1.0.0", + "com.unity.modules.jsonserialize": "1.0.0", + "com.unity.modules.subsystems": "1.0.0" + } + } + } +} diff --git a/ProjectSettings/AudioManager.asset b/ProjectSettings/AudioManager.asset new file mode 100644 index 0000000..df1e809 --- /dev/null +++ b/ProjectSettings/AudioManager.asset @@ -0,0 +1,20 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!11 &1 +AudioManager: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Volume: 1 + Rolloff Scale: 1 + Doppler Factor: 1 + Default Speaker Mode: 2 + m_SampleRate: 0 + m_DSPBufferSize: 1024 + m_VirtualVoiceCount: 512 + m_RealVoiceCount: 32 + m_EnableOutputSuspension: 1 + m_SpatializerPlugin: + m_AmbisonicDecoderPlugin: + m_DisableAudio: 0 + m_VirtualizeEffects: 1 + m_RequestedDSPBufferSize: 0 diff --git a/ProjectSettings/ClusterInputManager.asset b/ProjectSettings/ClusterInputManager.asset new file mode 100644 index 0000000..e7886b2 --- /dev/null +++ b/ProjectSettings/ClusterInputManager.asset @@ -0,0 +1,6 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!236 &1 +ClusterInputManager: + m_ObjectHideFlags: 0 + m_Inputs: [] diff --git a/ProjectSettings/DynamicsManager.asset b/ProjectSettings/DynamicsManager.asset new file mode 100644 index 0000000..abb382f --- /dev/null +++ b/ProjectSettings/DynamicsManager.asset @@ -0,0 +1,38 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!55 &1 +PhysicsManager: + m_ObjectHideFlags: 0 + serializedVersion: 13 + m_Gravity: {x: 0, y: -9.81, z: 0} + m_DefaultMaterial: {fileID: 0} + m_BounceThreshold: 2 + m_DefaultMaxDepenetrationVelocity: 10 + m_SleepThreshold: 0.005 + m_DefaultContactOffset: 0.01 + m_DefaultSolverIterations: 6 + m_DefaultSolverVelocityIterations: 1 + m_QueriesHitBackfaces: 0 + m_QueriesHitTriggers: 1 + m_EnableAdaptiveForce: 0 + m_ClothInterCollisionDistance: 0.1 + m_ClothInterCollisionStiffness: 0.2 + m_ContactsGeneration: 1 + m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff + m_AutoSimulation: 1 + m_AutoSyncTransforms: 0 + m_ReuseCollisionCallbacks: 0 + m_ClothInterCollisionSettingsToggle: 0 + m_ClothGravity: {x: 0, y: -9.81, z: 0} + m_ContactPairsMode: 0 + m_BroadphaseType: 0 + m_WorldBounds: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 250, y: 250, z: 250} + m_WorldSubdivisions: 8 + m_FrictionType: 0 + m_EnableEnhancedDeterminism: 0 + m_EnableUnifiedHeightmaps: 1 + m_ImprovedPatchFriction: 0 + m_SolverType: 0 + m_DefaultMaxAngularSpeed: 50 diff --git a/ProjectSettings/EditorBuildSettings.asset b/ProjectSettings/EditorBuildSettings.asset new file mode 100644 index 0000000..0147887 --- /dev/null +++ b/ProjectSettings/EditorBuildSettings.asset @@ -0,0 +1,8 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1045 &1 +EditorBuildSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Scenes: [] + m_configObjects: {} diff --git a/ProjectSettings/EditorSettings.asset b/ProjectSettings/EditorSettings.asset new file mode 100644 index 0000000..c4a74bd --- /dev/null +++ b/ProjectSettings/EditorSettings.asset @@ -0,0 +1,44 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!159 &1 +EditorSettings: + m_ObjectHideFlags: 0 + serializedVersion: 11 + m_SerializationMode: 2 + m_LineEndingsForNewScripts: 2 + m_DefaultBehaviorMode: 0 + m_PrefabRegularEnvironment: {fileID: 0} + m_PrefabUIEnvironment: {fileID: 0} + m_SpritePackerMode: 0 + m_SpritePackerPaddingPower: 1 + m_Bc7TextureCompressor: 0 + m_EtcTextureCompressorBehavior: 1 + m_EtcTextureFastCompressor: 1 + m_EtcTextureNormalCompressor: 2 + m_EtcTextureBestCompressor: 4 + m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef;asmref;rsp;java;cpp;c;mm;m;h + m_ProjectGenerationRootNamespace: + m_EnableTextureStreamingInEditMode: 1 + m_EnableTextureStreamingInPlayMode: 1 + m_AsyncShaderCompilation: 1 + m_CachingShaderPreprocessor: 1 + m_PrefabModeAllowAutoSave: 1 + m_EnterPlayModeOptionsEnabled: 0 + m_EnterPlayModeOptions: 3 + m_GameObjectNamingDigits: 1 + m_GameObjectNamingScheme: 0 + m_AssetNamingUsesSpace: 1 + m_UseLegacyProbeSampleCount: 0 + m_SerializeInlineMappingsOnOneLine: 1 + m_DisableCookiesInLightmapper: 0 + m_AssetPipelineMode: 1 + m_RefreshImportMode: 0 + m_CacheServerMode: 0 + m_CacheServerEndpoint: + m_CacheServerNamespacePrefix: default + m_CacheServerEnableDownload: 1 + m_CacheServerEnableUpload: 1 + m_CacheServerEnableAuth: 0 + m_CacheServerEnableTls: 0 + m_CacheServerValidationMode: 2 + m_CacheServerDownloadBatchSize: 128 diff --git a/ProjectSettings/GraphicsSettings.asset b/ProjectSettings/GraphicsSettings.asset new file mode 100644 index 0000000..6652e42 --- /dev/null +++ b/ProjectSettings/GraphicsSettings.asset @@ -0,0 +1,66 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!30 &1 +GraphicsSettings: + m_ObjectHideFlags: 0 + serializedVersion: 14 + m_Deferred: + m_Mode: 1 + m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0} + m_DeferredReflections: + m_Mode: 1 + m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0} + m_ScreenSpaceShadows: + m_Mode: 1 + m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0} + m_LegacyDeferred: + m_Mode: 1 + m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0} + m_DepthNormals: + m_Mode: 1 + m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0} + m_MotionVectors: + m_Mode: 1 + m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0} + m_LightHalo: + m_Mode: 1 + m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0} + m_LensFlare: + m_Mode: 1 + m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0} + m_VideoShadersIncludeMode: 2 + m_AlwaysIncludedShaders: + - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 10783, guid: 0000000000000000f000000000000000, type: 0} + m_PreloadedShaders: [] + m_PreloadShadersBatchTimeLimit: -1 + m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} + m_CustomRenderPipeline: {fileID: 0} + m_TransparencySortMode: 0 + m_TransparencySortAxis: {x: 0, y: 0, z: 1} + m_DefaultRenderingPath: 1 + m_DefaultMobileRenderingPath: 1 + m_TierSettings: [] + m_LightmapStripping: 0 + m_FogStripping: 0 + m_InstancingStripping: 0 + m_LightmapKeepPlain: 1 + m_LightmapKeepDirCombined: 1 + m_LightmapKeepDynamicPlain: 1 + m_LightmapKeepDynamicDirCombined: 1 + m_LightmapKeepShadowMask: 1 + m_LightmapKeepSubtractive: 1 + m_FogKeepLinear: 1 + m_FogKeepExp: 1 + m_FogKeepExp2: 1 + m_AlbedoSwatchInfos: [] + m_LightsUseLinearIntensity: 0 + m_LightsUseColorTemperature: 0 + m_DefaultRenderingLayerMask: 1 + m_LogWhenShaderIsCompiled: 0 + m_SRPDefaultSettings: {} diff --git a/ProjectSettings/InputManager.asset b/ProjectSettings/InputManager.asset new file mode 100644 index 0000000..b00cb79 --- /dev/null +++ b/ProjectSettings/InputManager.asset @@ -0,0 +1,296 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!13 &1 +InputManager: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Axes: + - serializedVersion: 3 + m_Name: Horizontal + descriptiveName: + descriptiveNegativeName: + negativeButton: left + positiveButton: right + altNegativeButton: a + altPositiveButton: d + gravity: 3 + dead: 0.001 + sensitivity: 3 + snap: 1 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Vertical + descriptiveName: + descriptiveNegativeName: + negativeButton: down + positiveButton: up + altNegativeButton: s + altPositiveButton: w + gravity: 3 + dead: 0.001 + sensitivity: 3 + snap: 1 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Fire1 + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: left ctrl + altNegativeButton: + altPositiveButton: mouse 0 + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Fire2 + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: left alt + altNegativeButton: + altPositiveButton: mouse 1 + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Fire3 + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: left shift + altNegativeButton: + altPositiveButton: mouse 2 + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Jump + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: space + altNegativeButton: + altPositiveButton: + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Mouse X + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: + altNegativeButton: + altPositiveButton: + gravity: 0 + dead: 0 + sensitivity: 0.1 + snap: 0 + invert: 0 + type: 1 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Mouse Y + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: + altNegativeButton: + altPositiveButton: + gravity: 0 + dead: 0 + sensitivity: 0.1 + snap: 0 + invert: 0 + type: 1 + axis: 1 + joyNum: 0 + - serializedVersion: 3 + m_Name: Mouse ScrollWheel + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: + altNegativeButton: + altPositiveButton: + gravity: 0 + dead: 0 + sensitivity: 0.1 + snap: 0 + invert: 0 + type: 1 + axis: 2 + joyNum: 0 + - serializedVersion: 3 + m_Name: Horizontal + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: + altNegativeButton: + altPositiveButton: + gravity: 0 + dead: 0.19 + sensitivity: 1 + snap: 0 + invert: 0 + type: 2 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Vertical + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: + altNegativeButton: + altPositiveButton: + gravity: 0 + dead: 0.19 + sensitivity: 1 + snap: 0 + invert: 1 + type: 2 + axis: 1 + joyNum: 0 + - serializedVersion: 3 + m_Name: Fire1 + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: joystick button 0 + altNegativeButton: + altPositiveButton: + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Fire2 + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: joystick button 1 + altNegativeButton: + altPositiveButton: + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Fire3 + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: joystick button 2 + altNegativeButton: + altPositiveButton: + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Jump + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: joystick button 3 + altNegativeButton: + altPositiveButton: + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Submit + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: return + altNegativeButton: + altPositiveButton: joystick button 0 + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Submit + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: enter + altNegativeButton: + altPositiveButton: space + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Cancel + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: escape + altNegativeButton: + altPositiveButton: joystick button 1 + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + m_UsePhysicalKeys: 0 diff --git a/ProjectSettings/MemorySettings.asset b/ProjectSettings/MemorySettings.asset new file mode 100644 index 0000000..5b5face --- /dev/null +++ b/ProjectSettings/MemorySettings.asset @@ -0,0 +1,35 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!387306366 &1 +MemorySettings: + m_ObjectHideFlags: 0 + m_EditorMemorySettings: + m_MainAllocatorBlockSize: -1 + m_ThreadAllocatorBlockSize: -1 + m_MainGfxBlockSize: -1 + m_ThreadGfxBlockSize: -1 + m_CacheBlockSize: -1 + m_TypetreeBlockSize: -1 + m_ProfilerBlockSize: -1 + m_ProfilerEditorBlockSize: -1 + m_BucketAllocatorGranularity: -1 + m_BucketAllocatorBucketsCount: -1 + m_BucketAllocatorBlockSize: -1 + m_BucketAllocatorBlockCount: -1 + m_ProfilerBucketAllocatorGranularity: -1 + m_ProfilerBucketAllocatorBucketsCount: -1 + m_ProfilerBucketAllocatorBlockSize: -1 + m_ProfilerBucketAllocatorBlockCount: -1 + m_TempAllocatorSizeMain: -1 + m_JobTempAllocatorBlockSize: -1 + m_BackgroundJobTempAllocatorBlockSize: -1 + m_JobTempAllocatorReducedBlockSize: -1 + m_TempAllocatorSizeGIBakingWorker: -1 + m_TempAllocatorSizeNavMeshWorker: -1 + m_TempAllocatorSizeAudioWorker: -1 + m_TempAllocatorSizeCloudWorker: -1 + m_TempAllocatorSizeGfx: -1 + m_TempAllocatorSizeJobWorker: -1 + m_TempAllocatorSizeBackgroundWorker: -1 + m_TempAllocatorSizePreloadManager: -1 + m_PlatformMemorySettings: {} diff --git a/ProjectSettings/NavMeshAreas.asset b/ProjectSettings/NavMeshAreas.asset new file mode 100644 index 0000000..ad2654e --- /dev/null +++ b/ProjectSettings/NavMeshAreas.asset @@ -0,0 +1,93 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!126 &1 +NavMeshProjectSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + areas: + - name: Walkable + cost: 1 + - name: Not Walkable + cost: 1 + - name: Jump + cost: 2 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + m_LastAgentTypeID: -887442657 + m_Settings: + - serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.75 + 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_SettingNames: + - Humanoid diff --git a/ProjectSettings/PackageManagerSettings.asset b/ProjectSettings/PackageManagerSettings.asset new file mode 100644 index 0000000..559fce9 --- /dev/null +++ b/ProjectSettings/PackageManagerSettings.asset @@ -0,0 +1,36 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &1 +MonoBehaviour: + m_ObjectHideFlags: 61 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 13964, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_EnablePreReleasePackages: 0 + m_EnablePackageDependencies: 0 + m_AdvancedSettingsExpanded: 1 + m_ScopedRegistriesSettingsExpanded: 1 + m_SeeAllPackageVersions: 0 + oneTimeWarningShown: 0 + m_Registries: + - m_Id: main + m_Name: + m_Url: https://packages.unity.com + m_Scopes: [] + m_IsDefault: 1 + m_Capabilities: 7 + m_ConfigSource: 0 + m_UserSelectedRegistryName: + m_UserAddingNewScopedRegistry: 0 + m_RegistryInfoDraft: + m_Modified: 0 + m_ErrorMessage: + m_UserModificationsInstanceId: -884 + m_OriginalInstanceId: -886 + m_LoadAssets: 0 diff --git a/ProjectSettings/Physics2DSettings.asset b/ProjectSettings/Physics2DSettings.asset new file mode 100644 index 0000000..34e8328 --- /dev/null +++ b/ProjectSettings/Physics2DSettings.asset @@ -0,0 +1,56 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!19 &1 +Physics2DSettings: + m_ObjectHideFlags: 0 + serializedVersion: 5 + m_Gravity: {x: 0, y: -9.81} + m_DefaultMaterial: {fileID: 0} + m_VelocityIterations: 8 + m_PositionIterations: 3 + m_VelocityThreshold: 1 + m_MaxLinearCorrection: 0.2 + m_MaxAngularCorrection: 8 + m_MaxTranslationSpeed: 100 + m_MaxRotationSpeed: 360 + m_BaumgarteScale: 0.2 + m_BaumgarteTimeOfImpactScale: 0.75 + m_TimeToSleep: 0.5 + m_LinearSleepTolerance: 0.01 + m_AngularSleepTolerance: 2 + m_DefaultContactOffset: 0.01 + m_JobOptions: + serializedVersion: 2 + useMultithreading: 0 + useConsistencySorting: 0 + m_InterpolationPosesPerJob: 100 + m_NewContactsPerJob: 30 + m_CollideContactsPerJob: 100 + m_ClearFlagsPerJob: 200 + m_ClearBodyForcesPerJob: 200 + m_SyncDiscreteFixturesPerJob: 50 + m_SyncContinuousFixturesPerJob: 50 + m_FindNearestContactsPerJob: 100 + m_UpdateTriggerContactsPerJob: 100 + m_IslandSolverCostThreshold: 100 + m_IslandSolverBodyCostScale: 1 + m_IslandSolverContactCostScale: 10 + m_IslandSolverJointCostScale: 10 + m_IslandSolverBodiesPerJob: 50 + m_IslandSolverContactsPerJob: 50 + m_SimulationMode: 0 + m_QueriesHitTriggers: 1 + m_QueriesStartInColliders: 1 + m_CallbacksOnDisable: 1 + m_ReuseCollisionCallbacks: 0 + m_AutoSyncTransforms: 0 + m_AlwaysShowColliders: 0 + m_ShowColliderSleep: 1 + m_ShowColliderContacts: 0 + m_ShowColliderAABB: 0 + m_ContactArrowScale: 0.2 + m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412} + m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432} + m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745} + m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804} + m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff diff --git a/ProjectSettings/PresetManager.asset b/ProjectSettings/PresetManager.asset new file mode 100644 index 0000000..67a94da --- /dev/null +++ b/ProjectSettings/PresetManager.asset @@ -0,0 +1,7 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1386491679 &1 +PresetManager: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_DefaultPresets: {} diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset new file mode 100644 index 0000000..c090301 --- /dev/null +++ b/ProjectSettings/ProjectSettings.asset @@ -0,0 +1,638 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!129 &1 +PlayerSettings: + m_ObjectHideFlags: 0 + serializedVersion: 23 + productGUID: 8efbaebe5f8402d458e6521766cc1bd4 + AndroidProfiler: 0 + AndroidFilterTouchesWhenObscured: 0 + AndroidEnableSustainedPerformanceMode: 0 + defaultScreenOrientation: 4 + targetDevice: 2 + useOnDemandResources: 0 + accelerometerFrequency: 60 + companyName: DefaultCompany + productName: UnityNicoliveClient + defaultCursor: {fileID: 0} + cursorHotspot: {x: 0, y: 0} + m_SplashScreenBackgroundColor: {r: 0.12156863, g: 0.12156863, b: 0.1254902, a: 1} + m_ShowUnitySplashScreen: 1 + m_ShowUnitySplashLogo: 1 + m_SplashScreenOverlayOpacity: 1 + m_SplashScreenAnimation: 1 + m_SplashScreenLogoStyle: 1 + m_SplashScreenDrawMode: 0 + m_SplashScreenBackgroundAnimationZoom: 1 + m_SplashScreenLogoAnimationZoom: 1 + m_SplashScreenBackgroundLandscapeAspect: 1 + m_SplashScreenBackgroundPortraitAspect: 1 + m_SplashScreenBackgroundLandscapeUvs: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + m_SplashScreenBackgroundPortraitUvs: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + m_SplashScreenLogos: [] + m_VirtualRealitySplashScreen: {fileID: 0} + m_HolographicTrackingLossScreen: {fileID: 0} + defaultScreenWidth: 1920 + defaultScreenHeight: 1080 + defaultScreenWidthWeb: 960 + defaultScreenHeightWeb: 600 + m_StereoRenderingPath: 0 + m_ActiveColorSpace: 0 + m_MTRendering: 1 + mipStripping: 0 + numberOfMipsStripped: 0 + m_StackTraceTypes: 010000000100000001000000010000000100000001000000 + iosShowActivityIndicatorOnLoading: -1 + androidShowActivityIndicatorOnLoading: -1 + iosUseCustomAppBackgroundBehavior: 0 + iosAllowHTTPDownload: 1 + allowedAutorotateToPortrait: 1 + allowedAutorotateToPortraitUpsideDown: 1 + allowedAutorotateToLandscapeRight: 1 + allowedAutorotateToLandscapeLeft: 1 + useOSAutorotation: 1 + use32BitDisplayBuffer: 1 + preserveFramebufferAlpha: 0 + disableDepthAndStencilBuffers: 0 + androidStartInFullscreen: 1 + androidRenderOutsideSafeArea: 1 + androidUseSwappy: 1 + androidBlitType: 0 + androidResizableWindow: 0 + androidDefaultWindowWidth: 1920 + androidDefaultWindowHeight: 1080 + androidMinimumWindowWidth: 400 + androidMinimumWindowHeight: 300 + androidFullscreenMode: 1 + defaultIsNativeResolution: 1 + macRetinaSupport: 1 + runInBackground: 0 + captureSingleScreen: 0 + muteOtherAudioSources: 0 + Prepare IOS For Recording: 0 + Force IOS Speakers When Recording: 0 + deferSystemGesturesMode: 0 + hideHomeButton: 0 + submitAnalytics: 1 + usePlayerLog: 1 + bakeCollisionMeshes: 0 + forceSingleInstance: 0 + useFlipModelSwapchain: 1 + resizableWindow: 0 + useMacAppStoreValidation: 0 + macAppStoreCategory: public.app-category.games + gpuSkinning: 0 + xboxPIXTextureCapture: 0 + xboxEnableAvatar: 0 + xboxEnableKinect: 0 + xboxEnableKinectAutoTracking: 0 + xboxEnableFitness: 0 + visibleInBackground: 1 + allowFullscreenSwitch: 1 + fullscreenMode: 1 + xboxSpeechDB: 0 + xboxEnableHeadOrientation: 0 + xboxEnableGuest: 0 + xboxEnablePIXSampling: 0 + metalFramebufferOnly: 0 + xboxOneResolution: 0 + xboxOneSResolution: 0 + xboxOneXResolution: 3 + xboxOneMonoLoggingLevel: 0 + xboxOneLoggingLevel: 1 + xboxOneDisableEsram: 0 + xboxOneEnableTypeOptimization: 0 + xboxOnePresentImmediateThreshold: 0 + switchQueueCommandMemory: 1048576 + switchQueueControlMemory: 16384 + switchQueueComputeMemory: 262144 + switchNVNShaderPoolsGranularity: 33554432 + switchNVNDefaultPoolsGranularity: 16777216 + switchNVNOtherPoolsGranularity: 16777216 + switchNVNMaxPublicTextureIDCount: 0 + switchNVNMaxPublicSamplerIDCount: 0 + stadiaPresentMode: 0 + stadiaTargetFramerate: 0 + vulkanNumSwapchainBuffers: 3 + vulkanEnableSetSRGBWrite: 0 + vulkanEnablePreTransform: 0 + vulkanEnableLateAcquireNextImage: 0 + vulkanEnableCommandBufferRecycling: 1 + m_SupportedAspectRatios: + 4:3: 1 + 5:4: 1 + 16:10: 1 + 16:9: 1 + Others: 1 + bundleVersion: 1.0 + preloadedAssets: [] + metroInputSource: 0 + wsaTransparentSwapchain: 0 + m_HolographicPauseOnTrackingLoss: 1 + xboxOneDisableKinectGpuReservation: 1 + xboxOneEnable7thCore: 1 + vrSettings: + enable360StereoCapture: 0 + isWsaHolographicRemotingEnabled: 0 + enableFrameTimingStats: 0 + enableOpenGLProfilerGPURecorders: 1 + useHDRDisplay: 0 + D3DHDRBitDepth: 0 + m_ColorGamuts: 00000000 + targetPixelDensity: 0 + resolutionScalingMode: 0 + resetResolutionOnWindowResize: 0 + androidSupportedAspectRatio: 1 + androidMaxAspectRatio: 2.1 + applicationIdentifier: {} + buildNumber: {} + overrideDefaultApplicationIdentifier: 0 + AndroidBundleVersionCode: 1 + AndroidMinSdkVersion: 22 + AndroidTargetSdkVersion: 0 + AndroidPreferredInstallLocation: 1 + aotOptions: + stripEngineCode: 1 + iPhoneStrippingLevel: 0 + iPhoneScriptCallOptimization: 0 + ForceInternetPermission: 0 + ForceSDCardPermission: 0 + CreateWallpaper: 0 + APKExpansionFiles: 0 + keepLoadedShadersAlive: 0 + StripUnusedMeshComponents: 0 + VertexChannelCompressionMask: 4054 + iPhoneSdkVersion: 988 + iOSTargetOSVersionString: + tvOSSdkVersion: 0 + tvOSRequireExtendedGameController: 0 + tvOSTargetOSVersionString: + uIPrerenderedIcon: 0 + uIRequiresPersistentWiFi: 0 + uIRequiresFullScreen: 1 + uIStatusBarHidden: 1 + uIExitOnSuspend: 0 + uIStatusBarStyle: 0 + appleTVSplashScreen: {fileID: 0} + appleTVSplashScreen2x: {fileID: 0} + tvOSSmallIconLayers: [] + tvOSSmallIconLayers2x: [] + tvOSLargeIconLayers: [] + tvOSLargeIconLayers2x: [] + tvOSTopShelfImageLayers: [] + tvOSTopShelfImageLayers2x: [] + tvOSTopShelfImageWideLayers: [] + tvOSTopShelfImageWideLayers2x: [] + iOSLaunchScreenType: 0 + iOSLaunchScreenPortrait: {fileID: 0} + iOSLaunchScreenLandscape: {fileID: 0} + iOSLaunchScreenBackgroundColor: + serializedVersion: 2 + rgba: 0 + iOSLaunchScreenFillPct: 100 + iOSLaunchScreenSize: 100 + iOSLaunchScreenCustomXibPath: + iOSLaunchScreeniPadType: 0 + iOSLaunchScreeniPadImage: {fileID: 0} + iOSLaunchScreeniPadBackgroundColor: + serializedVersion: 2 + rgba: 0 + iOSLaunchScreeniPadFillPct: 100 + iOSLaunchScreeniPadSize: 100 + iOSLaunchScreeniPadCustomXibPath: + iOSLaunchScreenCustomStoryboardPath: + iOSLaunchScreeniPadCustomStoryboardPath: + iOSDeviceRequirements: [] + iOSURLSchemes: [] + macOSURLSchemes: [] + iOSBackgroundModes: 0 + iOSMetalForceHardShadows: 0 + metalEditorSupport: 1 + metalAPIValidation: 1 + iOSRenderExtraFrameOnPause: 0 + iosCopyPluginsCodeInsteadOfSymlink: 0 + appleDeveloperTeamID: + iOSManualSigningProvisioningProfileID: + tvOSManualSigningProvisioningProfileID: + iOSManualSigningProvisioningProfileType: 0 + tvOSManualSigningProvisioningProfileType: 0 + appleEnableAutomaticSigning: 0 + iOSRequireARKit: 0 + iOSAutomaticallyDetectAndAddCapabilities: 1 + appleEnableProMotion: 0 + shaderPrecisionModel: 0 + clonedFromGUID: 00000000000000000000000000000000 + templatePackageId: + templateDefaultScene: + useCustomMainManifest: 0 + useCustomLauncherManifest: 0 + useCustomMainGradleTemplate: 0 + useCustomLauncherGradleManifest: 0 + useCustomBaseGradleTemplate: 0 + useCustomGradlePropertiesTemplate: 0 + useCustomProguardFile: 0 + AndroidTargetArchitectures: 1 + AndroidTargetDevices: 0 + AndroidSplashScreenScale: 0 + androidSplashScreen: {fileID: 0} + AndroidKeystoreName: + AndroidKeyaliasName: + AndroidBuildApkPerCpuArchitecture: 0 + AndroidTVCompatibility: 0 + AndroidIsGame: 1 + AndroidEnableTango: 0 + androidEnableBanner: 1 + androidUseLowAccuracyLocation: 0 + androidUseCustomKeystore: 0 + m_AndroidBanners: + - width: 320 + height: 180 + banner: {fileID: 0} + androidGamepadSupportLevel: 0 + chromeosInputEmulation: 1 + AndroidMinifyWithR8: 0 + AndroidMinifyRelease: 0 + AndroidMinifyDebug: 0 + AndroidValidateAppBundleSize: 1 + AndroidAppBundleSizeToValidate: 150 + m_BuildTargetIcons: [] + m_BuildTargetPlatformIcons: [] + m_BuildTargetBatching: [] + m_BuildTargetShaderSettings: [] + m_BuildTargetGraphicsJobs: [] + m_BuildTargetGraphicsJobMode: [] + m_BuildTargetGraphicsAPIs: [] + m_BuildTargetVRSettings: [] + m_DefaultShaderChunkSizeInMB: 16 + m_DefaultShaderChunkCount: 0 + openGLRequireES31: 0 + openGLRequireES31AEP: 0 + openGLRequireES32: 0 + m_TemplateCustomTags: {} + mobileMTRendering: + Android: 1 + iPhone: 1 + tvOS: 1 + m_BuildTargetGroupLightmapEncodingQuality: [] + m_BuildTargetGroupLightmapSettings: [] + m_BuildTargetNormalMapEncoding: [] + m_BuildTargetDefaultTextureCompressionFormat: [] + playModeTestRunnerEnabled: 0 + runPlayModeTestAsEditModeTest: 0 + actionOnDotNetUnhandledException: 1 + enableInternalProfiler: 0 + logObjCUncaughtExceptions: 1 + enableCrashReportAPI: 0 + cameraUsageDescription: + locationUsageDescription: + microphoneUsageDescription: + bluetoothUsageDescription: + switchNMETAOverride: + switchNetLibKey: + switchSocketMemoryPoolSize: 6144 + switchSocketAllocatorPoolSize: 128 + switchSocketConcurrencyLimit: 14 + switchScreenResolutionBehavior: 2 + switchUseCPUProfiler: 0 + switchUseGOLDLinker: 0 + switchLTOSetting: 0 + switchApplicationID: 0x01004b9000490000 + switchNSODependencies: + switchTitleNames_0: + switchTitleNames_1: + switchTitleNames_2: + switchTitleNames_3: + switchTitleNames_4: + switchTitleNames_5: + switchTitleNames_6: + switchTitleNames_7: + switchTitleNames_8: + switchTitleNames_9: + switchTitleNames_10: + switchTitleNames_11: + switchTitleNames_12: + switchTitleNames_13: + switchTitleNames_14: + switchTitleNames_15: + switchPublisherNames_0: + switchPublisherNames_1: + switchPublisherNames_2: + switchPublisherNames_3: + switchPublisherNames_4: + switchPublisherNames_5: + switchPublisherNames_6: + switchPublisherNames_7: + switchPublisherNames_8: + switchPublisherNames_9: + switchPublisherNames_10: + switchPublisherNames_11: + switchPublisherNames_12: + switchPublisherNames_13: + switchPublisherNames_14: + switchPublisherNames_15: + switchIcons_0: {fileID: 0} + switchIcons_1: {fileID: 0} + switchIcons_2: {fileID: 0} + switchIcons_3: {fileID: 0} + switchIcons_4: {fileID: 0} + switchIcons_5: {fileID: 0} + switchIcons_6: {fileID: 0} + switchIcons_7: {fileID: 0} + switchIcons_8: {fileID: 0} + switchIcons_9: {fileID: 0} + switchIcons_10: {fileID: 0} + switchIcons_11: {fileID: 0} + switchIcons_12: {fileID: 0} + switchIcons_13: {fileID: 0} + switchIcons_14: {fileID: 0} + switchIcons_15: {fileID: 0} + switchSmallIcons_0: {fileID: 0} + switchSmallIcons_1: {fileID: 0} + switchSmallIcons_2: {fileID: 0} + switchSmallIcons_3: {fileID: 0} + switchSmallIcons_4: {fileID: 0} + switchSmallIcons_5: {fileID: 0} + switchSmallIcons_6: {fileID: 0} + switchSmallIcons_7: {fileID: 0} + switchSmallIcons_8: {fileID: 0} + switchSmallIcons_9: {fileID: 0} + switchSmallIcons_10: {fileID: 0} + switchSmallIcons_11: {fileID: 0} + switchSmallIcons_12: {fileID: 0} + switchSmallIcons_13: {fileID: 0} + switchSmallIcons_14: {fileID: 0} + switchSmallIcons_15: {fileID: 0} + switchManualHTML: + switchAccessibleURLs: + switchLegalInformation: + switchMainThreadStackSize: 1048576 + switchPresenceGroupId: + switchLogoHandling: 0 + switchReleaseVersion: 0 + switchDisplayVersion: 1.0.0 + switchStartupUserAccount: 0 + switchTouchScreenUsage: 0 + switchSupportedLanguagesMask: 0 + switchLogoType: 0 + switchApplicationErrorCodeCategory: + switchUserAccountSaveDataSize: 0 + switchUserAccountSaveDataJournalSize: 0 + switchApplicationAttribute: 0 + switchCardSpecSize: -1 + switchCardSpecClock: -1 + switchRatingsMask: 0 + switchRatingsInt_0: 0 + switchRatingsInt_1: 0 + switchRatingsInt_2: 0 + switchRatingsInt_3: 0 + switchRatingsInt_4: 0 + switchRatingsInt_5: 0 + switchRatingsInt_6: 0 + switchRatingsInt_7: 0 + switchRatingsInt_8: 0 + switchRatingsInt_9: 0 + switchRatingsInt_10: 0 + switchRatingsInt_11: 0 + switchRatingsInt_12: 0 + switchLocalCommunicationIds_0: + switchLocalCommunicationIds_1: + switchLocalCommunicationIds_2: + switchLocalCommunicationIds_3: + switchLocalCommunicationIds_4: + switchLocalCommunicationIds_5: + switchLocalCommunicationIds_6: + switchLocalCommunicationIds_7: + switchParentalControl: 0 + switchAllowsScreenshot: 1 + switchAllowsVideoCapturing: 1 + switchAllowsRuntimeAddOnContentInstall: 0 + switchDataLossConfirmation: 0 + switchUserAccountLockEnabled: 0 + switchSystemResourceMemory: 16777216 + switchSupportedNpadStyles: 22 + switchNativeFsCacheSize: 32 + switchIsHoldTypeHorizontal: 0 + switchSupportedNpadCount: 8 + switchSocketConfigEnabled: 0 + switchTcpInitialSendBufferSize: 32 + switchTcpInitialReceiveBufferSize: 64 + switchTcpAutoSendBufferSizeMax: 256 + switchTcpAutoReceiveBufferSizeMax: 256 + switchUdpSendBufferSize: 9 + switchUdpReceiveBufferSize: 42 + switchSocketBufferEfficiency: 4 + switchSocketInitializeEnabled: 1 + switchNetworkInterfaceManagerInitializeEnabled: 1 + switchPlayerConnectionEnabled: 1 + switchUseNewStyleFilepaths: 0 + switchUseLegacyFmodPriorities: 1 + switchUseMicroSleepForYield: 1 + switchEnableRamDiskSupport: 0 + switchMicroSleepForYieldTime: 25 + switchRamDiskSpaceSize: 12 + ps4NPAgeRating: 12 + ps4NPTitleSecret: + ps4NPTrophyPackPath: + ps4ParentalLevel: 11 + ps4ContentID: ED1633-NPXX51362_00-0000000000000000 + ps4Category: 0 + ps4MasterVersion: 01.00 + ps4AppVersion: 01.00 + ps4AppType: 0 + ps4ParamSfxPath: + ps4VideoOutPixelFormat: 0 + ps4VideoOutInitialWidth: 1920 + ps4VideoOutBaseModeInitialWidth: 1920 + ps4VideoOutReprojectionRate: 60 + ps4PronunciationXMLPath: + ps4PronunciationSIGPath: + ps4BackgroundImagePath: + ps4StartupImagePath: + ps4StartupImagesFolder: + ps4IconImagesFolder: + ps4SaveDataImagePath: + ps4SdkOverride: + ps4BGMPath: + ps4ShareFilePath: + ps4ShareOverlayImagePath: + ps4PrivacyGuardImagePath: + ps4ExtraSceSysFile: + ps4NPtitleDatPath: + ps4RemotePlayKeyAssignment: -1 + ps4RemotePlayKeyMappingDir: + ps4PlayTogetherPlayerCount: 0 + ps4EnterButtonAssignment: 2 + ps4ApplicationParam1: 0 + ps4ApplicationParam2: 0 + ps4ApplicationParam3: 0 + ps4ApplicationParam4: 0 + ps4DownloadDataSize: 0 + ps4GarlicHeapSize: 2048 + ps4ProGarlicHeapSize: 2560 + playerPrefsMaxSize: 32768 + ps4Passcode: frAQBc8Wsa1xVPfvJcrgRYwTiizs2trQ + ps4pnSessions: 1 + ps4pnPresence: 1 + ps4pnFriends: 1 + ps4pnGameCustomData: 1 + playerPrefsSupport: 0 + enableApplicationExit: 0 + resetTempFolder: 1 + restrictedAudioUsageRights: 0 + ps4UseResolutionFallback: 0 + ps4ReprojectionSupport: 0 + ps4UseAudio3dBackend: 0 + ps4UseLowGarlicFragmentationMode: 1 + ps4SocialScreenEnabled: 0 + ps4ScriptOptimizationLevel: 2 + ps4Audio3dVirtualSpeakerCount: 14 + ps4attribCpuUsage: 0 + ps4PatchPkgPath: + ps4PatchLatestPkgPath: + ps4PatchChangeinfoPath: + ps4PatchDayOne: 0 + ps4attribUserManagement: 0 + ps4attribMoveSupport: 0 + ps4attrib3DSupport: 0 + ps4attribShareSupport: 0 + ps4attribExclusiveVR: 0 + ps4disableAutoHideSplash: 0 + ps4videoRecordingFeaturesUsed: 0 + ps4contentSearchFeaturesUsed: 0 + ps4CompatibilityPS5: 0 + ps4AllowPS5Detection: 0 + ps4GPU800MHz: 1 + ps4attribEyeToEyeDistanceSettingVR: 0 + ps4IncludedModules: [] + ps4attribVROutputEnabled: 0 + monoEnv: + splashScreenBackgroundSourceLandscape: {fileID: 0} + splashScreenBackgroundSourcePortrait: {fileID: 0} + blurSplashScreenBackground: 1 + spritePackerPolicy: + webGLMemorySize: 32 + webGLExceptionSupport: 1 + webGLNameFilesAsHashes: 0 + webGLDataCaching: 1 + webGLDebugSymbols: 0 + webGLEmscriptenArgs: + webGLModulesDirectory: + webGLTemplate: APPLICATION:Default + webGLAnalyzeBuildSize: 0 + webGLUseEmbeddedResources: 0 + webGLCompressionFormat: 0 + webGLWasmArithmeticExceptions: 0 + webGLLinkerTarget: 1 + webGLThreadsSupport: 0 + webGLDecompressionFallback: 0 + webGLPowerPreference: 2 + scriptingDefineSymbols: {} + additionalCompilerArguments: {} + platformArchitecture: {} + scriptingBackend: {} + il2cppCompilerConfiguration: {} + managedStrippingLevel: {} + incrementalIl2cppBuild: {} + suppressCommonWarnings: 1 + allowUnsafeCode: 0 + useDeterministicCompilation: 1 + enableRoslynAnalyzers: 1 + selectedPlatform: 0 + additionalIl2CppArgs: + scriptingRuntimeVersion: 1 + gcIncremental: 1 + assemblyVersionValidation: 1 + gcWBarrierValidation: 0 + apiCompatibilityLevelPerPlatform: {} + m_RenderingPath: 1 + m_MobileRenderingPath: 1 + metroPackageName: UnityNicoliveClient + metroPackageVersion: + metroCertificatePath: + metroCertificatePassword: + metroCertificateSubject: + metroCertificateIssuer: + metroCertificateNotAfter: 0000000000000000 + metroApplicationDescription: UnityNicoliveClient + wsaImages: {} + metroTileShortName: + metroTileShowName: 0 + metroMediumTileShowName: 0 + metroLargeTileShowName: 0 + metroWideTileShowName: 0 + metroSupportStreamingInstall: 0 + metroLastRequiredScene: 0 + metroDefaultTileSize: 1 + metroTileForegroundText: 2 + metroTileBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 0} + metroSplashScreenBackgroundColor: {r: 0.12941177, g: 0.17254902, b: 0.21568628, a: 1} + metroSplashScreenUseBackgroundColor: 0 + platformCapabilities: {} + metroTargetDeviceFamilies: {} + metroFTAName: + metroFTAFileTypes: [] + metroProtocolName: + vcxProjDefaultLanguage: + XboxOneProductId: + XboxOneUpdateKey: + XboxOneSandboxId: + XboxOneContentId: + XboxOneTitleId: + XboxOneSCId: + XboxOneGameOsOverridePath: + XboxOnePackagingOverridePath: + XboxOneAppManifestOverridePath: + XboxOneVersion: 1.0.0.0 + XboxOnePackageEncryption: 0 + XboxOnePackageUpdateGranularity: 2 + XboxOneDescription: + XboxOneLanguage: + - enus + XboxOneCapability: [] + XboxOneGameRating: {} + XboxOneIsContentPackage: 0 + XboxOneEnhancedXboxCompatibilityMode: 0 + XboxOneEnableGPUVariability: 1 + XboxOneSockets: {} + XboxOneSplashScreen: {fileID: 0} + XboxOneAllowedProductIds: [] + XboxOnePersistentLocalStorageSize: 0 + XboxOneXTitleMemory: 8 + XboxOneOverrideIdentityName: + XboxOneOverrideIdentityPublisher: + vrEditorSettings: {} + cloudServicesEnabled: {} + luminIcon: + m_Name: + m_ModelFolderPath: + m_PortalFolderPath: + luminCert: + m_CertPath: + m_SignPackage: 1 + luminIsChannelApp: 0 + luminVersion: + m_VersionCode: 1 + m_VersionName: + apiCompatibilityLevel: 6 + activeInputHandler: 0 + windowsGamepadBackendHint: 0 + cloudProjectId: + framebufferDepthMemorylessMode: 0 + qualitySettingsNames: [] + projectName: + organizationId: + cloudEnabled: 0 + legacyClampBlendShapeWeights: 0 + playerDataPath: + forceSRGBBlit: 1 + virtualTexturingSupportEnabled: 0 diff --git a/ProjectSettings/ProjectVersion.txt b/ProjectSettings/ProjectVersion.txt new file mode 100644 index 0000000..1a9f85a --- /dev/null +++ b/ProjectSettings/ProjectVersion.txt @@ -0,0 +1,2 @@ +m_EditorVersion: 2021.3.17f1 +m_EditorVersionWithRevision: 2021.3.17f1 (3e8111cac19d) diff --git a/ProjectSettings/QualitySettings.asset b/ProjectSettings/QualitySettings.asset new file mode 100644 index 0000000..b00e975 --- /dev/null +++ b/ProjectSettings/QualitySettings.asset @@ -0,0 +1,242 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!47 &1 +QualitySettings: + m_ObjectHideFlags: 0 + serializedVersion: 5 + m_CurrentQuality: 5 + m_QualitySettings: + - serializedVersion: 2 + name: Very Low + pixelLightCount: 0 + shadows: 0 + shadowResolution: 0 + shadowProjection: 1 + shadowCascades: 1 + shadowDistance: 15 + shadowNearPlaneOffset: 3 + shadowCascade2Split: 0.33333334 + shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} + shadowmaskMode: 0 + skinWeights: 1 + textureQuality: 1 + anisotropicTextures: 0 + antiAliasing: 0 + softParticles: 0 + softVegetation: 0 + realtimeReflectionProbes: 0 + billboardsFaceCameraPosition: 0 + vSyncCount: 0 + lodBias: 0.3 + maximumLODLevel: 0 + streamingMipmapsActive: 0 + streamingMipmapsAddAllCameras: 1 + streamingMipmapsMemoryBudget: 512 + streamingMipmapsRenderersPerFrame: 512 + streamingMipmapsMaxLevelReduction: 2 + streamingMipmapsMaxFileIORequests: 1024 + particleRaycastBudget: 4 + asyncUploadTimeSlice: 2 + asyncUploadBufferSize: 16 + asyncUploadPersistentBuffer: 1 + resolutionScalingFixedDPIFactor: 1 + customRenderPipeline: {fileID: 0} + excludedTargetPlatforms: [] + - serializedVersion: 2 + name: Low + pixelLightCount: 0 + shadows: 0 + shadowResolution: 0 + shadowProjection: 1 + shadowCascades: 1 + shadowDistance: 20 + shadowNearPlaneOffset: 3 + shadowCascade2Split: 0.33333334 + shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} + shadowmaskMode: 0 + skinWeights: 2 + textureQuality: 0 + anisotropicTextures: 0 + antiAliasing: 0 + softParticles: 0 + softVegetation: 0 + realtimeReflectionProbes: 0 + billboardsFaceCameraPosition: 0 + vSyncCount: 0 + lodBias: 0.4 + maximumLODLevel: 0 + streamingMipmapsActive: 0 + streamingMipmapsAddAllCameras: 1 + streamingMipmapsMemoryBudget: 512 + streamingMipmapsRenderersPerFrame: 512 + streamingMipmapsMaxLevelReduction: 2 + streamingMipmapsMaxFileIORequests: 1024 + particleRaycastBudget: 16 + asyncUploadTimeSlice: 2 + asyncUploadBufferSize: 16 + asyncUploadPersistentBuffer: 1 + resolutionScalingFixedDPIFactor: 1 + customRenderPipeline: {fileID: 0} + excludedTargetPlatforms: [] + - serializedVersion: 2 + name: Medium + pixelLightCount: 1 + shadows: 1 + shadowResolution: 0 + shadowProjection: 1 + shadowCascades: 1 + shadowDistance: 20 + shadowNearPlaneOffset: 3 + shadowCascade2Split: 0.33333334 + shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} + shadowmaskMode: 0 + skinWeights: 2 + textureQuality: 0 + anisotropicTextures: 1 + antiAliasing: 0 + softParticles: 0 + softVegetation: 0 + realtimeReflectionProbes: 0 + billboardsFaceCameraPosition: 0 + vSyncCount: 1 + lodBias: 0.7 + maximumLODLevel: 0 + streamingMipmapsActive: 0 + streamingMipmapsAddAllCameras: 1 + streamingMipmapsMemoryBudget: 512 + streamingMipmapsRenderersPerFrame: 512 + streamingMipmapsMaxLevelReduction: 2 + streamingMipmapsMaxFileIORequests: 1024 + particleRaycastBudget: 64 + asyncUploadTimeSlice: 2 + asyncUploadBufferSize: 16 + asyncUploadPersistentBuffer: 1 + resolutionScalingFixedDPIFactor: 1 + customRenderPipeline: {fileID: 0} + excludedTargetPlatforms: [] + - serializedVersion: 2 + name: High + pixelLightCount: 2 + shadows: 2 + shadowResolution: 1 + shadowProjection: 1 + shadowCascades: 2 + shadowDistance: 40 + shadowNearPlaneOffset: 3 + shadowCascade2Split: 0.33333334 + shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} + shadowmaskMode: 1 + skinWeights: 2 + textureQuality: 0 + anisotropicTextures: 1 + antiAliasing: 0 + softParticles: 0 + softVegetation: 1 + realtimeReflectionProbes: 1 + billboardsFaceCameraPosition: 1 + vSyncCount: 1 + lodBias: 1 + maximumLODLevel: 0 + streamingMipmapsActive: 0 + streamingMipmapsAddAllCameras: 1 + streamingMipmapsMemoryBudget: 512 + streamingMipmapsRenderersPerFrame: 512 + streamingMipmapsMaxLevelReduction: 2 + streamingMipmapsMaxFileIORequests: 1024 + particleRaycastBudget: 256 + asyncUploadTimeSlice: 2 + asyncUploadBufferSize: 16 + asyncUploadPersistentBuffer: 1 + resolutionScalingFixedDPIFactor: 1 + customRenderPipeline: {fileID: 0} + excludedTargetPlatforms: [] + - serializedVersion: 2 + name: Very High + pixelLightCount: 3 + shadows: 2 + shadowResolution: 2 + shadowProjection: 1 + shadowCascades: 2 + shadowDistance: 70 + shadowNearPlaneOffset: 3 + shadowCascade2Split: 0.33333334 + shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} + shadowmaskMode: 1 + skinWeights: 4 + textureQuality: 0 + anisotropicTextures: 2 + antiAliasing: 2 + softParticles: 1 + softVegetation: 1 + realtimeReflectionProbes: 1 + billboardsFaceCameraPosition: 1 + vSyncCount: 1 + lodBias: 1.5 + maximumLODLevel: 0 + streamingMipmapsActive: 0 + streamingMipmapsAddAllCameras: 1 + streamingMipmapsMemoryBudget: 512 + streamingMipmapsRenderersPerFrame: 512 + streamingMipmapsMaxLevelReduction: 2 + streamingMipmapsMaxFileIORequests: 1024 + particleRaycastBudget: 1024 + asyncUploadTimeSlice: 2 + asyncUploadBufferSize: 16 + asyncUploadPersistentBuffer: 1 + resolutionScalingFixedDPIFactor: 1 + customRenderPipeline: {fileID: 0} + excludedTargetPlatforms: [] + - serializedVersion: 2 + name: Ultra + pixelLightCount: 4 + shadows: 2 + shadowResolution: 2 + shadowProjection: 1 + shadowCascades: 4 + shadowDistance: 150 + shadowNearPlaneOffset: 3 + shadowCascade2Split: 0.33333334 + shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} + shadowmaskMode: 1 + skinWeights: 255 + textureQuality: 0 + anisotropicTextures: 2 + antiAliasing: 2 + softParticles: 1 + softVegetation: 1 + realtimeReflectionProbes: 1 + billboardsFaceCameraPosition: 1 + vSyncCount: 1 + lodBias: 2 + maximumLODLevel: 0 + streamingMipmapsActive: 0 + streamingMipmapsAddAllCameras: 1 + streamingMipmapsMemoryBudget: 512 + streamingMipmapsRenderersPerFrame: 512 + streamingMipmapsMaxLevelReduction: 2 + streamingMipmapsMaxFileIORequests: 1024 + particleRaycastBudget: 4096 + asyncUploadTimeSlice: 2 + asyncUploadBufferSize: 16 + asyncUploadPersistentBuffer: 1 + resolutionScalingFixedDPIFactor: 1 + customRenderPipeline: {fileID: 0} + excludedTargetPlatforms: [] + m_PerPlatformDefaultQuality: + Android: 2 + EmbeddedLinux: 5 + GameCoreScarlett: 5 + GameCoreXboxOne: 5 + LinuxHeadlessSimulation: 5 + Lumin: 5 + Nintendo Switch: 5 + PS4: 5 + PS5: 5 + Server: 5 + Stadia: 5 + Standalone: 5 + WebGL: 3 + Windows Store Apps: 5 + XboxOne: 5 + iPhone: 2 + tvOS: 2 diff --git a/ProjectSettings/TagManager.asset b/ProjectSettings/TagManager.asset new file mode 100644 index 0000000..1c92a78 --- /dev/null +++ b/ProjectSettings/TagManager.asset @@ -0,0 +1,43 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!78 &1 +TagManager: + serializedVersion: 2 + tags: [] + layers: + - Default + - TransparentFX + - Ignore Raycast + - + - Water + - UI + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + m_SortingLayers: + - name: Default + uniqueID: 0 + locked: 0 diff --git a/ProjectSettings/TimeManager.asset b/ProjectSettings/TimeManager.asset new file mode 100644 index 0000000..558a017 --- /dev/null +++ b/ProjectSettings/TimeManager.asset @@ -0,0 +1,9 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!5 &1 +TimeManager: + m_ObjectHideFlags: 0 + Fixed Timestep: 0.02 + Maximum Allowed Timestep: 0.33333334 + m_TimeScale: 1 + Maximum Particle Timestep: 0.03 diff --git a/ProjectSettings/UnityConnectSettings.asset b/ProjectSettings/UnityConnectSettings.asset new file mode 100644 index 0000000..a88bee0 --- /dev/null +++ b/ProjectSettings/UnityConnectSettings.asset @@ -0,0 +1,36 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!310 &1 +UnityConnectSettings: + m_ObjectHideFlags: 0 + serializedVersion: 1 + m_Enabled: 0 + m_TestMode: 0 + m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events + m_EventUrl: https://cdp.cloud.unity3d.com/v1/events + m_ConfigUrl: https://config.uca.cloud.unity3d.com + m_DashboardUrl: https://dashboard.unity3d.com + m_TestInitMode: 0 + CrashReportingSettings: + m_EventUrl: https://perf-events.cloud.unity3d.com + m_Enabled: 0 + m_LogBufferSize: 10 + m_CaptureEditorExceptions: 1 + UnityPurchasingSettings: + m_Enabled: 0 + m_TestMode: 0 + UnityAnalyticsSettings: + m_Enabled: 0 + m_TestMode: 0 + m_InitializeOnStartup: 1 + m_PackageRequiringCoreStatsPresent: 0 + UnityAdsSettings: + m_Enabled: 0 + m_InitializeOnStartup: 1 + m_TestMode: 0 + m_IosGameId: + m_AndroidGameId: + m_GameIds: {} + m_GameId: + PerformanceReportingSettings: + m_Enabled: 0 diff --git a/ProjectSettings/VFXManager.asset b/ProjectSettings/VFXManager.asset new file mode 100644 index 0000000..82b46d9 --- /dev/null +++ b/ProjectSettings/VFXManager.asset @@ -0,0 +1,15 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!937362698 &1 +VFXManager: + m_ObjectHideFlags: 0 + m_IndirectShader: {fileID: 0} + m_CopyBufferShader: {fileID: 0} + m_SortShader: {fileID: 0} + m_StripUpdateShader: {fileID: 0} + m_RenderPipeSettingsPath: + m_FixedTimeStep: 0.016666668 + m_MaxDeltaTime: 0.05 + m_CompiledVersion: 0 + m_RuntimeVersion: 0 + m_RuntimeResources: {fileID: 0} diff --git a/ProjectSettings/VersionControlSettings.asset b/ProjectSettings/VersionControlSettings.asset new file mode 100644 index 0000000..dca2881 --- /dev/null +++ b/ProjectSettings/VersionControlSettings.asset @@ -0,0 +1,8 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!890905787 &1 +VersionControlSettings: + m_ObjectHideFlags: 0 + m_Mode: Visible Meta Files + m_CollabEditorSettings: + inProgressEnabled: 1 diff --git a/ProjectSettings/boot.config b/ProjectSettings/boot.config new file mode 100644 index 0000000..e69de29 diff --git a/README.md b/README.md index 02f0ca7..61d9efc 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,13 @@ UnityNicoliveClientはニコニコ生放送の新配信番組をUnityから操作するクライアントです。 新配信のユーザ生放送にのみ対応しています。 -UniRxの使用を前提にしています。 + +# 依存ライブラリ + +次のライブラリを別途導入する必要があります。 + +* UniRx +* UniTask # 機能一覧 @@ -12,11 +18,11 @@ UniRxの使用を前提にしています。 * 番組延長手段取得 * 番組延長 * 運営コメント投稿/削除 - * BSPコメント投稿 * 番組情報取得 * 番組統計情報取得(来場者数、コメント数) * コメント取得 - * アンケートの実行 + * アンケートの実行/終了 + * (アンケートの結果表示は壊れてて動きません) # 使い方 @@ -28,17 +34,10 @@ UniRxの使用を前提にしています。 4. 各種メソッドを実行 ```cs -IEnumerator LoginCoroutine() +public async UniTask LoginAsync(string mail, string pass, CancellationToken ct) { - var mail = "ニコニコのメールアドレス"; - var pass = "ニコニコのパスワード"; - //ログイン実行 - var u = NiconicoUserClient.LoginAsync(mail, pass).ToYieldInstruction(); - yield return u; //ログイン処理を待機 - - //ログインに成功するとユーザ情報が返ってくる - NiconicoUser user = u.Result; + NiconicoUser user = await NiconicoUserClient.LoginAsync(mail, pass, ct); //クライアントにユーザ情報を渡して初期化 var client = new NicoliveApiClient(user); @@ -47,10 +46,7 @@ IEnumerator LoginCoroutine() client.SetNicoliveProgramId("lv123456"); //運営コメントを非同期で投稿 - client.SendOperatorCommentAsync("テスト投稿"); - - //投稿が終わるのを同期的に待つ場合はToYieldInstruction() - yield return client.SendOperatorCommentAsync("テスト投稿").ToYieldInstruction(); + await client.SendOperatorCommentAsync("名前", "テスト投稿", "white", false, ct); } ``` @@ -76,14 +72,13 @@ client.SetCustomUserAgent("YourApplicationNameHere"); ### コミュニティ番組のみでよい場合 -`GetCurrentCommunityProgramIdAsync()` で取得可能。取得できない場合は`OnError()`が返る。 +`GetCurrentCommunityProgramIdAsync()` で取得可能。 **※番組作成後にAPIで取得できるようになるまで1分程度かかる点に注意。** ```cs //現在放送中の番組ID取得 -client.GetCurrentCommunityProgramIdAsync() - .Subscribe(lv => Debug.Log(lv)); +string[] programs = await client.GetCurrentCommunityProgramIdAsync(ct); ``` ### チャンネル番組を含む場合 @@ -99,24 +94,20 @@ client.GetCurrentCommunityProgramIdAsync() ```cs var targetChannelId = "ch123456789"; +var programs = await client.GetScheduledProgramListAsync(ct); -client.GetScheduledProgramListAsync() - .Subscribe(programs => +foreach (var programSchedule in programs) +{ + if (programSchedule.SocialGroupId == targetChannelId + && programSchedule.Status == ProgramStatus.OnAir + && programSchedule.Status == ProgramStatus.Test //テスト放送も判定に含めるなら必要 + ) { - foreach (var programSchedule in programs) - { - if (programSchedule.SocialGroupId == targetChannelId - && programSchedule.Status == ProgramStatus.OnAir - && programSchedule.Status == ProgramStatus.Test //テスト放送も判定に含めるなら必要 - ) - { - Debug.Log(targetChannelId + "は現在、" + programSchedule.ProgramId + "で配信中です。"); - return; - } - } - - Debug.Log(targetChannelId + "は現在配信していません。"); - }); + Debug.Log(targetChannelId + "は現在、" + programSchedule.ProgramId + "で配信中です。"); + return; + } +} +Debug.Log(targetChannelId + "は現在配信していません。"); ``` @@ -126,8 +117,7 @@ client.GetScheduledProgramListAsync() `GetProgramInfoAsync` で取得可能 ```cs -var programInfo = default(ProgramInfo); -client.GetProgramInfoAsync().Subscribe(x => programInfo = x); +ProgramInfo result = await client.GetProgramInfoAsync("lv123456", ct); ``` ## コメントを取得する @@ -142,91 +132,29 @@ client.GetProgramInfoAsync().Subscribe(x => programInfo = x); **使い終わったら必ずDispose()を実行すること!** ```cs -IEnumerator CommentCoroutine(NiconicoUser user, NicoliveApiClient apiClient) -{ - //番組情報取得 - var pi = apiClient.GetProgramInfoAsync().ToYieldInstruction(); - yield return pi; +//番組情報取得 +var pi = await client.GetProgramInfoAsync("lv12345", ct); - // 番組の部屋一覧 - // 自分が放送する番組の場合は全部屋取得できる - // 他人の放送の場合は「座席を取得済み」の場合のみ、その座席のある部屋の情報が1つ取得できる - var rooms = pi.Result.Rooms; +// 番組の部屋一覧 +// 自分が放送する番組の場合は全部屋取得できる +// 他人の放送の場合は「座席を取得済み」の場合のみ、その座席のある部屋の情報が1つ取得できる +var rooms = pi.Rooms; - //先頭の部屋に接続するコメントクライアントを作成 - var commentClient = new NicoliveCommentClient(rooms.First(), user.UserId); +//先頭の部屋に接続するコメントクライアントを作成 +using var commentClient = new NicoliveCommentClient(rooms.First(), user.UserId); - //コメント購読設定 - commentClient.OnMessageAsObservable.Subscribe(x => Debug.Log(x.Content)); +//コメント購読設定 +commentClient.OnMessageAsObservable.Subscribe(x => Debug.Log(x.Content)); - //クライアント接続 - commentClient.Connect(resFrom: 0); +//クライアント接続 +commentClient.Connect(resFrom: 0); - yield return new WaitForSeconds(10); +await UniTask.Delay(TimeSpan.FromSeconds(10)); - //おかたづけ - commentClient.Disconnect(); - commentClient.Dispose(); -} +//おかたづけ +commentClient.Disconnect(); ``` -## アンケート - -```cs -IEnumerator EnqueteCoroutine(NicoliveApiClient client) -{ - var title = "どれが好き?"; - var questions = new string[] { "き○この山", "た○のこの里", "コ○ラのマーチ" }; - - //アンケートの実行 - client.StartEnqueteAsync(title, questions); - - - //回答時間 - yield return new WaitForSeconds(10); - - - //結果表示 - var ri = client.ShowResultEnqueteAsync().ToYieldInstruction(); - yield return ri; //APIの結果待ち - var enqueteResult = ri.Result; - - //結果表示 - Debug.Log(enqueteResult.Title); - foreach (var i in enqueteResult.Items) - { - //各要素の回答率 - Debug.Log(string.Format("{0}:{1}%", i.Name, i.Rate)); - } - - - //結果表示待機 - yield return new WaitForSeconds(3); - - - //アンケート終了 - client.FinishEnqueteAsync(); -} -``` - - -## エラーハンドリング - -```cs -//失敗時はOnErrorが通知される -client.SendOperatorCommentAsync("テスト投稿") - .Subscribe(_ => { }, ex => Debug.LogError(ex)); -``` - -## その他 - -`NicoliveApiClient`が提供する各種メソッドは全てHot変換(PublishLast)済み。 -そのため明示的な`Subscribe()`は省略可能。 - -```cs -client.SendOperatorCommentAsync("テスト投稿").Subscribe(); -client.SendOperatorCommentAsync("テスト投稿"); //Subscribeを省略しても実行される -``` # 配布ライセンス @@ -238,5 +166,8 @@ MITライセンス UniRx Copyright (c) 2014 Yoshifumi Kawai https://github.com/neuecc/UniRx/blob/master/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 diff --git a/TORISOUP.NicoliveClient.csproj.DotSettings b/TORISOUP.NicoliveClient.csproj.DotSettings new file mode 100644 index 0000000..34a151f --- /dev/null +++ b/TORISOUP.NicoliveClient.csproj.DotSettings @@ -0,0 +1,2 @@ + + True \ No newline at end of file diff --git a/UserSettings/EditorUserSettings.asset b/UserSettings/EditorUserSettings.asset new file mode 100644 index 0000000..8ddb2f1 --- /dev/null +++ b/UserSettings/EditorUserSettings.asset @@ -0,0 +1,28 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!162 &1 +EditorUserSettings: + m_ObjectHideFlags: 0 + serializedVersion: 4 + m_ConfigSettings: + RecentlyUsedSceneGuid-0: + value: 5504015056530d0a550f5826167b59441515192e2d2b7e3678784437b1e56d3a + flags: 0 + vcSharedLogLevel: + value: 0d5e400f0650 + flags: 0 + m_VCAutomaticAdd: 1 + m_VCDebugCom: 0 + m_VCDebugCmd: 0 + m_VCDebugOut: 0 + m_SemanticMergeMode: 2 + m_DesiredImportWorkerCount: 8 + m_StandbyImportWorkerCount: 2 + m_IdleImportWorkerShutdownDelay: 60000 + m_VCShowFailedCheckout: 1 + m_VCOverwriteFailedCheckoutAssets: 1 + m_VCProjectOverlayIcons: 1 + m_VCHierarchyOverlayIcons: 1 + m_VCOtherOverlayIcons: 1 + m_VCAllowAsyncUpdate: 1 + m_ArtifactGarbageCollection: 1 diff --git a/UserSettings/Layouts/default-2021.dwlt b/UserSettings/Layouts/default-2021.dwlt new file mode 100644 index 0000000..6a49ce1 --- /dev/null +++ b/UserSettings/Layouts/default-2021.dwlt @@ -0,0 +1,1049 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &1 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 12004, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_PixelRect: + serializedVersion: 2 + x: -2511.6 + y: 526.4 + width: 2496 + height: 827 + m_ShowMode: 0 + m_Title: Console + m_RootView: {fileID: 4} + m_MinSize: {x: 101, y: 123} + m_MaxSize: {x: 4001, y: 4023} + m_Maximized: 0 +--- !u!114 &2 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 1 + m_Script: {fileID: 12004, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_PixelRect: + serializedVersion: 2 + x: 62.4 + y: 43.2 + width: 3009.6 + height: 1684.8 + m_ShowMode: 4 + m_Title: Project + m_RootView: {fileID: 5} + m_MinSize: {x: 875, y: 492} + m_MaxSize: {x: 10000, y: 10000} + m_Maximized: 1 +--- !u!114 &3 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0} + m_Name: ConsoleWindow + m_EditorClassIdentifier: + m_Children: [] + m_Position: + serializedVersion: 2 + x: 0 + y: 0 + width: 2496 + height: 827 + m_MinSize: {x: 101, y: 123} + m_MaxSize: {x: 4001, y: 4023} + m_ActualView: {fileID: 15} + m_Panes: + - {fileID: 15} + m_Selected: 0 + m_LastSelected: 0 +--- !u!114 &4 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 12010, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_Children: + - {fileID: 3} + m_Position: + serializedVersion: 2 + x: 0 + y: 0 + width: 2496 + height: 827 + m_MinSize: {x: 101, y: 123} + m_MaxSize: {x: 4001, y: 4023} + vertical: 0 + controlID: 281 +--- !u!114 &5 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 1 + m_Script: {fileID: 12008, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_Children: + - {fileID: 6} + - {fileID: 7} + - {fileID: 8} + m_Position: + serializedVersion: 2 + x: 0 + y: 0 + width: 3009.6 + height: 1684.8 + m_MinSize: {x: 875, y: 492} + m_MaxSize: {x: 10000, y: 10000} + m_UseTopView: 1 + m_TopViewHeight: 30 + m_UseBottomView: 1 + m_BottomViewHeight: 20 +--- !u!114 &6 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 1 + m_Script: {fileID: 12011, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_Children: [] + m_Position: + serializedVersion: 2 + x: 0 + y: 0 + width: 3009.6 + height: 30 + m_MinSize: {x: 0, y: 0} + m_MaxSize: {x: 0, y: 0} + m_LastLoadedLayoutName: 2 by 3 +--- !u!114 &7 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 1 + m_Script: {fileID: 12010, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_Children: + - {fileID: 9} + - {fileID: 10} + - {fileID: 11} + - {fileID: 12} + m_Position: + serializedVersion: 2 + x: 0 + y: 30 + width: 3009.6 + height: 1634.8 + m_MinSize: {x: 400, y: 200} + m_MaxSize: {x: 32384, y: 16192} + vertical: 0 + controlID: 230 +--- !u!114 &8 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 1 + m_Script: {fileID: 12042, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_Children: [] + m_Position: + serializedVersion: 2 + x: 0 + y: 1664.8 + width: 3009.6 + height: 20 + m_MinSize: {x: 0, y: 0} + m_MaxSize: {x: 0, y: 0} +--- !u!114 &9 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 1 + m_Script: {fileID: 12010, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_Children: + - {fileID: 13} + - {fileID: 14} + m_Position: + serializedVersion: 2 + x: 0 + y: 0 + width: 1421.6 + height: 1634.8 + m_MinSize: {x: 100, y: 200} + m_MaxSize: {x: 8096, y: 16192} + vertical: 1 + controlID: 221 +--- !u!114 &10 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 1 + m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_Children: [] + m_Position: + serializedVersion: 2 + x: 1421.6 + y: 0 + width: 483.20007 + height: 1634.8 + m_MinSize: {x: 202, y: 221} + m_MaxSize: {x: 4002, y: 4021} + m_ActualView: {fileID: 16} + m_Panes: + - {fileID: 16} + m_Selected: 0 + m_LastSelected: 0 +--- !u!114 &11 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 1 + m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_Children: [] + m_Position: + serializedVersion: 2 + x: 1904.8 + y: 0 + width: 432 + height: 1634.8 + m_MinSize: {x: 232, y: 271} + m_MaxSize: {x: 10002, y: 10021} + m_ActualView: {fileID: 18} + m_Panes: + - {fileID: 18} + m_Selected: 0 + m_LastSelected: 0 +--- !u!114 &12 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 1 + m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_Children: [] + m_Position: + serializedVersion: 2 + x: 2336.8 + y: 0 + width: 672.80005 + height: 1634.8 + m_MinSize: {x: 276, y: 71} + m_MaxSize: {x: 4001, y: 4021} + m_ActualView: {fileID: 17} + m_Panes: + - {fileID: 17} + m_Selected: 0 + m_LastSelected: 0 +--- !u!114 &13 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 1 + m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_Children: [] + m_Position: + serializedVersion: 2 + x: 0 + y: 0 + width: 1421.6 + height: 838.4 + m_MinSize: {x: 201, y: 221} + m_MaxSize: {x: 4001, y: 4021} + m_ActualView: {fileID: 20} + m_Panes: + - {fileID: 20} + m_Selected: 0 + m_LastSelected: 0 +--- !u!114 &14 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 1 + m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_Children: [] + m_Position: + serializedVersion: 2 + x: 0 + y: 838.4 + width: 1421.6 + height: 796.4 + m_MinSize: {x: 201, y: 221} + m_MaxSize: {x: 4001, y: 4021} + m_ActualView: {fileID: 19} + m_Panes: + - {fileID: 19} + m_Selected: 0 + m_LastSelected: 0 +--- !u!114 &15 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 12003, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_MinSize: {x: 100, y: 100} + m_MaxSize: {x: 4000, y: 4000} + m_TitleContent: + m_Text: Console + m_Image: {fileID: -4950941429401207979, guid: 0000000000000000d000000000000000, type: 0} + m_Tooltip: + m_Pos: + serializedVersion: 2 + x: -2511.6 + y: 526.4 + width: 2496 + height: 806 + m_ViewDataDictionary: {fileID: 0} + m_OverlayCanvas: + m_LastAppliedPresetName: Default + m_SaveData: [] +--- !u!114 &16 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 1 + m_Script: {fileID: 12061, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_MinSize: {x: 200, y: 200} + m_MaxSize: {x: 4000, y: 4000} + m_TitleContent: + m_Text: Hierarchy + m_Image: {fileID: -3734745235275155857, guid: 0000000000000000d000000000000000, type: 0} + m_Tooltip: + m_Pos: + serializedVersion: 2 + x: 1484 + y: 73.6 + width: 481.20007 + height: 1613.8 + m_ViewDataDictionary: {fileID: 0} + m_OverlayCanvas: + m_LastAppliedPresetName: Default + m_SaveData: [] + m_SceneHierarchy: + m_TreeViewState: + scrollPos: {x: 0, y: 0} + m_SelectedIDs: f4320000 + m_LastClickedID: 0 + m_ExpandedIDs: + m_RenameOverlay: + m_UserAcceptedRename: 0 + m_Name: + m_OriginalName: + m_EditFieldRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 0 + height: 0 + m_UserData: 0 + m_IsWaitingForDelay: 0 + m_IsRenaming: 0 + m_OriginalEventType: 11 + m_IsRenamingFilename: 0 + m_ClientGUIView: {fileID: 0} + m_SearchString: + m_ExpandedScenes: [] + m_CurrenRootInstanceID: 0 + m_LockTracker: + m_IsLocked: 0 + m_CurrentSortingName: TransformSorting + m_WindowGUID: 64ae1983fb1f9cb4e8b38652c17ef71f +--- !u!114 &17 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 1 + m_Script: {fileID: 12019, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_MinSize: {x: 275, y: 50} + m_MaxSize: {x: 4000, y: 4000} + m_TitleContent: + m_Text: Inspector + m_Image: {fileID: -440750813802333266, guid: 0000000000000000d000000000000000, type: 0} + m_Tooltip: + m_Pos: + serializedVersion: 2 + x: 2399.2 + y: 73.6 + width: 671.80005 + height: 1613.8 + m_ViewDataDictionary: {fileID: 0} + m_OverlayCanvas: + m_LastAppliedPresetName: Default + m_SaveData: [] + m_ObjectsLockedBeforeSerialization: [] + m_InstanceIDsLockedBeforeSerialization: + m_PreviewResizer: + m_CachedPref: -160 + m_ControlHash: -371814159 + m_PrefName: Preview_InspectorPreview + m_LastInspectedObjectInstanceID: -1 + m_LastVerticalScrollValue: 0 + m_GlobalObjectId: + m_InspectorMode: 0 + m_LockTracker: + m_IsLocked: 0 + m_PreviewWindow: {fileID: 0} +--- !u!114 &18 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 1 + m_Script: {fileID: 12014, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_MinSize: {x: 230, y: 250} + m_MaxSize: {x: 10000, y: 10000} + m_TitleContent: + m_Text: Project + m_Image: {fileID: -5179483145760003458, guid: 0000000000000000d000000000000000, type: 0} + m_Tooltip: + m_Pos: + serializedVersion: 2 + x: 1967.2001 + y: 73.6 + width: 430 + height: 1613.8 + m_ViewDataDictionary: {fileID: 0} + m_OverlayCanvas: + m_LastAppliedPresetName: Default + m_SaveData: [] + m_SearchFilter: + m_NameFilter: + m_ClassNames: [] + m_AssetLabels: [] + m_AssetBundleNames: [] + m_VersionControlStates: [] + m_SoftLockControlStates: [] + m_ReferencingInstanceIDs: + m_SceneHandles: + m_ShowAllHits: 0 + m_SkipHidden: 0 + m_SearchArea: 1 + m_Folders: + - Packages/com.unity.ugui/Editor/EventSystem + m_Globs: [] + m_OriginalText: + m_ViewMode: 0 + m_StartGridSize: 64 + m_LastFolders: + - Assets + m_LastFoldersGridSize: -1 + m_LastProjectPath: M:\UnityProject\UnityNicoliveClient + m_LockTracker: + m_IsLocked: 0 + m_FolderTreeState: + scrollPos: {x: 0, y: 0} + m_SelectedIDs: b4830000 + m_LastClickedID: 33716 + m_ExpandedIDs: 00000000b483000000ca9a3bffffff7f + m_RenameOverlay: + m_UserAcceptedRename: 0 + m_Name: + m_OriginalName: + m_EditFieldRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 0 + height: 0 + m_UserData: 0 + m_IsWaitingForDelay: 0 + m_IsRenaming: 0 + m_OriginalEventType: 11 + m_IsRenamingFilename: 1 + m_ClientGUIView: {fileID: 0} + m_SearchString: + m_CreateAssetUtility: + m_EndAction: {fileID: 0} + m_InstanceID: 0 + m_Path: + m_Icon: {fileID: 0} + m_ResourceFile: + m_AssetTreeState: + scrollPos: {x: 0, y: 0} + m_SelectedIDs: + m_LastClickedID: 0 + m_ExpandedIDs: ffffffff00000000b4830000b8830000c4830000c8830000f2830000f48300002c86000066860000728600007686000000ca9a3bffffff7f + m_RenameOverlay: + m_UserAcceptedRename: 0 + m_Name: + m_OriginalName: + m_EditFieldRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 0 + height: 0 + m_UserData: 0 + m_IsWaitingForDelay: 0 + m_IsRenaming: 0 + m_OriginalEventType: 11 + m_IsRenamingFilename: 1 + m_ClientGUIView: {fileID: 0} + m_SearchString: + m_CreateAssetUtility: + m_EndAction: {fileID: 0} + m_InstanceID: 0 + m_Path: + m_Icon: {fileID: 0} + m_ResourceFile: + m_ListAreaState: + m_SelectedInstanceIDs: + m_LastClickedInstanceID: 0 + m_HadKeyboardFocusLastEvent: 0 + m_ExpandedInstanceIDs: + m_RenameOverlay: + m_UserAcceptedRename: 0 + m_Name: + m_OriginalName: + m_EditFieldRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 0 + height: 0 + m_UserData: 0 + m_IsWaitingForDelay: 0 + m_IsRenaming: 0 + m_OriginalEventType: 11 + m_IsRenamingFilename: 1 + m_ClientGUIView: {fileID: 0} + m_CreateAssetUtility: + m_EndAction: {fileID: 0} + m_InstanceID: 0 + m_Path: + m_Icon: {fileID: 0} + m_ResourceFile: + m_NewAssetIndexInList: -1 + m_ScrollPosition: {x: 0, y: 0} + m_GridSize: 64 + m_SkipHiddenPackages: 0 + m_DirectoriesAreaWidth: 115 +--- !u!114 &19 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 1 + m_Script: {fileID: 12015, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_MinSize: {x: 200, y: 200} + m_MaxSize: {x: 4000, y: 4000} + m_TitleContent: + m_Text: Game + m_Image: {fileID: 4621777727084837110, guid: 0000000000000000d000000000000000, type: 0} + m_Tooltip: + m_Pos: + serializedVersion: 2 + x: 62.4 + y: 912 + width: 1420.6 + height: 775.4 + m_ViewDataDictionary: {fileID: 0} + m_OverlayCanvas: + m_LastAppliedPresetName: Default + m_SaveData: [] + m_SerializedViewNames: [] + m_SerializedViewValues: [] + m_PlayModeViewName: GameView + m_ShowGizmos: 0 + m_TargetDisplay: 0 + m_ClearColor: {r: 0, g: 0, b: 0, a: 0} + m_TargetSize: {x: 1775.75, y: 943} + m_TextureFilterMode: 0 + m_TextureHideFlags: 61 + m_RenderIMGUI: 1 + m_EnterPlayModeBehavior: 0 + m_UseMipMap: 0 + m_VSyncEnabled: 0 + m_Gizmos: 0 + m_Stats: 0 + m_SelectedSizes: 00000000000000000000000000000000000000000000000000000000000000000000000000000000 + m_ZoomArea: + m_HRangeLocked: 0 + m_VRangeLocked: 0 + hZoomLockedByDefault: 0 + vZoomLockedByDefault: 0 + m_HBaseRangeMin: -710.3 + m_HBaseRangeMax: 710.3 + m_VBaseRangeMin: -377.2 + m_VBaseRangeMax: 377.2 + m_HAllowExceedBaseRangeMin: 1 + m_HAllowExceedBaseRangeMax: 1 + m_VAllowExceedBaseRangeMin: 1 + m_VAllowExceedBaseRangeMax: 1 + m_ScaleWithWindow: 0 + m_HSlider: 0 + m_VSlider: 0 + m_IgnoreScrollWheelUntilClicked: 0 + m_EnableMouseInput: 1 + m_EnableSliderZoomHorizontal: 0 + m_EnableSliderZoomVertical: 0 + m_UniformScale: 1 + m_UpDirection: 1 + m_DrawArea: + serializedVersion: 2 + x: 0 + y: 21 + width: 1420.6 + height: 754.4 + m_Scale: {x: 1, y: 1} + m_Translation: {x: 710.3, y: 377.2} + m_MarginLeft: 0 + m_MarginRight: 0 + m_MarginTop: 0 + m_MarginBottom: 0 + m_LastShownAreaInsideMargins: + serializedVersion: 2 + x: -710.3 + y: -377.2 + width: 1420.6 + height: 754.4 + m_MinimalGUI: 1 + m_defaultScale: 1 + m_LastWindowPixelSize: {x: 1775.75, y: 969.25} + m_ClearInEditMode: 1 + m_NoCameraWarning: 1 + m_LowResolutionForAspectRatios: 00000000000000000000 + m_XRRenderMode: 0 + m_RenderTexture: {fileID: 0} +--- !u!114 &20 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 1 + m_Script: {fileID: 12013, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_MinSize: {x: 200, y: 200} + m_MaxSize: {x: 4000, y: 4000} + m_TitleContent: + m_Text: Scene + m_Image: {fileID: 8634526014445323508, guid: 0000000000000000d000000000000000, type: 0} + m_Tooltip: + m_Pos: + serializedVersion: 2 + x: 62.4 + y: 73.6 + width: 1420.6 + height: 817.4 + m_ViewDataDictionary: {fileID: 0} + m_OverlayCanvas: + m_LastAppliedPresetName: Default + m_SaveData: + - dockPosition: 0 + containerId: overlay-toolbar__top + floating: 0 + collapsed: 0 + displayed: 1 + snapOffset: {x: 0, y: 0} + snapOffsetDelta: {x: -100, y: -25.599976} + snapCorner: 3 + id: Tool Settings + index: 0 + layout: 1 + - dockPosition: 0 + containerId: overlay-toolbar__top + floating: 0 + collapsed: 0 + displayed: 1 + snapOffset: {x: -141, y: 149} + snapOffsetDelta: {x: 0, y: 0} + snapCorner: 1 + id: unity-grid-and-snap-toolbar + index: 1 + layout: 1 + - dockPosition: 1 + containerId: overlay-toolbar__top + floating: 0 + collapsed: 0 + displayed: 1 + snapOffset: {x: 0, y: 0} + snapOffsetDelta: {x: 0, y: 0} + snapCorner: 0 + id: unity-scene-view-toolbar + index: 0 + layout: 1 + - dockPosition: 1 + containerId: overlay-toolbar__top + floating: 0 + collapsed: 0 + displayed: 0 + snapOffset: {x: 0, y: 0} + snapOffsetDelta: {x: 0, y: 0} + snapCorner: 1 + id: unity-search-toolbar + index: 1 + layout: 1 + - dockPosition: 0 + containerId: overlay-container--left + floating: 0 + collapsed: 0 + displayed: 1 + snapOffset: {x: 0, y: 0} + snapOffsetDelta: {x: 0, y: 0} + snapCorner: 0 + id: unity-transform-toolbar + index: 0 + layout: 2 + - dockPosition: 0 + containerId: overlay-container--left + floating: 0 + collapsed: 0 + displayed: 1 + snapOffset: {x: 0, y: 197} + snapOffsetDelta: {x: 0, y: 0} + snapCorner: 0 + id: unity-component-tools + index: 1 + layout: 2 + - dockPosition: 0 + containerId: overlay-container--right + floating: 0 + collapsed: 0 + displayed: 1 + snapOffset: {x: 67.5, y: 86} + snapOffsetDelta: {x: 0, y: 0} + snapCorner: 0 + id: Orientation + index: 0 + layout: 4 + - dockPosition: 1 + containerId: overlay-container--right + floating: 0 + collapsed: 0 + displayed: 0 + snapOffset: {x: 0, y: 0} + snapOffsetDelta: {x: 0, y: 0} + snapCorner: 0 + id: Scene View/Light Settings + index: 0 + layout: 4 + - dockPosition: 1 + containerId: overlay-container--right + floating: 0 + collapsed: 0 + displayed: 0 + snapOffset: {x: 0, y: 0} + snapOffsetDelta: {x: 0, y: 0} + snapCorner: 0 + id: Scene View/Camera + index: 1 + layout: 4 + - dockPosition: 1 + containerId: overlay-container--right + floating: 0 + collapsed: 0 + displayed: 0 + snapOffset: {x: 0, y: 0} + snapOffsetDelta: {x: 0, y: 0} + snapCorner: 0 + id: Scene View/Cloth Constraints + index: 2 + layout: 4 + - dockPosition: 1 + containerId: overlay-container--right + floating: 0 + collapsed: 0 + displayed: 0 + snapOffset: {x: 0, y: 0} + snapOffsetDelta: {x: 0, y: 0} + snapCorner: 0 + id: Scene View/Cloth Collisions + index: 3 + layout: 4 + - dockPosition: 1 + containerId: overlay-container--right + floating: 0 + collapsed: 0 + displayed: 0 + snapOffset: {x: 0, y: 0} + snapOffsetDelta: {x: 0, y: 0} + snapCorner: 0 + id: Scene View/Navmesh Display + index: 4 + layout: 4 + - dockPosition: 1 + containerId: overlay-container--right + floating: 0 + collapsed: 0 + displayed: 0 + snapOffset: {x: 0, y: 0} + snapOffsetDelta: {x: 0, y: 0} + snapCorner: 0 + id: Scene View/Agent Display + index: 5 + layout: 4 + - dockPosition: 1 + containerId: overlay-container--right + floating: 0 + collapsed: 0 + displayed: 0 + snapOffset: {x: 0, y: 0} + snapOffsetDelta: {x: 0, y: 0} + snapCorner: 0 + id: Scene View/Obstacle Display + index: 6 + layout: 4 + - dockPosition: 1 + containerId: overlay-container--right + floating: 0 + collapsed: 0 + displayed: 0 + snapOffset: {x: 0, y: 0} + snapOffsetDelta: {x: 0, y: 0} + snapCorner: 0 + id: Scene View/Occlusion Culling + index: 7 + layout: 4 + - dockPosition: 1 + containerId: overlay-container--right + floating: 0 + collapsed: 0 + displayed: 0 + snapOffset: {x: 0, y: 0} + snapOffsetDelta: {x: 0, y: 0} + snapCorner: 0 + id: Scene View/Physics Debugger + index: 8 + layout: 4 + - dockPosition: 1 + containerId: overlay-container--right + floating: 0 + collapsed: 0 + displayed: 0 + snapOffset: {x: 0, y: 0} + snapOffsetDelta: {x: 0, y: 0} + snapCorner: 0 + id: Scene View/Scene Visibility + index: 9 + layout: 4 + - dockPosition: 1 + containerId: overlay-container--right + floating: 0 + collapsed: 0 + displayed: 0 + snapOffset: {x: 0, y: 0} + snapOffsetDelta: {x: 0, y: 0} + snapCorner: 0 + id: Scene View/Particles + index: 10 + layout: 4 + - dockPosition: 1 + containerId: overlay-container--right + floating: 0 + collapsed: 0 + displayed: 0 + snapOffset: {x: 0, y: 0} + snapOffsetDelta: {x: 0, y: 0} + snapCorner: 0 + id: Scene View/Tilemap + index: 11 + layout: 4 + - dockPosition: 1 + containerId: overlay-container--right + floating: 0 + collapsed: 0 + displayed: 0 + snapOffset: {x: 0, y: 0} + snapOffsetDelta: {x: 0, y: 0} + snapCorner: 0 + id: Scene View/Tilemap Palette Helper + index: 12 + layout: 4 + m_WindowGUID: d906cc6aa7685c748bda36eafde51c01 + m_Gizmos: 1 + m_OverrideSceneCullingMask: 6917529027641081856 + m_SceneIsLit: 1 + m_SceneLighting: 1 + m_2DMode: 0 + m_isRotationLocked: 0 + m_PlayAudio: 0 + m_AudioPlay: 0 + m_Position: + m_Target: {x: 0, y: 0, z: 0} + speed: 2 + m_Value: {x: 0, y: 0, z: 0} + m_RenderMode: 0 + m_CameraMode: + drawMode: 0 + name: Shaded + section: Shading Mode + m_ValidateTrueMetals: 0 + m_DoValidateTrueMetals: 0 + m_ExposureSliderValue: 0 + m_SceneViewState: + m_AlwaysRefresh: 0 + showFog: 1 + showSkybox: 1 + showFlares: 1 + showImageEffects: 1 + showParticleSystems: 1 + showVisualEffectGraphs: 1 + m_FxEnabled: 1 + m_Grid: + xGrid: + m_Fade: + m_Target: 0 + speed: 2 + m_Value: 0 + m_Color: {r: 0.5, g: 0.5, b: 0.5, a: 0.4} + m_Pivot: {x: 0, y: 0, z: 0} + m_Size: {x: 0, y: 0} + yGrid: + m_Fade: + m_Target: 1 + speed: 2 + m_Value: 1 + m_Color: {r: 0.5, g: 0.5, b: 0.5, a: 0.4} + m_Pivot: {x: 0, y: 0, z: 0} + m_Size: {x: 1, y: 1} + zGrid: + m_Fade: + m_Target: 0 + speed: 2 + m_Value: 0 + m_Color: {r: 0.5, g: 0.5, b: 0.5, a: 0.4} + m_Pivot: {x: 0, y: 0, z: 0} + m_Size: {x: 0, y: 0} + m_ShowGrid: 1 + m_GridAxis: 1 + m_gridOpacity: 0.5 + m_Rotation: + m_Target: {x: -0.08717229, y: 0.89959055, z: -0.21045254, w: -0.3726226} + speed: 2 + m_Value: {x: -0.08717229, y: 0.89959055, z: -0.21045254, w: -0.3726226} + m_Size: + m_Target: 10 + speed: 2 + m_Value: 10 + m_Ortho: + m_Target: 0 + speed: 2 + m_Value: 0 + m_CameraSettings: + m_Speed: 1 + m_SpeedNormalized: 0.5 + m_SpeedMin: 0.01 + m_SpeedMax: 2 + m_EasingEnabled: 1 + m_EasingDuration: 0.4 + m_AccelerationEnabled: 1 + m_FieldOfViewHorizontalOrVertical: 60 + m_NearClip: 0.03 + m_FarClip: 10000 + m_DynamicClip: 1 + m_OcclusionCulling: 0 + m_LastSceneViewRotation: {x: 0, y: 0, z: 0, w: 0} + m_LastSceneViewOrtho: 0 + m_ReplacementShader: {fileID: 0} + m_ReplacementString: + m_SceneVisActive: 1 + m_LastLockedObject: {fileID: 0} + m_ViewIsLockedToObject: 0