using System.Collections; using System.Collections.Generic; using UnityEngine;

public class DupLowPoly : MonoBehaviour {

static public GameObject dupLowPoly, duplicate;
static Vector3 sDP, pDP;

// Start is called before the first frame update
static int i = 0;
static internal void Duplica()
{
    i++;
    if (i < 3)
    {
      dupLowPoly = GameObject.Find("LowPoly");
      duplicate = Instantiate(dupLowPoly);
      duplicate.name = $"duplicate {i}";
    }
    Debug.LogFormat($"ok {duplicate.name}");
    return;
}

static internal void Start()
{
    GameObject cameretta = GameObject.Find("Cameretta");

    duplicate = GameObject.Find("LowPoly");
    pDP = duplicate.transform.position = new Vector3(0, (cameretta.transform.localScale.y / 2), 0);
    sDP = duplicate.transform.localScale = new Vector3(1, 1, 1);

    duplicate = GameObject.Find("duplicate 1");

    pDP = duplicate.transform.position = new Vector3(1, (cameretta.transform.localScale.y / 2), 0);
    sDP = duplicate.transform.localScale = new Vector3(1, 1, 1);

    duplicate = GameObject.Find("duplicate 2");
    pDP = duplicate.transform.position = new Vector3(2, (cameretta.transform.localScale.y / 2), 0);
    sDP = duplicate.transform.localScale = new Vector3(1, 1, 1);
}

// Update is called once per frame
void Update()
{

}

}