x


Can I write a script to rename objects as I create them?

I am trying to create a system of nested assets (with a script from the store). They come in with a prefix of GEOM, and I need to turn each one into a prefab immediately, and as such I want to change the prefix to SLAB. So is it possible to write an editor script that will automatically string replace GEOM whenever I create something, and just leave anything without GEOM alone?

Thanks

more ▼

asked Jul 18 '12 at 12:25 AM

azmundai gravatar image

azmundai
110 7 12 21

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first
more ▼

answered Jul 18 '12 at 12:48 AM

DaveA gravatar image

DaveA
26.5k 151 171 256

Thanks! Investigating more my question was probably poorly thought out. When the models import, they are fine. I don't want to change them then. Instead I want to change them when I drag them from the project folder into the scene.

Actually while we are at it .. once it's renamed, if a prefab of the object can be placed in a specific folder, that would be fantastic :)

Jul 18 '12 at 03:50 AM azmundai
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x3327
x1672
x26
x25

asked: Jul 18 '12 at 12:25 AM

Seen: 349 times

Last Updated: Jul 18 '12 at 03:52 AM