31 lines
618 B
C#
31 lines
618 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using EasyButtons;
|
|
|
|
public class bulkRenamer : MonoBehaviour
|
|
{
|
|
public string find;
|
|
public string replace;
|
|
|
|
[Button]
|
|
public void Rename(){
|
|
foreach(Transform t in transform.GetComponentsInChildren<Transform>()){
|
|
if(t.name.Contains(find)){
|
|
t.name = t.name.Replace(find,replace);
|
|
}
|
|
}
|
|
Debug.Log("It works!");
|
|
}
|
|
void Start()
|
|
{
|
|
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
|
|
}
|
|
}
|