Learn C# Scripting for Unity 15 Minutes - Part 4 - Foreach Loop, Array, Find Tags

Charger Games
12 Sept 202015:45

Summary

TLDRIn this Unity tutorial, Raja from Charger Games walks through C# scripting for object manipulation. The video focuses on finding game objects by tag, specifically cubes and spheres, and demonstrates how to destroy or interact with them. The tutorial covers using arrays to store multiple objects, utilizing loops for bulk operations, and implementing actions via input keys. Additionally, Raja explores how to selectively destroy objects by tags and customize interactions, such as color changes upon clicking. This video is a practical guide for game developers looking to enhance their Unity projects with C# scripting.

Takeaways

  • 😀 Learn how to find and manipulate game objects in Unity using C# scripting.
  • 📦 A 3D cube object is created, positioned, and a material is applied to it.
  • 🔍 Game objects can be located by tag using the method `GameObject.FindWithTag` in Unity scripts.
  • 🧠 Tags can be added to game objects for easier identification and interaction through scripts.
  • 💥 Game objects, like the cube, can be destroyed using the `Destroy()` method after being found by tag.
  • 💡 Multiple game objects can be stored in an array and managed together using `FindGameObjectsWithTag`.
  • 🔄 The `foreach` loop is used to iterate through arrays of game objects, applying actions such as destruction.
  • 🕹 Actions like destroying objects can be triggered by user input, such as pressing the spacebar or specific keys.
  • 🎮 A new script can allow the destruction of objects when clicked, filtering based on their tag (e.g., only cubes or spheres).
  • 🎨 Scripts can be applied to multiple game objects, enabling different actions depending on the object's tag, like changing color or destruction.

Q & A

  • What is the purpose of the video tutorial?

    -The purpose of the video tutorial is to teach how to script in C# for Unity, specifically focusing on how to search for and manipulate game objects within a Unity scene.

  • How does the script find a specific game object in the scene?

    -The script finds a specific game object by using `GameObject.FindWithTag` and specifying the tag of the game object, like 'cube' or 'sphere'. This allows the script to locate and interact with the object.

  • Why do you need to use tags for game objects in Unity?

    -Tags are used to categorize game objects, making it easier to identify and find multiple objects of the same type, such as all cubes or spheres. This approach is useful when you need to perform actions on a group of objects.

  • How can you assign a tag to a game object in Unity?

    -To assign a tag, select the game object, go to the 'Tag' drop-down menu, and either choose an existing tag or create a new one by clicking on 'Add Tag' and saving it.

  • What is the benefit of using arrays in the script when finding multiple game objects?

    -Arrays are useful for storing multiple game objects with the same tag. This allows the script to reference and manipulate all of them collectively, such as destroying all cubes or spheres in a scene.

  • How does the script destroy multiple game objects at once?

    -The script uses a `for each` loop to iterate through the array of game objects found with a specific tag, such as cubes, and destroys each one sequentially using the `Destroy()` function.

  • What is the purpose of using the `Input.GetKeyDown` method in the script?

    -The `Input.GetKeyDown` method is used to detect key presses. In the tutorial, pressing specific keys like 'space' or 'S' triggers the destruction of either cubes or spheres in the scene.

  • What is the difference between `GameObject.FindWithTag` and `GameObject.FindGameObjectsWithTag`?

    -`GameObject.FindWithTag` finds and returns a single game object with the specified tag, while `GameObject.FindGameObjectsWithTag` returns an array of all game objects with that tag, allowing for batch operations like destroying or modifying them.

  • How does the script differentiate between game objects when destroying them?

    -The script differentiates between game objects based on their tags. It checks the tag of the object and only destroys those with a specific tag, such as 'cube' or 'sphere'.

  • How can the `OnMouseDown` method be used in Unity scripting?

    -The `OnMouseDown` method is called when the user clicks on a game object. In the tutorial, it is used to destroy an object when clicked, but only if the object's tag matches a specified condition, such as 'cube' or 'sphere'.

Outlines

00:00

🎮 Introduction to C# Scripting in Unity

In this introductory section, Raja from Charger Games introduces the video, part of a tutorial series on learning C# scripting for Unity. The goal is to teach how to search and find objects in a scene. The example focuses on creating a cube, applying a material, and then manipulating it through C# scripts. Raja demonstrates how to find and interact with objects in a Unity scene, such as changing the cube's color or destroying it.

05:00

🧩 Using Tags to Identify and Find Game Objects

This section focuses on tagging game objects to easily locate them within the scene. Raja explains how to create and assign tags to objects like cubes and spheres. He demonstrates how to find game objects using the 'FindGameObjectsWithTag' method, store them in an array, and then manipulate or destroy them through a loop. The tutorial covers the usage of arrays to store multiple game objects and how to traverse through them using a foreach loop to apply actions like destruction.

10:02

🌀 Destroying Game Objects by Pressing Keys

In this section, Raja introduces how to destroy game objects by pressing specific keys. Using Unity’s Input system, the script detects key presses (like the spacebar for cubes and the 'S' key for spheres) and destroys the respective objects. The tutorial showcases how to set up different key bindings to control various actions on objects, allowing users to selectively interact with different groups of game objects based on their tags.

15:04

🖱️ Destroying Game Objects with Mouse Clicks

Raja explains how to destroy game objects through mouse clicks. A new script called 'Destroyer' is introduced, which uses the 'OnMouseDown' method to detect clicks on objects. Based on their tags (either 'cube' or 'sphere'), the script destroys the clicked object. This method demonstrates how to interact with objects individually while ensuring that only certain tagged objects are affected.

🎨 Performing Different Actions on Multiple Objects with a Single Script

The final section of the video showcases how to perform various actions on different objects using the same script. Raja describes how the 'Destroyer' script can be modified to apply different behaviors depending on the tag of the object. For example, clicking on cubes could turn them red, while clicking on spheres could turn them green. This flexibility allows for dynamic interactions with multiple objects using a unified code structure. The video concludes with a call to action for viewers to apply the learned concepts in their own projects.

Mindmap

Keywords

💡GameObject

A GameObject is the fundamental building block of objects in Unity. In the script, it refers to the objects like cubes and spheres that are placed in the scene and can be manipulated. The tutorial shows how to create and manipulate these objects in code.

💡Tag

Tags are labels that can be assigned to GameObjects in Unity to categorize them. The video demonstrates how to use tags like 'Cube' and 'Sphere' to identify and interact with specific objects programmatically, such as finding or destroying all objects with a certain tag.

💡FindGameObjectsWithTag

This method in Unity is used to find all GameObjects that have been assigned a specific tag. The tutorial explains how to use it to search for multiple objects, such as all cubes in a scene, and perform actions on them, like destruction.

💡Script

A script in Unity is a C# file that contains code to control the behavior of GameObjects. In the video, a script named 'GameManager' is created to manage the behavior of various objects, such as finding and destroying them using tags and arrays.

💡Destroy

The 'Destroy' function in Unity is used to remove a GameObject from the scene. In the video, the script demonstrates how to destroy specific GameObjects, like cubes or spheres, either when the game starts or when a certain key is pressed.

💡Array

An array is a collection of elements stored in a single variable. In the tutorial, arrays are used to store multiple GameObjects, such as all cubes or spheres in the scene, allowing the script to loop through and perform actions on each one.

💡ForEach Loop

A 'ForEach' loop is a control structure that iterates over elements in a collection, such as an array. The video demonstrates how to use a ForEach loop to cycle through all GameObjects in an array (e.g., cubes) and apply actions like destruction.

💡Material

Materials in Unity define the appearance of a GameObject’s surface, including color and texture. The tutorial shows how to apply a material to a GameObject, like a cube, to change its color to black, enhancing its visual appeal.

💡Input.GetKeyDown

This Unity method detects when a key is pressed. In the tutorial, the 'Input.GetKeyDown' function is used to trigger actions, such as destroying all cubes when the space key is pressed, or destroying all spheres when the 'S' key is pressed.

💡Empty GameObject

An empty GameObject is a GameObject without a physical form that can still hold components and scripts. In the video, an empty GameObject is created to act as the Game Manager, holding a script that controls various actions within the game.

Highlights

Introduction to Learn C# Scripting for Unity tutorial series.

Learning how to search and find different objects from a scene.

Creating a new 3D object named 'cube' and resetting its position.

Applying a black material to the cube for visual enhancement.

Creating a new C# script named 'game manager'.

Attaching the script to a new empty game object named 'game manager'.

Using 'GameObject.FindWithTag' to find objects with a specific tag.

Adding a 'cube' tag to the cube object for identification.

Writing code to find and destroy the cube object with the 'cube' tag.

Duplicating and positioning multiple cube objects in the scene.

Creating a new sphere object and applying a red material.

Adding a 'sphere' tag to the sphere object.

Duplicating and distributing sphere objects across the scene.

Finding and storing references to multiple objects with tags.

Using a for-each loop to destroy all objects with a specific tag.

Destroying all cubes when the space key is pressed.

Destroying all spheres when the 's' key is pressed.

Creating a 'destroyer' script to handle object destruction on mouse click.

Attaching the 'destroyer' script to all game objects for conditional destruction.

Changing the script to destroy spheres instead of cubes by altering the tag check.

Conclusion and call to action for feedback and suggestions for future tutorials.

Transcripts

play00:00

hey there this is raja from charger

play00:02

games and welcome back to another video

play00:04

this is another part of my learn c sharp

play00:06

scripting for unity tutorial

play00:08

so in this video as well within short

play00:10

time we're gonna learn a lot of new

play00:12

things

play00:12

so let's get started learning without

play00:14

wasting any time

play00:16

so first of all in this video we're

play00:17

going to learn how we can search and

play00:20

find

play00:20

different objects from our scene all

play00:22

right so as you can see here i can

play00:24

simply go ahead and create a new 3d

play00:26

object

play00:27

and we're going to name it a cube i'm

play00:28

gonna reset its position

play00:31

and then i'm gonna position it right so

play00:33

that i can see it in the scene

play00:35

now i'm gonna go to my materials folder

play00:37

and as you can see i already have

play00:38

created this materials from previous

play00:40

tutorials

play00:41

so i can simply drag and drop this black

play00:43

material right here on the cube

play00:45

to make it look good and if you don't

play00:47

have materials created you can simply go

play00:49

ahead and right click

play00:50

create and from here you can go to this

play00:52

material to create a new material

play00:55

all right so now that we have this cube

play00:58

now

play00:58

let's say we want to create a script and

play01:01

from the script if we want to find the

play01:03

cube

play01:03

and do then do something with the cube

play01:05

let's say we want to change its color or

play01:07

we want to destroy it

play01:09

so it doesn't matter wherever we have

play01:11

this cube

play01:12

we want to find it from our script and

play01:14

then do something with it

play01:16

so for that first of all we're gonna go

play01:18

ahead and create a new script

play01:19

i'm gonna create this new c sharp script

play01:22

and i'm gonna name this one

play01:24

game manager

play01:27

okay now i'm gonna create a new

play01:30

empty game object where we gonna attach

play01:32

our script so

play01:34

because this script is the is a generic

play01:37

script that will

play01:38

work on our whole game that's why we're

play01:41

not gonna attach it to any particular

play01:42

game object

play01:43

okay so we're gonna create an empty game

play01:45

object and we're gonna name this one

play01:47

game manager or game controller anything

play01:50

that you want

play01:51

and then i'm gonna drag and drop the

play01:52

game manager script onto our game

play01:54

controller

play01:54

then simply double click to open it in

play01:56

visual studio

play01:58

alright now let's try to find out how we

play02:01

are going to

play02:02

find the cube so we are going to use a

play02:05

method called

play02:07

object dot search or game object

play02:10

find game objects with tag okay so

play02:14

let's say in this seed we can add a tag

play02:17

called cube to this cube and then from

play02:20

our script we're gonna

play02:21

find the game object which has this cube

play02:24

tag

play02:24

attached and that's how we're gonna find

play02:26

this game object all right

play02:28

so in order to add a tag you can select

play02:30

your cube

play02:31

and from the tag as you can see

play02:32

currently it doesn't have any tag

play02:34

so from here you can select this cube

play02:36

tag now in my case this cube tag is

play02:39

already created but in your case you can

play02:41

go to add tag

play02:42

and suppose you didn't have this text so

play02:44

you can simply remove them

play02:48

and then you can simply click on plus

play02:50

and from here

play02:51

select cube and click on save so now as

play02:54

you can see i have a new tag

play02:56

created now i can select my cube and

play02:59

from the tag

play03:00

select the cube tag okay so now it has

play03:02

the cube tag attached so now let's go

play03:04

back to our script

play03:06

and your script here we gonna say

play03:09

game object cube

play03:13

equals game object dot find with

play03:18

tag and for the tag we're gonna say q

play03:21

and this is what you need to write

play03:23

exactly same as it is written in your

play03:25

tag otherwise this is not gonna work

play03:26

so this code will find the game object

play03:29

which has the cube tag attached and give

play03:32

us access to it

play03:33

inside this cube variable so now let's

play03:36

say i want to destroy the cube

play03:38

so for that i'm going to simply say

play03:39

destroy

play03:41

cube all right so this

play03:44

is what it will do whenever our game

play03:47

runs this will simply destroy the cube

play03:49

and as you can see here we have the cube

play03:51

tag attached now when i click on play

play03:54

you will see immediately the key will

play03:56

get destroyed

play03:57

but you will probably say that we can

play03:59

already do it

play04:00

using destroy function we can simply add

play04:02

a destroy function to this cube and

play04:04

destroy directly

play04:05

why do we need to add tag and all these

play04:07

things so for that i want to say that

play04:09

let's say there are a lot of objects in

play04:11

the scene and all of them have different

play04:13

tag attached

play04:14

let's say there we have cubes spheres

play04:16

and cylinders

play04:17

from there you can simply select all the

play04:20

cubes because they have the cube tag

play04:22

attached

play04:22

and from there you can simply go ahead

play04:24

and delete them okay so let's see how we

play04:26

can do that with a better example

play04:28

so in this case first of all here we

play04:30

have the cube so i'm going to simply

play04:32

duplicate the cube

play04:33

and position it here here somewhere like

play04:35

this

play04:36

duplicate it another time position it

play04:38

here here

play04:41

so now we have three cubes the same way

play04:43

we're going to create a new sphere game

play04:45

object

play04:46

3d game object sphere all right

play04:49

and now i'm going to simply go to my

play04:52

materials tab

play04:53

and add this red material to the sphere

play04:56

okay just to make it look a little bit

play04:57

pretty so here we have our sphere we can

play05:00

position it

play05:01

somewhere like this all right now we're

play05:04

gonna go to our tags

play05:06

click on add tag from here we're gonna

play05:09

create a new tag

play05:10

called sphere all right now we're gonna

play05:13

select our sphere

play05:14

and select the sphere tag from here so

play05:17

now we have a sphere with the sphere tag

play05:19

attached

play05:19

and cube with the cube tag attached now

play05:22

the same way i'm gonna simply duplicate

play05:24

my sphere and move it around the scene

play05:28

so that we can distribute it at

play05:31

different places on the scene

play05:33

and use them or destroy them or do

play05:35

anything that you want with them

play05:36

so now as you can see we have three

play05:38

cubes and three spheres on the scene

play05:40

now we need to find out a way so that we

play05:42

can find out all the cubes

play05:44

and do something with them and then to

play05:45

find out a way so that we can find all

play05:47

the spheres

play05:48

and do something with them so till now

play05:50

we have learned how we can only find

play05:52

one single game object now we're gonna

play05:55

learn how we can find

play05:56

multiple different game objects with tag

play05:58

and how we can store them

play06:00

so let's say i want to find all the

play06:03

cubes in the scene

play06:04

and then store them somewhere for that

play06:06

we need to create an array

play06:08

okay so here we are creating a single

play06:10

variable to store a single object

play06:12

but if we want to store multiple game

play06:14

objects then we need to create something

play06:16

called an

play06:17

array to create an array of game objects

play06:20

here we can write game object then a

play06:23

pair of square brackets

play06:24

and then we're gonna say cubes okay so

play06:27

this is an array which will store our

play06:29

cubes

play06:29

the same way we're gonna say game object

play06:32

period of square brackets

play06:34

and then spheres okay so this is an

play06:37

array that will store

play06:38

our spheres so now inside the start

play06:40

function

play06:41

instead of writing this what you're

play06:43

gonna do is we're gonna write

play06:45

cubes equals game object

play06:48

dot find game objects with tag

play06:53

so here we're not going to use the game

play06:54

object we're going to say

play06:56

find game objects with text so that we

play06:58

can find

play06:59

multiple game objects alright and here

play07:01

we can write

play07:02

cube so now what we'll do is

play07:05

it will simply go to the scene and find

play07:08

all the game objects

play07:10

that have this cube tag attached it will

play07:13

find them

play07:13

and it will store them inside these

play07:15

cubes array

play07:17

and then we can destroy them using a for

play07:20

each loop

play07:21

okay so this destroy function will not

play07:24

work here here we need to use something

play07:25

called

play07:26

a for each loop okay so what this will

play07:28

do is

play07:29

this will go to the array and search for

play07:32

each of the game objects

play07:33

and destroy all of them one by one by

play07:36

one

play07:36

so let's see how we can use the forage

play07:38

loop to use the forage loop we need to

play07:40

write

play07:41

for each need to write

play07:44

game object g in

play07:48

cubes okay now you can

play07:52

rename this d to anything you can name

play07:53

it c you can name it a you can name it

play07:56

uh cube or anything it doesn't really

play07:59

matter

play08:00

so what this will do is this will search

play08:03

for

play08:04

all the elements in the cube okay or

play08:06

this will traverse through all the

play08:07

elements of this cubes array

play08:09

let's say we have three cubes on the

play08:11

scene so this array contains

play08:14

reference to three of those cubes now

play08:16

this

play08:17

forage loop will refer or traverse to

play08:21

three of those cubes and every time it

play08:24

finds the

play08:25

first second and third cube it will

play08:27

store its reference inside this g

play08:29

variable

play08:30

and then we can do anything that we want

play08:32

using the g variable

play08:34

so in this case we simply want to say

play08:36

destroy

play08:37

g dot game object okay so let's say

play08:41

it finds the first element in the cube's

play08:43

array

play08:44

then it will store the first element

play08:46

inside g and then it will destroy the g

play08:48

that is the first element then it will

play08:50

traverse the second element

play08:52

store it inside g then destroy secondary

play08:54

limit

play08:55

and this way it will keep on going so

play08:58

here what we are doing is

play08:59

we are traversing through all the

play09:01

elements

play09:02

that are stored inside this cubes array

play09:05

and destroying them

play09:06

one by one by one all right now instead

play09:10

of doing this in the start let's see how

play09:11

we can do it

play09:12

when we press a key so inside the update

play09:15

we're gonna say

play09:16

if input dot get

play09:19

key down here we're going to say key

play09:22

code

play09:23

dot space now you have used these things

play09:26

a lot of times in the previous tutorial

play09:28

so

play09:28

you should not face any problems here so

play09:30

whenever we press the space key

play09:33

let's cut this code

play09:36

and paste it here so whenever we press

play09:38

the space button on our keyboard

play09:40

we want to travel through all the cubes

play09:43

that we have in the scene

play09:45

and destroy all of them one by one by

play09:47

one

play09:48

so this is it let's save this go back to

play09:51

unity

play09:52

and see how our code is working

play09:55

so as you can see our code is uh

play09:58

attached to the manager

play10:00

and now if i click on play you will see

play10:02

here we have all the different things

play10:04

and only the cubes will get destroyed

play10:06

when i press the space key

play10:07

so three two one space and as you can

play10:10

see all the cubes got destroyed

play10:12

because all the cubes had this cube

play10:15

tag attached okay now let's see how we

play10:18

can do the same thing for the spheres

play10:20

so let's go to our game manager

play10:23

and now we're going to say

play10:28

here the same way first of all we need

play10:29

to store the reference of the spheres

play10:31

so here we're gonna say spheres

play10:35

equals game object not game controller

play10:39

game object dot find

play10:42

game objects with tag and make sure to

play10:45

write

play10:46

objects and not object i'm saying it

play10:48

again and again

play10:49

and here we're going to say spheres

play10:53

sphere actually so now we have access to

play10:56

all the spheres inside this sphere array

play11:00

now the same way we need to use a

play11:03

foreign loop

play11:03

and do the same thing so inside the

play11:05

update we're going to say if

play11:10

input dot get key down

play11:14

input the get key down key code dot

play11:17

let's say i'm gonna say s

play11:21

so whenever we press the s key on our

play11:23

keyboard we're going to do the same

play11:25

thing so let's copy the forage loop

play11:27

paste it here and instead of writing

play11:30

cubes

play11:31

here we're going to simply write spheres

play11:35

all right so now what we'll do is it

play11:38

will

play11:38

get access to each and every sphere that

play11:41

is

play11:42

stored inside this spheres array and

play11:45

then it will destroy all of them

play11:47

one by one by one whenever we press the

play11:49

s

play11:50

key on our keyboard so let's see how

play11:52

that works let's go back to unity

play11:54

and now whenever we're gonna press the s

play11:57

key on our keyboard

play11:58

the spheres will get destroyed and

play12:00

whenever we press the

play12:01

space button the cubes will get

play12:03

destroyed so maximize and play

play12:06

click on play and now i'm going to press

play12:09

the

play12:10

s key and as you can see all the spheres

play12:12

got destroyed

play12:13

i'm going to press the space key and all

play12:15

the cubes got destroyed

play12:16

so this way you can use these features

play12:19

to

play12:19

find and search multiple game objects on

play12:22

the scene

play12:22

and destroy any of them that you want

play12:25

anytime

play12:26

now let's see how we can do some more

play12:28

cool things using this tag functionality

play12:30

so let's say we have already learned how

play12:32

we can simply click on any object and

play12:34

destroy it

play12:35

now let's say i want to destroy certain

play12:38

object

play12:39

and i want to simply save other objects

play12:42

and

play12:42

don't destroy them so let's say i click

play12:44

on the cubes

play12:45

and i want to i want to destroy the

play12:47

cubes but i click on the spheres

play12:48

but i don't want to destroy the spheres

play12:50

and we want to actually

play12:52

write the same code and do the do both

play12:55

of things together

play12:56

all right so to do that here i'm gonna

play12:59

create a new script

play13:00

and i'm gonna name this one destroyer

play13:04

and inside the destroyer script what

play13:06

you're gonna do is we're gonna first of

play13:08

all check

play13:09

void on mouse down

play13:13

so this function will be called whenever

play13:14

our mouse will be clicked

play13:16

over this object then we're gonna check

play13:19

if

play13:20

this dot gameobject.tag

play13:23

equals cube

play13:27

only then we gonna say destroy

play13:30

gameobject

play13:32

otherwise we're not gonna destroy the

play13:34

game object all right so let's see how

play13:36

that works

play13:38

so now we're gonna select all of our

play13:40

game objects and we're gonna add the

play13:41

destroyer

play13:42

script to all of them so let's say here

play13:45

i'm gonna select my cubes

play13:47

and my spheres all of them together by

play13:48

pressing the shift key so select the

play13:50

first one

play13:51

press the shift key select the last one

play13:54

and then drag and drop the destroyer

play13:55

script here

play13:56

and as you can see all of them will have

play13:58

the destroyer script attached

play14:00

all right and we're gonna attach it to

play14:01

our first cube as well so it has a

play14:03

description script to it

play14:05

now let me click on play

play14:09

and you will see whenever i click on the

play14:11

spheres nothing happens but whenever i

play14:13

click on the

play14:14

cubes they get destroyed all right so

play14:16

the same script is attached to all of

play14:19

the game objects

play14:20

but only the cubes are getting destroyed

play14:22

the spheres are not

play14:23

now we can also go ahead and change the

play14:26

script anytime

play14:27

so let's say i simply change this to

play14:29

sphere

play14:32

and as soon as i do that and go back to

play14:35

unity

play14:36

now you will see it will completely be

play14:38

changed now whenever i go ahead and

play14:40

click on it

play14:41

you will see now i can click on the

play14:42

cubes but they will not get destroyed

play14:45

but if i click on the spheres they will

play14:46

get destroyed

play14:48

okay so just by writing this simple code

play14:50

and this simple

play14:51

tag test we can do a lot more things so

play14:54

we can attach the same script to

play14:56

multiple game objects

play14:57

and let's say we click on we run the

play14:59

game and whenever we click on the cubes

play15:02

we want to turn them red and whenever we

play15:04

click on the spheres

play15:05

we return them green so we can write one

play15:08

single script

play15:09

attach them to all the game objects and

play15:11

perform different actions on them

play15:13

depending on the different things that

play15:15

you do

play15:16

so this is it this is all i wanted to

play15:19

show you in this video i hope you really

play15:21

enjoyed and learned a lot of new things

play15:23

so go ahead and use these skills in your

play15:25

new projects

play15:26

so let me know in the comments if you

play15:28

like this video and what do you want to

play15:29

see in the next tutorial

play15:31

and if you if this video helped you

play15:33

please hit the like button so that i can

play15:34

make more videos like this

play15:36

so thank you so much for watching this

play15:38

is raja from charger games

play15:39

and i'm gonna see you in this next video

play15:43

soon

Rate This

5.0 / 5 (0 votes)

Etiquetas Relacionadas
Unity tutorialC# scriptingGame developmentObject tagsFind objectsDestroy objectsFor each loopBeginner codingGame objectsUnity scripting
¿Necesitas un resumen en inglés?