UniVRM/Assets/VRM_Samples
Isamu Mogi 018aec1fab Unity2023.1以降でFindObjectsOfType系APIがObsolete警告を出すのに対応
Unity 2023.1以降のバージョンでUnityEngine.Object.FindObjectsOfType系APIがObsoleteになり、次の警告が発生していました。

```
Assets/VRM10_Samples/VRM10Viewer/VRM10ViewerUI.cs(250,24): warning CS0618: 'Object.FindObjectOfType<T>()' is obsolete: 'Object.FindObjectOfType has been deprecated. Use Object.FindFirstObjectByType instead or if finding any instance is acceptable the faster Object.FindAnyObjectByType'
Assets/VRM10_Samples/VRM10Viewer/VRM10ViewerUI.cs(208,31): warning CS0618: 'Object.FindObjectsOfType<T>()' is obsolete: 'Object.FindObjectsOfType has been deprecated. Use Object.FindObjectsByType instead which lets you decide whether you need the results sorted or not.  FindObjectsOfType sorts the results by InstanceID but if you do not need this using FindObjectSortMode.None is considerably faster.'
```

代わりにFindObjectsBy系APIを使うようにしました。これはUnity 2021.3にも存在しているので、そのまま使うことができました。

FindObjectOfType()とFindFirstObjectByType()の違いに関してはドキュメントからは読み取れませんでしたが、
Unity-Technologiesgが公開しているUnity 6000のソースコードを見る限り、動作は同一に見えるためそのまま置き換えました。

https://github.com/Unity-Technologies/UnityCsReference/blob/6000.0/Runtime/Export/Scripting/UnityEngineObject.bindings.cs#L586-L602
2024-05-08 03:48:25 +09:00
..
AnimationBridgeSample copy Samples~ to under Assets 2021-10-14 19:28:31 +09:00
BlendShapeMenu add null check 2022-07-29 20:16:17 +09:00
FirstPersonSample Unity2023.1以降でFindObjectsOfType系APIがObsolete警告を出すのに対応 2024-05-08 03:48:25 +09:00
RuntimeExporterSample avatar 代入の workaround 2024-01-05 15:08:43 +09:00
SimpleViewer Unity2023.1以降でFindObjectsOfType系APIがObsolete警告を出すのに対応 2024-05-08 03:48:25 +09:00
AnimationBridgeSample.meta copy Samples~ to under Assets 2021-10-14 19:28:31 +09:00
BlendShapeMenu.meta BlendShape を作って登録するサンプル 2022-05-19 14:13:44 +09:00
FirstPersonSample.meta copy Samples~ to under Assets 2021-10-14 19:28:31 +09:00
RuntimeExporterSample.meta copy Samples~ to under Assets 2021-10-14 19:28:31 +09:00
SimpleViewer.meta copy Samples~ to under Assets 2021-10-14 19:28:31 +09:00