Skip to content

Conversation

@K-Tone
Copy link
Collaborator

@K-Tone K-Tone commented Nov 19, 2025

Description

Here we force reimport all assets into Unity 2022.3 LTS with the means of this script:

using UnityEditor;
using UnityEngine;
using System.IO;

public class ForceReserializeWindow : EditorWindow
{
    [MenuItem("Tools/Force Reserialize All Assets")]
    public static void ShowWindow()
    {
        GetWindow<ForceReserializeWindow>("Force Reserialize Assets");
    }

    void OnGUI()
    {
        GUILayout.Label("Force all assets to be re-saved (reserialized).", EditorStyles.wordWrappedLabel);
        if (GUILayout.Button("Force Reserialize All Assets"))
        {
            ForceReserializeAllAssets();
        }
    }

    private static void ForceReserializeAllAssets()
    {
        // Get all asset paths in the project
        string[] allAssetPaths = AssetDatabase.GetAllAssetPaths();
        
        // Use ForceReserializeAssets with the option to reserialize both assets and metadata
        // This loads, upgrades, and writes all data back to disk.
        AssetDatabase.ForceReserializeAssets(allAssetPaths, ForceReserializeAssetsOptions.ReserializeAssetsAndMetadata);

        Debug.Log($"Reserialization complete for {allAssetPaths.Length} assets.");
    }
}

This is done so that what we have on disk is actually 22.3 LTS data and not old data that is still usable due to compatibility paths. One of the benefits of this work is that with it landing, we won't get extra large diffs from doing seemingly small changes.

Testing status & QA

Local testing by dev.

Overall Product Risks

  • Complexity: Low
  • Halo Effect: Low

Checklist

Before review:

  • Changelog entry added.
    • Explains the change in Changed, Fixed, Added sections.
    • For API change contains an example snippet and/or migration example.
    • JIRA ticket linked, example (case %%). If it is a private issue, just add the case ID without a link.
    • Jira port for the next release set as "Resolved".
  • Tests added/changed, if applicable.
    • Functional tests Area_CanDoX, Area_CanDoX_EvenIfYIsTheCase, Area_WhenIDoX_AndYHappens_ThisIsTheResult.
    • Performance tests.
    • Integration tests.
  • Docs for new/changed API's.
    • Xmldoc cross references are set correctly.
    • Added explanation how the API works.
    • Usage code examples added.
    • The manual is updated, if needed.

During merge:

  • Commit message for squash-merge is prefixed with one of the list:
    • NEW: ___.
    • FIX: ___.
    • DOCS: ___.
    • CHANGE: ___.
    • RELEASE: 1.1.0-preview.3.

@K-Tone K-Tone changed the title Anthony/reimport into 2022.3 CHANGE: Force reimport all assets into Unity 2022.3 LTS Nov 20, 2025
@K-Tone K-Tone marked this pull request as ready for review November 20, 2025 10:08
@K-Tone K-Tone requested review from Pauliusd01 and ekcoh November 20, 2025 10:09
@u-pr-agent
Copy link
Contributor

u-pr-agent bot commented Nov 20, 2025

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪

The PR contains a very small diff involving only configuration changes in `manifest.json` and one preset file, making it quick to review.
🏅 Score: 88

The changes appear consistent with a Unity version upgrade/maintenance, but the package updates in `manifest.json` are not explicitly documented in the PR description.
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Undocumented Package Updates

The PR updates several packages (including a major version bump for com.unity.settings-manager) and adds com.unity.ai.navigation. These changes are not mentioned in the PR description, which focuses solely on asset reserialization. Please verify that these specific package versions are intended and compatible with the target Unity version.

"com.unity.ai.navigation": "1.1.6",
"com.unity.analytics": "3.8.1",
"com.unity.cinemachine": "2.10.3",
"com.unity.coding": "0.1.0-preview.24",
"com.unity.ide.rider": "3.0.36",
"com.unity.ide.visualstudio": "2.0.22",
"com.unity.settings-manager": "2.1.0",
"com.unity.test-framework": "1.4.5",
"com.unity.test-framework.build": "0.0.1-preview.12",
"com.unity.test-framework.performance": "3.0.3",
"com.unity.test-framework.utp-reporter": "1.1.0-preview",
"com.unity.textmeshpro": "3.0.7",
  • Update review

🤖 Helpful? Please react with 👍/👎 | Questions❓Please reach out in Slack #ask-u-pr-agent

@u-pr-agent
Copy link
Contributor

u-pr-agent bot commented Nov 20, 2025

PR Code Suggestions ✨

No code suggestions found for the PR.

@codecov-github-com
Copy link

codecov-github-com bot commented Nov 20, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

@@             Coverage Diff             @@
##           develop    #2287      +/-   ##
===========================================
+ Coverage    76.81%   77.95%   +1.14%     
===========================================
  Files          476      477       +1     
  Lines        88726    97418    +8692     
===========================================
+ Hits         68155    75947    +7792     
- Misses       20571    21471     +900     
Flag Coverage Δ
inputsystem_MacOS_2022.3 5.54% <ø> (+0.15%) ⬆️
inputsystem_MacOS_2022.3_project 75.49% <ø> (+0.79%) ⬆️
inputsystem_MacOS_6000.0 5.32% <ø> (+0.14%) ⬆️
inputsystem_MacOS_6000.0_project 77.41% <ø> (+0.81%) ⬆️
inputsystem_MacOS_6000.2 5.32% <ø> (+0.14%) ⬆️
inputsystem_MacOS_6000.2_project 77.41% <ø> (+0.81%) ⬆️
inputsystem_MacOS_6000.3 5.32% <ø> (+0.14%) ⬆️
inputsystem_MacOS_6000.3_project 77.41% <ø> (+0.80%) ⬆️
inputsystem_MacOS_6000.4 5.33% <ø> (+0.14%) ⬆️
inputsystem_MacOS_6000.4_project 77.41% <ø> (+0.80%) ⬆️
inputsystem_MacOS_6000.5 5.33% <ø> (+0.14%) ⬆️
inputsystem_MacOS_6000.5_project 77.41% <ø> (+0.80%) ⬆️
inputsystem_Ubuntu_2022.3 5.55% <ø> (+0.15%) ⬆️
inputsystem_Ubuntu_2022.3_project 75.28% <ø> (+0.79%) ⬆️
inputsystem_Ubuntu_6000.0 5.33% <ø> (+0.14%) ⬆️
inputsystem_Ubuntu_6000.0_project 77.21% <ø> (+0.80%) ⬆️
inputsystem_Ubuntu_6000.2 5.33% <ø> (+0.14%) ⬆️
inputsystem_Ubuntu_6000.2_project 77.21% <ø> (+0.80%) ⬆️
inputsystem_Ubuntu_6000.3 5.33% <ø> (+0.14%) ⬆️
inputsystem_Ubuntu_6000.3_project 77.21% <ø> (+0.80%) ⬆️
inputsystem_Ubuntu_6000.4 5.33% <ø> (+0.14%) ⬆️
inputsystem_Ubuntu_6000.4_project 77.22% <ø> (+0.80%) ⬆️
inputsystem_Ubuntu_6000.5 5.33% <ø> (+0.14%) ⬆️
inputsystem_Ubuntu_6000.5_project 77.22% <ø> (+0.81%) ⬆️
inputsystem_Windows_2022.3 5.54% <ø> (+0.15%) ⬆️
inputsystem_Windows_2022.3_project 75.62% <ø> (+0.79%) ⬆️
inputsystem_Windows_6000.0 5.32% <ø> (+0.14%) ⬆️
inputsystem_Windows_6000.0_project 77.53% <ø> (+0.80%) ⬆️
inputsystem_Windows_6000.2 5.32% <ø> (+0.14%) ⬆️
inputsystem_Windows_6000.2_project 77.53% <ø> (+0.80%) ⬆️
inputsystem_Windows_6000.3 5.32% <ø> (+0.14%) ⬆️
inputsystem_Windows_6000.3_project 77.53% <ø> (+0.80%) ⬆️
inputsystem_Windows_6000.4 5.33% <ø> (+0.14%) ⬆️
inputsystem_Windows_6000.4_project 77.54% <ø> (+0.80%) ⬆️
inputsystem_Windows_6000.5 5.33% <ø> (+0.14%) ⬆️
inputsystem_Windows_6000.5_project 77.54% <ø> (+0.81%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
Assets/Tools/ForceReserializeUtility.cs 0.00% <ø> (ø)

... and 66 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@josepmariapujol-unity
Copy link
Collaborator

Screenshot 2025-11-20 at 12 41 56

When I open the project I get this file created

@josepmariapujol-unity
Copy link
Collaborator

Should we commit it?

@K-Tone K-Tone requested review from josepmariapujol-unity and removed request for Pauliusd01 November 21, 2025 09:50
@K-Tone
Copy link
Collaborator Author

K-Tone commented Nov 21, 2025

CC @Pauliusd01 for viz, no functional changes here, just asset reimport

Copy link
Collaborator

@ekcoh ekcoh left a comment

Choose a reason for hiding this comment

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

Great to get this upgrade, I skimmed through the files and changes look good. I was surprised to not see a similar script to the PR description check in though, why don't we add this to e.g. /Assets/Tools/AssetUtilties.cs (The menu option only - see no value in the window), so you only need to go to e.g. "QA Tools/Force Reserialize All Assets" next time we do this? It can also be handy to use when e.g. messing with C# generators or asset generation/format changes that requires you to "manually" upgrade all of these.

@ekcoh
Copy link
Collaborator

ekcoh commented Nov 21, 2025

What I suggested is essentially this:

using UnityEditor;
using UnityEngine;
using System.IO;

static class AssetDatabaseMenuItems 
{
     // Use ForceReserializeAssets with the option to reserialize both assets and metadata
     // This loads, upgrades, and writes all data back to disk.
    [MenuItem("QA Tools/Force Reserialize All Assets")]
    static void ForceReserializeAllAssets() =>
        AssetDatabase.ForceReserializeAssets(AssetDatabase.GetAllAssetPaths(), ForceReserializeAssetsOptions.ReserializeAssetsAndMetadata);
}```

@K-Tone K-Tone force-pushed the anthony/reimport-into-2022.3 branch from 9936753 to 727c74f Compare November 21, 2025 10:24
Copy link
Collaborator

@josepmariapujol-unity josepmariapujol-unity left a comment

Choose a reason for hiding this comment

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

Tested manually, approved

@K-Tone K-Tone merged commit 83db18f into develop Nov 21, 2025
127 checks passed
@K-Tone K-Tone deleted the anthony/reimport-into-2022.3 branch November 21, 2025 13:18
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.

4 participants