summaryrefslogtreecommitdiff
path: root/VRCSDK3AvatarsQuestLegacy/Assets/VRCSDK/Dependencies/VRChat/Editor/Components/EditorHandling.cs
blob: 32923b58f042b8828b54c50c77634048c6306c10 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
using UnityEditor;
using UnityEngine.SceneManagement;

[InitializeOnLoad]
public static class EditorHandling
{
    static EditorHandling()
    {
        UnityEditor.SceneManagement.EditorSceneManager.sceneOpened += SceneOpenedCallback;
    }

    static void SceneOpenedCallback( Scene scene, UnityEditor.SceneManagement.OpenSceneMode mode)
    {
        // refresh window when scene is opened to display content images correctly
        if (null != VRCSdkControlPanel.window) VRCSdkControlPanel.window.Reset();
    }
}