Skip to content

Conversation

@octo127
Copy link
Contributor

@octo127 octo127 commented Jun 19, 2025

Summary

This PR fixes a compilation error that occurs when using Unity versions prior to 2023.1 due to the use of AssetDatabase.AssetPathExists, which was added in Unity 2023.1.0a4.

Changes

  • Added preprocessor directives to check Unity version
  • For Unity 2023.1 and newer: Use AssetDatabase.AssetPathExists
  • For older versions: Use AssetDatabase.LoadAssetAtPath<UnityEngine.Object>() != null as a fallback

Testing

  • Verified that the functionality works correctly on both Unity 2022.3 and 2023.1+

@brunomikoski brunomikoski merged commit 294eeae into brunomikoski:master Aug 20, 2025
1 check passed
@brunomikoski
Copy link
Owner

Thanks for the contribution

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.

2 participants