-
-
Notifications
You must be signed in to change notification settings - Fork 144
Expand file tree
/
Copy pathRawScriptedImporterEditor.cs
More file actions
31 lines (26 loc) · 1.08 KB
/
Copy pathRawScriptedImporterEditor.cs
File metadata and controls
31 lines (26 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#if UNITY_2020_2_OR_NEWER
using UnityEditor;
using UnityEditor.AssetImporters;
namespace UnityVolumeRendering
{
[CustomEditor(typeof(RawScriptedImporter))]
public class RawScriptedImporterEditor : ScriptedImporterEditor
{
public override void OnInspectorGUI()
{
serializedObject.Update();
RawScriptedImporter importer = (RawScriptedImporter)target;
SerializedProperty dimension = serializedObject.FindProperty("dimension");
SerializedProperty dataFormat = serializedObject.FindProperty("dataFormat");
SerializedProperty endianness = serializedObject.FindProperty("endianness");
SerializedProperty bytesToSkip = serializedObject.FindProperty("bytesToSkip");
EditorGUILayout.PropertyField(dimension);
EditorGUILayout.PropertyField(dataFormat);
EditorGUILayout.PropertyField(endianness);
EditorGUILayout.PropertyField(bytesToSkip);
serializedObject.ApplyModifiedProperties();
ApplyRevertGUI();
}
}
}
#endif