Hiya! I’ll start by saying that I have nearly no C# experience/knowledge at all, and am learning as I go.
I’m attempting to modify the asset bundle export script provided in the Unity 5 documentation to suit my needs, and have run into a pair of errors that I can’t find a solution for: Error CS1503: Argument ‘3’: cannot convert from ‘UnityEditor.BuildAssetBundleOptions’ to ‘UnityEditor.BuildTarget’
Error CS1502: The best overloaded method match for ‘UnityEditor.BuildPipeline.BuildAssetBundles(string, UnityEditor.AssetBundleBuild, UnityEditor.BuildAssetBundleOptions, UnityEditor.BuildTarget)’ has some invalid arguments
The script is as follows
using UnityEditor;
public class CreateAssetBundles
{
[MenuItem ("Assets/Build AssetBundles")]
static void BuildAllAssetBundles ()
{
BuildPipeline.BuildAssetBundles ("AssetBundles" , BuildAssetBundleOptions.DisableWriteTypeTree, BuildAssetBundleOptions.UncompressedAssetBundle, BuildTarget.StandaloneWindows);
}
}
From what I’ve gathered, the error results from having both the BuildAssetBundleOptions.DisableWriteTypeTree and BuildAssetBundleOptions.UncompressedAssetBundle variables in at the same time.
Any help is appreciated.