#7 Game Creator 101 - Variables

preview_player
Показать описание
Getting Started with Game Creator - Episode 7

Background music by Moroza Knozova from Fugue
Рекомендации по теме
Комментарии
Автор

A global variable can be used across scenes. A local variable can only be used in the scene which it is declared. So if you have a game that has a players experience and two scenes (forest and desert) and you set it to a local variable in the forest scene. When the player moves to the desert scene, you can no longer access that players experience because it no longer exists (only existed in the forest scene). If that variable was global, it would still exist and you could still use it (which in the case, would be useful). Hope that explains it a bit better.

kytestar
Автор

You made that very clear & simple 👍 i gotta try this out TY

RDEYELOVE
Автор

i could not get this example to work as is.
I had to add a unity UI canvas which should automatically add an "Event System".
Then following the video's steps, i got it to work.

BillybobsPainting
Автор

Help! How I Can Make this kind of thing? Is it based on ScriptableObject? Or can I make it in another way?

ДенисВоробьёв-фч
Автор

how do I define a variable as a formula, like, say, the sum of other variables?

dplocksmith
Автор

Hmm, this doesn't actually explain the difference between a global and local variable. As far as this video is concerned they do the exact same thing and serve the same purpose which I'm sure isn't the case.

yalizhang
Автор

These are probably just scriptable object etc underneath

pokoro