{"id":13786107,"url":"https://github.com/ToshikiImagawa/Scrmizu","last_synced_at":"2025-05-11T22:30:40.549Z","repository":{"id":44982196,"uuid":"101469628","full_name":"ToshikiImagawa/Scrmizu","owner":"ToshikiImagawa","description":"Variable infinite scroll in Unity UI","archived":false,"fork":false,"pushed_at":"2024-03-11T09:28:16.000Z","size":462,"stargazers_count":79,"open_issues_count":1,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-01T15:02:06.022Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ToshikiImagawa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-08-26T07:11:24.000Z","updated_at":"2025-04-07T02:23:52.000Z","dependencies_parsed_at":"2024-01-17T05:13:59.181Z","dependency_job_id":"3c3e631c-ea12-4398-b8f6-3b9d91ed8fa7","html_url":"https://github.com/ToshikiImagawa/Scrmizu","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ToshikiImagawa%2FScrmizu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ToshikiImagawa%2FScrmizu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ToshikiImagawa%2FScrmizu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ToshikiImagawa%2FScrmizu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ToshikiImagawa","download_url":"https://codeload.github.com/ToshikiImagawa/Scrmizu/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253645078,"owners_count":21941311,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T19:01:09.682Z","updated_at":"2025-05-11T22:30:39.783Z","avatar_url":"https://github.com/ToshikiImagawa.png","language":"C#","funding_links":[],"categories":["Scroll"],"sub_categories":[],"readme":"[![license](https://img.shields.io/github/license/ToshikiImagawa/Variable-infinite-scroll?style=flat-square)](https://github.com/ToshikiImagawa/Variable-infinite-scroll/blob/master/LICENSE.md)\n[![release](https://img.shields.io/github/release/ToshikiImagawa/Variable-infinite-scroll?style=flat-square)](https://github.com/ToshikiImagawa/Variable-infinite-scroll/releases)\n\n# What is Scrmizu\nScrmizu is variable infinite scroll and extended UnityEngine.UI.ScrollRect for Unity UGUI.\n\n# Required\n- Unity 2020.3.45f1 or later.\n- Scripting Runtime Version 4.6 Eq.\n\n# Install\n1. Download Scrmizu.unitypackage [here](https://github.com/ToshikiImagawa/Variable-infinite-scroll/releases).\n1. Import the contents of the Scrmizu folder to the Packages or Assets folder.\n1. Optionally import Scrmizu.Sample.unitypackage.\n\n# Quick start\n## Infinite Scroll View\nTo create a Infinite Scroll View in the Unity Editor, go to GameObject → UI → Infinite Scroll View.\n\n\u003cimg src=\"https://user-images.githubusercontent.com/6396938/72912227-aa445500-3d7e-11ea-8c7b-59da594e0a0c.png\" width=\"300px\"/\u003e\n\nPrepare ScrollItem prefab to be repeatedly displayed by infinite scroll.\n\n\u003cimg src=\"https://user-images.githubusercontent.com/6396938/72912979-ce546600-3d7f-11ea-8107-38b2b826b9e6.png\" width=\"300px\"/\u003e\n\n```c#:SimpleInfiniteScrollItem.cs\npublic class SimpleInfiniteScrollItem : MonoBehaviour, IInfiniteScrollItem\n{\n    /// \u003csummary\u003e\n    /// ScrollItem enters display area and updates display item data.\n    /// \u003c/summary\u003e\n    /// \u003cparam name=\"data\"\u003e\u003c/param\u003e\n    public void UpdateItemData(object data)\n    {\n        if (!(data is float width)) return;\n        gameObject.SetActive(true);\n        if (!(gameObject.transform is RectTransform rectTransform)) return;\n        rectTransform.sizeDelta = new Vector2(width, rectTransform.sizeDelta.y);\n    }\n\n    /// \u003csummary\u003e\n    /// Hide ScrollItem because it has left the display area.\n    /// \u003c/summary\u003e\n    public void Hide()\n    {\n        gameObject.SetActive(false);\n    }\n}\n```\n\nCall InfiniteScrollRect.SetItemData to set the item data.\n\n```c#:SimpleInfiniteScrollController.cs\n[RequireComponent(typeof(InfiniteScrollRect))]\npublic class SimpleInfiniteScrollController : MonoBehaviour\n{\n    private InfiniteScrollRect _infiniteScrollRect;\n\n    private InfiniteScrollRect InfiniteScrollRect =\u003e _infiniteScrollRect != null\n        ? _infiniteScrollRect : _infiniteScrollRect = GetComponent\u003cInfiniteScrollRect\u003e();\n\n    private void Awake()\n    {\n        InfiniteScrollRect.SetItemData(new object[]\n        {\n            200f, \n            300f, \n            400f, \n            500f, \n            600f, \n            700f, \n            800f, \n            900f, \n            1000f\n        });\n    }\n}\n```\n\nBy scrolling, you can confirm that the width of the scroll item is updated for each set data (width).\n\n## Nested Scroll View\nTo create a Nested Scroll View in the Unity Editor, go to GameObject → UI → Nested Scroll View.\nPut it under the Scroll View container.\n\n\u003cimg src=\"https://user-images.githubusercontent.com/6396938/72831133-8bce5300-3cc5-11ea-8cae-5cf5447fcbfa.png\" width=\"300px\"/\u003e\n\nWhen scrolling in the non-scroll direction of NestedScrollView, scroll event is sent to the parent ScrollView.\n\n## Paged Scroll View\nTo create a Paged Scroll View in the Unity Editor, go to GameObject → UI → Paged Scroll View.\nCreate multiple page content items under content.\n\n\u003cimg src=\"https://user-images.githubusercontent.com/6396938/72828751-ab16b180-3cc0-11ea-9783-3efffd775ae9.png\" width=\"300px\"/\u003e\n\nOne item is displayed in the scroll direction in the view area.\nPauses the page each time scroll.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FToshikiImagawa%2FScrmizu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FToshikiImagawa%2FScrmizu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FToshikiImagawa%2FScrmizu/lists"}