123456789101112131415161718192021222324252627282930 |
- 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()
- {
-
- }
- }
|