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

Script language

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

Texture.width

public var width: int;

Description

Width of the texture in pixels. (Read Only)

    // Print texture size to the Console
    var texture : Texture;
    function Start () {
        print("Size is " + texture.width + " by " + texture.height);
    }

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