- Home /
Question by
Avaista · Apr 19, 2012 at 04:04 PM ·
editorimportselectionmonobehavior
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?
Comment