2017-10-14 18 views
0

3Dオブジェクトの資産バンドルを1つに作成しています。変換値(スケール、回転、位置)で作成されていません。しかし、私はその値が正しく来ているデバッグしながらバンドルし、私のアプリに読み込まれた後、デフォルト値にリセットします。Unity - 資産バンドルが正しく作成されない

私は資産バンドルに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); 
 

 
    } 
 
}

答えて

0

リンク https://www.assetstore.unity3d.com/#!/content/45836 次からプロジェクト内のアセットバンドルマネージャをダウンロードして、資産に行きます - > AssetBundle-> Asset bundle これは、プロジェクトのAssetフォルダ外のAssetbundleフォルダ名に資産バンドルを作成します

関連する問題