x


How to reference assets from editor script?

When I write a postprocessor script that shall change the texture of a mesh that I'm importing, how can I get a reference to an existing texture within an editor script so that I can modify the imported model's texture to the one I have already in my project?

more ▼

asked Nov 02 '09 at 01:20 PM

Martin Schultz gravatar image

Martin Schultz
1.6k 9 20 32

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

1 answer: sort voted first

I'm not sure, but give AssetDatabase.LoadAssetAtPath a try

more ▼

answered Nov 02 '09 at 05:28 PM

Yorick gravatar image

Yorick
172 1 1 4

AssetDatabase.LoadAssetAtPath would indeed be your weapon of choice.

Nov 04 '09 at 10:51 AM AngryAnt ♦♦

Accept this answer! I give Vote+1 :)

Dec 16 '12 at 02:51 AM clunk47
(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:

x1729
x584

asked: Nov 02 '09 at 01:20 PM

Seen: 1817 times

Last Updated: Dec 16 '12 at 02:51 AM