Version: 2019.1 (switch to 2018.3 or 2017.4)
  • C#


Suggest a change




Submission failed





Do not include type information within the AssetBundle.


See Also: BuildPipeline.BuildAssetBundle.

//Place this script in the Editor folder

//This script creates a new Menu named “Build Asset” and new options within the menu named “Normal” and “Disable Write Type Tree”. Click these menu items to build an AssetBundle into a folder.

using UnityEngine; using UnityEditor;


//Creates a new item (Disable Write Type Tree) in the new Build Asset Bundles menu [MenuItem("Build Asset Bundles/Disable Write Type Tree ")] static void BuildABsTree() { //Build the AssetBundles in this mode BuildPipeline.BuildAssetBundles("Assets/MyAssetBuilds", BuildAssetBundleOptions.DisableWriteTypeTree, BuildTarget.StandaloneOSX); } }
