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);