I know this must be plainly simple, but still it eludes me:
I want to create a mesh and/or material (in an Editor script), and I want to assign a mesh from my assets. Not necessarily in Resources folder mind you, just some random asset.
gameObject.GetComponent(MeshFilter).sharedMesh = ?LoadAsset? ("big_gun_mesh");
Is this possible?
asked Jul 28 '10 at 08:28 PM
You'll want to use AssetDatabase.LoadAssetAtPath:
It's similar to Resource.Load, but takes paths relative to the project folder, not assets as you may first guess
answered Jul 28 '10 at 08:38 PM