Commit Graph

12 Commits

Author SHA1 Message Date
ousttrue
66402c74d6
Update Assets/VRM/Runtime/LookAt/CurveMapper.cs
Co-authored-by: 0b5vr <0b5vr@0b5vr.com>
2024-10-11 16:13:36 +09:00
ousttrue
6a02614d35 fix Clamp 2024-10-07 16:14:02 +09:00
ousttrue
a17aa977c7 Clamp01 2024-10-07 15:36:24 +09:00
ousttrue
d688a1568e max 2024-10-07 15:31:14 +09:00
ousttrue
e63c6ff2f5 0 or CurveYRangeDegree 2024-10-07 15:13:05 +09:00
ousttrue
9ffebd5b87 fix CurveMapper. zero inputMaxValue 2024-10-07 14:49:36 +09:00
ousttrue
be20563059 GetComponent を置き換え。
TryGetComponent
GetComponentOrThrow(拡張関数)
GetComponentOrNull(拡張関数)

sample と test は据え置き
2024-07-24 22:09:30 +09:00
Isamu Mogi
698a4dbc8e Unity2022.2.4以下と2021.3.17以下でFindObjectBy系APIが存在しないのに対応
FindObjectsBy系のAPIは、UniVRMがサポートしているUnityのうち、次の範囲のバージョンには存在しない。

- 2021.3.0~2021.3.17
- 2022.1.0~2022.1.24
- 2022.2.0~2022.2.4

そのため、該当するバージョンのUnityではコンパイルエラーが発生していた。UNITY_2022_3_OR_NEWERで分岐することで、旧APIと新APIを安全に選択するようにした。

厳密にはUNITY_2022_2_5_OR_NEWERを用いたいが、そのようなシンボルは存在していなかった。
2024-05-14 20:15:56 +09:00
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
ousttrue
f6c5329b25 fix warn 2021-05-27 20:35:19 +09:00
ousttrue
b8223a20c3 export with bone normalize cause, drop look at curve params 2021-05-19 16:04:16 +09:00
ousttrue
4ffd97c2e9 FolderとAsmdef整理。Runtime, Editor, Tests 2020-12-01 19:54:13 +09:00