What is the DIFFERENCE between Transform and GameObject? (Unity Tutorial for Beginners)

What is the DIFFERENCE between Transform and GameObject? (Unity Tutorial for Beginners)

Code Monkey

1 год назад

35,507 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

DaveStomper
DaveStomper - 05.08.2023 06:17

Wow I really real stupid now ...... thanks code monkey lol

Ответить
Grasher
Grasher - 06.07.2023 00:21

I understood both Transform and GameObject and personally I prefer GameObject simply because I like to visualize in my head that it's an object and not just "something" that has x,y,z stuff. I know it can go back and forth by accessing the properties / object etc but I just like it better in my head xD

Ответить
Abdullah
Abdullah - 23.06.2023 09:53

amazing tutorial thanks alot

Ответить
JohnWick
JohnWick - 16.04.2023 23:50

Thank you so much buddy:)

Ответить
SOLAIRE NERO
SOLAIRE NERO - 05.02.2023 08:11

oh thanks <3 ,So does it mean to depend on the user's coding style?

Ответить
Brian Automata Man
Brian Automata Man - 20.01.2023 05:29

I have on question, I saw a video where they got the name of the game object by typing 'transform.name' I do no tunderstand as to why this works considering there is not name within transform, why not type 'gameObject.name'? Sry I am new to unity

Ответить
Jeff McCloud
Jeff McCloud - 02.01.2023 21:41

to instantiate an object at a certain position/rotation, there is an overload of Instantiate() that does it all in one call. it's actually slower (i.e. extra code/CPU cycles) to set the position/rotation/parent on the returned transform.

Ответить
Relw
Relw - 19.12.2022 23:46

I am confused about this concept using transform or gameobject different times, this video was completely clean and understandable, thanks for this!

Ответить
Russell Thorburn
Russell Thorburn - 17.09.2022 02:04

For my sanity I prefer GameObjects. It just makes it more clear to me what's going on.

Ответить
優婉
優婉 - 15.09.2022 22:21

So we can create a Scriptable Object -> Use Transform to reference a prefab -> get component of that prefab referenced in the Scriptable object ? (idk if my question make sense tho lol)

Ответить
Alexander Fosseidbråten
Alexander Fosseidbråten - 27.07.2022 23:45

good video - but i would like to understand what they are, not just that they're different and how to fetch each other. keep it up!

Ответить
Pandan
Pandan - 27.07.2022 02:54

Not every gameobject has a Transform. Some can have RectTransforms, etc
Idk why you would reference prefabs with Transform, just seems terrible

Ответить
Newb Ninja
Newb Ninja - 21.07.2022 02:51

Super helpful man .... love it. Thanks!

Ответить
Marushia Dark
Marushia Dark - 13.07.2022 14:32

I tend to think of GameObject as a container that holds various components, while a Transform is a component that contains position, rotation, and scale data. In the case of a Rect Transform, it'll also contain anchor point data.

Ответить
Ayush Sidam
Ayush Sidam - 12.07.2022 21:07

thanks for the video sir. 😀

Ответить
TorchWind Games
TorchWind Games - 10.07.2022 01:21

Why not just do
new Transform prefabTransform = Instantiate (prefab).transform
?

I prefer like this, because if you want to reference any other component and what you have is the transform you have to go tranformPrefab.gameobject.Getcomponent...
And it's just an extra step every time.

Ответить
for education
for education - 09.07.2022 11:23

Why you don't use dark theme for visual studio, it would be much easier to watch your videos at night.

Ответить
scampbell419
scampbell419 - 09.07.2022 01:36

love your vids, are you thinking of doing more dev reacts in the future? those videos have me hooked on your courses

Ответить