Skip to main content

LineRenderer

info

LineRenderer inherits from Renderer

The line renderer is used to draw free-floating lines in 3D space.

Members

Properties

NameDescription
LineRenderer.alignmentSelect whether the line will face the camera, or the orientation of the Transform Component.
LineRenderer.endColorSet the color at the end of the line.
LineRenderer.endWidthSet the width at the end of the line.
LineRenderer.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.
LineRenderer.loopConnect the start and end positions of the line together to form a continuous loop.
LineRenderer.numCapVerticesSet this to a value greater than 0, to get rounded corners on each end of the line.
LineRenderer.numCornerVerticesSet this to a value greater than 0, to get rounded corners between each segment of the line.
LineRenderer.positionCountSet/get the number of vertices.
LineRenderer.shadowBiasApply a shadow bias to prevent self-shadowing artifacts. The specified value is the proportion of the line width at each segment.
LineRenderer.startColorSet the color at the start of the line.
LineRenderer.startWidthSet the width at the start of the line.
LineRenderer.textureModeChoose whether the U coordinate of the line texture is tiled or stretched.
LineRenderer.useWorldSpaceIf enabled, the lines are defined in world space.
LineRenderer.widthCurveSet the curve describing the width of the line at various points along its length.

Inherited Members

Inherited Properties

NameDescription
LineRenderer.allowOcclusionWhenDynamicControls if dynamic occlusion culling should be performed for this renderer.
LineRenderer.boundsThe bounding volume of the renderer (Read Only).
LineRenderer.enabledMakes the rendered 3D object visible if enabled.
LineRenderer.forceRenderingOffAllows turning off rendering for a specific component.
LineRenderer.isPartOfStaticBatchHas this renderer been statically batched with any other renderers? (Read-Only)
LineRenderer.isVisibleIs this renderer visible in any camera? (Read Only)
LineRenderer.lightmapIndexThe index of the baked lightmap applied to this renderer. (Read-Only)
LineRenderer.lightmapScaleOffsetThe UV scale & offset used for a lightmap. (Read-Only)
LineRenderer.lightProbeProxyVolumeOverrideIf set, the Renderer will use the Light Probe Proxy Volume component attached to the source GameObject.
LineRenderer.lightProbeUsageThe light probe interpolation type.
LineRenderer.localToWorldMatrixMatrix that transforms a point from local space into world space (Read Only).
LineRenderer.materialReturns the first instantiated Material assigned to the renderer. Modifying material will change the material for this object only.
LineRenderer.materialsReturns all the instantiated materials of this object.
LineRenderer.motionVectorGenerationModeSpecifies the mode for motion vector rendering.
LineRenderer.probeAnchorIf set, Renderer will use this Transform's position to find the light or reflection probe. Otherwise the center of Renderer's AABB will be used.
LineRenderer.realtimeLightmapIndexThe index of the realtime lightmap applied to this renderer.
LineRenderer.realtimeLightmapScaleOffsetThe UV scale & offset used for a realtime lightmap.
LineRenderer.receiveShadowsDoes this object receive shadows?
LineRenderer.reflectionProbeUsageShould reflection probes be used for this Renderer?
LineRenderer.rendererPriorityThis value sorts renderers by priority. Lower values are rendered first and higher values are rendered last.
LineRenderer.renderingLayerMaskDetermines which rendering layer this renderer lives on.
LineRenderer.shadowCastingModeDoes this object cast shadows?
LineRenderer.sharedMaterialThe shared material of this object.
LineRenderer.sharedMaterialsAll the shared materials of this object.
LineRenderer.sortingLayerIDUnique ID of the Renderer's sorting layer.
LineRenderer.sortingLayerNameName of the Renderer's sorting layer.
LineRenderer.sortingOrderRenderer's order within a sorting layer.
LineRenderer.worldToLocalMatrixMatrix that transforms a point from world space into local space (Read Only).
LineRenderer.gameObjectThe game object this component is attached to. A component is always attached to a game object.
LineRenderer.tagThe tag of this game object.
LineRenderer.transformThe Transform attached to this GameObject.
LineRenderer.hideFlagsShould the object be hidden, saved with the Scene or modifiable by the user?
LineRenderer.nameThe name of the object.

Inherited Methods

NameDescription
LineRenderer.GetMaterials()Returns all the instantiated materials of this object.
LineRenderer.GetPropertyBlock(materialIndex=-1)Get per-Renderer or per-Material property block.
LineRenderer.GetSharedMaterials()Returns all the shared materials of this object.
LineRenderer.HasPropertyBlock()Returns true if the Renderer has a material property block attached via SetPropertyBlock.
LineRenderer.SetPropertyBlock(properties, materialIndex=-1)Lets you set or clear per-renderer or per-material parameter overrides.
LineRenderer.BroadcastMessage(methodName, parameter=nil)Calls the method named methodName on every Lua Script in this game object or any of its children.
LineRenderer.CompareTag(tag)Is this game object tagged with tag ?
LineRenderer.GetAllLuaScripts()Returns an array of all Lua scripts that attached to the game object.
LineRenderer.GetComponent(type)Returns the component of Type type if the game object has one attached, nil if it doesn't.
LineRenderer.GetComponentInChildren(t)Returns the component of Type type in the GameObject or any of its children using depth first search.
LineRenderer.GetComponentInParent(t)Returns the component of Type type in the GameObject or any of its parents.
LineRenderer.GetComponents(type)Returns all components of Type type in the GameObject.
LineRenderer.GetComponentsInChildren(t)Returns all components of Type type in the GameObject or any of its children.
LineRenderer.GetComponentsInParent(t)Returns all components of Type type in the GameObject or any of its parents.
LineRenderer.SendMessage(methodName, value=nil)Calls the method named methodName on every Lua Script in this game object.
LineRenderer.SendMessageUpwards(methodName, value=nil)Calls the method named methodName on every LuaScript in this game object and on every ancestor of the behaviour.
LineRenderer.TryGetComponent(type)Gets the component of the specified type, if it exists.
LineRenderer.GetInstanceID()Returns the instance id of the object.