UniVRM/Assets/VRM10_Samples/VRM10FirstPersonSample
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
..
VRM10.Samples.VRM10FirstPersonSample.asmdef copy Samples~ to under Assets 2021-10-14 19:28:31 +09:00
VRM10.Samples.VRM10FirstPersonSample.asmdef.meta copy Samples~ to under Assets 2021-10-14 19:28:31 +09:00
VRM10CanvasManager.cs Unity2023.1以降でFindObjectsOfType系APIがObsolete警告を出すのに対応 2024-05-08 03:48:25 +09:00
VRM10CanvasManager.cs.meta copy Samples~ to under Assets 2021-10-14 19:28:31 +09:00
VRM10FileDialogForWindows.cs copy Samples~ to under Assets 2021-10-14 19:28:31 +09:00
VRM10FileDialogForWindows.cs.meta copy Samples~ to under Assets 2021-10-14 19:28:31 +09:00
VRM10FirstPersonSample.unity copy Samples~ to under Assets 2021-10-14 19:28:31 +09:00
VRM10FirstPersonSample.unity.meta copy Samples~ to under Assets 2021-10-14 19:28:31 +09:00
VRM10LookTarget.cs copy Samples~ to under Assets 2021-10-14 19:28:31 +09:00
VRM10LookTarget.cs.meta copy Samples~ to under Assets 2021-10-14 19:28:31 +09:00
VRM10OffsetOnTransform.cs copy Samples~ to under Assets 2021-10-14 19:28:31 +09:00
VRM10OffsetOnTransform.cs.meta copy Samples~ to under Assets 2021-10-14 19:28:31 +09:00
VRM10RuntimeLoader.cs sample の ShowMeshes の呼び方 2024-02-26 16:12:40 +09:00
VRM10RuntimeLoader.cs.meta copy Samples~ to under Assets 2021-10-14 19:28:31 +09:00