TeamSirenix / odin-serializer

Fast, robust, powerful and extendible .NET serializer built for Unity
http://www.odininspector.com
Apache License 2.0
1.66k stars 190 forks source link

SceneView.onSceneGUIDelegate obsolete #33

Open lazlo-bonin opened 4 years ago

lazlo-bonin commented 4 years ago

In the build project's SceneViewBuildButton, the SceneView.onSceneGUIDelegate callback registration is obsolete (since I believe 2019.1).

To eliminate the warning it should be wrapped around:

        [InitializeOnLoadMethod]
        private static void Init()
        {
#if UNITY_2019_1_OR_NEWER
            SceneView.duringSceneGui += DrawButtons;
#else
            SceneView.onSceneGUIDelegate += DrawButtons;
#endif
        }