예제 #1
0
    protected override void OnUpdate()
    {
        var positionsY = GetCircleSegments1(Radius);

        RenderCircleY.positionCount = positionsY.Length;
        RenderCircleY.SetPositions(positionsY);

        var positionsX = GetCircleSegments2(Radius);

        RenderCircleX.positionCount = positionsX.Length;
        RenderCircleX.SetPositions(positionsX);

        var positionsZ = GetCircleSegments3(Radius);

        RenderCircleZ.positionCount = positionsZ.Length;
        RenderCircleZ.SetPositions(positionsZ);
    }
예제 #2
0
    public void Init()
    {
        RenderCircleY = CreateRenderer(Color);
        RenderCircleX = CreateRenderer(Color);
        RenderCircleZ = CreateRenderer(Color);

        var positionsY = GetCircleSegments1(Radius);

        RenderCircleY.positionCount = positionsY.Length;
        RenderCircleY.SetPositions(positionsY);

        var positionsX = GetCircleSegments2(Radius);

        RenderCircleX.positionCount = positionsX.Length;
        RenderCircleX.SetPositions(positionsX);

        var positionsZ = GetCircleSegments3(Radius);

        RenderCircleZ.positionCount = positionsZ.Length;
        RenderCircleZ.SetPositions(positionsZ);
    }