26 lines
618 B
C#
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;
|
|
}
|
|
}
|
|
} |