- What does it mean to make a variable "public"? What is the benefit of doing this versus it being private? - Minimum 2 sentences
- Now knowing what a rigidbody is, what is an example of something in your "My Island" assignment from last semester that would not need a rigidbody component? What is something you would add to that Island Scene that would require a rigidbody component? - Minimum 2 sentences
- Define what a component is? What's an example of a component in one of your GameObjects? If you wanted to added a component to a GameObject, which part of the Unity screen would you go to? - Minimum 3 sentences
- When adding a vehicle GameObject to your Prototype 1 game tutorial, why would you need to add most of your scripting underneath the "Update" method rather than underneath the "Start" method (like we mostly did last semester)? - Minimum 1 sentence
- If you want to add speed to your vehicle, what kind of code needs to be added to convert your speed number to frames per second? - Minimum 1 sentence
- What are at least (2) rules you should follow when naming your scripts? - Minimum 2 sentences
To help get you ready for the Level 7 Quiz next Wednesday, answer the following questions:
87 Comments
Nicholas Kolling
1/16/2020 08:09:17 am
1. If a variable is public, you can change it in the Inspector Window. When a variable is private, you can only change it in the code.
Reply
James Wibowo
1/16/2020 08:10:57 am
1) When a variable is set to public, the value of that variable can be edited through MVS and Unity through the inspector window. When it's set to private, it can only be edited through MVS.
Reply
Kaylie Ruffner
1/16/2020 08:12:57 am
1) If a variable is public, then you could change it on the unity side. If it is private, then you could only make changes in the code itself.
Reply
Khristopher
1/16/2020 08:13:35 am
1. To make a variable public it means that it shows up in the inspector window. The benefit to doing this is that you can adjust that variable to whatever you want right from Unity. If it were private you would have to adjust it through a script.
Reply
Tanner Braun
1/16/2020 08:14:33 am
1)To make a variable public allows it to be changed outside of the script. Private doesn't allow you to change it outside of the script.
Reply
Ryan Anderson
1/16/2020 08:15:23 am
1. Making a variable public allows you to change the number or component to what ever you want. You can also change it while testing your game.
Reply
Rebecca Horvatich
1/16/2020 08:15:41 am
1. To make a variable public means that the variable can be seen by all. The benefit of making the variable private is that only the creator is able to see the variable in the script and only the creator is able to make changes to it.
Reply
Anabelle Casavilla
1/16/2020 08:15:46 am
1. To make a variable public means it shows up on unity to change or add a number. On private, the option to publicly change the number or name is unavailable.
Reply
Trenton Hickman
1/16/2020 08:15:53 am
1. Public allows you to edit a variable in Unity. Private only allows you to edit it through the code.
Reply
Michael Parker
1/16/2020 08:16:06 am
1. Public means that anyone can use it. Private means there are some restrictions on it.
Reply
Daniel Warren
1/16/2020 08:16:15 am
If it is public you can change it thru the hieracrhy window. It also makes it easier to get to. Railing on a bridge would require a rigid body so you don't walk thru it. Also your house would require a rigid body. A component is something that is required in the game. The boxes are a component in prototype 1. You would go to the assets. 4. You need to add it to update because the game would need to update everything your doing like driving it wouldn't work in the start menu. 5. You need a vector3 to add speed because it has to know its a 3D object. 6. Make sure capitals are right.
Reply
Jack Channell
1/16/2020 08:16:33 am
1. It allows the player/designer to change a variable in game rather than going into the script. This allows them to save time by not having to go back and forth from the engine to the script.
Reply
Mohammed Raza
1/16/2020 08:16:43 am
1. Making a variable public means that it can be edited by the game player. Making it public makes it much easier to change the variable rather then when it is private. When private, you have to go to the script but when public you can change it directly from Unity.
Reply
Michelle Thongchine
1/16/2020 08:16:50 am
1. The purpose of making a variable "public" is so that the values can be changed in the inspector window. Making the variable "private" limits the creativity from the player, as it makes the value set at a specific number, to be left unchanged.
Reply
Puneet Parmar
1/16/2020 08:16:59 am
By Making a variable public we can see the variable in the inspector window
Reply
Jenny Vang
1/16/2020 08:17:05 am
1.) Making it public lets you see it in the inspector area where the player is able to change it.
Reply
Alec De Leon
1/16/2020 08:17:21 am
1. A public variable is a variable that can be changed by the player/ seen in the inspector window. Making a public variable makes it easier to access whereas a private variable can only be changed in the code.
Reply
Amy Zhang
1/16/2020 08:18:30 am
1. Making a variable "public" means that you can see that variable in Inspector instead of only in the script. This is beneficial compared to making a variable private because then you can move the variable around in Unity and be able to see it when making placement changes to the variable.
Reply
Zachary Tierney
1/16/2020 08:19:13 am
1. Well when you make it public you can see it in the inspector channel and can easily just change it without having to go back on the script and fix your speed or name. Like I said if you had it private you have to go back on the script to fix the name or speed but with public its just on the inspector and its easily faster.
Reply
Ryan Theo
1/16/2020 08:19:18 am
1. Making a variable public has the option to change it while in the game. Private is to only change it when inside the script.
Reply
Max Alonzo
1/16/2020 08:19:32 am
1. Public means visible to all classes and private means visible to only a certain class.
Reply
Sharon Lu
1/16/2020 08:19:37 am
1. Making a variable public means you're making it show up on your script so you can change it anytime. When you make a variable private only you can see it in the script.
Reply
Matthew Torres
1/16/2020 08:19:59 am
1. When you make a variable public it means you can change it from the inspector window in your project. The benefit of making it public instead of making it private is you can change things easier. If it's public you can change things while you are in the scene view. But if its private then you have to change it in your code.
Reply
Valerie Koontz
1/16/2020 08:20:05 am
1. To make variable public someone can mess around with it on unitys side. The benefit for doing this private is no one but the coder is able to play around with it.
Reply
Melissa Bryan
1/16/2020 08:20:51 am
1) That the player can change these settings to their liking. The benefit of it being private means they cant change the settings its already at
Reply
Makayla Vazquez
1/16/2020 08:22:13 am
1.) When you make a variable public you can change it in one of the windows in your project.Some benefits are you don't have to go back to your script. Another benefits it makes everything so much easier.
Reply
Joshua Su
1/16/2020 08:33:51 am
1. A public variable is able to be viewed and edited from the object window. The private variable is only able to be viewed and edited in the script.
Reply
Mike Klump
1/16/2020 08:35:02 am
1. Its easier to do in public. And it does more. 2. An example of "My Island" that isn't in need of a rigidbody component is probably the camera. I thought that was necessary for that question. 3. A component is something like a c# script that will do something for the object its attached to. And you would do this by going to the inspector window of an object. Again you're most-likely adding a script component if you're ever doing that. 4. It's probably so it can do something else to the scripts other than what the start method can not do. 5."TimeDeltatime" line of code. 6. One rule is to mostly put a after a line, ;. And another one is to have no errors or it won't work.
Reply
Cherydin Green
1/16/2020 09:26:00 am
when it's public people can change the speed or settings. when its private only you can change the speed or settings and no one else.
Reply
Ashton Herrera
1/16/2020 11:27:41 am
1. Making a variable public means you can change it in Unity, vs. having to change it in the script
Reply
c@iden
1/16/2020 11:30:15 am
1. it means the variable can be altered by the player. if its not public then it can only be changed in the code.
Reply
Neil Chen
1/16/2020 11:30:32 am
1. When you make a variable public, then you are able to change the variable in the inspector window. The benefit of using a private variable is if you are trying to find the perfect speed, then you can change it without having to go into the script to change the speed.
Reply
Ely Ruiz
1/16/2020 11:31:28 am
1. The benefit to making a variable is making its value easily interchangable. For example if the var is for speed you can easily adjust it in the Inspector.
Reply
Braden King
1/16/2020 11:31:42 am
1. You can change the variable in game.
Reply
1/16/2020 11:31:50 am
1. public means you can change the number or text in the unity ui. Private means it is a static number or line of text that is only depicted within the code block.
Reply
Ben Morales
1/16/2020 11:33:13 am
1. Making a variable public means that it can be edited in the Unity interface. If it's private, it can only be modified in the script.
Reply
Garen Ozkochian
1/16/2020 11:33:32 am
1.To make a variable public means that you can change it whenever you want in unity and the private is that you should go to the coding and change it from there the public variable makes things faster.
Reply
Jules Dachino
1/16/2020 11:33:40 am
1 - A public variable means the variable will be displayed in Unity. It benefits to use public variables as it can be changed either in the main view or during the gameplay to test different things.
Reply
Jaerik M.
1/16/2020 11:33:51 am
1. When you make a variable "public", you're basically allowing a variable to be accessed to the player in Unity to edit, making it easy to change the variables. If you make it private, it can only be edited in the script, making it to where you have to keep the script open all the time to edit the variable.
Reply
Camille Hill
1/16/2020 11:34:00 am
1. When a variable is public, it is able to be seen on the game and when it is private, it is only visible on the script
Reply
Cole Flaugher
1/16/2020 11:34:06 am
1. When a variable is public, it means that it can be edited in unity. Differing from 'private' because private can only be edited in the code itself.
Reply
Antonio Alfaro
1/16/2020 11:34:11 am
1. it means you can edit and see it through unity. It also has the benefit of not letting you accidentally make a mistake with it.
Reply
Frank Farrugia
1/16/2020 11:36:05 am
1. When a variable is public, you can see it in the inspector window. In private you can't see it there.
Reply
Victor Hernandez
1/16/2020 11:36:26 am
1.Make a variable public means to making the variable visible to all classes.
Reply
Jonathan Waddell
1/16/2020 11:36:32 am
1. When you make a variable public you can change it in the hierarchy window. when you have it as private you have to change it in the code.
Reply
Alex
1/16/2020 11:36:46 am
1) Making a variable public means that it can be accessed within unity. This is done without editing the code itself.
Reply
Jason Barela
1/16/2020 11:37:11 am
1) A public variable is a variable that allows the player to change it. A private variable is locked and the player has no control over it.
Reply
francene matining
1/16/2020 11:37:28 am
1. to make variable public is to make the variable shown
Reply
Seamus Terry
1/16/2020 11:37:55 am
1. Public means variables can be changed in the inspector window. Private makes variables accessible only in the script.
Reply
Jonathan Sanchez
1/16/2020 11:38:02 am
1. By setting the code to be public in the script, it enables you to change it without going into the script. This can be extremely beneficial to find the most accurate input for the game.
Reply
Angelina Tetreault
1/16/2020 11:39:04 am
1. To make a variable public means it can be changed through unity not just through changing the scripting. A variable being private cause you having to go into your scripting and change it if the variable is wrong so instead you could make it public and just change it through there and it would not cause as much time loss and effort.
Reply
Brian Wilde
1/16/2020 11:39:13 am
1. Making a variable public makes it able to be adjusted while in unity. When in private the script itself has to be changed and adjusted in order to make the changes that was required.
Reply
Kylin Bilderain
1/16/2020 11:39:37 am
1. It means that is can be changed by whoever is on Unity without looking at the script. All they have to do is look in the inspector window.
Reply
Jun Gallego
1/16/2020 11:40:05 am
1.Public means that anything anywhere has direct access to whatever it is. Private means only members of this class (and by extension, its children) have access to it. Protected means only this class, its friends, and its children have access.
Reply
Mykael Byrant
1/16/2020 11:40:51 am
1. To make a variable public it means the player is allowed to put in what they want. If a player is making there name it is better because you dont have to go and create the name for them.
Reply
John Banzon
1/16/2020 11:41:02 am
1. What it means for a variable to be public is that is that the script with the variable is visible and can be changed when ran in Unity. The benefit for this is that you can easily change the value of the variable quicker than going back in your script and changing it there. It also can be useful because the player can adjust or change something within that game unlike private.
Reply
Jessica Barreto
1/16/2020 11:42:52 am
1. The difference between a public variable and a private variable is that the player can change the variable if its public. If it was private, the player couldn't see the variable and couldn't make changes to it.
Reply
Trenton Mcclure
1/16/2020 11:47:29 am
1: you can see it in game
Reply
Brandon Ilori
1/16/2020 11:54:44 am
Making a variable "public" means that you can change the variable in the hierarchy window. The benefit of doing this besides it being private is that you don't have to go into your code to change the variable. Something in my "My Island" assignment that does not need a rigidbody component is the terrain. Something that I would add to that Island Scene that would require a rigidbody component is boxes, vehicles, planes, etc. A component is something that can be added to an object. An example of a component is a rigidbody. If you wanted to add a component to a GameObject, you would go to the Inspector Window. I would need to add most of our scripting underneath the "Update" method rather than underneath the "Start" method is because the movement of the car has to be updated at frames per second. The code needed to be added to convert your speed number to frames per second is Vector 3. Two rules to follow when naming your scripts is to make sure you do not space out the words. And you should not change the name in the script.
Reply
Giovanni Santos
1/16/2020 02:02:37 pm
1.making it public makes it visible to the person playing the game. making it private only the creator can change and see.
Reply
Raymond Liu
1/16/2020 02:02:55 pm
1. It means that the player can change the value in Unity. Private can be good when you don't want people to change anything.
Reply
Jayden Zhang
1/16/2020 02:04:11 pm
1. To make a variable public means that it can be changed by anyone and not just the coder, and the benefit of this is so you wont have to go back into the code to change the variable because now that its public it can be changed from your inspector window.
Reply
Emry Gurule
1/16/2020 02:04:56 pm
1) It can be managed in the view.Private needs to be edited through script.
Reply
Aanchal
1/16/2020 02:05:29 pm
1. When you make a variable private you are making it so that you can't change anything from the unity side and only from your side. This is so that you can control for example the speed chosen for a ball.
Reply
Aidan Hsu
1/16/2020 02:05:54 pm
1. A public variable can be edited in the inspector window. This is useful for quick edits to the variable.
Reply
Joseph Hunter
1/16/2020 02:06:12 pm
If it is public you can change the settings of the object through unity. If its private you have to change it in visual studio.
Reply
Arnav
1/16/2020 02:07:32 pm
1. It means that the variable can be changed. In private you can keep your own speed.
Reply
Jaylen Williams
1/16/2020 02:07:39 pm
1. If the variable is public it will appear in the inspector. it will also be change able from there.
Reply
Abhinay
1/16/2020 02:07:56 pm
1. To make a variable public means to make it changeable in unity. If a variable was private that means you couldn't change it in game
Reply
Enrique Wicochea
1/16/2020 02:09:05 pm
Public means you can edit it in the inspector window. If it is private you can only edit it in its code.
Reply
Zac
1/16/2020 02:10:53 pm
making a variable public makes it so you can see it in your inspector window. it also lets you edit it freely. something that would not need a ridged body component would be a house or a light post. something that would need a Ridged body component would be the player and the boat or water. a component is something you add to a game object. like a script or a ridged body. because start is only for a single motion and update updates a frame every millisecond for a more powerful coding game. A vector3 code would need to be added to put speed to a game object. There needs to be capital letters for both words in your scripts title and you cant have spaces in between the words.
Reply
Jeremy Toribio
1/16/2020 02:10:58 pm
1. when you make it public itsmakes it where everyone could see it
Reply
Jacob King
1/16/2020 02:11:30 pm
1.When you make something public that means you can see it inspector. One of the things that's good with that is that you don't have to switch to your script to save something then have to save it and go back.So it's easier and is quicker.
Reply
Elijah Pallay
1/16/2020 02:11:55 pm
1. To make a variable public, means we can see and manipulate the variable in the Inspector window. If private, the variable can only be accessed from the script.
Reply
curtis sanders
1/16/2020 02:12:13 pm
1.that the person can see the variable and change it in the inspector the benefit is you being able to change the variable faster or to your liking.
Reply
ANGE'L
1/16/2020 02:12:48 pm
To make a variable public it means that your able to see it. In the console I think you should see it. I would add rocks and objects on the road. An component is for a certain game object to move. Components help the objects function. Scripts are even a component. You need it under Update because you want the game to start when you move and stuff . For your speed you need '' public float speed = 20;''. Make sure there are no spaces when you make a script. Make sure that The name of your script is the same as the me of the public class.
Reply
Terry Zhang
1/16/2020 02:14:46 pm
1.) Making a variable public means that we can see the variables in the inspector window. You can edit the variables in the inspector. it is easier to change the number in unity than going to visual studios and change it there every time.
Reply
Yannick
1/16/2020 02:15:05 pm
1. when a variable is public, then you can edit it in unity. It is easier to change the number in unity than to constantly have to go to visual studios every time.
Reply
sam Sexton
1/16/2020 02:16:09 pm
1. making a variable public means that you can see it in unity when its attached to an object in the hierarchy, I believe, and your able to edit it from unity instead of having to go into the code. this is more beneficial as it gives you ease of access and makes a lot of processes a lot faster.
Reply
Mia Cieslak
1/16/2020 02:28:01 pm
1. When a variable is made public, it can be edited in Unity. This makes it easier to edit the variable, instead of opening the code to edit and saving every time you want to change a number.
Reply
Esteban Marquez
1/16/2020 02:28:31 pm
1. When a variable is public it means that are able to add specific name or anything to fit your story line for your code. Or you can make it public so whoever want to change names and things they are able to do those things.
Reply
Jozelynn Sandoval
1/16/2020 02:32:55 pm
NO.1-To make a variable public means you can manually change what number or words go into the program from unity and can change it anytime from in your inspector! While if its private you can change it unless you were to go into the code to change it, otherwise its a set variable and cant change it in the inspector.
Reply
Quinlan
1/16/2020 05:53:41 pm
1. Making a variable public will allow you to change its value from within the Unity editor. This is useful for when you want to experiment with different values. (ex. speed) With private variables, you have to go into the code to change the value.
Reply
Lucky Shipp
1/27/2020 08:17:12 am
1. Cause if you do it in public you can edit it in Unity
Reply
Mikey Rojo
2/2/2020 10:47:34 pm
1. changing a variable to public will allow you to change any values for the variable within the Unity engine making it easier to change. If the variable were private, to change it you would have to open the script and change it from there.
Reply
Allison Hernandez
2/3/2020 10:48:35 am
1) To make a variable public is to be able to see it in the inspector window. So if the creator needs to make quick changes then they are able to do so.
Reply
Samuel natividad
2/12/2020 08:11:23 am
1) When a variable is set to public, the value of that variable can be edited through MVS and Unity through the inspector window. When it's set to private, it can only be edited through MVS.
Reply
Your comment will be posted after it is approved.
Leave a Reply. |
Daily BoOT Ups (Video Game Design I)Directions: Archives
March 2020
Categories |