facebook twitter hatena line email

「Unity/バージョンアップメモ」の版間の差分

提供: 初心者エンジニアの簡易メモ
移動: 案内検索
(multidexのエラーが出るとき)
 
(同じ利用者による、間の22版が非表示)
行1: 行1:
==unity2020.1.2f1へ==
+
[[Unity/バージョンアップメモ/unity2022.3.22f1]]
unity2019.2.12f1からunity2020.1.2f1へ
+
  
===Component GUI Layerエラーが出るとき==
+
[[Unity/バージョンアップメモ/unity2022.3.11f1]]
<pre>
+
Component GUI Layer in Main Camera for Scene unity is no longer available.
+
It will be removed after you edit this GameObject and save the Scene.
+
</pre>
+
MainCameraのFlareLayerをremoveするとよい。
+
  
参考:https://baba-s.hatenablog.com/entry/2020/05/07/070100
+
[[Unity/バージョンアップメモ/unity2022.3.8f1]]
  
===android.useAndroidXが設定されてないエラー===
+
[[Unity/バージョンアップメモ/unity2022.3.0f1]]
以下のようなメッセージが出た場合
+
<pre>
+
* What went wrong:
+
Could not determine the dependencies of task ':launcher:lintVitalRelease'.
+
> This project uses AndroidX dependencies, but the 'android.useAndroidX' property is not enabled. Set this property to true in the gradle.properties file and retry.
+
The following AndroidX dependencies are detected: androidx.versionedparcelable:versionedparcelable:1.0.0, androidx.fragment:fragment:1.0.0, androidx.slidingpanelayout:slidingpanelayout:1.0.0, androidx.core:core:1.0.0, androidx.customview:customview:1.0.0, androidx.swiperefreshlayout:swiperefreshlayout:1.0.0, androidx.interpolator:interpolator:1.0.0, androidx.loader:loader:1.0.0, androidx.drawerlayout:drawerlayout:1.0.0, androidx.viewpager:viewpager:1.0.0, androidx.collection:collection:1.0.0, androidx.localbroadcastmanager:localbroadcastmanager:1.0.0, androidx.lifecycle:lifecycle-common:2.0.0, androidx.arch.core:core-common:2.0.0, androidx.annotation:annotation:1.1.0, androidx.legacy:legacy-support-core-ui:1.0.0, androidx.lifecycle:lifecycle-livedata:2.0.0, androidx.lifecycle:lifecycle-viewmodel:2.0.0, androidx.lifecycle:lifecycle-livedata-core:2.0.0, androidx.browser:browser:1.0.0, androidx.arch.core:core-runtime:2.0.0, androidx.legacy:legacy-support-core-utils:1.0.0, androidx.documentfile:documentfile:1.0.0, androidx.cursoradapter:cursoradapter:1.0.0, androidx.lifecycle:lifecycle-runtime:2.0.0, androidx.coordinatorlayout:coordinatorlayout:1.0.0, androidx.asynclayoutinflater:asynclayoutinflater:1.0.0, androidx.print:print:1.0.0
+
  
* Try:
+
[[Unity/バージョンアップメモ/unity2021.3.4f1]]
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
+
</pre>
+
AndroidのPublisingSettingのCustomGradlePropertiesTemplateにチェックを付け、生成されたgradleTemplate.propertiesに以下を追加
+
  
Assets/Plugins/Android/gradleTemplate.properties
+
[[Unity/バージョンアップメモ/unity2020.3.0f1]]
<pre>
+
android.enableJetifier=true
+
android.useAndroidX=true
+
</pre>
+
  
===firebase-xxxx-unity.jarがない===
+
[[Unity/バージョンアップメモ/unity2020.1.2f1]]
以下のようなエラーが出るとき
+
<pre>
+
> Could not find firebase-analytics-unity.jar (com.google.firebase:firebase-analytics-unity:6.10.0).
+
> Could not find firebase-app-unity.jar (com.google.firebase:firebase-app-unity:6.10.0).
+
> Could not find firebase-auth-unity.jar (com.google.firebase:firebase-auth-unity:6.10.0).
+
> Could not find firebase-config-unity.jar (com.google.firebase:firebase-config-unity:6.10.0).
+
> Could not find firebase-crashlytics-unity.jar (com.google.firebase:firebase-crashlytics-unity:6.10.0).
+
> Could not find firebase-functions-unity.jar (com.google.firebase:firebase-functions-unity:6.10.0).
+
</pre>
+
firebaseを再度downloadして(firebase_unity_sdk_6.15.2.zip)各種unitypackageをインストールする。
+
  
===GoogleMobileAds周りのエラーのとき===
+
[[Unity/バージョンアップメモ/unity2019.3.0f6]]
Assets/GoogleMobileAdsを最新のGoogleMobileAds5.3.0 (https://github.com/googleads/googleads-mobile-unity/releases/tag/v5.3.0) をインポート
+
<pre>
+
java.lang.RuntimeException: Unable to get provider com.google.android.gms.ads.MobileAdsInitProvider: java.lang.IllegalStateException:
+
</pre>
+
Assets/Plugin/Android/GoogleMobileAdsPluginを削除して、最新のGoogleMobileAds5.3.0 をimport
+
<pre>
+
BuildMethodException: [GoogleMobileAds] AndroidManifest.xml is missing. Try re-importing the plugin.
+
ManifestProcessor.StopBuildWithMessage (System.String message) (at
+
</pre>
+
===multidexのエラーが出るとき===
+
以下エラーが出るとき
+
<pre>
+
com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives:
+
</pre>
+
  
以下ファイルにmultiDexEnabledを追加する
+
[[Unity/バージョンアップメモ/unity2017.2]]
 
+
Assets/Plugins/Android/mainTemplate.gradle
+
<pre>
+
android {
+
    defaultConfig {
+
        multiDexEnabled true
+
    }
+
    dependencies {
+
      implementation 'androidx.multidex:multidex:2.0.1'
+
    }
+
}
+
</pre>
+
 
+
参考:[[Unity/GoogleMobileSDK/ライブラリ自動読み込み]] [ショートカット]
+
 
+
==unity2019.3.0f6へ==
+
unity2019.2.0f1からunity2019.3.0f6へ
+
 
+
Assets/Plugins/Pixelplacement/iTween/iTween.cs(6083,4): error CS0619: 'GUITexture.color' is obsolete: 'GUITexture has been removed. Use UI.Image instead.'
+
 
+
*GUITextureが使えなくなったのでiTweenを最新へすることで直った。
+
*photonでもdemoでGUI系を使ってたのでdemoを削除することで直った。
+
 
+
参考:https://www.ikaken.com/archives/1747
+
==unity2017.2でGUI Textは非推奨へ==
+
以下メッセージが出たときの直し方
+
Component GUI Layer in Main Camera for Scene Assets/MainScene.unity is no longer available.
+
It will be removed after you edit this GameObject and save the Scene.
+
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
+
#Assets/MainScene.unityを開く
+
#Main Cameraのinspectorを開いて、適当にプロパティを有効/無効と適当に変更する
+
#Assets/MainScene.unityを保存する
+
#Assets/MainScene.unityをクリックして、上記ログが出なければ良い。
+
 
+
参考:https://tech.pjin.jp/blog/2018/01/31/unity_gui-text_deprecated/
+

2024年3月25日 (月) 01:13時点における最新版

Unity/バージョンアップメモ/unity2022.3.22f1

Unity/バージョンアップメモ/unity2022.3.11f1

Unity/バージョンアップメモ/unity2022.3.8f1

Unity/バージョンアップメモ/unity2022.3.0f1

Unity/バージョンアップメモ/unity2021.3.4f1

Unity/バージョンアップメモ/unity2020.3.0f1

Unity/バージョンアップメモ/unity2020.1.2f1

Unity/バージョンアップメモ/unity2019.3.0f6

Unity/バージョンアップメモ/unity2017.2