Legacy Documentation: Version 5.1
LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

ScrollRect.content

Switch to Manual
public var content: RectTransform;

Description

The content that can be scrolled. It should be a child of the GameObject with ScrollRect on it.

#pragma strict
// Required when Using UI elements.
public var myScrollRect;
public var scrollableContent;
//Do this when the Save button is selected.
public function Start() {
	// assigns the contect that can be scrolled using the ScrollRect.
	myScrollRect.content = scrollableContent;
}