TG9six 03a642d635 first push
first push
2025-09-06 17:17:39 +04:00

26 lines
618 B
C#

using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using NaughtyAttributes;
using UnityEditor;
using UnityEngine;
public class MeshCloner : MonoBehaviour
{
public List<GameObject> GameObjects = new List<GameObject>();
public GameObject preset;
[Button("clone")]
public void Clone()
{
foreach (var obj in GameObjects)
{
var t = obj.transform;
var inst= GameObject.Instantiate(preset, t.position, t.rotation);
inst.transform.localScale = t.localScale;
}
}
}