![]() ![]() String outstr = "Failed to load Asset! " + name GameObject prefab = (GameObject)mechAssetBundle.LoadAsset(name) Var names = mechAssetBundle.GetAllAssetNames() Public string m_assetBundleName = "chrprfmech_newMechBase-001" ĪssetBundle mechAssetBundle = AssetBundle.LoadFromFile(Application.streamingAssetsPath + "/" + m_assetBundleName) ĭebug.Log("Failed to load AssetBundle! %s", mechAssetBundle ) Note this only loads a mech, there is no easy way to create an AssetBundle at runtime, so this is not a mech asset bundle editor. When you run the Unity project it will load and display the mech. You'll need to drop the mech assetbundle into the StreamingAssets folder of the unity project (creating it if necessary) and then copy the name of the asset bundle into the Asset Bundle Name field in the Inspector. It'll load the mech into that gameobject. ![]() If you want to see how a mech bundle is arranged inside the game, and know how to use unity, then if you create a new gameobject in an empty scene, and add this as a script.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |