- Home /
Give error after exporting AssetBundle by using BuildPipeline
Hi there,
I have an project which get data from database and rigt it as label name or button name. In this project there is also exportResource script to export assetbundle. By this way i can import them in runtime. My projects works fine in unity editors but when right click and export prefabs, a problem occur. It export frefabs well, but after then my project can not connetc to the database any more.
I can use same database in another project, and it runs but after exporting prefabs, that project also cannot connect database. Where is the problem i can not understand. The code I use to export frefabs ;
@MenuItem("Assets/Build AssetBundle From Selection - Track dependencies")
static function ExportResource ()
var path = EditorUtility.SaveFilePanel ("Save Resource", "", "New Resource", "ept");
if (path.Length != 0)
{ Build the resource file from the active selection.
var 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 function ExportResourceNoTrack () {
var path = EditorUtility.SaveFilePanel ("Save Resource", "", "New Resource", "ept");
if (path.Length != 0)
{
BuildPipeline.BuildAssetBundle(Selection.activeObject, Selection.objects, path);
}
}
and the error given;
SecurityException: Unable to connect, as no valid crossdomain policy was found
I need your helps, thnx :)
I also have this question. Have you solved the this ? thx
Your answer
Follow this Question
Related Questions
Build addressables in custom build script 4 Answers
Dynamic loaded assets including meta data 0 Answers
Error after building a bundle,Error while creating a bundle 0 Answers
Unity crashes when try to load prefab with LWRP from Asset bundles 1 Answer
Get path to prefab asset not from instance is not working :/ 0 Answers