You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
655 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEditor.SceneManagement;
using UnityEngine;
using UnityEngine.SceneManagement;
[InitializeOnLoad]
public class AutoHandVersionControlFixer {
static AutoHandVersionControlFixer() {
EditorSceneManager.sceneOpened += OnSceneOpened;
}
private static void OnSceneOpened(Scene scene, OpenSceneMode mode) {
#if UNITY_2022_1_OR_NEWER
#else
var colliderFixers = GameObject.FindObjectsOfType<BoxColliderSerializationFixer>();
foreach(var fixer in colliderFixers) {
fixer.ApplyColliderSizesRecursive();
}
#endif
}
}