How to add a editing option to variables in a script in Inspector?
Hi, I got Unity just today, so I apologise for not knowing the correct terms for anything or if this is something simple to work out. I'm working through tutorials trying to make a simple 2D Scene, I've been trying to add a 'player controller' script to my game object of "Player". I'm using the 'PlayerPlatformerController' from
I've created a C# script in Assets, then pasted the script into it with Notepad with the name of 'playercontrol'. I then dragged this into my GameObject labelled 'Player', and I can see it under the 'Transform' component in the Inspector. While it's there, I've seen in tutorials that people are able to edit the attributes in the script, like 'maxspeed' being 7, in the inspector, rather than having to edit the C# itself. It had the C# icon, with a ticked box, with 'Playercontrol (Script)'. Underneath it says 'Script' then the same icon with 'playercontrol' next to it. Both of these words underneath are slightly faded.
So essentially I'd like to be able to edit the variables for a script in the Inspector, but these aren't appearing and as far as I can tell the only way to change them is to manually change the C# from Notepad. Again, apologies for the poor wording and if this is something easy to fix, I'm not a beginner to programming but this is the first time I've used Unity or C#. Let me know if you know how to sort this out, or if you want me to reword something I'll be happy to. Thank for the help!
Edit: I've done a little research, and as far as I can tell it has something to do with the Object not being made public. I've got a grasp on OOP, so don't be afraid to get a little more technical about this with me. Thanks again!
Your answer
Follow this Question
Related Questions
Issues using two scripts. 1 Answer
level manger and starting scene will not work together 0 Answers
Error CS1525: Unexpected symbol 'void' 1 Answer
Can somebody help me fix this script? 2 Answers
Copy Rotation in script C# 1 Answer