Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unity2022.2.4以下と2021.3.17以下でFindObjectBy系APIが存在しないのに対応 #2290

Merged
merged 1 commit into from
May 30, 2024

Conversation

saturday06
Copy link
Contributor

@saturday06 saturday06 commented May 14, 2024

私が以前提出した PR #2285 で、コンパイルエラーのリグレッションを発生させてしまいました。そちらの修正です。お手数おかけしてしまい大変申し訳ありません。

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を用いたいですが、そのようなシンボルは存在していませんでした。

以前の PR #2285 では、Unity 2021.3のドキュメントや2021.3.27f1でメソッドが存在したことで、2021.3以降のバージョンにはすべて存在していると勘違いしてしまっていました。

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を用いたいが、そのようなシンボルは存在していなかった。
Copy link
Contributor

@ousttrue ousttrue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

2021.3.25 で作業しているのでまったく気付いていおりませんでした。

@ousttrue ousttrue merged commit 90577fa into vrm-c:master May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants