Skip to content

Fix Unity 6.5 asset creation API compatibility - #316

Closed
Hinen wants to merge 1 commit into
Seanba:masterfrom
Hinen:fix/unity-6000-5-api
Closed

Fix Unity 6.5 asset creation API compatibility#316
Hinen wants to merge 1 commit into
Seanba:masterfrom
Hinen:fix/unity-6000-5-api

Conversation

@Hinen

@Hinen Hinen commented Sep 2, 2026

Copy link
Copy Markdown

Summary

  • Use ProjectWindowUtil.CreateAssetWithTextContent on Unity 6000.5 and newer.
  • Keep CreateAssetWithContent on older supported Unity versions.

Why

Unity 6000.5 marks CreateAssetWithContent as an obsolete compile error. The replacement API is not present in Unity 6000.3.11f1, so the version guard must start at 6000.5 rather than 6000.0. This preserves the package's older Unity compatibility.

This differs from #309 by retaining compatibility with Unity 6000.0 through 6000.4.

Verification

  • Unity 6000.5.10f1: full project script recompilation completed with failed: false.
  • Unity 6000.3.11f1 editor assembly: ProjectWindowUtil exposes CreateAssetWithContent, but not CreateAssetWithTextContent.

@Hinen

Hinen commented Sep 2, 2026

Copy link
Copy Markdown
Author

Closing in favor of #309. I added the Unity 6000.3 compatibility finding there so the existing change can be corrected without maintaining a duplicate PR.

@Hinen Hinen closed this Sep 2, 2026
@Hinen
Hinen deleted the fix/unity-6000-5-api branch September 2, 2026 06:10
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