Search Results for

    Show / Hide Table of Contents

    Class LineController

    Displays a line between the selected cube and its nearest neighbour cube.

    Inheritance
    Object
    LineController
    Implements
    ILine
    Namespace: XRC.Students.SU2023.IN03.Chen
    Assembly: cs.temp.dll.dll
    Syntax
    public class LineController : MonoBehaviour, ILine

    Methods

    Awake()

    Add Unlit shader to the line material

    Declaration
    public void Awake()

    InitLine(LineRenderer, Color)

    Create a line with the the line renderer and set this line renderer to the color

    Declaration
    public void InitLine(LineRenderer lineRenderer, Color color)
    Parameters
    Type Name Description
    LineRenderer lineRenderer

    The lineRenderer to be initialized with two points and lineWidth

    Color color

    The color to be added on the lineRenderer

    UpdateLine(LineRenderer, Vector3, Vector3)

    Update the line renderer by setting the start and end positions.

    Declaration
    public void UpdateLine(LineRenderer lineRenderer, Vector3 startPosition, Vector3 endPosition)
    Parameters
    Type Name Description
    LineRenderer lineRenderer

    The line renderer to be updated.

    Vector3 startPosition

    The start position of the line renderer.

    Vector3 endPosition

    The end position of the line renderer.

    Implements

    ILine
    In This Article
    Back to top XR Collaboratory