Version: 5.3 (switch to 5.4b)
ЯзыкEnglish
  • C#
  • JS

Язык программирования

Выберите подходящий для вас язык программирования. Все примеры кода будут представлены на выбранном языке.

GUITexture

class in UnityEngine

/

Наследует от:GUIElement

Предложить изменения

Успех!

Благодарим вас за то, что вы помогаете нам улучшить качество документации по Unity. Однако, мы не можем принять любой перевод. Мы проверяем каждый предложенный вами вариант перевода и принимаем его только если он соответствует оригиналу.

Закрыть

Ошибка внесения изменений

По определённым причинам предложенный вами перевод не может быть принят. Пожалуйста <a>попробуйте снова</a> через пару минут. И выражаем вам свою благодарность за то, что вы уделяете время, чтобы улучшить документацию по Unity.

Закрыть

Отменить

Руководство

Описание

Изображение текстуры, которое используется в 2D GUI.

Переменные

borderГраницы определяют количество пикселей от края, на который не применялось масштабирование.
colorЦвет GUI текстуры.
pixelInsetВставка пикселя используется для пиксельной корректировки размера и положения.
textureТекстура, используемая для отображения.

Унаследованные члены

Переменные

enabledEnabled Behaviours are Updated, disabled Behaviours are not.
isActiveAndEnabledHas the Behaviour had enabled called.
gameObjectThe game object this component is attached to. A component is always attached to a game object.
tagТег данного игрового объекта.
transformThe Transform attached to this GameObject (null if there is none attached).
hideFlagsShould the object be hidden, saved with the scene or modifiable by the user?
nameThe name of the object.

Открытые функции

BroadcastMessageВызывает метод названный methodName на каждом MonoBehaviour этого game object-а или любого из его потомков.
CompareTagПомечен ли этот игровой объект тэгом tag?
GetComponentВозвращает компонент типа type, если он прикреплен к игровому объекту и null, если не прикреплен.
GetComponentInChildrenReturns the component of Type type in the GameObject or any of its children using depth first search.
GetComponentInParentReturns the component of Type type in the GameObject or any of its parents.
GetComponentsReturns all components of Type type in the GameObject.
GetComponentsInChildrenReturns all components of Type type in the GameObject or any of its children.
GetComponentsInParentReturns all components of Type type in the GameObject or any of its parents.
SendMessageВызывает метод с именем methodName в каждом MonoBehaviour на этом объекте.
SendMessageUpwardsВызывает на каждом MonoBehaviour в данном игровом объекте и на каждом предке скрипта метод с именем methodName.
GetScreenRectВозвращает ограниченный прямоугольник Gui элемента (GUIElement) в координатах экрана.
HitTestТочка на экране внутри элемента.
GetInstanceIDReturns the instance id of the object.
ToStringReturns the name of the game object.

Статические функции

DestroyRemoves a gameobject, component or asset.
DestroyImmediateDestroys the object obj immediately. You are strongly recommended to use Destroy instead.
DontDestroyOnLoadMakes the object target not be destroyed automatically when loading a new scene.
FindObjectOfTypeReturns the first active loaded object of Type type.
FindObjectsOfTypeReturns a list of all active loaded objects of Type type.
InstantiateReturns a copy of the object original.

Операторы

boolDoes the object exist?
operator !=Compares if two objects refer to a different object.
operator ==Compares two object references to see if they refer to the same object.