LineRenderer

class in UnityEngine

/

Hereda de:Renderer

Cambiar al Manual

Descripción

El line renderer se utiliza para dibujar líneas flotantes en el espacio 3D.

Esta clase es una interfaz script para un componente line renderer.

Variables

alignmentSelect whether the line will face the camera, or the orientation of the Transform Component.
colorGradientSet the color gradient describing the color of the line at various points along its length.
endColorSet the color at the end of the line.
endWidthSet the width at the end of the line.
generateLightingDataConfigures a line to generate Normals and Tangents. With this data, Scene lighting can affect the line via Normal Maps and the Unity Standard Shader, or your own custom-built Shaders.
loopConnect the start and end positions of the line together to form a continuous loop.
numCapVerticesSet this to a value greater than 0, to get rounded corners on each end of the line.
numCornerVerticesSet this to a value greater than 0, to get rounded corners between each segment of the line.
positionCountSet/get the number of vertices.
shadowBiasApply a shadow bias to prevent self-shadowing artifacts. The specified value is the proportion of the line width at each segment.
startColorSet the color at the start of the line.
startWidthSet the width at the start of the line.
textureModeChoose whether the U coordinate of the line texture is tiled or stretched.
useWorldSpaceSi está habilitado, las lineas son definidas en el espacio del mundo.
widthCurveSet the curve describing the width of the line at various points along its length.
widthMultiplierSet an overall multiplier that is applied to the LineRenderer.widthCurve to get the final width of the line.

Funciones Públicas

BakeMeshCreates a snapshot of LineRenderer and stores it in mesh.
GetPositionGet the position of a vertex in the line.
GetPositionsGet the positions of all vertices in the line.
SetPositionSet the position of a vertex in the line.
SetPositionsDefine las posiciones de todos los vértices en la linea.
SimplifyGenerates a simplified version of the original line by removing points that fall within the specified tolerance.

Miembros heredados

Variables

gameObjectEl game object que tiene este componente adjunto. Un componente siempre está adjunto a un game object.
tagEl tag de este game object.
transformThe Transform attached to this GameObject.
hideFlagsShould the object be hidden, saved with the Scene or modifiable by the user?
nameEl nombre del objeto.
allowOcclusionWhenDynamicControls if dynamic occlusion culling should be performed for this renderer.
boundsEl volumen de-limitador del renderer (Lectura solamente).
enabledHace que el objeto 3D renderizado esté visible si está activado.
forceRenderingOffAllows turning off rendering for a specific component.
isPartOfStaticBatchHa sido este renderer agrupado estáticamente con otro renderer?
isVisibleEs este renderer visible a cualquier cámara? (Lectura solamente)
lightmapIndexEl índice del lightmap baked aplicado a este renderizador.
lightmapScaleOffsetLa escala & desfase UV utilizado para un lightmap.
lightProbeProxyVolumeOverrideSi se establece, el Renderer utilizará el componente Light Probe Proxy Volume conectado a la fuente GameObject.
lightProbeUsageEl tipo de interpolación de la sonda de luz.
localToWorldMatrixMatriz que transforma un punto del espacio local en el espacio mundial (Lectura solamente).
materialRetorna el primer Material instanciado asignado al renderer.
materialsRetorna todos los materiales instanciados de este objeto.
motionVectorGenerationModeSpecifies the mode for motion vector rendering.
probeAnchorSi se establece el Renderer, utilizará esta posición del Transform para encontrar la luz o el reflection probe.
rayTracingModeDescribes how this renderer is updated for ray tracing.
realtimeLightmapIndexEl índice del mapa de luz en tiempo real aplicado a este renderizador.
realtimeLightmapScaleOffsetLa escala UV y desfase utilizados para un lightmap en tiempo real.
receiveShadows¿Este objeto recibe sombras?
reflectionProbeUsageDeberían los reflection probes ser utilizados para este Renderer?
rendererPriorityThis value sorts renderers by priority. Lower values are rendered first and higher values are rendered last.
renderingLayerMaskDetermines which rendering layer this renderer lives on.
shadowCastingMode¿El objeto emite sombras?
sharedMaterialEl material comportado de este objeto.
sharedMaterialsTodos los materiales compartidos de este objeto.
sortingLayerIDUnique ID del sorting layer del Renderer.
sortingLayerNameNombre de la sorting layer del Renderer.
sortingOrderOrden del renderer dentro de una sorting layer.
worldToLocalMatrixMatriz que transforma un punto del espacio mundial en espacio local (Lectura solamente).

Funciones Públicas

BroadcastMessageLlama al método denominado methodName de todos los MonoBehaviour en este game objecto en cualquiera de sus hijos.
CompareTag¿Este game object está etiquetado con tag?
GetComponentDevuelve un componente de tipo type si el game object tiene a alguno adjuntado, o null si no lo tiene.
GetComponentInChildrenRetorna el componente de tipo type en el GameObject o cualquiera de sus hijos utilizando depth first search (busqueda de profundidad).
GetComponentInParentRetorna el componente de tipo type en el GameObject o cualquiera de sus padres.
GetComponentsRetorna todos los componentes de tipo type en el GameObject.
GetComponentsInChildrenRetorna todos los componentes de tipo type en el GameObject o cualquiera de sus hijo.
GetComponentsInParentRetorna todos los componentes de tipo type en el GameObject o cualquiera de sus padres.
SendMessageLlama al método denominado methodName en cada MonoBehaviour de este game object.
SendMessageUpwardsLlama al método denominado methodName en todos los MonoBehaviour de este juego y en todos los ancestros del behaviour.
TryGetComponentGets the component of the specified type, if it exists.
GetInstanceIDDevuelve el id de la instancia del objeto.
ToStringReturns the name of the object.
GetClosestReflectionProbesRetorna un arreglo de los reflection probes más cercanos con pesos, el peso muestra qué tanta influencia el probe tiene sobre el renderer, este valor también es utilizado cuando se mezcla entre reflection probes.
GetMaterialsRetorna todos los materiales instanciados de este objeto.
GetPropertyBlockGet per-Renderer or per-Material property block.
GetSharedMaterialsReturns all the shared materials of this object.
HasPropertyBlockReturns true if the Renderer has a material property block attached via SetPropertyBlock.
SetPropertyBlockLets you set or clear per-renderer or per-material parameter overrides.

Funciones Estáticas

DestroyRemoves a GameObject, component or asset.
DestroyImmediateDestroys the object obj immediately. You are strongly recommended to use Destroy instead.
DontDestroyOnLoadDo not destroy the target Object when loading a new Scene.
FindObjectOfTypeDevuelve el primer objeto activo cargado de tipo type.
FindObjectsOfTypeDevuelve una lista de todos los objetos activos cargados de tipo type.
InstantiateClona el objeto original y devuelve el clon.

Operadores

bool¿Existe el objeto?
operator !=Compare si dos objetos se refieren a un objeto diferente.
operator ==Compara dos referencias de objeto para ver si se refieren al mismo objeto.

Mensajes

OnBecameInvisible OnBecameInvisible se llama cuando el objeto ya no es visible por ninguna cámara.
OnBecameVisible OnBecameVisible se llama cuando el objeto se hizo visible por cualquier cámara.