Why wont my Headers and Spaces show up in the inspector

This is my script:

using UnityEngine;
using System.Collections;

public enum WeaponType
{
    sword,
    axe,
    whip,
    staff,
    fist,
    bow,
    mace,
    polearm,
}

[System.Serializable]
public class baseCharacterClass : ScriptableObject
{
    public string className;
    public string classDescription;
    [Space(10)]
    [Header("Class specific stat bonuses that get added to the base stats")]
    public int healthBonus;
    public int vigorBonus;
    public int magicBonus;
    public int dexterityBonus;
    public int luckBonus;
    [Space(10)]
    [Header("The amount of time a character with this specific class can move")]
    public int move;
    [Space(10)]
    [Header("Helps determine what stats increase upon leveling up")]
    public int healthGrowthRate;
    public int vigorGrowthRate;
    public int magicGrowthRate;
    public int dexterityGrowthRate;
    public int luckGrowthRate;
    [Space(10)]
    [Header("Determines class armor type")]
    public float physicalArmorRating;
    public float magicArmorRating;
    public float specialArmorRating;
    [Space(10)]
    [Header("Determines class Weapon specialty")]
    public WeaponType weaponType;
    public WeaponType classAdvantage;
    public WeaponType classWeakness;
    [Space(10)]
    [Header("The max distance between the character and target when interacting")]
    public int range;
    [Space(10)]
    [Header("Potential Class Upgrades")]
    public ScriptableObject[] nextClass;
}

This is what it looks like in the inspector:
2860525--209290--Capture.PNG

I have tried restarting Unity and I don’t have any compilation errors.
Any help would be greatly appreciated.

Is there an editor script associated with this class?

Why does that inspector screenshot have no script reference?

I am not quite sure what you mean. Might help if you could be more descriptive.

In your screenshot, the top field “Script” is set to “None”. That seems strange. It should have a reference to the script that created it. You also don’t have an asset menu creation attribute for your class, how are you making your ScriptableObject instances?

I am creating the instances thorough another script. I had everything set up correctly and my problem was visual studio. I am not sure why visual studio glitched but everything started working after I restarted it.

1 Like

It may be quite old case, but I ran in to the same issue and found out why all of that happen.

the problem for me that I’ve refactor the name of my class inside the IDE only, and it doesn’t match with the name of the script inside the editor .

So when I “recreated the class with correct name” it works fine bec renaming the class inside the editor manually didnt fix this for me.

so it could be a possible solution to anyone.

Hello all!
In my case, i just turned from “debug mode” to normal in inspector, and space worked! 8163257--1061750--upload_2022-5-28_14-34-42.png

1 Like

Yes, this is a common mistake. The debug mode disables all custom inspectors or decorator drawers. You should only briefly switch to debug mode. it can have other issues as well. Maybe it would make sense to not ever switch to debug mode but open a second inspector window and switch that to debug mode.