Version: 2017.2

SpriteMask

class in UnityEngine

/

Inherits from:Renderer

Switch to Manual

Description

A component for masking Sprites and Particles.

By default it will mask all Sorting Layers. A custom range of Sorting Layers can be set. If a SortingGroup is present, it will act local to the SortingGroup.

Variables

alphaCutoffThe minimum alpha value used by the mask to select the area of influence defined over the mask's sprite.
backSortingLayerIDUnique ID of the sorting layer defining the end of the custom range.
backSortingOrderOrder within the back sorting layer defining the end of the custom range.
frontSortingLayerIDUnique ID of the sorting layer defining the start of the custom range.
frontSortingOrderOrder within the front sorting layer defining the start of the custom range.
isCustomRangeActiveMask sprites from front to back sorting values only.
spriteThe Sprite used to define the mask.

Inherited members

Variables

gameObjectИгровой объект к которому прикреплён данный компонент. Компонент всегда прикреплён к игровому объекту.
tagТег данного игрового объекта.
transformThe Transform attached to this GameObject.
hideFlagsShould the object be hidden, saved with the scene or modifiable by the user?
nameThe name of the object.
allowOcclusionWhenDynamicControls if dynamic occlusion culling should be performed for this renderer.
boundsThe bounding volume of the renderer (Read Only).
enabledMakes the rendered 3D object visible if enabled.
isPartOfStaticBatchHas this renderer been statically batched with any other renderers?
isVisibleIs this renderer visible in any camera? (Read Only)
lightmapIndexИндекс карты освещения, примененной при визуализации.
lightmapScaleOffsetThe UV scale & offset used for a lightmap.
lightProbeProxyVolumeOverrideIf set, the Renderer will use the Light Probe Proxy Volume component attached to the source GameObject.
lightProbeUsageThe light probe interpolation type.
localToWorldMatrixMatrix that transforms a point from local space into world space (Read Only).
materialReturns the first instantiated Material assigned to the renderer.
materialsReturns all the instantiated materials of this object.
motionVectorGenerationModeSpecifies the mode for motion vector rendering.
probeAnchorЕсли установлено, Renderer будет использовать позицию Transform's, чтобы найти интерполированные светопробы.
realtimeLightmapIndexИндекс карты освещения, примененной при визуализации.
realtimeLightmapScaleOffsetThe UV scale & offset used for a realtime lightmap.
receiveShadowsDoes this object receive shadows?
reflectionProbeUsageShould reflection probes be used for this Renderer?
shadowCastingModeDoes this object cast shadows?
sharedMaterialThe shared material of this object.
sharedMaterialsAll the shared materials of this object.
sortingLayerIDUnique ID of the Renderer's sorting layer.
sortingLayerNameName of the Renderer's sorting layer.
sortingOrderRenderer's order within a sorting layer.
worldToLocalMatrixMatrix that transforms a point from world space into local space (Read Only).

Public Functions

BroadcastMessageВызывает метод названный methodName на каждом MonoBehaviour этого game object-а или любого из его потомков.
CompareTagПомечен ли данный игровой объект тегом tag?
GetComponentВозвращает компонент типа type, если он прикреплен к игровому объекту и null, если не прикреплен.
GetComponentInChildrenВозвращает компонент типа type в GameObject или некоторого его потомка через поиск в глубину.
GetComponentInParentВозвращает все компоненты типа type из GameObject'а или из любого его родителя.
GetComponentsВозвращает все компоненты типа type в GameObject.
GetComponentsInChildrenВозвращает все компоненты типа type в GameObject или любому из его потомков.
GetComponentsInParentВозвращает все компоненты типа type в GameObject или любому из его родителей.
SendMessageВызывает метод с названием methodName в каждом MonoBehaviour в этом игровом объекте.
SendMessageUpwardsВызывает метод с именем methodName в каждом MonoBehaviour в этом игровом объекте и в каждом предке поведения.
GetInstanceIDReturns the instance id of the object.
ToStringReturns the name of the game object.
GetClosestReflectionProbesReturns an array of closest reflection probes with weights, weight shows how much influence the probe has on the renderer, this value is also used when blending between reflection probes occur.
GetPropertyBlockGet per-renderer material property block.
SetPropertyBlockLets you add per-renderer material parameters without duplicating a material.

Static Functions

DestroyУдаляет GameObject, Component или 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.
InstantiateClones the object original and returns the clone.

Operators

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.

Messages

OnBecameInvisible OnBecameInvisible is called when the object is no longer visible by any camera.
OnBecameVisible OnBecameVisible is called when the object became visible by any camera.