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.
@@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.
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?
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?
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."
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. 😢
@@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.
Thanks, really quick and easy to follow explanation
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!
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.
@@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.
Good Tutorial! Nice work
Thank you! Cheers!
Also, how would I save the timer if its a float value?
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?
Dude u r the best
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?
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."
does Mac has problems while using Unreal Engine? For instance, I can't configure my VS Code setup on my M3 Pro chip
UE is compatible with Apple Silicon. Don't see any relation why you can't configure your vs code, what error are you getting?
@@JustAnotherDangHowToChannel jusy can't recognize Header files, I tried to solve that for 2 days, but I couldn't do anything
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. 😢
When I run your code my player falls through floor. Any guesses why?
Could be the player start is not position properly. Make sure it is placed above the floor or use End keyboard shortcut.
@@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.
I have gate blueprint to pass another level how can i change the code.
I understand the game instance basics and solved it thank you to amazing tutorial.
As close to a global variable that UE allows for.