x


Make Unity Select A Script In The Project Via Script

I have a CSharp script that is generated and added to the Project in the Assets Folder. I then import this new script into the project using AssetDatabase.ImportAsset.

I would like to make the Editor Select the new script in the Project Window. How would one go about that? I would venture a guess that it involves Selection.objects, but how would one get an Object from said file. I tried AssetDatabase.LoadAssetAtPath as a Monobehavior and received nothing, tried loading it as a UnityEngine.Object and just got the text.

Ideas?

more ▼

asked Apr 19 '12 at 04:04 PM

Avaista gravatar image

Avaista
484 8 23 31

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

0 answers: sort voted first
Be the first one to answer this question
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:

x1675
x973
x130
x21

asked: Apr 19 '12 at 04:04 PM

Seen: 355 times

Last Updated: Apr 19 '12 at 04:04 PM