エラーなど出ていないためどこから手を付ければよいか困っています。
ぜひアドバイスいただければ幸いです。
前提・実現したいこと
UnityのAssetsBundlesに配置したファイルをiOSで読み込みたい
読み込みたいファイルは画像など含むゲームデータ
発生している問題・エラーメッセージ
Assetsファイルを読み込む処理を行なっています
- iOSの実機にビルドすると読み込まれず、表示されるべき部分で停止
- Androidの実機では読み込まれる
- UnityEditerでは読み込まれる
このためxcodeのビルドに問題があるのでは?と確認中です。
試したこと
- ファイルが存在していることは確認
- 前日の作業までは起きていなかったので、Gitでその状態に戻した
何かの作業が影響しているはずだが不明 - https://qiita.com/satotin/items/7a481c69230e9393401b
補足情報(FW/ツールのバージョンなど)
- Unity 5.6.3p4
- xcode 9.2
xcodeでのエラー
以下のエラーが繰り返し表示される
The referenced script on this Behaviour (Game Object 'UserProgress') is missing! (Filename: Line: 1744) Unloading 6 Unused Serialized files (Serialized files now loaded: 0) UnloadTime: 1.047708 ms Font size and style overrides are only supported for dynamic fonts. Font 'font-export' is not dynamic. UnityEngine.TextGenerator:ValidatedSettings(TextGenerationSettings) UnityEngine.TextGenerator:PopulateAlways(String, TextGenerationSettings) UnityEngine.TextGenerator:PopulateWithError(String, TextGenerationSettings) UnityEngine.TextGenerator:PopulateWithErrors(String, TextGenerationSettings, GameObject) UnityEngine.UI.Text:OnPopulateMesh(VertexHelper) UnityEngine.UI.Graphic:DoMeshGeneration() UnityEngine.UI.Graphic:Rebuild(CanvasUpdate) UnityEngine.UI.CanvasUpdateRegistry:PerformUpdate() IEZLinkedListItem`1:set_next(T) IEZLinkedListItem`1:set_next(T) IEZLinkedListItem`1:set_next(T) (Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51) Unloading 19 unused Assets to reduce memory usage. Loaded Objects now: 2765. Total: 4.221166 ms (FindLiveObjects: 0.421541 ms CreateObjectMapping: 0.063416 ms MarkObjects: 3.667250 ms DeleteObjects: 0.068541 ms) Unloading 0 Unused Serialized files (Serialized files now loaded: 0) Unloading 0 unused Assets to reduce memory usage. Loaded Objects now: 2765. Total: 3.815541 ms (FindLiveObjects: 0.186166 ms CreateObjectMapping: 0.062000 ms MarkObjects: 3.559666 ms DeleteObjects: 0.007166 ms) starting www download: file:///var/containers/Bundle/Application/ID/appname/Data/Raw/AssetBundles/ios/theme/ファイル名.unity3d 2018-02-16 12:46:42.5433+0900 プロダクトID[146:21775] NSURLConnection finished with error - code -1100 The referenced script on this Behaviour (Game Object 'DebugText') is missing! (Filename: Line: 1744)
using UnityEngine; using System.Collections; public class BaseAssetBundleLoader { public delegate void LoadSuccessCallback (AssetBundle bundle); #if UNITY_ANDROID const string PLATFORM_NAME = "android"; #elif UNITY_IPHONE const string PLATFORM_NAME = "ios"; #elif UNITY_SWITCH const string PLATFORM_NAME = "switch"; #endif protected string _fileName = null; protected string _type = null; protected bool _isDone = false; protected string _error = null; protected float _progress = 0.0f; protected LoadSuccessCallback _callback = null; public bool IsDone { get { return _isDone; } } public string Error { get { return _error; } } public float Progress { get { return _progress; } } public BaseAssetBundleLoader () { } public BaseAssetBundleLoader (string fileName, string type, int version) { _fileName = fileName; _type = type; string url = CreateUrl (_fileName, _type); // Debug.Log( "Load And Cache -> Ver." + version + " " + url ); AssetBundleLoader.Load (url, version, OnLoadFinish, OnLoadProgress); } protected void Load (string fileName, string type, int version) { _fileName = fileName; _type = type; string url = CreateUrl (_fileName, _type); AssetBundleLoader.Load (url, version, OnLoadFinish, OnLoadProgress); } protected void LoadFromLocal (string fileName, string type, int version) { _fileName = fileName; _type = type; string url = CreateLocalUrl (_fileName, _type); AssetBundleLoader.Load (url, version, OnLoadFinish, OnLoadProgress); } static public bool IsCached (string fileName, string type, int version) { return Caching.IsVersionCached (CreateUrl (fileName, fileName), version); } void OnLoadFinish (WWW www) { _isDone = true; if (www.error != null || !www.isDone) { _error = www.error ?? "timeout"; Debug.LogError ("AssetBundle Load Error! -> " + www.url + "\n" + _error); return; } if (_callback != null) { _callback (www.assetBundle); } } void OnLoadProgress (WWW www) { _progress = www.progress; } protected static string CreateLocalUrl (string fileName, string type) { return Helper.StreamingAssetsPath + "AssetBundles/" + PLATFORM_NAME + "/" + type + "/" + fileName + "." + PLATFORM_NAME + "." + type + ".unity3d"; } protected static string CreateUrl (string fileName, string type) { //return CreateLocalUrl (fileName, type); return TextIOUtil.AddSlash (AppManager.ServerPath) + "AssetBundles/" + PLATFORM_NAME + "/" + type + "/" + fileName + "." + PLATFORM_NAME + "." + type + ".unity3d"; } }
回答1件
あなたの回答
tips
プレビュー