Loading files
36cc7c005This file is pinned to the selected release. Download the original to open it in your design tool.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace Leap.Unity.Apps.Paint4.LineDrawing {
[ExecuteInEditMode]
public class LineAnchor : MonoBehaviour {
private LineRendererController _line;
void Start() {
_line = GetComponentInParent<LineRendererController>();
}
void Update() {
if (this.transform.hasChanged) {
_line.Refresh();
this.transform.hasChanged = false;
}
}
void OnDestroy() {
_line.Refresh();
}
}
}