Documentation

Unity Engine

Unity Engine

IntegerProperty

Draws a field for an integer shader property, using automatic layout.
Read time 1 minuteLast updated 20 days ago

Definition

  • Type: Method
  • Namespace: UnityEditor
  • Assembly: UnityEditor.CoreModule

IntegerProperty(MaterialProperty, string)

Draws a field for an integer shader property, using automatic layout.
public int IntegerProperty(MaterialProperty prop, string label)

Parameters

The material property to edit.

label

The label to show for the property.

Returns

Type

Description

intThe value of the property, which might have changed if the user interacted with the control.

Remarks

Use this method in a custom material editor to draw a field for an integer shader property. This overload uses automatic layout. To set the position and size of the control, use the overload that takes a Rect.

IntegerProperty(Rect, MaterialProperty, string)

Draws a field for an integer shader property at a specified position.
public int IntegerProperty(Rect position, MaterialProperty prop, string label)

Parameters

position

The position and size of the control.

The material property to edit.

label

The label to show for the property.

Returns

Type

Description

intThe value of the property, which might have changed if the user interacted with the control.

Remarks

Use this method in a custom material editor to draw a field for an integer shader property. This overload draws the control at
position
. To use automatic layout, use the overload without a Rect.