[SOLVED] Custom editor can't acces to variables of a scriptable object

Hi guys !
I encounter a problem while scripting a custom editor for my scriptables objects.
I’m pretty new in that domain so please be gentle.
when i declare : [CustomEditor(typeof(Fish))] => Fish is the name of my scriptable object
i’ve got the error : missing assemble reference.
but when i write :

public override void OnInspectorGUI()
    {
        base.OnInspectorGUI();
     
        EditorGUILayout.HelpBox("Test", MessageType.Info);

    }

The base inspector and the helpox is shown so i trust it is recognized and i can add more ediots options.
But if i try to access a avariable from scriptable object it can’t found it.

public override void OnInspectorGUI()
    {
        var fish = target as Fish;
        //base.OnInspectorGUI();
        var nameLabel = target.nameLabel;
        EditorGUILayout.HelpBox("Test", MessageType.Info);
    }

I can use the serializedObject.FindProperty(); but after i can’t modify the values with the fields.

The script of the scriptable object is pretty simple :

using UnityEngine;

[CreateAssetMenu(fileName = "Fish", menuName = "Game/Fish", order = 0)]
[System.Serializable]
public class Fish : ScriptableObject
{
    public string nameLabel = null;
    [Header("Inclusive")]
    public int minScoreValue = 0;
    [Header("Exclusive")]
    public int maxScoreValue = 0;
    public AudioClip audioClip;
    public int percentageOfSpawn = 0;
    [Range(0, 100)]
    public float speedMovement;

    public int ScoreToAdd()
    {
        int score = Random.Range(minScoreValue, maxScoreValue);
        return score;
    }
}

If anyone have an idea, thanks for help :slight_smile:

After searching for a while and thanks to @bunny83 the problemn was with the assembly definition file.

The scriptable object was driven by : assembly-csharp.dll
And the editor was driven by : assembly-csharp-editor.dll

In the assemble-csharp, it was no reference to csharp-editor, so it woul’dnt recognize the type.