質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
Unity3D

Unity3Dは、ゲームや対話式の3Dアプリケーション、トレーニングシュミレーション、そして医学的・建築学的な技術を可視化する、商業用の開発プラットフォームです。

Unity

Unityは、Unity Technologiesが開発・販売している、IDEを内蔵するゲームエンジンです。主にC#を用いたプログラミングでコンテンツの開発が可能です。

Q&A

解決済

1回答

2863閲覧

Unityのエラーの意味と解決法がわかりません

Kosen

総合スコア33

Unity3D

Unity3Dは、ゲームや対話式の3Dアプリケーション、トレーニングシュミレーション、そして医学的・建築学的な技術を可視化する、商業用の開発プラットフォームです。

Unity

Unityは、Unity Technologiesが開発・販売している、IDEを内蔵するゲームエンジンです。主にC#を用いたプログラミングでコンテンツの開発が可能です。

0グッド

0クリップ

投稿2020/07/23 12:18

前提・実現したいこと

発生したエラーの意味と解決法を知りたい

発生している問題・エラーメッセージ

UnityException: Parse can only be called from the main thread. Constructors and field initializers will be executed from the loading thread when loading a scene. Don't use this function in the constructor or field initializers, instead move initialization code to the Awake or Start function. UnityEngine.Hash128.Parse (System.String hashString) (at <480508088aee40cab70818ff164a29d5>:0) Unity.QuickSearch.SearchIndexer.Read (System.IO.Stream stream, System.Boolean checkVersionOnly) (at Library/PackageCache/com.unity.quicksearch@2.1.0-preview.1/Editor/Indexing/SearchIndexer.cs:594) Unity.QuickSearch.SearchIndexer.ReadIndexFromDisk (System.String indexFilePath, System.Boolean checkVersionOnly) (at Library/PackageCache/com.unity.quicksearch@2.1.0-preview.1/Editor/Indexing/SearchIndexer.cs:1251) Unity.QuickSearch.SearchDatabase.CombineIndexes (Unity.QuickSearch.SearchDatabase+Settings settings, Unity.QuickSearch.SearchDatabase+IndexArtifact[] artifacts, Unity.QuickSearch.SearchTask`1[T] task) (at Library/PackageCache/com.unity.quicksearch@2.1.0-preview.1/Editor/Indexing/SearchDatabase.cs:421) Unity.QuickSearch.SearchDatabase+<>c__DisplayClass45_0.<ResolveArtifacts>b__0 () (at Library/PackageCache/com.unity.quicksearch@2.1.0-preview.1/Editor/Indexing/SearchDatabase.cs:386) Unity.QuickSearch.SearchTask`1+<>c__DisplayClass34_0[T].<RunThread>b__0 () (at Library/PackageCache/com.unity.quicksearch@2.1.0-preview.1/Editor/Indexing/SearchTask.cs:99) System.Threading.ThreadHelper.ThreadStart_Context (System.Object state) (at <437ba245d8404784b9fbab9b439ac908>:0) System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) (at <437ba245d8404784b9fbab9b439ac908>:0) System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) (at <437ba245d8404784b9fbab9b439ac908>:0) System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) (at <437ba245d8404784b9fbab9b439ac908>:0) System.Threading.ThreadHelper.ThreadStart () (at <437ba245d8404784b9fbab9b439ac908>:0) UnityEngine.Hash128:Parse(String) Unity.QuickSearch.SearchIndexer:Read(Stream, Boolean) (at Library/PackageCache/com.unity.quicksearch@2.1.0-preview.1/Editor/Indexing/SearchIndexer.cs:594) Unity.QuickSearch.SearchIndexer:ReadIndexFromDisk(String, Boolean) (at Library/PackageCache/com.unity.quicksearch@2.1.0-preview.1/Editor/Indexing/SearchIndexer.cs:1251) Unity.QuickSearch.SearchDatabase:CombineIndexes(Settings, IndexArtifact[], SearchTask`1) (at Library/PackageCache/com.unity.quicksearch@2.1.0-preview.1/Editor/Indexing/SearchDatabase.cs:421) Unity.QuickSearch.<>c__DisplayClass45_0:<ResolveArtifacts>b__0() (at Library/PackageCache/com.unity.quicksearch@2.1.0-preview.1/Editor/Indexing/SearchDatabase.cs:386) Unity.QuickSearch.<>c__DisplayClass34_0:<RunThread>b__0() (at Library/PackageCache/com.unity.quicksearch@2.1.0-preview.1/Editor/Indexing/SearchTask.cs:99) System.Threading.ThreadHelper:ThreadStart()

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

ベストアンサー

UnityException: Parse can only be called from the main thread.

Parse はメインスレッドからしか呼べない、という意味です。

Unity の Quick Search というパッケージが出しているようなので、使っていないようなら Package Manager から削除すればよいです。使っているなら、まずは preview 版ではなく、正式リリース版(現時点での最新は 2.0.2)を使いましょう。

投稿2020/07/23 12:26

bboydaisuke

総合スコア5275

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問