Line Renderer
The line renderer is a component that renders a line or a series of connected lines.
The LineRendererRecorderModule
automatically picks up every line renderer in the scene and records:
- Whether the line renderer is enabled or not
- Whether the line renderer is using the world space or the local space
- Whether the line renderer is looping or not
- Positions of the line points
- Width (as key points)
- Color (as key points/color gradient)
- Number of corner vertices
- Number of end cap vertices
- Alignment
- Texture mode
- Shadow bias
Creation and destruction
The creation and destruction of a line renderer component are recorded as a LineRendererCreate and LineRendererDestroy sample respectively.
When created, a LineRendererUpdate sample is emitted with the initial values of the line renderer component.
Update
Hooks
A LineRendererUpdate sample is emitted when a change in the component properties is detected. The following methods are hooked to detect those changes:
- Renderer.enabled
- Renderer.material
- Renderer.materials
- Renderer.sharedMaterial
- Renderer.sharedMaterials
- void Renderer.SetPropertyBlock(MaterialPropertyBlock properties)
- void Renderer.SetPropertyBlock(MaterialPropertyBlock properties, int materialIndex)
- LineRenderer.widthMultiplier
- LineRenderer.startWidth
- LineRenderer.endWidth
- LineRenderer.widthCurve
- LineRenderer.startColor
- LineRenderer.endColor
- LineRenderer.colorGradient
- LineRenderer.positionCount
- LineRenderer.SetPosition(int index, Vector3 position)
- LineRenderer.SetPositions(Vector3[] positions)
- LineRenderer.SetPositions(NativeArray
positions) - LineRenderer.SetPositions(NativeSlice
positions)
Info
See the associated proto files for more information on the data format.