Understanding Prefabs and Instantiation Flashcards

1
Q

Prefabs

A

Prefabs are like blueprints of a GameObject. Prefabs are, in a way, a copy of a GameObject that
can be duplicated and put into a scene, even if it did not exist when the scene was being made;
in other words, prefabs can be used to dynamically generate GameObjects.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the difference between GameObject and gameObject :

A

Do not get confused between the two, however.
GameObject with a capital G and O is the class that encompasses all GameObjects and provides standard methods like Instantiate, Destroy and methods to fetch components.
—————
gameObject with a small g and capital O is the specific instance of a GameObject, used to refer to the
gameObject this script is currently attached to.
Let us now compile our code, and head back to Unity.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Coroutines :

A

sometimes we want to deliberately slow down a function or make it wait for longer than the
split second duration that it runs. A coroutine is capable of exactly that: a coroutine is a function
that is capable of waiting and timing its process, as well as pausing it entirely.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

The Console :

A

The Console is where we will be reading the Developer outputs. These outputs can be used to quickly
test bits of code without having to give added functionality for testing.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

There are three types of messages that appear in the default console. These messages can be related
to most of the compiler standards :

A

Errors
Errors are issues or exceptions that will prevent the code from running at all.
————-
Warnings
Warnings are issues that will not stop your code from running, but may pose issues during
runtime.
————-
Messages
Messages are outputs that convey something to the user; they do not usually highlight issues.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly