about load asset by code.

hello, everybody.

i’m comfuse about the asset load API.

i want generate *.prefab file when import the *.fbx file.

  • step 1: load *.fbx file
  • step 2: Create *.prefab file
  • step 3: load *.prefab file and Instantiate it.

i try the code such below, but return null: [Windows]

              var prefab = AssetDatabase.LoadMainAssetAtPath("");
                Debug.Log(prefab);
                // This instantiates the prefab into the Hierarchy.
                var instance = (GameObject)PrefabUtility.InstantiatePrefab(prefab);

i try it, but fail again.

so, I think this is bug of Unity 4.6 version.