/*
* void Awake()
* {
* lineTransform = transform.GetChild(0); // assuming only child
* }
*/
// Update is called once per frame
void Update()
{
lifeTimeCounter += Time.deltaTime;
if (lifeTimeCounter > maxLifeTime)
{
lifeTimeCounter = 0;
gameObject.SetActive(false);
meshlinesGenerator.RemoveMeshLineFromActiveList(gameObject);
}
}