diff --git a/.gitignore b/.gitignore index b27c769..3706c64 100644 --- a/.gitignore +++ b/.gitignore @@ -2,12 +2,18 @@ # # Get latest from https://github.com/github/gitignore/blob/master/Unity.gitignore # + +# ==================== # +# Unity 2020 generated # +# ==================== # +/[Ll]ogs/ +/[Uu]serSettings/ + /[Ll]ibrary/ /[Tt]emp/ /[Oo]bj/ /[Bb]uild/ /[Bb]uilds/ -/[Ll]ogs/ /[Mm]emoryCaptures/ # Asset meta data should only be ignored when the corresponding asset is also ignored diff --git a/Assets/InfiniteScrollView/Scripts/CHANGELOG.md b/Assets/InfiniteScrollView/Scripts/CHANGELOG.md index e50995e..3e12081 100644 --- a/Assets/InfiniteScrollView/Scripts/CHANGELOG.md +++ b/Assets/InfiniteScrollView/Scripts/CHANGELOG.md @@ -1,5 +1,54 @@ ## CHANGELOG +## [1.4.0] - 2023-11-03 (Breaking Changes) +- Modified namespace HowTungTung to InfiniteScrollViews. +- Modified RefreshCellVisibility access modifier to protected. +```C# + protected abstract void RefreshCellVisibility(); +``` +- Modified Add, Insert, Remove, Refresh, Clear methods (Removed async behaviour, won't auto InitializePool). +- Added RefreshCellVisibilityWithCheck method in InfiniteScrollView. +```C# + public void RefreshCellVisibilityWithCheck() +``` +- Added visibleCount param in InfiniteScrollView. +```C# + public int visibleCount { get; protected set; } +``` +- Added lastMaxVisibleCount param in InfiniteScrollView. +```C# + public int lastMaxVisibleCount { get; protected set; } +``` +- Added isVisibleRangeFilled param in InfiniteScrollView. +```C# + public bool isVisibleRangeFilled { get; protected set; } +``` +- Added DataCount() method in InfiniteScrollView. +```C# + public int DataCount() +``` +- Added param for Refresh(bool disabledRefreshCells = false) method of InfiniteScrollView. +```C# + /// + /// Refresh scrollView (doesn't need to await, if scrollView already initialized) + /// + /// Disable refresh cells, when disabled will mark flag to refresh all at next scrolling. + /// + public abstract UniTask Refresh(bool disabledRefreshCells = false) +``` +- Optimized code. + +※Note: If you add data and don't want to refresh cells every times. You can determines infiniteScrollView.isVisibleRangeFilled == true and set disabledRefreshCells = true, will help you to mark flag and refresh once all at next scrolling. +```C# + public void AddCellData() + { + var data = new InfiniteCellData(new Vector2(100, 100)); + infiniteScrollView.Add(data); + if(!infiniteScrollView.isVisibleRangeFilled) infiniteScrollView.Refresh(); + else infiniteScrollView.Refresh(true); + } +``` + ## [1.3.1] - 2023-11-01 - Fixed determines. - Modified Samples. diff --git a/Assets/InfiniteScrollView/Scripts/Editor/InfiniteScrollViewCreateScriptEditor.cs b/Assets/InfiniteScrollView/Scripts/Editor/InfiniteScrollViewCreateScriptEditor.cs index 6dcb9d0..e474264 100644 --- a/Assets/InfiniteScrollView/Scripts/Editor/InfiniteScrollViewCreateScriptEditor.cs +++ b/Assets/InfiniteScrollView/Scripts/Editor/InfiniteScrollViewCreateScriptEditor.cs @@ -1,6 +1,6 @@ using UnityEditor; -namespace HowTungTung.Editor +namespace InfiniteScrollViews.Editor { public static class InfiniteScrollViewCreateScriptEditor { diff --git a/Assets/InfiniteScrollView/Scripts/Editor/TplScripts/TplInfiniteCell.cs.txt b/Assets/InfiniteScrollView/Scripts/Editor/TplScripts/TplInfiniteCell.cs.txt index 6bb17e7..f1639d3 100644 --- a/Assets/InfiniteScrollView/Scripts/Editor/TplScripts/TplInfiniteCell.cs.txt +++ b/Assets/InfiniteScrollView/Scripts/Editor/TplScripts/TplInfiniteCell.cs.txt @@ -1,4 +1,4 @@ -using HowTungTung; +using InfiniteScrollViews; using System; using Cysharp.Threading.Tasks; diff --git a/Assets/InfiniteScrollView/Scripts/Runtime/HorizontalGridInfiniteScrollView.cs b/Assets/InfiniteScrollView/Scripts/Runtime/HorizontalGridInfiniteScrollView.cs index 34696d1..7decb75 100644 --- a/Assets/InfiniteScrollView/Scripts/Runtime/HorizontalGridInfiniteScrollView.cs +++ b/Assets/InfiniteScrollView/Scripts/Runtime/HorizontalGridInfiniteScrollView.cs @@ -1,14 +1,14 @@ using Cysharp.Threading.Tasks; using UnityEngine; -namespace HowTungTung +namespace InfiniteScrollViews { public class HorizontalGridInfiniteScrollView : InfiniteScrollView { public Vector2 spacing; public int rowCount = 1; - public override void RefreshCellVisibility() + protected override void RefreshCellVisibility() { if (rowCount <= 0) { @@ -27,36 +27,36 @@ public override void RefreshCellVisibility() // Hide float contentWidth = padding.left; - for (int i = 0; i < dataList.Count; i += rowCount) + for (int i = 0; i < _dataList.Count; i += rowCount) { for (int j = 0; j < rowCount; j++) { int index = i + j; - if (index >= dataList.Count) + if (index >= _dataList.Count) break; - var visibleRange = new Vector2(contentWidth, contentWidth + dataList[index].cellSize.x); + var visibleRange = new Vector2(contentWidth, contentWidth + _dataList[index].cellSize.x); if (visibleRange.y < viewportRange.x || visibleRange.x > viewportRange.y) { RecycleCell(index); } } - contentWidth += dataList[i].cellSize.x + spacing.x; + contentWidth += _dataList[i].cellSize.x + spacing.x; } // Show contentWidth = padding.left; - for (int i = 0; i < dataList.Count; i += rowCount) + for (int i = 0; i < _dataList.Count; i += rowCount) { for (int j = 0; j < rowCount; j++) { int index = i + j; - if (index >= dataList.Count) + if (index >= _dataList.Count) break; - var visibleRange = new Vector2(contentWidth, contentWidth + dataList[index].cellSize.x); + var visibleRange = new Vector2(contentWidth, contentWidth + _dataList[index].cellSize.x); if (visibleRange.y >= viewportRange.x && visibleRange.x <= viewportRange.y) { InfiniteCell cell = null; - if (cellList[index] == null) + if (_cellList[index] == null) { if (_cellPool.Count > 0) cell = _cellPool.Dequeue(); else Debug.Log("The cell display error occurred, not enough cells in the cell pool!!!"); @@ -64,21 +64,21 @@ public override void RefreshCellVisibility() // Check cell direciton pivot float dirCoeff = 1f; if (cell != null) dirCoeff = cell.RectTransform.pivot.x > 0 ? -1f : 1f; - SetupCell(cell, index, new Vector2(contentWidth * dirCoeff, (dataList[index].cellSize.y + spacing.y) * -j + -(padding.top - padding.bottom))); + SetupCell(cell, index, new Vector2(contentWidth * dirCoeff, (_dataList[index].cellSize.y + spacing.y) * -j + -(padding.top - padding.bottom))); if (visibleRange.y >= viewportRange.x) - cellList[index]?.transform.SetAsLastSibling(); + _cellList[index]?.transform.SetAsLastSibling(); else - cellList[index]?.transform.SetAsFirstSibling(); + _cellList[index]?.transform.SetAsFirstSibling(); } } - contentWidth += dataList[i].cellSize.x + spacing.x; + contentWidth += _dataList[i].cellSize.x + spacing.x; } // Check scroll position if (scrollRect.content.sizeDelta.x > viewportInterval) { - this._isAtLeft = viewportRange.x + extendVisibleRange + dataList[0].cellSize.x <= dataList[0].cellSize.x; - this._isAtRight = scrollRect.content.sizeDelta.x - viewportRange.y + extendVisibleRange + dataList[dataList.Count - 1].cellSize.x <= dataList[dataList.Count - 1].cellSize.x; + this._isAtLeft = viewportRange.x + extendVisibleRange + _dataList[0].cellSize.x <= _dataList[0].cellSize.x; + this._isAtRight = scrollRect.content.sizeDelta.x - viewportRange.y + extendVisibleRange + _dataList[_dataList.Count - 1].cellSize.x <= _dataList[_dataList.Count - 1].cellSize.x; } else { @@ -89,62 +89,115 @@ public override void RefreshCellVisibility() } } - public sealed override async UniTask Refresh() + public sealed override void Refresh(bool disabledRefreshCells = true) { - if (!IsInitialized) - { - await InitializePool(); - } + if (!this.IsInitialized()) return; + if (scrollRect.viewport.rect.width == 0) { - await DelayToRefresh(); + DelayToRefresh(disabledRefreshCells).Forget(); } else { - DoRefresh(); + DoRefresh(disabledRefreshCells); } } - private void DoRefresh() + protected sealed override void DoRefresh(bool disabledRefreshCells) { if (scrollRect == null) return; - float width = padding.left; - for (int i = 0; i < dataList.Count; i += rowCount) - { - width += dataList[i].cellSize.x + spacing.x; - } - for (int i = 0; i < cellList.Count; i++) + if (!disabledRefreshCells) { - RecycleCell(i); + // Refresh content size + float width = padding.left; + for (int i = 0; i < _dataList.Count; i += rowCount) + { + width += _dataList[i].cellSize.x + spacing.x; + } + width += padding.right; + scrollRect.content.sizeDelta = new Vector2(width, scrollRect.content.sizeDelta.y); + + // Recycle all cells first + for (int i = 0; i < _cellList.Count; i++) + { + RecycleCell(i); + } + + // Refresh cells view + this.RefreshCellVisibility(); + + // Invoke onRefresh callback + onRefreshed?.Invoke(); } - width += padding.right; - scrollRect.content.sizeDelta = new Vector2(width, scrollRect.content.sizeDelta.y); - this.RefreshCellVisibility(); - onRefreshed?.Invoke(); + // Mark flag for refresh at next scrolling + else this._disabledRefreshCells = true; } - private async UniTask DelayToRefresh() + protected sealed override async UniTask DelayToRefresh(bool disabledRefreshCells) { await UniTask.Yield(PlayerLoopTiming.LastPostLateUpdate); - DoRefresh(); + DoRefresh(disabledRefreshCells); + } + + protected sealed override void RefreshAndCheckVisibleInfo() + { + // Reset visible count + this.visibleCount = 0; + + // Viewport + float viewportInterval = scrollRect.viewport.rect.width; + + // Check content direction pivot + if (this._contentDirCoeff == 0) this._contentDirCoeff = scrollRect.content.pivot.x > 0 ? 1f : -1f; + + // Set content direction + float minViewport = scrollRect.content.anchoredPosition.x * this._contentDirCoeff; + Vector2 viewportRange = new Vector2(minViewport - extendVisibleRange, minViewport + viewportInterval + extendVisibleRange); + + // Show + float contentWidth = padding.left; + for (int i = 0; i < _dataList.Count; i += rowCount) + { + for (int j = 0; j < rowCount; j++) + { + int index = i + j; + if (index >= _dataList.Count) + break; + var visibleRange = new Vector2(contentWidth, contentWidth + _dataList[index].cellSize.x); + if (visibleRange.y >= viewportRange.x && visibleRange.x <= viewportRange.y) + { + // Calcuate visible count + this.visibleCount++; + + // Check filled flag + if (_cellList[index] == null) this.isVisibleRangeFilled = false; + else this.isVisibleRangeFilled = true; + } + } + contentWidth += _dataList[i].cellSize.x + spacing.x; + } + + // Adjust filled flag while cell removing + if (this.visibleCount < this.lastMaxVisibleCount) this.isVisibleRangeFilled = false; + this.lastMaxVisibleCount = this.visibleCount; } public override void Snap(int index, float duration) { - if (!IsInitialized) + if (!IsInitialized()) return; - if (index >= dataList.Count || + if (index >= _dataList.Count || index < 0) return; var columeNumber = index / rowCount; float width = padding.left; for (int i = 0; i < columeNumber; i++) { - width += dataList[i * rowCount].cellSize.x + spacing.x; + width += _dataList[i * rowCount].cellSize.x + spacing.x; } - width = this.CalculateSnapPos(ScrollType.Horizontal, this.snapAlign, width, dataList[index]); + width = this.CalculateSnapPos(ScrollType.Horizontal, this.snapAlign, width, _dataList[index]); if (scrollRect.content.anchoredPosition.x != width) { diff --git a/Assets/InfiniteScrollView/Scripts/Runtime/HorizontalInfiniteScrollView.cs b/Assets/InfiniteScrollView/Scripts/Runtime/HorizontalInfiniteScrollView.cs index bfda058..5db8359 100644 --- a/Assets/InfiniteScrollView/Scripts/Runtime/HorizontalInfiniteScrollView.cs +++ b/Assets/InfiniteScrollView/Scripts/Runtime/HorizontalInfiniteScrollView.cs @@ -1,15 +1,15 @@ using Cysharp.Threading.Tasks; using UnityEngine; -namespace HowTungTung +namespace InfiniteScrollViews { public class HorizontalInfiniteScrollView : InfiniteScrollView { public float spacing; - public override void RefreshCellVisibility() + protected override void RefreshCellVisibility() { - if (dataList.Count == 0) + if (_dataList.Count == 0) return; // Viewport @@ -24,25 +24,25 @@ public override void RefreshCellVisibility() // Hide float contentWidth = padding.left; - for (int i = 0; i < dataList.Count; i++) + for (int i = 0; i < _dataList.Count; i++) { - var visibleRange = new Vector2(contentWidth, contentWidth + dataList[i].cellSize.x); + var visibleRange = new Vector2(contentWidth, contentWidth + _dataList[i].cellSize.x); if (visibleRange.y < viewportRange.x || visibleRange.x > viewportRange.y) { RecycleCell(i); } - contentWidth += dataList[i].cellSize.x + spacing; + contentWidth += _dataList[i].cellSize.x + spacing; } // Show contentWidth = padding.left; - for (int i = 0; i < dataList.Count; i++) + for (int i = 0; i < _dataList.Count; i++) { - var visibleRange = new Vector2(contentWidth, contentWidth + dataList[i].cellSize.x); + var visibleRange = new Vector2(contentWidth, contentWidth + _dataList[i].cellSize.x); if (visibleRange.y >= viewportRange.x && visibleRange.x <= viewportRange.y) { InfiniteCell cell = null; - if (cellList[i] == null) + if (_cellList[i] == null) { if (_cellPool.Count > 0) cell = _cellPool.Dequeue(); else Debug.Log("The cell display error occurred, not enough cells in the cell pool!!!"); @@ -52,18 +52,18 @@ public override void RefreshCellVisibility() if (cell != null) dirCoeff = cell.RectTransform.pivot.x > 0 ? -1f : 1f; SetupCell(cell, i, new Vector2(contentWidth * dirCoeff, -(padding.top - padding.bottom))); if (visibleRange.y >= viewportRange.x) - cellList[i]?.transform.SetAsLastSibling(); + _cellList[i]?.transform.SetAsLastSibling(); else - cellList[i]?.transform.SetAsFirstSibling(); + _cellList[i]?.transform.SetAsFirstSibling(); } - contentWidth += dataList[i].cellSize.x + spacing; + contentWidth += _dataList[i].cellSize.x + spacing; } // Check scroll position if (scrollRect.content.sizeDelta.x > viewportInterval) { - this._isAtLeft = viewportRange.x + extendVisibleRange + dataList[0].cellSize.x <= dataList[0].cellSize.x; - this._isAtRight = scrollRect.content.sizeDelta.x - viewportRange.y + extendVisibleRange + dataList[dataList.Count - 1].cellSize.x <= dataList[dataList.Count - 1].cellSize.x; + this._isAtLeft = viewportRange.x + extendVisibleRange + _dataList[0].cellSize.x <= _dataList[0].cellSize.x; + this._isAtRight = scrollRect.content.sizeDelta.x - viewportRange.y + extendVisibleRange + _dataList[_dataList.Count - 1].cellSize.x <= _dataList[_dataList.Count - 1].cellSize.x; } else { @@ -74,52 +74,99 @@ public override void RefreshCellVisibility() } } - public sealed override async UniTask Refresh() + public sealed override void Refresh(bool disabledRefreshCells = true) { - if (!IsInitialized) - { - await InitializePool(); - } + if (!IsInitialized()) return; + if (scrollRect.viewport.rect.width == 0) { - await DelayToRefresh(); + DelayToRefresh(disabledRefreshCells).Forget(); } else { - DoRefresh(); + DoRefresh(disabledRefreshCells); } } - private void DoRefresh() + protected sealed override void DoRefresh(bool disabledRefreshCells) { if (scrollRect == null) return; - float width = padding.left; - for (int i = 0; i < dataList.Count; i++) - { - width += dataList[i].cellSize.x + spacing; - } - for (int i = 0; i < cellList.Count; i++) + if (!disabledRefreshCells) { - RecycleCell(i); + // Refresh content size + float width = padding.left; + for (int i = 0; i < _dataList.Count; i++) + { + width += _dataList[i].cellSize.x + spacing; + } + width += padding.right; + scrollRect.content.sizeDelta = new Vector2(width, scrollRect.content.sizeDelta.y); + + // Recycle all cells first + for (int i = 0; i < _cellList.Count; i++) + { + RecycleCell(i); + } + + // Refresh cells view + this.RefreshCellVisibility(); + + // Invoke onRefresh callback + onRefreshed?.Invoke(); } - width += padding.right; - scrollRect.content.sizeDelta = new Vector2(width, scrollRect.content.sizeDelta.y); - this.RefreshCellVisibility(); - onRefreshed?.Invoke(); + // Mark flag for refresh at next scrolling + else this._disabledRefreshCells = true; } - private async UniTask DelayToRefresh() + protected sealed override async UniTask DelayToRefresh(bool disabledRefreshCells) { await UniTask.Yield(PlayerLoopTiming.LastPostLateUpdate); - DoRefresh(); + DoRefresh(disabledRefreshCells); + } + + protected override void RefreshAndCheckVisibleInfo() + { + // Reset visible count + this.visibleCount = 0; + + // Viewport + float viewportInterval = scrollRect.viewport.rect.width; + + // Check content direction pivot + if (this._contentDirCoeff == 0) this._contentDirCoeff = scrollRect.content.pivot.x > 0 ? 1f : -1f; + + // Set content direction + float minViewport = scrollRect.content.anchoredPosition.x * this._contentDirCoeff; + Vector2 viewportRange = new Vector2(minViewport - extendVisibleRange, minViewport + viewportInterval + extendVisibleRange); + + // Show + float contentWidth = padding.left; + for (int i = 0; i < _dataList.Count; i++) + { + var visibleRange = new Vector2(contentWidth, contentWidth + _dataList[i].cellSize.x); + if (visibleRange.y >= viewportRange.x && visibleRange.x <= viewportRange.y) + { + // Calcuate visible count + this.visibleCount++; + + // Check filled flag + if (_cellList[i] == null) this.isVisibleRangeFilled = false; + else this.isVisibleRangeFilled = true; + } + contentWidth += _dataList[i].cellSize.x + spacing; + } + + // Adjust filled flag while cell removing + if (this.visibleCount < this.lastMaxVisibleCount) this.isVisibleRangeFilled = false; + this.lastMaxVisibleCount = this.visibleCount; } public override void Snap(int index, float duration) { - if (!IsInitialized) + if (!IsInitialized()) return; - if (index >= dataList.Count || + if (index >= _dataList.Count || index < 0) return; if (scrollRect.content.rect.width < scrollRect.viewport.rect.width) @@ -127,10 +174,10 @@ public override void Snap(int index, float duration) float width = padding.left; for (int i = 0; i < index; i++) { - width += dataList[i].cellSize.x + spacing; + width += _dataList[i].cellSize.x + spacing; } - width = this.CalculateSnapPos(ScrollType.Horizontal, this.snapAlign, width, dataList[index]); + width = this.CalculateSnapPos(ScrollType.Horizontal, this.snapAlign, width, _dataList[index]); if (scrollRect.content.anchoredPosition.x != width) { @@ -139,15 +186,18 @@ public override void Snap(int index, float duration) } } - public override async UniTask Remove(int index, bool withRefresh = true) + public override bool Remove(int index, bool withRefresh = true) { - if (index >= dataList.Count || + if (!this.IsInitialized()) + return false; + if (index >= _dataList.Count || index < 0) - return; + return false; - var removeCell = dataList[index]; - await base.Remove(index, withRefresh); + var removeCell = _dataList[index]; + bool result = base.Remove(index, withRefresh); scrollRect.content.anchoredPosition -= new Vector2(removeCell.cellSize.x + spacing, 0); + return result; } } } \ No newline at end of file diff --git a/Assets/InfiniteScrollView/Scripts/Runtime/InfiniteCell.cs b/Assets/InfiniteScrollView/Scripts/Runtime/InfiniteCell.cs index cf352a7..7cca7b3 100644 --- a/Assets/InfiniteScrollView/Scripts/Runtime/InfiniteCell.cs +++ b/Assets/InfiniteScrollView/Scripts/Runtime/InfiniteCell.cs @@ -2,7 +2,7 @@ using System; using Cysharp.Threading.Tasks; -namespace HowTungTung +namespace InfiniteScrollViews { public class InfiniteCell : MonoBehaviour { diff --git a/Assets/InfiniteScrollView/Scripts/Runtime/InfiniteCellData.cs b/Assets/InfiniteScrollView/Scripts/Runtime/InfiniteCellData.cs index 6742866..5921702 100644 --- a/Assets/InfiniteScrollView/Scripts/Runtime/InfiniteCellData.cs +++ b/Assets/InfiniteScrollView/Scripts/Runtime/InfiniteCellData.cs @@ -1,7 +1,7 @@ using System; using UnityEngine; -namespace HowTungTung +namespace InfiniteScrollViews { public class InfiniteCellData : IDisposable { diff --git a/Assets/InfiniteScrollView/Scripts/Runtime/InfiniteScrollView.cs b/Assets/InfiniteScrollView/Scripts/Runtime/InfiniteScrollView.cs index de4237b..e0b17e5 100644 --- a/Assets/InfiniteScrollView/Scripts/Runtime/InfiniteScrollView.cs +++ b/Assets/InfiniteScrollView/Scripts/Runtime/InfiniteScrollView.cs @@ -6,7 +6,7 @@ using UnityEngine.EventSystems; using UnityEngine.UI; -namespace HowTungTung +namespace InfiniteScrollViews { [RequireComponent(typeof(ScrollRect))] public abstract class InfiniteScrollView : UIBehaviour @@ -43,12 +43,18 @@ public class Padding [Header("------ Cell View Options ------")] public float extendVisibleRange; [HideInInspector] public ScrollRect scrollRect; - public List dataList = new List(); - [HideInInspector] public List cellList = new List(); + protected List _dataList = new List(); + protected List _cellList = new List(); protected Queue _cellPool = new Queue(); public SnapAlign snapAlign = SnapAlign.Start; public Padding padding; + // Visible info + protected bool _disabledRefreshCells = false; + public int visibleCount { get; protected set; } = 0; + public int lastMaxVisibleCount { get; protected set; } = 0; + public bool isVisibleRangeFilled { get; protected set; } = false; + // Direction pivot protected float _contentDirCoeff = 0; @@ -67,7 +73,7 @@ public class Padding // Task cancellation private CancellationTokenSource _cts; - public bool IsInitialized + public bool isInitialized { get; protected set; @@ -81,13 +87,22 @@ protected override async void Awake() } } + /// + /// Get data count (Equals to cell count) + /// + /// + public int DataCount() + { + return this._dataList.Count; + } + /// /// Init infinite-cell of scrollView /// /// public virtual async UniTask InitializePool(object args = null) { - if (IsInitialized) + if (isInitialized) return; if (scrollRect == null) scrollRect = this.GetComponent(); @@ -100,8 +115,8 @@ public virtual async UniTask InitializePool(object args = null) Destroy(trans.gameObject); } - dataList.Clear(); - cellList.Clear(); + _dataList.Clear(); + _cellList.Clear(); _cellPool.Clear(); for (int i = 0; i < cellPoolSize; i++) @@ -111,91 +126,117 @@ public virtual async UniTask InitializePool(object args = null) newCell.gameObject.SetActive(false); _cellPool.Enqueue(newCell); } - IsInitialized = true; + isInitialized = true; } protected void OnValueChanged(Vector2 normalizedPosition) { - this.RefreshCellVisibility(); + // If ever set to false, must refresh all once + if (this._disabledRefreshCells) + { + this._disabledRefreshCells = false; + this.Refresh(); + } + else this.RefreshCellVisibilityWithCheck(); + + // Invoke callback this.onValueChanged?.Invoke(normalizedPosition); } + public void RefreshCellVisibilityWithCheck() + { + if (!this.IsInitialized()) return; + this.RefreshCellVisibility(); + } + /// /// Refresh visible cells /// - public abstract void RefreshCellVisibility(); + protected abstract void RefreshCellVisibility(); /// /// Refresh scrollView (doesn't need to await, if scrollView already initialized) /// + /// Disable refresh cells, when disabled will mark flag to refresh all at next scrolling. /// - public abstract UniTask Refresh(); + public abstract void Refresh(bool disabledRefreshCells = false); + + protected abstract void DoRefresh(bool disabledRefreshCells); + + protected abstract UniTask DelayToRefresh(bool disabledRefreshCells); + + protected abstract void RefreshAndCheckVisibleInfo(); + + protected bool IsInitialized() + { + if (!this.isInitialized) + { + Debug.Log("[InfiniteScrollView] Please InitializePool first!!!"); + return false; + } + return true; + } /// - /// Add cell data (doesn't need to await, if scrollView already initialized) + /// Add cell data /// /// /// /// - public virtual async UniTask Add(InfiniteCellData data, bool autoRefresh = false) + public virtual void Add(InfiniteCellData data, bool autoRefresh = false) { - if (!IsInitialized) - { - await InitializePool(); - } + if (!this.IsInitialized()) return; - dataList.Add(data); - cellList.Add(null); - this.RefreshCellDataIndex(dataList.Count - 1); - if (autoRefresh) await Refresh(); + _dataList.Add(data); + _cellList.Add(null); + this.RefreshCellDataIndex(_dataList.Count - 1); + if (autoRefresh) this.Refresh(); + this.RefreshAndCheckVisibleInfo(); } /// - /// Insert cell data (doesn't need to await, if scrollView already initialized) + /// Insert cell data /// /// /// /// - public virtual async UniTask Insert(int index, InfiniteCellData data) + public virtual bool Insert(int index, InfiniteCellData data) { - if (!IsInitialized) - { - await InitializePool(); - } + if (!this.IsInitialized()) return false; // Insert including max count - if (index > dataList.Count || + if (index > _dataList.Count || index < 0) - return; + return false; - dataList.Insert(index, data); - cellList.Insert(index, null); + _dataList.Insert(index, data); + _cellList.Insert(index, null); this.RefreshCellDataIndex(index); + return true; } /// - /// Remove cell data (doesn't need to await, if scrollView already initialized) + /// Remove cell data /// /// /// /// - public virtual async UniTask Remove(int index, bool autoRefresh = true) + public virtual bool Remove(int index, bool autoRefresh = true) { - if (!IsInitialized) - { - await InitializePool(); - } + if (!this.IsInitialized()) return false; - if (index >= dataList.Count || + if (index >= _dataList.Count || index < 0) - return; + return false; - dataList[index].Dispose(); - dataList.RemoveAt(index); + this._dataList[index].Dispose(); + this._dataList.RemoveAt(index); this.RefreshCellDataIndex(index); RecycleCell(index); - cellList.RemoveAt(index); - if (autoRefresh) await Refresh(); + _cellList.RemoveAt(index); + if (autoRefresh) this.Refresh(); + this.RefreshAndCheckVisibleInfo(); + return true; } /// @@ -297,7 +338,7 @@ public bool IsAtRight() /// public void SnapLast(float duration) { - Snap(dataList.Count - 1, duration); + Snap(_dataList.Count - 1, duration); } protected void DoSnapping(Vector2 target, float duration) @@ -325,7 +366,12 @@ private async UniTask ProcessSnapping(Vector2 target, float duration) if (duration <= 0) { scrollRect.content.anchoredPosition = target; - this.RefreshCellVisibility(); + if (this._disabledRefreshCells) + { + this._disabledRefreshCells = false; + this.Refresh(); + } + else this.RefreshCellVisibilityWithCheck(); } else { @@ -342,6 +388,10 @@ private async UniTask ProcessSnapping(Vector2 target, float duration) } await UniTask.Yield(PlayerLoopTiming.Update, this._cts.Token); } + + /** + * When scrolling, OnValueChanged will be called + */ } // After snap end to release cts @@ -354,8 +404,8 @@ protected void SetupCell(InfiniteCell cell, int index, Vector2 pos) { if (cell != null) { - cellList[index] = cell; - cell.CellData = dataList[index]; + _cellList[index] = cell; + cell.CellData = _dataList[index]; cell.RectTransform.anchoredPosition = pos; cell.onSelected += OnCellSelected; cell.gameObject.SetActive(true); @@ -364,10 +414,10 @@ protected void SetupCell(InfiniteCell cell, int index, Vector2 pos) protected void RecycleCell(int index) { - if (cellList[index] != null) + if (_cellList[index] != null) { - var cell = cellList[index]; - cellList[index] = null; + var cell = _cellList[index]; + _cellList[index] = null; cell.onSelected -= OnCellSelected; cell.gameObject.SetActive(false); cell.OnRecycle(); @@ -384,23 +434,23 @@ private void OnCellSelected(InfiniteCell selectedCell) /// Clear cell data (doesn't need to await, if scrollView already initialized) /// /// - public virtual async UniTask Clear() + public virtual void Clear() { - if (IsInitialized == false) - await InitializePool(); + if (!this.IsInitialized()) return; + scrollRect.velocity = Vector2.zero; scrollRect.content.anchoredPosition = Vector2.zero; - for (int i = 0; i < dataList.Count; i++) + for (int i = 0; i < _dataList.Count; i++) { - dataList[i].Dispose(); + _dataList[i].Dispose(); } - dataList.Clear(); - for (int i = 0; i < cellList.Count; i++) + _dataList.Clear(); + for (int i = 0; i < _cellList.Count; i++) { RecycleCell(i); } - cellList.Clear(); - await Refresh(); + _cellList.Clear(); + this.Refresh(); } protected override void OnRectTransformDimensionsChange() @@ -415,9 +465,9 @@ protected override void OnRectTransformDimensionsChange() private void RefreshCellDataIndex(int beginIndex) { // Optimized refresh efficiency - for (int i = beginIndex; i < dataList.Count; i++) + for (int i = beginIndex; i < _dataList.Count; i++) { - dataList[i].index = i; + _dataList[i].index = i; } } diff --git a/Assets/InfiniteScrollView/Scripts/Runtime/VerticalGridInfiniteScrollView.cs b/Assets/InfiniteScrollView/Scripts/Runtime/VerticalGridInfiniteScrollView.cs index c0ecf90..c8420ea 100644 --- a/Assets/InfiniteScrollView/Scripts/Runtime/VerticalGridInfiniteScrollView.cs +++ b/Assets/InfiniteScrollView/Scripts/Runtime/VerticalGridInfiniteScrollView.cs @@ -1,14 +1,14 @@ using Cysharp.Threading.Tasks; using UnityEngine; -namespace HowTungTung +namespace InfiniteScrollViews { public class VerticalGridInfiniteScrollView : InfiniteScrollView { public Vector2 spacing; public int columeCount = 1; - public override void RefreshCellVisibility() + protected override void RefreshCellVisibility() { if (columeCount <= 0) { @@ -27,36 +27,36 @@ public override void RefreshCellVisibility() // Hide float contentHeight = padding.top; - for (int i = 0; i < dataList.Count; i += columeCount) + for (int i = 0; i < _dataList.Count; i += columeCount) { for (int j = 0; j < columeCount; j++) { int index = i + j; - if (index >= dataList.Count) + if (index >= _dataList.Count) break; - var visibleRange = new Vector2(contentHeight, contentHeight + dataList[index].cellSize.y); + var visibleRange = new Vector2(contentHeight, contentHeight + _dataList[index].cellSize.y); if (visibleRange.y < viewportRange.x || visibleRange.x > viewportRange.y) { RecycleCell(index); } } - contentHeight += dataList[i].cellSize.y + spacing.y; + contentHeight += _dataList[i].cellSize.y + spacing.y; } // Show contentHeight = padding.top; - for (int i = 0; i < dataList.Count; i += columeCount) + for (int i = 0; i < _dataList.Count; i += columeCount) { for (int j = 0; j < columeCount; j++) { int index = i + j; - if (index >= dataList.Count) + if (index >= _dataList.Count) break; - var visibleRange = new Vector2(contentHeight, contentHeight + dataList[index].cellSize.y); + var visibleRange = new Vector2(contentHeight, contentHeight + _dataList[index].cellSize.y); if (visibleRange.y >= viewportRange.x && visibleRange.x <= viewportRange.y) { InfiniteCell cell = null; - if (cellList[index] == null) + if (_cellList[index] == null) { if (_cellPool.Count > 0) cell = _cellPool.Dequeue(); else Debug.Log("The cell display error occurred, not enough cells in the cell pool!!!"); @@ -64,21 +64,21 @@ public override void RefreshCellVisibility() // Check cell direciton pivot float dirCoeff = 1f; if (cell != null) dirCoeff = cell.RectTransform.pivot.y > 0 ? -1f : 1f; - SetupCell(cell, index, new Vector2((dataList[index].cellSize.x + spacing.x) * j + (padding.left - padding.right), contentHeight * dirCoeff)); + SetupCell(cell, index, new Vector2((_dataList[index].cellSize.x + spacing.x) * j + (padding.left - padding.right), contentHeight * dirCoeff)); if (visibleRange.y >= viewportRange.x) - cellList[index]?.transform.SetAsLastSibling(); + _cellList[index]?.transform.SetAsLastSibling(); else - cellList[index]?.transform.SetAsFirstSibling(); + _cellList[index]?.transform.SetAsFirstSibling(); } } - contentHeight += dataList[i].cellSize.y + spacing.y; + contentHeight += _dataList[i].cellSize.y + spacing.y; } // Check scroll position if (scrollRect.content.sizeDelta.y > viewportInterval) { - this._isAtTop = viewportRange.x + extendVisibleRange <= dataList[0].cellSize.y; - this._isAtBottom = scrollRect.content.sizeDelta.y - viewportRange.y + extendVisibleRange <= dataList[dataList.Count - 1].cellSize.y; + this._isAtTop = viewportRange.x + extendVisibleRange <= _dataList[0].cellSize.y; + this._isAtBottom = scrollRect.content.sizeDelta.y - viewportRange.y + extendVisibleRange <= _dataList[_dataList.Count - 1].cellSize.y; } else { @@ -89,62 +89,115 @@ public override void RefreshCellVisibility() } } - public sealed override async UniTask Refresh() + public sealed override void Refresh(bool disabledRefreshCells = true) { - if (!IsInitialized) - { - await InitializePool(); - } + if (!IsInitialized()) return; + if (scrollRect.viewport.rect.height == 0) { - await DelayToRefresh(); + DelayToRefresh(disabledRefreshCells).Forget(); } else { - DoRefresh(); + DoRefresh(disabledRefreshCells); } } - private void DoRefresh() + protected sealed override void DoRefresh(bool disabledRefreshCells) { if (scrollRect == null) return; - float height = padding.top; - for (int i = 0; i < dataList.Count; i += columeCount) - { - height += dataList[i].cellSize.y + spacing.y; - } - for (int i = 0; i < cellList.Count; i++) + if (!disabledRefreshCells) { - RecycleCell(i); + // Refresh content size + float height = padding.top; + for (int i = 0; i < _dataList.Count; i += columeCount) + { + height += _dataList[i].cellSize.y + spacing.y; + } + height += padding.bottom; + scrollRect.content.sizeDelta = new Vector2(scrollRect.content.sizeDelta.x, height); + + // Recycle all cells first + for (int i = 0; i < _cellList.Count; i++) + { + RecycleCell(i); + } + + // Refresh cells view + this.RefreshCellVisibility(); + + // Invoke onRefresh callback + onRefreshed?.Invoke(); } - height += padding.bottom; - scrollRect.content.sizeDelta = new Vector2(scrollRect.content.sizeDelta.x, height); - this.RefreshCellVisibility(); - onRefreshed?.Invoke(); + // Mark flag for refresh at next scrolling + else this._disabledRefreshCells = true; } - private async UniTask DelayToRefresh() + protected sealed override async UniTask DelayToRefresh(bool disabledRefreshCells) { await UniTask.Yield(PlayerLoopTiming.LastPostLateUpdate); - DoRefresh(); + DoRefresh(disabledRefreshCells); + } + + protected override void RefreshAndCheckVisibleInfo() + { + // Reset visible count + this.visibleCount = 0; + + // Viewport + float viewportInterval = scrollRect.viewport.rect.height; + + // Check content direction pivot + if (this._contentDirCoeff == 0) this._contentDirCoeff = scrollRect.content.pivot.y > 0 ? 1f : -1f; + + // Set content direction + float minViewport = scrollRect.content.anchoredPosition.y * this._contentDirCoeff; + Vector2 viewportRange = new Vector2(minViewport - extendVisibleRange, minViewport + viewportInterval + extendVisibleRange); + + // Show + float contentHeight = padding.top; + for (int i = 0; i < _dataList.Count; i += columeCount) + { + for (int j = 0; j < columeCount; j++) + { + int index = i + j; + if (index >= _dataList.Count) + break; + var visibleRange = new Vector2(contentHeight, contentHeight + _dataList[index].cellSize.y); + if (visibleRange.y >= viewportRange.x && visibleRange.x <= viewportRange.y) + { + // Calcuate visible count + this.visibleCount++; + + // Check filled flag + if (_cellList[index] == null) this.isVisibleRangeFilled = false; + else this.isVisibleRangeFilled = true; + } + } + contentHeight += _dataList[i].cellSize.y + spacing.y; + } + + // Adjust filled flag while cell removing + if (this.visibleCount < this.lastMaxVisibleCount) this.isVisibleRangeFilled = false; + this.lastMaxVisibleCount = this.visibleCount; } public override void Snap(int index, float duration) { - if (!IsInitialized) + if (!IsInitialized()) return; - if (index >= dataList.Count || + if (index >= _dataList.Count || index < 0) return; var rowNumber = index / columeCount; float height = padding.top; for (int i = 0; i < rowNumber; i++) { - height += dataList[i * columeCount].cellSize.y + spacing.y; + height += _dataList[i * columeCount].cellSize.y + spacing.y; } - height = this.CalculateSnapPos(ScrollType.Vertical, this.snapAlign, height, dataList[index]); + height = this.CalculateSnapPos(ScrollType.Vertical, this.snapAlign, height, _dataList[index]); if (scrollRect.content.anchoredPosition.y != height) { diff --git a/Assets/InfiniteScrollView/Scripts/Runtime/VerticalInfiniteScrollView.cs b/Assets/InfiniteScrollView/Scripts/Runtime/VerticalInfiniteScrollView.cs index f452744..15b7645 100644 --- a/Assets/InfiniteScrollView/Scripts/Runtime/VerticalInfiniteScrollView.cs +++ b/Assets/InfiniteScrollView/Scripts/Runtime/VerticalInfiniteScrollView.cs @@ -1,15 +1,15 @@ using Cysharp.Threading.Tasks; using UnityEngine; -namespace HowTungTung +namespace InfiniteScrollViews { public class VerticalInfiniteScrollView : InfiniteScrollView { public float spacing; - public override void RefreshCellVisibility() + protected override void RefreshCellVisibility() { - if (dataList.Count == 0) + if (_dataList.Count == 0) return; // Viewport @@ -24,25 +24,25 @@ public override void RefreshCellVisibility() // Hide float contentHeight = padding.top; - for (int i = 0; i < dataList.Count; i++) + for (int i = 0; i < _dataList.Count; i++) { - var visibleRange = new Vector2(contentHeight, contentHeight + dataList[i].cellSize.y); + var visibleRange = new Vector2(contentHeight, contentHeight + _dataList[i].cellSize.y); if (visibleRange.y < viewportRange.x || visibleRange.x > viewportRange.y) { RecycleCell(i); } - contentHeight += dataList[i].cellSize.y + spacing; + contentHeight += _dataList[i].cellSize.y + spacing; } // Show contentHeight = padding.top; - for (int i = 0; i < dataList.Count; i++) + for (int i = 0; i < _dataList.Count; i++) { - var visibleRange = new Vector2(contentHeight, contentHeight + dataList[i].cellSize.y); + var visibleRange = new Vector2(contentHeight, contentHeight + _dataList[i].cellSize.y); if (visibleRange.y >= viewportRange.x && visibleRange.x <= viewportRange.y) { InfiniteCell cell = null; - if (cellList[i] == null) + if (_cellList[i] == null) { if (_cellPool.Count > 0) cell = _cellPool.Dequeue(); else Debug.Log("The cell display error occurred, not enough cells in the cell pool!!!"); @@ -52,11 +52,11 @@ public override void RefreshCellVisibility() if (cell != null) dirCoeff = cell.RectTransform.pivot.y > 0 ? -1f : 1f; SetupCell(cell, i, new Vector2(padding.left - padding.right, contentHeight * dirCoeff)); if (visibleRange.y >= viewportRange.x) - cellList[i]?.transform.SetAsLastSibling(); + _cellList[i]?.transform.SetAsLastSibling(); else - cellList[i]?.transform.SetAsFirstSibling(); + _cellList[i]?.transform.SetAsFirstSibling(); } - contentHeight += dataList[i].cellSize.y + spacing; + contentHeight += _dataList[i].cellSize.y + spacing; } // Check scroll position @@ -74,52 +74,99 @@ public override void RefreshCellVisibility() } } - public sealed override async UniTask Refresh() + public sealed override void Refresh(bool disabledRefreshCells = true) { - if (!IsInitialized) - { - await InitializePool(); - } + if (!IsInitialized()) return; + if (scrollRect.viewport.rect.height == 0) { - await DelayToRefresh(); + this.DelayToRefresh(disabledRefreshCells).Forget(); } else { - DoRefresh(); + this.DoRefresh(disabledRefreshCells); } } - private void DoRefresh() + protected sealed override void DoRefresh(bool disabledRefreshCells) { if (scrollRect == null) return; - float height = padding.top; - for (int i = 0; i < dataList.Count; i++) - { - height += dataList[i].cellSize.y + spacing; - } - for (int i = 0; i < cellList.Count; i++) + if (!disabledRefreshCells) { - RecycleCell(i); + // Refresh content size + float height = padding.top; + for (int i = 0; i < _dataList.Count; i++) + { + height += _dataList[i].cellSize.y + spacing; + } + height += padding.bottom; + scrollRect.content.sizeDelta = new Vector2(scrollRect.content.sizeDelta.x, height); + + // Recycle all cells first + for (int i = 0; i < _cellList.Count; i++) + { + RecycleCell(i); + } + + // Refresh cells view + this.RefreshCellVisibility(); + + // Invoke onRefresh callback + onRefreshed?.Invoke(); } - height += padding.bottom; - scrollRect.content.sizeDelta = new Vector2(scrollRect.content.sizeDelta.x, height); - this.RefreshCellVisibility(); - onRefreshed?.Invoke(); + // Mark flag for refresh at next scrolling + else this._disabledRefreshCells = true; } - private async UniTask DelayToRefresh() + protected sealed override async UniTask DelayToRefresh(bool disabledRefreshCells) { await UniTask.Yield(PlayerLoopTiming.LastPostLateUpdate); - DoRefresh(); + DoRefresh(disabledRefreshCells); + } + + protected override void RefreshAndCheckVisibleInfo() + { + // Reset visible count + this.visibleCount = 0; + + // Viewport + float viewportInterval = scrollRect.viewport.rect.height; + + // Check content direction pivot + if (this._contentDirCoeff == 0) this._contentDirCoeff = scrollRect.content.pivot.y > 0 ? 1f : -1f; + + // Set content direction + float minViewport = scrollRect.content.anchoredPosition.y * this._contentDirCoeff; + Vector2 viewportRange = new Vector2(minViewport - extendVisibleRange, minViewport + viewportInterval + extendVisibleRange); + + // Show + float contentHeight = padding.top; + for (int i = 0; i < _dataList.Count; i++) + { + var visibleRange = new Vector2(contentHeight, contentHeight + _dataList[i].cellSize.y); + if (visibleRange.y >= viewportRange.x && visibleRange.x <= viewportRange.y) + { + // Calcuate visible count + this.visibleCount++; + + // Check filled flag + if (_cellList[i] == null) this.isVisibleRangeFilled = false; + else this.isVisibleRangeFilled = true; + } + contentHeight += _dataList[i].cellSize.y + spacing; + } + + // Adjust filled flag while cell removing + if (this.visibleCount < this.lastMaxVisibleCount) this.isVisibleRangeFilled = false; + this.lastMaxVisibleCount = this.visibleCount; } public override void Snap(int index, float duration) { - if (!IsInitialized) + if (!IsInitialized()) return; - if (index >= dataList.Count || + if (index >= _dataList.Count || index < 0) return; if (scrollRect.content.rect.height < scrollRect.viewport.rect.height) @@ -127,10 +174,10 @@ public override void Snap(int index, float duration) float height = padding.top; for (int i = 0; i < index; i++) { - height += dataList[i].cellSize.y + spacing; + height += _dataList[i].cellSize.y + spacing; } - height = this.CalculateSnapPos(ScrollType.Vertical, this.snapAlign, height, dataList[index]); + height = this.CalculateSnapPos(ScrollType.Vertical, this.snapAlign, height, _dataList[index]); if (scrollRect.content.anchoredPosition.y != height) { @@ -139,15 +186,18 @@ public override void Snap(int index, float duration) } } - public override async UniTask Remove(int index, bool withRefresh = true) + public override bool Remove(int index, bool withRefresh = true) { - if (index >= dataList.Count || + if (!this.IsInitialized()) + return false; + if (index >= _dataList.Count || index < 0) - return; + return false; - var removeCell = dataList[index]; - await base.Remove(index, withRefresh); + var removeCell = _dataList[index]; + bool result = base.Remove(index, withRefresh); scrollRect.content.anchoredPosition -= new Vector2(0, removeCell.cellSize.y + spacing); + return result; } } } \ No newline at end of file diff --git a/Assets/InfiniteScrollView/Scripts/Samples~/01_Vertical/TestGUI_01.cs b/Assets/InfiniteScrollView/Scripts/Samples~/01_Vertical/TestGUI_01.cs index c602de9..c0f932a 100644 --- a/Assets/InfiniteScrollView/Scripts/Samples~/01_Vertical/TestGUI_01.cs +++ b/Assets/InfiniteScrollView/Scripts/Samples~/01_Vertical/TestGUI_01.cs @@ -1,5 +1,5 @@ using Cysharp.Threading.Tasks; -using HowTungTung; +using InfiniteScrollViews; using UnityEngine; public class TestGUI_01 : MonoBehaviour @@ -24,7 +24,7 @@ private void OnGUI() for (int i = 0; i < 100; i++) { var data = new InfiniteCellData(new Vector2(0, 50)); - infiniteScrollView.Add(data).Forget(); + infiniteScrollView.Add(data); } infiniteScrollView.Refresh(); } @@ -32,7 +32,7 @@ private void OnGUI() if (GUILayout.Button("Add")) { var data = new InfiniteCellData(new Vector2(0, 50)); - infiniteScrollView.Add(data).Forget(); + infiniteScrollView.Add(data); infiniteScrollView.Refresh(); infiniteScrollView.SnapLast(0.1f); } @@ -43,7 +43,7 @@ private void OnGUI() removeIndex = GUILayout.TextField(removeIndex); if (GUILayout.Button("Remove")) { - infiniteScrollView.Remove(int.Parse(removeIndex)).Forget(); + infiniteScrollView.Remove(int.Parse(removeIndex)); } #endregion diff --git a/Assets/InfiniteScrollView/Scripts/Samples~/02_Horizontal/TestGUI_02.cs b/Assets/InfiniteScrollView/Scripts/Samples~/02_Horizontal/TestGUI_02.cs index aae0427..6084a31 100644 --- a/Assets/InfiniteScrollView/Scripts/Samples~/02_Horizontal/TestGUI_02.cs +++ b/Assets/InfiniteScrollView/Scripts/Samples~/02_Horizontal/TestGUI_02.cs @@ -1,5 +1,5 @@ using Cysharp.Threading.Tasks; -using HowTungTung; +using InfiniteScrollViews; using UnityEngine; public class TestGUI_02 : MonoBehaviour @@ -23,7 +23,7 @@ private void OnGUI() { for (int i = 0; i < 100; i++) { - infiniteScrollView.Add(new InfiniteCellData(new Vector2(50, 0))).Forget(); + infiniteScrollView.Add(new InfiniteCellData(new Vector2(50, 0))); } infiniteScrollView.Refresh(); } @@ -31,7 +31,7 @@ private void OnGUI() GUILayout.Label("Add New Cell Width"); if (GUILayout.Button("Add")) { - infiniteScrollView.Add(new InfiniteCellData(new Vector2(50, 0))).Forget(); + infiniteScrollView.Add(new InfiniteCellData(new Vector2(50, 0))); infiniteScrollView.Refresh(); infiniteScrollView.SnapLast(0.1f); } @@ -42,7 +42,7 @@ private void OnGUI() removeIndex = GUILayout.TextField(removeIndex); if (GUILayout.Button("Remove")) { - infiniteScrollView.Remove(int.Parse(removeIndex)).Forget(); + infiniteScrollView.Remove(int.Parse(removeIndex)); } #endregion diff --git a/Assets/InfiniteScrollView/Scripts/Samples~/03_Grid/DemoGridCell.cs b/Assets/InfiniteScrollView/Scripts/Samples~/03_Grid/DemoGridCell.cs index 8484430..5359edd 100644 --- a/Assets/InfiniteScrollView/Scripts/Samples~/03_Grid/DemoGridCell.cs +++ b/Assets/InfiniteScrollView/Scripts/Samples~/03_Grid/DemoGridCell.cs @@ -1,4 +1,4 @@ -using HowTungTung; +using InfiniteScrollViews; using UnityEngine; using UnityEngine.UI; diff --git a/Assets/InfiniteScrollView/Scripts/Samples~/03_Grid/TestGUI_03.cs b/Assets/InfiniteScrollView/Scripts/Samples~/03_Grid/TestGUI_03.cs index 6a6888c..c9d2cac 100644 --- a/Assets/InfiniteScrollView/Scripts/Samples~/03_Grid/TestGUI_03.cs +++ b/Assets/InfiniteScrollView/Scripts/Samples~/03_Grid/TestGUI_03.cs @@ -1,65 +1,65 @@ using Cysharp.Threading.Tasks; -using HowTungTung; -using UnityEngine; +using InfiniteScrollViews; +using UnityEngine; -public class TestGUI_03 : MonoBehaviour -{ - private InfiniteScrollView infiniteScrollView; - - private string removeIndex = "0"; - private string snapIndex = "0"; - - private async void Awake() - { +public class TestGUI_03 : MonoBehaviour +{ + private InfiniteScrollView infiniteScrollView; + + private string removeIndex = "0"; + private string snapIndex = "0"; + + private async void Awake() + { infiniteScrollView = FindObjectOfType(); // Init cells first - await infiniteScrollView.InitializePool(); - infiniteScrollView.onCellSelected += OnCellSelected; - } - - private void OnCellSelected(InfiniteCell selectedCell) - { - Debug.Log("On Cell Selected " + selectedCell.CellData.index); - } - - private void OnGUI() + await infiniteScrollView.InitializePool(); + infiniteScrollView.onCellSelected += OnCellSelected; + } + + private void OnCellSelected(InfiniteCell selectedCell) + { + Debug.Log("On Cell Selected " + selectedCell.CellData.index); + } + + private void OnGUI() { - #region Add - if (GUILayout.Button("Add 1000 Cell")) - { - for (int i = 0; i < 1000; i++) - { - infiniteScrollView.Add(new InfiniteCellData(new Vector2(100, 100))).Forget(); - } - infiniteScrollView.Refresh(); - } - - if (GUILayout.Button("Add")) - { - var data = new InfiniteCellData(new Vector2(100, 100)); - infiniteScrollView.Add(data).Forget(); - infiniteScrollView.Refresh(); - infiniteScrollView.SnapLast(0.1f); + #region Add + if (GUILayout.Button("Add 1000 Cell")) + { + for (int i = 0; i < 1000; i++) + { + infiniteScrollView.Add(new InfiniteCellData(new Vector2(100, 100))); + } + infiniteScrollView.Refresh(); + } + + if (GUILayout.Button("Add")) + { + var data = new InfiniteCellData(new Vector2(100, 100)); + infiniteScrollView.Add(data); + infiniteScrollView.Refresh(); + infiniteScrollView.SnapLast(0.1f); } - #endregion + #endregion #region Remove - GUILayout.Label("Remove Index"); - removeIndex = GUILayout.TextField(removeIndex); - if (GUILayout.Button("Remove")) - { - infiniteScrollView.Remove(int.Parse(removeIndex)).Forget(); + GUILayout.Label("Remove Index"); + removeIndex = GUILayout.TextField(removeIndex); + if (GUILayout.Button("Remove")) + { + infiniteScrollView.Remove(int.Parse(removeIndex)); } - #endregion + #endregion #region Snap - GUILayout.Label("Snap Index"); - snapIndex = GUILayout.TextField(snapIndex); - if (GUILayout.Button("Snap")) - { - infiniteScrollView.Snap(int.Parse(snapIndex), 0.1f); + GUILayout.Label("Snap Index"); + snapIndex = GUILayout.TextField(snapIndex); + if (GUILayout.Button("Snap")) + { + infiniteScrollView.Snap(int.Parse(snapIndex), 0.1f); } - #endregion + #endregion #region Scroll GUILayout.Label("Vertical"); @@ -83,6 +83,6 @@ private void OnGUI() { infiniteScrollView.ScrollToRight(); } - #endregion - } -} + #endregion + } +} diff --git a/Assets/InfiniteScrollView/Scripts/Samples~/04_TabPage/DemoTabPageCell.cs b/Assets/InfiniteScrollView/Scripts/Samples~/04_TabPage/DemoTabPageCell.cs index f3732a9..37c5e7f 100644 --- a/Assets/InfiniteScrollView/Scripts/Samples~/04_TabPage/DemoTabPageCell.cs +++ b/Assets/InfiniteScrollView/Scripts/Samples~/04_TabPage/DemoTabPageCell.cs @@ -1,4 +1,4 @@ -using HowTungTung; +using InfiniteScrollViews; using UnityEngine; using UnityEngine.UI; diff --git a/Assets/InfiniteScrollView/Scripts/Samples~/04_TabPage/DemoTabPageScrollView.cs b/Assets/InfiniteScrollView/Scripts/Samples~/04_TabPage/DemoTabPageScrollView.cs index c7ed845..a0f74af 100644 --- a/Assets/InfiniteScrollView/Scripts/Samples~/04_TabPage/DemoTabPageScrollView.cs +++ b/Assets/InfiniteScrollView/Scripts/Samples~/04_TabPage/DemoTabPageScrollView.cs @@ -1,5 +1,5 @@ using Cysharp.Threading.Tasks; -using HowTungTung; +using InfiniteScrollViews; using UnityEngine; using UnityEngine.EventSystems; using UnityEngine.UI; @@ -24,7 +24,7 @@ private void Start() { foreach (var data in pageContents) { - scrollView.Add(new InfiniteCellData(eachContentSize, new DemoTabPageData { content = data })).Forget(); + scrollView.Add(new InfiniteCellData(eachContentSize, new DemoTabPageData { content = data })); } scrollView.Refresh(); } diff --git a/Assets/InfiniteScrollView/Scripts/Samples~/05_ChatRoom/05_ChatRoom.unity b/Assets/InfiniteScrollView/Scripts/Samples~/05_ChatRoom/05_ChatRoom.unity index 3cb3a9d..6f6e7a5 100644 --- a/Assets/InfiniteScrollView/Scripts/Samples~/05_ChatRoom/05_ChatRoom.unity +++ b/Assets/InfiniteScrollView/Scripts/Samples~/05_ChatRoom/05_ChatRoom.unity @@ -1167,7 +1167,6 @@ MonoBehaviour: cellPrefab: {fileID: 825949440, guid: 27fc55d2dd9f245419dad5b69ec8e99f, type: 3} extendVisibleRange: 0 scrollRect: {fileID: 0} - cellList: [] snapAlign: 1 padding: top: 0 diff --git a/Assets/InfiniteScrollView/Scripts/Samples~/05_ChatRoom/ChatCell.cs b/Assets/InfiniteScrollView/Scripts/Samples~/05_ChatRoom/ChatCell.cs index 1044527..f180b23 100644 --- a/Assets/InfiniteScrollView/Scripts/Samples~/05_ChatRoom/ChatCell.cs +++ b/Assets/InfiniteScrollView/Scripts/Samples~/05_ChatRoom/ChatCell.cs @@ -1,4 +1,4 @@ -using HowTungTung; +using InfiniteScrollViews; using UnityEngine; using UnityEngine.UI; diff --git a/Assets/InfiniteScrollView/Scripts/Samples~/05_ChatRoom/TestGUI_05.cs b/Assets/InfiniteScrollView/Scripts/Samples~/05_ChatRoom/TestGUI_05.cs index 06c339a..753ebcc 100644 --- a/Assets/InfiniteScrollView/Scripts/Samples~/05_ChatRoom/TestGUI_05.cs +++ b/Assets/InfiniteScrollView/Scripts/Samples~/05_ChatRoom/TestGUI_05.cs @@ -1,16 +1,16 @@ using Cysharp.Threading.Tasks; -using HowTungTung; -using UnityEngine; -using UnityEngine.UI; - -public class TestGUI_05 : MonoBehaviour -{ - public InfiniteScrollView chatScrollView; - public Text heightInstrument; - public float baseCellHeight = 20; - public InputField inputField; - public string myName = "HowTungTung"; - private string speaker = "Tester"; +using InfiniteScrollViews; +using UnityEngine; +using UnityEngine.UI; + +public class TestGUI_05 : MonoBehaviour +{ + public InfiniteScrollView chatScrollView; + public Text heightInstrument; + public float baseCellHeight = 20; + public InputField inputField; + public string myName = "InfiniteScrollViews"; + private string speaker = "Tester"; private string message = "In a recent blog post we introduced the concept of Scriptable Render Pipelines. In short, SRP allow developers to control how Unity renders a frame in C#. We will release two built-in render pipelines with Unity 2018.1: the Lightweight Pipeline and HD Pipeline. In this article we’re going to focus on the Lightweight Pipeline or LWRP."; private async void Awake() @@ -18,34 +18,44 @@ private async void Awake() chatScrollView = FindObjectOfType(); // Init cells first await chatScrollView.InitializePool(); - } - - private void OnGUI() - { - GUILayout.Label("Speaker"); - speaker = GUILayout.TextField(speaker); - GUILayout.Label("Message"); - message = GUILayout.TextArea(message, GUILayout.MaxWidth(300), GUILayout.MaxHeight(100)); - if (GUILayout.Button("Add")) - { - AddChatData(new ChatCellData(speaker, message, false)); - } - } - - public void OnSubmit(string input) - { - AddChatData(new ChatCellData(myName, input, true)); + } + + private void OnGUI() + { + GUILayout.Label("Speaker"); + speaker = GUILayout.TextField(speaker); + GUILayout.Label("Message"); + message = GUILayout.TextArea(message, GUILayout.MaxWidth(300), GUILayout.MaxHeight(100)); + if (GUILayout.Button("Add")) + { + AddChatData(new ChatCellData(speaker, message, false)); + } + } + + public void OnSubmit(string input) + { + AddChatDataAndSubmit(new ChatCellData(myName, input, true)); this.inputField.text = string.Empty; this.inputField.ActivateInputField(); - this.inputField.Select(); - } - - private void AddChatData(ChatCellData chatCellData) - { - heightInstrument.text = chatCellData.message; - var infiniteData = new InfiniteCellData(new Vector2(0, heightInstrument.preferredHeight + baseCellHeight), chatCellData); - chatScrollView.Add(infiniteData).Forget(); - chatScrollView.Refresh(); - chatScrollView.SnapLast(0.1f); - } -} + this.inputField.Select(); + } + + private void AddChatDataAndSubmit(ChatCellData chatCellData) + { + heightInstrument.text = chatCellData.message; + var infiniteData = new InfiniteCellData(new Vector2(0, heightInstrument.preferredHeight + baseCellHeight), chatCellData); + chatScrollView.Add(infiniteData); + chatScrollView.Refresh(); + chatScrollView.SnapLast(0.1f); + } + + private void AddChatData(ChatCellData chatCellData) + { + heightInstrument.text = chatCellData.message; + var chatMessageHeight = heightInstrument.preferredHeight + baseCellHeight; + var infiniteData = new InfiniteCellData(new Vector2(0, chatMessageHeight), chatCellData); + chatScrollView.Add(infiniteData); + if (!chatScrollView.isVisibleRangeFilled) chatScrollView.Refresh(); + else chatScrollView.Refresh(true); + } +} diff --git a/Assets/InfiniteScrollView/Scripts/package.json b/Assets/InfiniteScrollView/Scripts/package.json index 83b3c5a..606e0d1 100644 --- a/Assets/InfiniteScrollView/Scripts/package.json +++ b/Assets/InfiniteScrollView/Scripts/package.json @@ -1,8 +1,8 @@ { - "name": "com.howtungtung.infinitescrollview", + "name": "com.michaelo.infinitescrollview.unitask", "displayName": "InfiniteScrollView with UniTask", "description": "InfiniteScrollView is made for Unity extension, that support use as less as possible gameObject count to achieve large infinite scrolling content. Developed by native UGUI system, no any magical code inside, so you can easily modify and extend by yourself.", - "version": "1.3.1", + "version": "1.4.0", "unity": "2021.3", "license": "MIT", "samples": [ @@ -30,5 +30,8 @@ "dependencies": {}, "author": { "name": "howtungtung" - } + }, + "contributors": [{ + "name":"MichaelO" + }] } \ No newline at end of file diff --git a/LICENSE b/LICENSE index 9d5dc72..7657b13 100644 --- a/LICENSE +++ b/LICENSE @@ -2,7 +2,7 @@ MIT License Copyright (c) 2020 howtungtung -2023 modified by MichaelO +2023 modified by MichaelO (Kuan-Cheng, O) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/UserSettings/EditorUserSettings.asset b/UserSettings/EditorUserSettings.asset deleted file mode 100644 index 7b3086e..0000000 --- a/UserSettings/EditorUserSettings.asset +++ /dev/null @@ -1,70 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!162 &1 -EditorUserSettings: - m_ObjectHideFlags: 0 - serializedVersion: 4 - m_ConfigSettings: - RecentlyUsedSceneGuid-0: - value: 010157505051510a5e565f7240775c4114151d7e792b7e68782a4865b0e6356e - flags: 0 - RecentlyUsedSceneGuid-1: - value: 52020303030c5d58585a097a48775e1344164d78282a27692e7b4831b3b7666f - flags: 0 - RecentlyUsedSceneGuid-2: - value: 5b015055040d0f095d5c547012210f44434f40722e7e25362e704f60bab7616b - flags: 0 - RecentlyUsedSceneGuid-3: - value: 570252035d015b095c0b0a7643775c1546151e2f7f7b74367f284464e0b2313d - flags: 0 - RecentlyUsedSceneGuid-4: - value: 0053035606035a5e555e5d7716250e44151540297e7a2065757c4464b4e46169 - flags: 0 - RecentlyUsedSceneGuid-5: - value: 020906515053580a080a5d7a47770916154f1a287e7075642b2f1b63e7b86d60 - flags: 0 - RecentlyUsedSceneGuid-6: - value: 5455070552025c0b5d5d5a7713265e4415164d2c2a2d236378794e64e4e2306c - flags: 0 - RecentlyUsedSceneGuid-7: - value: 5a5501055602500859085e77167a0d44404e1c7b7e7a2433297c1e37b2e1616e - flags: 0 - RecentlyUsedSceneGuid-8: - value: 56050d0755055c0d5b5f547445710a4410151a7d7c7a74332f784560b2b43068 - flags: 0 - RecentlyUsedSceneGuid-9: - value: 5252515f5353085909580e2713760e4443151e7f7b2e23627d7a4a37b4e46561 - flags: 0 - RecentlyUsedScenePath-0: - value: 224247031146467e150f01321c264c5f46452702233a2f2a22270932eeaf646addcf39fbee2030322d03e3721130082beb - flags: 0 - RecentlyUsedScenePath-1: - value: 224247031146467e150f01321c264c5f4644270d3e21227f7d7a2214f0e93076f7e93ffdfe - flags: 0 - RecentlyUsedScenePath-2: - value: 224247031146467e150f01321c264c5f4643271e2d2a16312a2c5263b6df0039e0d737eee2742a323016f6 - flags: 0 - RecentlyUsedScenePath-3: - value: 224247031146467e150f01321c264c5f46422709242932022226107cb2b50b1beae622dbe83532722c0ce6281d - flags: 0 - RecentlyUsedScenePath-4: - value: 224247031146467e150f01321c264c5f4646271c293a32392e28117cb2b10b0ee7f522e0e43b33722c0ce6281d - flags: 0 - vcSharedLogLevel: - value: 0d5e400f0650 - flags: 0 - m_VCAutomaticAdd: 1 - m_VCDebugCom: 0 - m_VCDebugCmd: 0 - m_VCDebugOut: 0 - m_SemanticMergeMode: 2 - m_DesiredImportWorkerCount: 4 - 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 deleted file mode 100644 index 26b168e..0000000 --- a/UserSettings/Layouts/default-2021.dwlt +++ /dev/null @@ -1,1084 +0,0 @@ -%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: 1 - m_Script: {fileID: 12004, guid: 0000000000000000e000000000000000, type: 0} - m_Name: - m_EditorClassIdentifier: - m_PixelRect: - serializedVersion: 2 - x: 0 - y: 43 - width: 1920 - height: 997 - m_ShowMode: 4 - m_Title: Console - m_RootView: {fileID: 10} - m_MinSize: {x: 875, y: 371} - m_MaxSize: {x: 10000, y: 10000} - m_Maximized: 1 ---- !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: 0 - m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0} - m_Name: GameView - m_EditorClassIdentifier: - m_Children: [] - m_Position: - serializedVersion: 2 - x: 392 - y: 0 - width: 478 - height: 629 - m_MinSize: {x: 200, y: 200} - m_MaxSize: {x: 4000, y: 4000} - m_ActualView: {fileID: 19} - m_Panes: - - {fileID: 19} - m_Selected: 0 - m_LastSelected: 0 ---- !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: 12010, guid: 0000000000000000e000000000000000, type: 0} - m_Name: - m_EditorClassIdentifier: - m_Children: - - {fileID: 14} - - {fileID: 2} - m_Position: - serializedVersion: 2 - x: 0 - y: 0 - width: 870 - height: 629 - m_MinSize: {x: 200, y: 100} - m_MaxSize: {x: 16192, y: 8096} - vertical: 0 - controlID: 4639 ---- !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: 12006, guid: 0000000000000000e000000000000000, type: 0} - m_Name: ConsoleWindow - m_EditorClassIdentifier: - m_Children: [] - m_Position: - serializedVersion: 2 - x: 0 - y: 629 - width: 870 - height: 318 - m_MinSize: {x: 100, y: 100} - m_MaxSize: {x: 4000, y: 4000} - m_ActualView: {fileID: 20} - m_Panes: - - {fileID: 20} - m_Selected: 0 - m_LastSelected: 0 ---- !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: 0 - m_Script: {fileID: 12010, guid: 0000000000000000e000000000000000, type: 0} - m_Name: - m_EditorClassIdentifier: - m_Children: - - {fileID: 3} - - {fileID: 4} - m_Position: - serializedVersion: 2 - x: 453 - y: 0 - width: 870 - height: 947 - m_MinSize: {x: 200, y: 200} - m_MaxSize: {x: 16192, y: 16192} - vertical: 1 - controlID: 4638 ---- !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: 0 - m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0} - m_Name: SceneHierarchyWindow - m_EditorClassIdentifier: - m_Children: [] - m_Position: - serializedVersion: 2 - x: 1323 - y: 0 - width: 285 - height: 947 - m_MinSize: {x: 200, y: 200} - m_MaxSize: {x: 4000, y: 4000} - m_ActualView: {fileID: 17} - m_Panes: - - {fileID: 17} - m_Selected: 0 - m_LastSelected: 0 ---- !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: 0 - m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0} - m_Name: ProjectBrowser - m_EditorClassIdentifier: - m_Children: [] - m_Position: - serializedVersion: 2 - x: 0 - y: 0 - width: 453 - height: 947 - m_MinSize: {x: 231, y: 271} - m_MaxSize: {x: 10001, y: 10021} - m_ActualView: {fileID: 15} - m_Panes: - - {fileID: 15} - m_Selected: 0 - m_LastSelected: 0 ---- !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: 12010, guid: 0000000000000000e000000000000000, type: 0} - m_Name: - m_EditorClassIdentifier: - m_Children: - - {fileID: 13} - - {fileID: 9} - m_Position: - serializedVersion: 2 - x: 0 - y: 30 - width: 1920 - height: 947 - m_MinSize: {x: 500, y: 200} - m_MaxSize: {x: 40480, y: 16192} - vertical: 0 - controlID: 64 ---- !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: 12006, guid: 0000000000000000e000000000000000, type: 0} - m_Name: - m_EditorClassIdentifier: - m_Children: [] - m_Position: - serializedVersion: 2 - x: 1608 - y: 0 - width: 312 - height: 947 - m_MinSize: {x: 275, y: 50} - m_MaxSize: {x: 4000, y: 4000} - m_ActualView: {fileID: 16} - m_Panes: - - {fileID: 16} - m_Selected: 0 - m_LastSelected: 0 ---- !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: 12008, guid: 0000000000000000e000000000000000, type: 0} - m_Name: - m_EditorClassIdentifier: - m_Children: - - {fileID: 11} - - {fileID: 8} - - {fileID: 12} - m_Position: - serializedVersion: 2 - x: 0 - y: 0 - width: 1920 - height: 997 - m_MinSize: {x: 875, y: 300} - m_MaxSize: {x: 10000, y: 10000} - m_UseTopView: 1 - m_TopViewHeight: 30 - m_UseBottomView: 1 - m_BottomViewHeight: 20 ---- !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: 12011, guid: 0000000000000000e000000000000000, type: 0} - m_Name: - m_EditorClassIdentifier: - m_Children: [] - m_Position: - serializedVersion: 2 - x: 0 - y: 0 - width: 1920 - height: 30 - m_MinSize: {x: 0, y: 0} - m_MaxSize: {x: 0, y: 0} - m_LastLoadedLayoutName: ---- !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: 12042, guid: 0000000000000000e000000000000000, type: 0} - m_Name: - m_EditorClassIdentifier: - m_Children: [] - m_Position: - serializedVersion: 2 - x: 0 - y: 977 - width: 1920 - height: 20 - m_MinSize: {x: 0, y: 0} - m_MaxSize: {x: 0, y: 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: 12010, guid: 0000000000000000e000000000000000, type: 0} - m_Name: - m_EditorClassIdentifier: - m_Children: - - {fileID: 7} - - {fileID: 5} - - {fileID: 6} - m_Position: - serializedVersion: 2 - x: 0 - y: 0 - width: 1608 - height: 947 - m_MinSize: {x: 400, y: 200} - m_MaxSize: {x: 32384, y: 16192} - vertical: 0 - controlID: 121 ---- !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: SceneView - m_EditorClassIdentifier: - m_Children: [] - m_Position: - serializedVersion: 2 - x: 0 - y: 0 - width: 392 - height: 629 - m_MinSize: {x: 200, y: 200} - m_MaxSize: {x: 4000, y: 4000} - m_ActualView: {fileID: 18} - m_Panes: - - {fileID: 18} - 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: 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: -5467254957812901981, guid: 0000000000000000d000000000000000, - type: 0} - m_Tooltip: - m_Pos: - serializedVersion: 2 - x: 0 - y: 73 - width: 452 - height: 926 - m_ViewDataDictionary: {fileID: 0} - m_OverlayCanvas: - m_LastAppliedPresetName: Default - m_SaveData: [] - m_OverlaysVisible: 1 - 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: - - Assets/InfiniteScrollView/Scripts/Runtime - m_Globs: [] - m_OriginalText: - m_ViewMode: 1 - m_StartGridSize: 16 - m_LastFolders: - - Assets/InfiniteScrollView/Scripts/Runtime - m_LastFoldersGridSize: 16 - m_LastProjectPath: F:\Unity_Projects\2021\InfiniteScrollView-with-UniTask - m_LockTracker: - m_IsLocked: 0 - m_FolderTreeState: - scrollPos: {x: 0, y: 0} - m_SelectedIDs: 564d0000 - m_LastClickedID: 19798 - m_ExpandedIDs: 00000000304d0000324d0000344d0000364d0000384d00003a4d00003c4d00003e4d0000404d00008a4f000000ca9a3b - 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: 7} - 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: 00000000304d0000324d0000344d0000364d0000384d00003a4d00003c4d00003e4d0000404d0000 - 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: c6230000 - m_RenameOverlay: - m_UserAcceptedRename: 0 - m_Name: InfiniteScrollView - m_OriginalName: InfiniteScrollView - m_EditFieldRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 0 - height: 0 - m_UserData: 17576 - m_IsWaitingForDelay: 0 - m_IsRenaming: 0 - m_OriginalEventType: 0 - m_IsRenamingFilename: 1 - m_ClientGUIView: {fileID: 7} - 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: 16 - m_SkipHiddenPackages: 0 - m_DirectoriesAreaWidth: 185 ---- !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: 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: -2667387946076563598, guid: 0000000000000000d000000000000000, - type: 0} - m_Tooltip: - m_Pos: - serializedVersion: 2 - x: 1608 - y: 73 - width: 311 - height: 926 - m_ViewDataDictionary: {fileID: 0} - m_OverlayCanvas: - m_LastAppliedPresetName: Default - m_SaveData: [] - m_OverlaysVisible: 1 - 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 &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: 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: 7966133145522015247, guid: 0000000000000000d000000000000000, - type: 0} - m_Tooltip: - m_Pos: - serializedVersion: 2 - x: 1323 - y: 73 - width: 283 - height: 926 - m_ViewDataDictionary: {fileID: 0} - m_OverlayCanvas: - m_LastAppliedPresetName: Default - m_SaveData: [] - m_OverlaysVisible: 1 - m_SceneHierarchy: - m_TreeViewState: - scrollPos: {x: 0, y: 0} - m_SelectedIDs: e8d3ffff - m_LastClickedID: -11288 - m_ExpandedIDs: e8d3fffff2d3fffffcd3fffffed3ffff08d7ffffd6f4ffff10f8ffff14f8ffff1ef8ffff28f8ffff2af8ffffaaf8ffff2afbffff2450000092500000ac500000ae500000b2500000c450000024560000 - 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: 14} - m_SearchString: - m_ExpandedScenes: [] - m_CurrenRootInstanceID: 0 - m_LockTracker: - m_IsLocked: 0 - m_CurrentSortingName: TransformSorting - m_WindowGUID: 4c969a2b90040154d917609493e03593 ---- !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: 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: 2593428753322112591, guid: 0000000000000000d000000000000000, - type: 0} - m_Tooltip: - m_Pos: - serializedVersion: 2 - x: 453 - y: 73 - width: 390 - height: 608 - 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: -101, y: -26} - 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 - - dockPosition: 1 - containerId: overlay-toolbar__top - floating: 0 - collapsed: 0 - displayed: 0 - snapOffset: {x: 0, y: 0} - snapOffsetDelta: {x: 0, y: 0} - snapCorner: 0 - id: Scene View/Open Tile Palette - index: 2 - layout: 4 - - dockPosition: 1 - containerId: overlay-toolbar__top - floating: 0 - collapsed: 0 - displayed: 0 - snapOffset: {x: 0, y: 0} - snapOffsetDelta: {x: 0, y: 0} - snapCorner: 0 - id: Scene View/Tilemap Focus - index: 3 - layout: 4 - m_OverlaysVisible: 1 - m_WindowGUID: cc27987af1a868c49b0894db9c0f5429 - m_Gizmos: 1 - m_OverrideSceneCullingMask: 6917529027641081856 - m_SceneIsLit: 1 - m_SceneLighting: 1 - m_2DMode: 1 - m_isRotationLocked: 0 - m_PlayAudio: 0 - m_AudioPlay: 0 - m_Position: - m_Target: {x: 241.94958, y: 222.11487, z: -2.3708274} - speed: 2 - m_Value: {x: 241.94958, y: 222.11487, z: -2.3708274} - 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: 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: 1, y: 1} - zGrid: - 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} - m_ShowGrid: 1 - m_GridAxis: 1 - m_gridOpacity: 0.5 - m_Rotation: - m_Target: {x: 0, y: 0, z: 0, w: 1} - speed: 2 - m_Value: {x: 0, y: 0, z: 0, w: 1} - m_Size: - m_Target: 453.89914 - speed: 2 - m_Value: 453.89914 - m_Ortho: - m_Target: 1 - speed: 2 - m_Value: 1 - m_CameraSettings: - m_Speed: 1 - m_SpeedNormalized: 0.5 - m_SpeedMin: 0.001 - 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.08717229, y: 0.89959055, z: -0.21045254, w: -0.3726226} - m_LastSceneViewOrtho: 0 - m_ReplacementShader: {fileID: 0} - m_ReplacementString: - m_SceneVisActive: 1 - m_LastLockedObject: {fileID: 0} - m_ViewIsLockedToObject: 0 ---- !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: -6423792434712278376, guid: 0000000000000000d000000000000000, - type: 0} - m_Tooltip: - m_Pos: - serializedVersion: 2 - x: 845 - y: 73 - width: 476 - height: 608 - m_ViewDataDictionary: {fileID: 0} - m_OverlayCanvas: - m_LastAppliedPresetName: Default - m_SaveData: [] - m_OverlaysVisible: 1 - 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: 476, y: 587} - 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: -238 - m_HBaseRangeMax: 238 - m_VBaseRangeMin: -293.5 - m_VBaseRangeMax: 293.5 - 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: 476 - height: 587 - m_Scale: {x: 1, y: 1} - m_Translation: {x: 238, y: 293.5} - m_MarginLeft: 0 - m_MarginRight: 0 - m_MarginTop: 0 - m_MarginBottom: 0 - m_LastShownAreaInsideMargins: - serializedVersion: 2 - x: -238 - y: -293.5 - width: 476 - height: 587 - m_MinimalGUI: 1 - m_defaultScale: 1 - m_LastWindowPixelSize: {x: 476, y: 608} - m_ClearInEditMode: 1 - m_NoCameraWarning: 1 - m_LowResolutionForAspectRatios: 01000000000000000000 - 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: 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: -4327648978806127646, guid: 0000000000000000d000000000000000, - type: 0} - m_Tooltip: - m_Pos: - serializedVersion: 2 - x: 453 - y: 702 - width: 868 - height: 297 - m_ViewDataDictionary: {fileID: 0} - m_OverlayCanvas: - m_LastAppliedPresetName: Default - m_SaveData: [] - m_OverlaysVisible: 1 diff --git a/UserSettings/Search.settings b/UserSettings/Search.settings deleted file mode 100644 index 9e26dfe..0000000 --- a/UserSettings/Search.settings +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file