I'm writing an Editor script that takes assets from a directory path, and builds them into an asset bundle.
I want to use: BuildPipeline.BuildAssetBundle(Object main, Object  assets, string outputPath, ...);
That means I need an array of Object. But how do I get the array of Object, given an asset path that contains all the fbx that I need in bundled?
Why does AssetDatabase.LoadAllAssetsAtPath not work for you? The problem you are havaing with it should be a non-issue. In unity, a asset does not come in as a GameObject. It comes in as the most appropriate class, so a FBX should come in as a Mesh. What I would reccomend doing is instead of checking for a GameObject, print the class name. Try
which should give you the class names of all the imported objects.
Is your output asset bundle working? I find that is the really important question.
answered Nov 30 '10 at 03:35 AM