Beispiel #1
0
        private void ReportUnityVersionError()
        {
            string error = SuperTiled2Unity_Config.GetVersionError();

            ReportError(error);
            Debug.LogError(error);
        }
Beispiel #2
0
        public override void OnInspectorGUI()
        {
#if UNITY_2018_3_OR_NEWER
            if (GUILayout.Button("Open SuperTiled2Unity Project Settings"))
            {
                SettingsService.OpenProjectSettings(ST2USettings.ProjectSettingsPath);
            }
#else
            string error = SuperTiled2Unity_Config.GetVersionError();
            EditorGUILayout.HelpBox(error, MessageType.Error);
#endif
        }
Beispiel #3
0
        internal static ST2USettings GetOrCreateST2USettings()
        {
            var settings = AssetDatabaseEx.LoadFirstAssetByFilterAndExtension <ST2USettings>("t: ST2USettings", "asset");

            if (settings == null)
            {
                // This shouldn't often happen but we need settings in case they get deleted on us
                settings = SuperTiled2Unity_Config.CreateDefaultSettings();
            }

            return(settings);
        }
        internal static ST2USettings GetOrCreateST2USettings()
        {
            var settings = AssetDatabaseEx.LoadFirstAssetByFilterAndExtension <ST2USettings>("t: ST2USettings", "asset");

            if (settings == null)
            {
                // This should only happen when we are first installing SuperTiled2Unity
                // However, should our settings be deleted we would like them to be recreated
                settings = SuperTiled2Unity_Config.CreateDefaultSettings();
            }

            return(settings);
        }
        public override void OnInspectorGUI()
        {
#if UNITY_2018_3_OR_NEWER
            EditorGUILayout.HelpBox("SuperTiled2Unity Settings have been moved to Project Settings. You can delete this asset.", MessageType.Warning);
            if (GUILayout.Button("Open SuperTiled2Unity Project Settings"))
            {
                SettingsService.OpenProjectSettings(ST2USettings.ProjectSettingsPath);
            }
#else
            string error = SuperTiled2Unity_Config.GetVersionError();
            EditorGUILayout.HelpBox(error, MessageType.Error);
#endif
        }