How to use the Game Instance In Unreal Engine

Поделиться
HTML-код
  • Опубликовано: 11 окт 2024

Комментарии • 22

  • @Saas_1
    @Saas_1 10 месяцев назад

    Thanks, really quick and easy to follow explanation

  • @DEM1GOD7
    @DEM1GOD7 3 месяца назад +1

    NICE! A video on how to avoid Hard Ref's by using a GameInstance while adding a shit ton of hard ref's along the way!

    • @nexus1g
      @nexus1g 6 дней назад

      You don't use a game instance to avoid hard references; it's more like a global struct and game mode. Maybe better called a parent game mode class. I think you're confusing it with interfaces?
      Also, hard referencing something that's going to be pretty much everywhere in the game (e.g. the player character) isn't a problem. The player character hard referencing an enemy that may only show up once in the entire game (e.g. a boss) is a problem. Though tracking something like coins would probably be better done in a game mode or even game instance itself. If the value is to be reset between each level, then it doesn't matter, but generally the player character will be handling so much, you're looking to offload some of that logic to another blueprint just to manage it all better. For a simple tutorial like this, there isn't much to be concerned with there.

    • @DEM1GOD7
      @DEM1GOD7 5 дней назад +1

      @@nexus1g Ah, someone has started learning UE and is stalking YT comments to show how much better he is then everyone else. you and a thousand others. piss off.

  • @mrorange159
    @mrorange159 6 месяцев назад

    Good Tutorial! Nice work

  • @jonasvirsila4179
    @jonasvirsila4179 7 месяцев назад +1

    Also, how would I save the timer if its a float value?

  • @nortski78
    @nortski78 Месяц назад

    Noob question: do we really need to score variables then, one in the player character and one in the Game Instance? Why not just use the Game Instance variable?

  • @tulenb.so2
    @tulenb.so2 9 месяцев назад

    Dude u r the best

  • @jonasvirsila4179
    @jonasvirsila4179 7 месяцев назад

    What if I want to save the progression of the game. For instance, I have a narrative system implemented, each time when I pass by the trigger event, the narrative text changes. So, how would be possible to save the progressed narrative?

    • @BrianFoster
      @BrianFoster 6 месяцев назад

      if your narrative system has your narrative in an array, you could save the index of the array. as in "we stopped playing after the 5th narrative text, so let's save the number 5. When we load in again we'll set the index back to 5."

  • @nastenkaoo
    @nastenkaoo 3 месяца назад

    does Mac has problems while using Unreal Engine? For instance, I can't configure my VS Code setup on my M3 Pro chip

    • @JustAnotherDangHowToChannel
      @JustAnotherDangHowToChannel  3 месяца назад

      UE is compatible with Apple Silicon. Don't see any relation why you can't configure your vs code, what error are you getting?

    • @nastenkaoo
      @nastenkaoo 3 месяца назад

      @@JustAnotherDangHowToChannel jusy can't recognize Header files, I tried to solve that for 2 days, but I couldn't do anything

    • @EternalRecurrence88
      @EternalRecurrence88 15 дней назад

      From what i hear UE is not fully optimized for mac, but idk from experience. I dropped nearly 4k on an intel mac months before the M1 was announced. Did the same. With the ipad pro a month before M chips were announced for it. Wasn’t able to return either to upgrade. 😢

  • @krasnavin
    @krasnavin 8 месяцев назад

    When I run your code my player falls through floor. Any guesses why?

    • @JustAnotherDangHowToChannel
      @JustAnotherDangHowToChannel  8 месяцев назад +1

      Could be the player start is not position properly. Make sure it is placed above the floor or use End keyboard shortcut.

    • @krasnavin
      @krasnavin 8 месяцев назад

      @@JustAnotherDangHowToChannel Thanks! It is something to do with the original instance I use. Using original and adding variables Player ok but data not transferring to HUD in new level. I am working on it. Levels change by player walking into a BP collision that opens new level ok.

  • @Y_can_D
    @Y_can_D 4 месяца назад

    I have gate blueprint to pass another level how can i change the code.

    • @Y_can_D
      @Y_can_D 4 месяца назад +1

      I understand the game instance basics and solved it thank you to amazing tutorial.

  • @FPChris
    @FPChris 9 месяцев назад

    As close to a global variable that UE allows for.