Aurilath Posted July 8, 2023 Share Posted July 8, 2023 (edited) I immediately apologize for my poor English. I hope you agree with me that the collection of equipment in the game is rather scarce. So I decided to try to bring a little joy to the game for myself. Namely, add your model of equipment. Meshfile and textures moved from Blender to Unity and ran into a problem. Yes, I'm new to Unity, but I'm learning. I can't create and package the prefab and assetbundles into a unity3d file. I found a script that creates such a file, but it does not want to work with Unity versions after 2017. I have searched a lot of resources on the internet but have not yet found a solution to this problem. And I need help. Or a hint on how to do it or a link to a resource where I could learn it. Thank you. using UnityEngine;using UnityEditor; public class ExportAssetBundles{[MenuItem("Assets/Build AssetBundle From Selection - Track dependencies")]static void ExportResource (){// Bring up save panelstring path = EditorUtility.SaveFilePanel ("Save Resource", "", "New Resource", "unity3d");if (path.Length != 0){// Build the resource file from the active selection.Object[] selection = Selection.GetFiltered(typeof(Object), SelectionMode.DeepAssets);BuildPipeline.BuildAssetBundle(Selection.activeObject, selection, path, BuildAssetBundleOptions.CollectDependencies | BuildAssetBundleOptions.CompleteAssets);Selection.objects = selection;}}[MenuItem("Assets/Build AssetBundle From Selection - No dependency tracking")]static void ExportResourceNoTrack (){// Bring up save panelstring path = EditorUtility.SaveFilePanel ("Save Resource", "", "New Resource", "unity3d");if (path.Length != 0) {// Build the resource file from the active selection.BuildPipeline.BuildAssetBundle(Selection.activeObject, Selection.objects, path);}}} Edited July 8, 2023 by Aurilath Link to comment Share on other sites More sharing options...
Aurilath Posted July 9, 2023 Author Share Posted July 9, 2023 the theme is closed. Thank's. Link to comment Share on other sites More sharing options...
Recommended Posts