Sha256: 3b427e8e6c32e35edc9e268192f1034069252e4f6f796ff636e01a6aca34df5f
Contents?: true
Size: 1.42 KB
Versions: 1
Compression:
Stored size: 1.42 KB
Contents
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() { } }
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
CamerettaUnity-0.0.1 | Assets/Cameretta/DupLowPoly.cs |