Unity 2D Platformer Tutorial #12 | Accessing Variables In Other Scripts

Publicado el: 17 julio 2023
en el canal de: Robert James
96
1

In this Unity 2D Platformer tutorial, we learn how to access variables from other scripts.

As our project grows, we now have multiple ways to gain points and lose lives. Instead of creating separate score and life systems for every object, we'll learn how to reference existing scripts and update values from anywhere in our game.

You'll learn how to:

• Access variables from another script
• Understand public vs private variables
• Create script references
• Update score from multiple objects
• Update lives from multiple objects
• Connect enemy and player systems
• Use object references in Unity
• Share data between scripts
• Improve your existing score system
• Prepare for enemy movement systems

By the end of this lesson, your enemies, collectibles and hazards will all be able to update the same score and lives systems correctly.

#unity #unity2d #gamedevelopment #platformer #unitytutorial #learnunity #csharp #gamedev #indiedev #UnityScripts #programming #UnityCoding #ScriptCommunication #gameprogramming #unitybeginner


En esta página del sitio puede ver el video en línea Unity 2D Platformer Tutorial #12 | Accessing Variables In Other Scripts de Duración hora minuto segunda en buena calidad , que subió el usuario Robert James 17 julio 2023, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 96 veces y le gustó 1 a los espectadores. Disfruta viendo!