LineRenderer运用之画板的实现

using System.Collections;

using System.Collections.Generic;

using UnityEngine;

using UnityEngine.UI;

using UnityEngine.EventSystems;

 

public class SharedARManager : MonoBehaviour

{

private bool istouchUI;

public GameObject linePrefab;

public float distance = 0.005f;

private LineRenderer currentLine;

private float lineWidth = 0.01f;

public Color lineColor;

private List linesList = new List();

private List positionsList = new List();

private int lineVertexIndex = 2;

 

private bool isMouseDown;

private Vector3 lastposition;

// Use this for initialization

void Start()

{

Slider slider = GameObject.Find("Canvas/Slider").GetComponent();

slider.onValueChanged.AddListener(onSliderValueChanged);

Button button1 = GameObject.Find("Canvas/Button1").GetComponent

你可能感兴趣的:(绘图画线)