Legacy Documentation: Version 2017.2 (Go to current version)
LanguageEnglish
  • C#
  • JS

Script language

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

Rect.ToString

public string ToString();
public string ToString(string format);

Description

Returns a nicely formatted string for this Rect.

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour { public Rect rect = new Rect(0, 0, 10, 10); void Example() { print(rect); } }

Did you find this page useful? Please give it a rating: