






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
A compilation of questions and answers related to the gmetrix unity certified user programmer exam. It covers fundamental concepts in c# programming within the unity engine, including variables, operators, methods, control flow, data structures like arrays, lists, and dictionaries, as well as object-oriented programming principles. The document also touches on key aspects of the unity interface, such as the hierarchy window, game view window, project window, and inspector window. It serves as a study guide for individuals preparing for the unity certification exam, offering insights into scripting, animation, and debugging within the unity environment. It also includes information about the use of public and private variables, animation parameters, and input methods.
Typology: Exams
1 / 11
This page cannot be seen from the preview
Don't miss anything!







Semicolon - Correct Answer-Every line of C# is called a statement and must end with a ______ to separate them for the code complier process public int myAge = 16; Variable - Correct Answer-a tiny section of your computer's memory that holds an assigned value. Every variable keeps track of where its information is stored (this is called a memory address), its value, and its type (for instance, numbers, words, or lists). Operators - Correct Answer-A symbol that tells the compiler to perform specific mathematical or logical manipulations. Methods - Correct Answer-can perform an operation and return the result. For instance, a _______ can add numbers, return the sum, and store the sum in a variable. Control-Flow - Correct Answer-One of the central duties of a computer is to control what happens when predetermined conditions are met. When you click on a folder, you expect it to open; when you type on a keyboard, you expect the text to mirror your keystrokes. Writing code for applications or games is no different - they both need to behave in a certain way in one state and in another when conditions change. Selection Statement - Correct Answer-The if-else and switch selection statements allow you to specify branching paths, based on one or more conditions, and the actions you want to be taken in each case. They include the following
Scale slider - Correct Answer-Allows you to zoom in and examine areas of the Game View Window in more detail. Stats button - Correct Answer-Toggles the statistics overlay containing rendering statistics about our game's audio and graphics to monitor the performance of our game while in play mode. What does the Gizmos button do? - Correct Answer-It enables the visibility of gizmos, used to give visual debugging or setup aids in the game view. Project window - Correct Answer-allows us to easily access and manage all our assets in our project. = operator - Correct Answer-Assigns the value of the right-hand operand to the object denoted by the left-hand operand. How is an operator null? - Correct Answer-If the variable does not use an assignment operator, such as =, then the variable is null.
- Correct Answer-Greater than < - Correct Answer-Less than = - Correct Answer-Greater than or equal to <= - Correct Answer-Less than or equal to
== - Correct Answer-Equal to != - Correct Answer-Not equal to ! - Correct Answer-Not && - Correct Answer-And II - Correct Answer-Or ++ (example i++) - Correct Answer-Increments by 1 -- (example i--) - Correct Answer-Decrements by 1 % - Correct Answer-Remainder, also known as Modulus Where can scripted variables be edited? - Correct Answer-They can edited in the Inspector window; however, the access modifiers must be declared as public for them to appear in the Inspector window (True or False) A variable is declared private. It appears in the inspector menu. - Correct Answer-False How is a private variable accessed locally? - Correct Answer-Within the PlayerController class.
Public - Correct Answer-The access modifier, access modifiers are applied to the declaration of a class, method, properties, fields, and other members. They define the accessibility of the class and its members. Public private, protected, and internal are access modifiers in C#. Void - Correct Answer-The return type; void is used where there is no data. For example, if a method does not return any value then you can specify void as a return type. MyMethod - Correct Answer-The method (function) name, followed by parenthesis with two parameters we pass, int and string are the parameter type and parameter1 and parameter2 are the parameters' name. How are Awake and Start similar? - Correct Answer-They're two of the first few functions called when a script is activated, only called once, and are used to initialize the script. Why would someone use the Awake function? - Correct Answer-They would use Awake to initialize a script using only itself and its game object Why would someone use the Start function? - Correct Answer-They would use Start to further initialize based upon values in other scripts. For example, say we have a PlayerScript and a ShieldScript OnEnable - Correct Answer-is like Awake and Start, but it is called every time the script is activated. This makes it an ideal place for subscriptions or other initialization done on each activation. If you put subscriptions in OnEnable and unsubscribe during OnDisable, you can avoid extra code execution on unused objects.
Why is Init seen as superior compared to the other methods? - Correct Answer- None of the other methods are called until the game object is activated. Input.GetButton - Correct Answer-Input.GetButtonDown, and Input.GetButtonUp are public static bools (true or false). Input.GetButton - Correct Answer-returns true when the button has been pressed, held down, and not released. It will return false when the button is released. Input.GetButtonDown - Correct Answer-returns true during the frame the user pressed down on the button. It will not return trueuntil the user has released the key and pressed it again. Input.GetButtonUp - Correct Answer-returns true during the frame the user releases the button. It will not return true until the user has pressed the button and released it again. Input.GetMouseButton(int button) - Correct Answer- Input.GetMouseButtonDown(int button);, and Input.GetMouseButtonUp(int button);, and work similarly to the Input.GetButton methods. They are public static bools (true or false). Input.GetMouseButton(int button) - Correct Answer-returns true while the given mouse button is pressed down and held down. Input.GetMouseButtonDown(int button) - Correct Answer-returns true during the frame the user pressed down the given mouse button.
Iterator - Correct Answer-Defines the incremental or decremental of the loop variable. What can Animator.SetBool be used for? - Correct Answer-To pass Boolean values to an Animator Controller via script. Random.Range - Correct Answer-Returns a random float number between and min [inclusive] and max [inclusive] What does _Color do? - Correct Answer-It sets a color to an object What is an example of a code bing used to set a color to an object? - Correct Answer-("_Color", Color.red); When is OnCollision called? - Correct Answer-Called when this collider/rigidbody has begun touching another rigidbody/collider. Incontrast to OnTriggerEnter. Is not a collider. When is OnCollisionStay called? - Correct Answer-Called once per frame for every collider/rigidbody that is touching rigidbody/collider. In contrast to OnTriggerStay. Is not a collider. When is OnCollisionExit called? - Correct Answer-Called when this collider/rigidbody has stopped touching another rigidbody/collider. In contrast to OnTrgiggerExit. Is not a collider. When/Where is OnTriggerEnter called? - Correct Answer-When a GameObject collides with another GameObject. It happens on the FixedUpdate function.
When is OnTriggerExit called? - Correct Answer-When the Collider other has stopped touching the trigger. When is OnTriggerStay called? - Correct Answer-Almost all the frames for every Collider other that is touching the trigger. The function is on the physics timer, so it won't necessarily run every frame. What is Transform.position? - Correct Answer-The Vector 3 position, the position of the GameObjects transform in world space. What is Vector3.zero? - Correct Answer-It's shorthand for Vector3(0, 0, 0) How do I rotate an object in code? - Correct Answer-Use Transform.Rotate How do I rotate using Euler angles? - Correct Answer-Using Transform.eulerAngles When using any variance of Input.GetMouseButton, what does 0 , 1 , and 2 mean?