0
我正在統一創建3D對象的資產捆綁。它不是用變換值(比例,旋轉,位置)創建的。但是,雖然我調試它的值是正確的,但捆綁和加載到我的應用程序後重置爲默認值。統一 - 資產捆綁無法正常創建
我使用下面的腳本導出3D對象,以資產包
using UnityEngine;
using System.Collections;
using UnityEditor;
public class CreateAssetBundles : Editor
{
[MenuItem("Assets/Create Asset Bundle")]
static void CreateBundle()
{
string bundlePath = "Assets/AssetBundle/";
Object[] selectedAssets = Selection.GetFiltered(typeof(Object), SelectionMode.Assets);
GameObject gameobject = (GameObject) selectedAssets[0];
string name = gameobject.name;
BuildPipeline.BuildAssetBundle(Selection.activeObject, selectedAssets, bundlePath+name+ ".unity3d", BuildAssetBundleOptions.CollectDependencies | BuildAssetBundleOptions.CompleteAssets, BuildTarget.Android);
}
}