Moving a inspector slider to add objects to the scene

So I have this line of code

[Range(0, 10)] [Tooltip("How many of the Enemy do you want to spawn")] public int Amount;

and what I want now is the ability for this slider to also show me, in the scene, the spawn points of the enemies. Basically, if I slide the slider to 1, I want to show me one object. If I slide the slider to 5, I want it to show me 5 objects.

An example of exactly of what I mean is below


I want to know how to script it correctly so I can get that result.

Ok, so… this is complicated but it’s possible. Brackeys has a video on this exact topic and he explains it perfectly (And it’s still up to date) Here it is: [Brackeys Video][1]

[1]: How to make a CUSTOM INSPECTOR in Unity - YouTube And when you watch the video, create an integer with a [Range(X, Y)] above it. This will make it a slider that you can drag. After that, have an update method that constantly checks if the integer is changed, and if so, spawn more of the same object. If you have any more questions let me know