inspector isnt showing scripts

i have little problem with unity

Iam new to unity so it could be obvious. As you can see in the picture i cant see or change the variables in the script even though they are public.
Please Help.

Thank you in advance


Your variables aren’t public. You have specified no access modifier, which means they are internal (should be private) by default. Explicitly declare them as public.
Also, better use float instead of double, as floats are used everywhere in Unity while doubles aren’t.

That’s because your variables are non public (private)
To make a field visible in the inspector, it has to play nice with Unity’s serialization. So you either do:

public Transform Target;
public double Distance = -10;
public double lift = 1.5;

But it’s a bad habit to make all fields public, unless you know what you’re doing. However; making them private will tell unity not to serialize them unless you markup with [SerializeField], so:

private Transform Target;
private double Distance = -10;
private double lift = 1.5;

Keep in mind, something being visible in the inspector is a side effect to serialization. Which means, if something doesn’t serialize, it won’t show up in the inspector.

Edit: as suggested above by @JasperFlick, use floats instead of doubles.