Files
AR-Menu/Library/PackageCache/com.unity.cloud.ktx@77813424dbfd/Editor/Scripts/KtxImporterEditor.cs
2025-11-30 08:35:03 +02:00

39 lines
992 B
C#

// SPDX-FileCopyrightText: 2023 Unity Technologies and the KTX for Unity authors
// SPDX-License-Identifier: Apache-2.0
using UnityEditor;
#if UNITY_2020_2_OR_NEWER
using UnityEditor.AssetImporters;
#else
using UnityEditor.Experimental.AssetImporters;
#endif
namespace KtxUnity.Editor
{
[CustomEditor(typeof(KtxImporter))]
class KtxImporterEditor : ScriptedImporterEditor
{
SerializedProperty m_ReportItems;
public override void OnEnable()
{
base.OnEnable();
m_ReportItems = serializedObject.FindProperty("reportItems");
}
public override void OnInspectorGUI()
{
DrawDefaultInspector();
var reportItemCount = m_ReportItems.arraySize;
for (int i = 0; i < reportItemCount; i++)
{
EditorGUILayout.HelpBox(m_ReportItems.GetArrayElementAtIndex(i).stringValue, MessageType.Error);
}
ApplyRevertGUI();
}
}
}