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

[Unity] Replace obsoleted Unity API calls #394

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

SecretImbecile
Copy link

A simple patch to address compiler warnings generated in recent versions of Unity.

The Unity API has marked some methods that are being called by the Steam Audio Unity plugin as obsolete. The following method calls have been changed in this pull request:

  • UnityEngine.Object: FindObjectOfType<T>() replaced with FindFirstObjectByType<T>()
  • UnityEngine.Object: FindObjectsOfType<T>() replaced with FindObjectsByType<T>(FindObjectsSortMode)

These new methods have been implemented since Unity 2020.3, and the old methods have been marked as obsolete since 2023.1

To ensure compatibility of the Unity plugin remains the same as before (2017.3+), these call changes have been wrapped in #if UNITY_2020_3_OR-NEWER preprocessor directives.

This is my first pull request for this repo, let me know if I need to make any changes.

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.

1 participant