WorksheetsUnity quiz
Total questions: 21
Worksheet time: 13mins
This game engine use C# as a programming language combine with visual scripting, and making better environment and terrain become more realistic using post processing and real time lightinng
Unreal Engine
Game maker studio2
Unity
Pygame Engine
The green square around the pillars light illustrate
Mesh renderer
Box collider
Mesh collider
Box renderer
Which of the following type of games is most common using unity game engine
3d side scrolling
3d first person / 3d third person
2d top down view
4d dimensional view
Which of the following picture is shown below, using unity engine(specificallly)
Terrain
Map and island
Mesh terrain
Terrain collider
This is a short form of UNIVERSAL RENERING PIPELINE, or known as a prebuilt Scriptable Render Pipeline, made by Unity. which provides artist-friendly workflows that let you quickly and easily create optimized graphics across a range of platforms.
Unity HDRP
Unity real time lightning
Unity URP
Post processing
Since this object is tagged as a optimizer which is falling to the ground when tagged "isGrounded" and make sound. Which of the following tools help this object fall
Optimizing
Terrain features
"isGrounded" tag
Rigidbody
Which of the following does the following picture shown>?
GUI
UI
Radiobuttons
Dropdownlist
This is an example of point of contact between humans and computers. Any technology you interact with as a user is part of the user interface. For example, screens, sounds, overall style, and responsiveness are all elements
UI
GUI
GUIDE
Scripting
How would you say printing command which shows
"Hello my friend" is the console tab in unity
Debug.Log("Hello my friend");
Console.WriteLine("Hello my friend)
cin<<"Hello my friend">>
io.write("Hello my friend")
This tab on the unity screen is called a
Inspector
Console
Scene view
Hierarchy
Which of the following type of lightning is used on this unity lightning platform ("The celing light")
Baked point light
Spot light
Volumetric lightning
Directional lightning, and filter using post processing
using UnityEngine;
using UnityEngine.AudioSource;
using UnityEngine.UI;
using UnityEngine.GetComponent;
using UnityEngine.AudioClip;
public class Audio : MonoBehaviour
{
public AudioClip audioClip;
public keyCode triggerkey = KeyCode.E;
private AudioSource audioSource;
private void Start()
{
audioSource = GetComponent<AudioSource>();
audioSource.clip = audioClip;
}
private void OnTriggerEnter(Collider other)
{
BoxCollider boxCollider = other.GetComponent<BocCollider>();
if (boxCollider != null && boxCollider.isTrigger && Input.GetKeyDown(triggerkey))
{
}
}
}
Which of the following unity C# script shown below?
Object interaction
Audio playing script
When object is dropping and is tagg ground, the audio will play
Car physics, when crashing, the collider remove
Open the Timeline window by going to Window -> Timeline.
Create a new timeline by clicking on the Create button in the Timeline window.
In the Timeline window, you will see the timeline tracks at the bottom. You can add tracks by right-clicking and selecting the track type you want to add. For example, you can add an Animation track to animate a GameObject or a Audio track to play audio.
After adding the tracks, you can add clips to the tracks by dragging and dropping assets from the Project window onto the timeline.
Once you have added clips, you can adjust the timing and duration of the clips by dragging the edges of the clips.
You can preview the timeline by pressing the Play button in the Timeline window.
To activate the timeline in your scene, you can create a Timeline GameObject by going to GameObject -> Timeline. Assign the created timeline to the Timeline property of the Timeline GameObject.
You can also control the timeline playback through scripting by accessing the timeline's PlayableDirector component.
How to make an animation in unity using visual scripting
How to make a basic timeline using sequencing
How to make a collide physics using timeline
How to make a arrow shooting object using animation
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.AI;
public class AI : MonoBehaviour
{
public float detectionRadius = 10f;
public float followSpeed = 1.8f;
private NavMeshAgent agent;
private Transform playerTransform;
void Start()
{
agent = GetComponent<NavMeshAgent>();
}
void Update()
{
Collider[] hitColliders = Physics.OverlapSphere(transform.position, detectionRadius);
foreach (Collider hitCollider in hitColliders)
{
if (hitCollider.gameObject.CompareTag("Player"))
{
playerTransform = hitCollider.gameObject.transform;
break;
}
}
if (playerTransform != null)
{
agent.SetDestination(playerTransform.position);
agent.speed = followSpeed;
}
void SetRandomDestination()
{
Vector3 randomDirection = Random.insideUnitSphere * walkRadius;
randomDirection += transform.position;
NavMeshHit navHit;
NavMesh.SamplePosition(randomDirection, out navHit, walkRadius, -1);
targetDestination = navHit.position;
agent.SetDestination(targetDestination);
agent.speed = walkSpeed;
}
}
Which of the following C# scripting illustrate
Navmesh AI obselette following player when the player is tagged player, when player is outside the radius, AI will not follow a player
Navmesh AI walking in a random direction with the speed of 10f
Navmesh AI walking in a random direction until it hit the collider. After hitting, the AI will begin following player
Player is taged player and AI will not follow player until the player is hitting a box collider and this will trigger AI object to follow the player
using UnityEngine;
public class KeyPuzzle : MonoBehaviour
{
public GameObject keyObject;
public GameObject doorObject;
public AudioClip unlockSound;
public KeyCode pickupKey = KeyCode.E;
public KeyCode useKey = KeyCode.E;
private bool hasKey = false;
void Update()
{
if (!hasKey && Input.GetKeyDown(pickupKey))
{
Debug.Log("Player picked up key.");
Destroy(keyObject);
hasKey = true;
}
if (hasKey && Input.GetKeyDown(useKey))
{
Debug.Log("Player used key on door.");
doorObject.SetActive(false);
________________15________________
}
}
}
(a)
During the universe university second field trip, fatman knock out bus driver and he began to drive. Everyone was planned to go to the mountains, but fatman drove to the wrong way. He drove into the dark forest where there is no one there and stop at a mansion there is one old women there. Fatman stop quickly! and tell the students to go inside. and that old women look up to everyone with the needle and fabric clothes on her hand. Suggest what she will do next
Make fatman becime Freecerser
Making everyone become a small doll
Serving tea and sweets for everyone
Talk to everyone and guide them around their village
Making fabric(high) quality clothes for everyone
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ObjAppear : MonoBehaviour
{
private void OnTriggerEnter(Collider other)
{
if (other.CompareTag("Player"))
{
Destroy(gameObject);
}
}
}
Destroying game object when player step on the collider
making object reappear when player is stepping on the mesh collider
Timeline player when player is in the trigger box collider
Audio enable when player is in the collider other area
graphical way to manipulate objects and behaviors in Unity without writing code from scratch. The logic is built by connecting visual nodes together, empowering artists, designers, and programmers to create gameplay and interactive systems in a simple way.
Blueprint scripting in unity
Node js scripting
Visual scripting
material arrangement in unity
We use (a) to make trees falls down when cutting trees animation. This make your project more realistic
What is the correct way to make tkinter root frame (original frame) using python?
a
b
c
d
EXTRA QUESTION:
using UnityEngine;
using UnityEngine.AI;
using UnityEngine.UI;
using UnityEngine.GetComponent;
public class ObjectInteraction : MonoBehaviour
{
public KeyCode pickupKey = KeyCode.F;
public KeyCode moveKey = KeyCode.E;
public float moveDistance = 2f;
private bool isHoldingObject = false;
private GameObject heldObject;
void Update()
{
if (Input.GetKeyDown(pickupKey) && !isHoldingObject)
{
Collider[] hitColliders = Physics.OverlapSphere(transform.position, 2f);
foreach (var hitCollider in hitColliders)
{
if (hitCollider.CompareTag("Moveable"))
{
Debug.Log("Player picked up object.");
isHoldingObject = true;
heldObject = hitCollider.gameObject;
break;
}
}
}
if (Input.GetKeyDown(moveKey) && isHoldingObject)
{
Debug.Log("Player moved object.");
heldObject.transform.position += transform.forward * moveDistance;
isHoldingObject = false;
heldObject = null;
}
}
void OnDrawGizmosSelected()
{
Gizmos.color = Color.yellow;
Gizmos.DrawWireSphere(transform.position, 2f);
}
}
ANOTHER ONE
using UnityEngine;
public class ObjectBreak : MonoBehaviour
{
public int hitsToBreak = 3;
private int currentHits = 0;
void OnMouseDown()
{
currentHits++;
if (currentHits >= hitsToBreak)
{
BreakObject();
}
}
void BreakObject()
{
Debug.Log("Object broken!");
Destroy(gameObject);
}
}
(a)
