I have a problem with custom editor, becouse my script dont recognize the main script.
using UnityEngine;
using UnityEditor;
using System.Collections;
[CustomEditor (typeof(audioReverbScript))]
public class audioReverbEditor : Editor
{
public enum presetNames
{
Off = 1,
Generic = 2,
PaddedCell = 3,
Room = 4,
Bathroom = 5,
Livingroom = 6
}
private int number;
private presetNames myPresetNameItemType = presetNames.Off;
public audioReverbScript script;
public void OnEnable()
{
script = (audioReverbScript) target;
}
public override void OnInspectorGUI()
{
GUI.changed=false;
myPresetNameItemType = (presetNames)EditorGUILayout.EnumPopup("Wybierz preset: ", myPresetNameItemType );
script.presetNumber=(int) myPresetNameItemType;
if(GUI.changed) EditorUtility.SetDirty(script);
}
}
And that’s the error
Assets/Plugins/Editor/audioReverbEditor.cs(23,16): error CS0246: The type or namespace name `audioReverbScript’ could not be found. Are you missing a using directive or an assembly reference?