Install any skill in seconds. Free to start, no credit card required.
Get Started Free →ivanmurzak/unity-version-split
Split a C# file into Unity 6.5+ and pre-Unity 6.5 variants.
Passed 15 of 19 test cases with the skill, and 9 of 19 without it.
and 5 more in the full report
7 fixed10 passed either way5 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 7 test cases the skill fixed. Same model, same prompt, with and without the skill.
We are splitting `Editor/Inspectors/CustomMeshInspector.Editor.cs`. What exact file path and name should be used for the legacy Unity version?
| Checked | Without skill | With skill |
|---|---|---|
| Names the legacy file CustomMeshInspector.Editor.pre-Unity.6.5.cs | Missed | Passed |
The instructions your model reads when the skill loads.
Split a C# source file into two variants: one for Unity 6.5+ (UNITY_6000_5_OR_NEWER) and one for older versions (pre-Unity 6.5).
Unity 6.5 introduced breaking changes including:
EntityId replaces int for instance IDs (GetEntityId() replaces GetInstanceID())EditorUtility.EntityIdToObject(EntityId) replaces EditorUtility.InstanceIDToObject(int)EntityId <-> int conversions are marked [Obsolete(..., true)] (compile error)When a file needs different code for these Unity versions, split it into two files following the project convention.
| File | Purpose | Preprocessor Guard |
|---|---|---|
FileName.cs | Unity 6.5+ (newer version) | #if UNITY_6000_5_OR_NEWER |
FileName.pre-Unity.6.5.cs | Pre-Unity 6.5 (older version) | #if !UNITY_6000_5_OR_NEWER |
For files that also have Editor/Runtime variants, combine the guards:
| File | Guard |
|---|---|
FileName.Editor.cs | #if UNITY_EDITOR && UNITY_6000_5_OR_NEWER |
FileName.Editor.pre-Unity.6.5.cs | #if UNITY_EDITOR && !UNITY_6000_5_OR_NEWER |
FileName.Runtime.cs | #if !UNITY_EDITOR && UNITY_6000_5_OR_NEWER |
FileName.Runtime.pre-Unity.6.5.cs | #if !UNITY_EDITOR && !UNITY_6000_5_OR_NEWER |
Read $ARGUMENTS (the target file path). Identify which parts need version-specific code.
Common differences between Unity 6.5+ and pre-6.5:
| Unity 6.5+ | Pre-Unity 6.5 |
|---|
test cases passed, vs 9 / 19 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.