Nested Scroll Rect
>-
com.kwanjoong.nestedscrollrect 
Install via UPM
Add to Unity Package Manager using this URL
https://www.pkglnk.dev/nestedscrollrect.git?path=Packages/AdvancedScrollRect README Markdown
Copy this to your project's README.md
## Installation
Add **Nested Scroll Rect** to your Unity project via Package Manager:
1. Open **Window > Package Manager**
2. Click **+** > **Add package from git URL**
3. Enter:
```
https://www.pkglnk.dev/nestedscrollrect.git?path=Packages%2FAdvancedScrollRect
```
[](https://www.pkglnk.dev/pkg/nestedscrollrect)README
Nested Scroll Rect (AdvancedScrollRect)
Overview

Nested Scroll Rect is a utility that allows you to easily nest multiple ScrollRect components within each other (e.g., a vertical scroll containing horizontal scrolls) and correctly forward drag events either to the child or to the parent ScrollRect, depending on the drag direction.
When a parent ScrollRect and a child ScrollRect are both present, a typical issue is that the child intercepts all drag events, preventing the parent from scrolling if the user drags in the parent’s scroll direction. Nested Scroll Rect solves this by forwarding drag events to the parent when appropriate.
Installation
1. Git or Package Manager
- Clone or download this repository.
- In your Unity project, open Package Manager.
- Click the
+button in the upper-left corner, select Add package from disk..., and browse to thePackages/AdvancedScrollRectfolder in the cloned repository. - Click Add to install.
Alternatively, you can add this repository as a Git URL:
- Open Package Manager.
- Click the
+button, select Add package from git URL.... - Paste the repository URL:
https://github.com/kwan3854/Nested-Scroll-Rect.git?path=/Packages/AdvancedScrollRect - Click Add.
2. OpenUPM
This package is also available on OpenUPM under the name com.kwanjoong.nestedscrollrect.
To install via OpenUPM, simply run:
openupm add com.kwanjoong.nestedscrollrect
Repository & Sample
This repository contains a sample project. To try it out:
- Clone this repository.
- Open the Unity project in the folder.
- Look for the sample scenes to see how nested scrolls work.
Usage
1. Setting up in the Editor
- Create a parent
ScrollRect(for example, a vertical scroll) in your scene. - Under that parent, create a child
ScrollRectand add theNestedScrollRectcomponent (for example, a horizontal scroll). - In the Inspector of your
NestedScrollRect, assign the parentScrollRectto the Parent Scroll Rect field.- Alternatively, click the button to automatically find the nearest parent
ScrollRect.
- Alternatively, click the button to automatically find the nearest parent
2. Dynamic / Runtime Instantiation
If you instantiate the child NestedScrollRect at runtime under a parent ScrollRect, it will automatically find and assign the closest parent scroll rect.
- This saves you from having to manually specify the parent.
- However, note that searching for the parent does have a small performance overhead.
License
This project is licensed under the MIT License.
No comments yet. Be the first!