Level Up with Experience Points in Unity

  Рет қаралды 17,446

BMo

BMo

Күн бұрын

Пікірлер: 54
@matthewmiller4633
@matthewmiller4633 6 ай бұрын
What I love about your channel is that you explain the same things that everyone else is, but you are following the "Explain Like I'm Five" methodology, which is absolutely what I need. Thank you for making these concepts super understandable!!
@qwasd0r
@qwasd0r 3 ай бұрын
Didn't sign up for the event system tutorial, but I'm thankful for it. Great stuff!
@pepdawg18
@pepdawg18 Жыл бұрын
This was super helpful! If you feel so inclined ;) implementing some kind of Level Up mechanic for implementing a skill tree in a "series" style of video would be great.
@eatmorvegetal3444
@eatmorvegetal3444 Жыл бұрын
Not gonna lie, I kinda gave up on learning C# and Unity for the moment, but whenever I decide to get back to it, your channel is going to be a main resource.
@jumpshot353
@jumpshot353 4 ай бұрын
have you got back to learning?
@ssbmPi
@ssbmPi Жыл бұрын
Just found your videos, I like your pacing and how you structure your videos so thank you :). Currently watching your scriptable objects (referencing Fine/Hipple talks) and am now watching this video. I'm going to try and implement this system while using scriptable objects. If you were so inclined maybe a followup video to this one changing it to use ScriptableObjects as well. I'm sure I'll be able to meld the two together but any further insight/examples are always appreciated. Perhaps scriptable objects for events Thanks again
@TheErikalovey
@TheErikalovey 6 ай бұрын
So weird seeing Isaac smile
@sergiosg5039
@sergiosg5039 2 ай бұрын
me voy a suscribir a tu canal, tus videos son en verdad buenos
@go6ko1
@go6ko1 Жыл бұрын
If you are getting "NullReferenceException: Object reference not set to an instance of an object", and you've followed the tutorial to the point - one solution would be to go into Edit > Project Settings > Script Execution Order and add both scripts Experience Manager (ex value: 100) and Character (ex value: 200). This will make the Experience Manager run first, and Character second. The issue comes from the difference in execution times/order between Awake methods and OnEnable methods.
@Hietakissa
@Hietakissa Жыл бұрын
This shouldn't happen since Awake is called before OnEnable, so if that's happening, there could be some other problem in the code/setup. Generally, you shouldn't resort to changing the script execution order.
@Charybdis47
@Charybdis47 Жыл бұрын
You can fix this error without manipuliating the execution order(I also recommend it because changing it can lead to funny errors). This error usally happens when you have an Awake() function somewhere in your code that requires and Object/Prefab that uses the ExpereinceManager methods, because the OnEnable() method is executed after the Awake() function so it requires the object before it is enabled leading to the null Reference Exception. So in short.... Dont use Awake() when possible always use Start()
@TT-yl1gz
@TT-yl1gz Жыл бұрын
You should use Invoke() to delay the OnEnable and OnDisable for 0.2 seconds
@HyperWook
@HyperWook 4 ай бұрын
I checked for Awake in every script i have and tried every other fix and nothing worked except doing what you reccomended. i would reccomend any else having problems to try what @Charybdis47 is saying and pretty much replace all awakes except for the experienceManager and if that doesnt work try editing the script execution order. This is very last resort, and I spent hours before resorting to this.
@SomnusShinra
@SomnusShinra 8 ай бұрын
How did you setup the XP Progress bar at the start of the video? How do you make it?
@ShadowCraft1118
@ShadowCraft1118 4 ай бұрын
i think you make a slider object in the ui canvas and set it to be equal to the current experience through an update method.
@ChaosSensei
@ChaosSensei 11 ай бұрын
Can I have it as a child object that empty object which detects collecting exp in case that I do rpg? So when I am far away so it accidentally doesn’t stop count or when I leave the scene so it keeps the values from previous level and so on. Or I have to always create a new empty object containing this exp manager script
@Uplatenerd
@Uplatenerd Жыл бұрын
How do you address the issue if you save the project, you get an error of NullReferenceException: Object reference not set to an instance of an object PlayerHealth.OnEnable () (at Assets/Scripts/PlayerHealth.cs:16) . Everything works fine until you save and restart it.
@gamingprochampion5822
@gamingprochampion5822 Жыл бұрын
Does everything break? Or just the exp?
@gamingprochampion5822
@gamingprochampion5822 Жыл бұрын
Since i am having the same issue, i need to know if you have the answer
@lumein7676
@lumein7676 Жыл бұрын
@@gamingprochampion5822 let me know if you ever figure out what is wrong
@kajak8979
@kajak8979 Жыл бұрын
Remember to put the ExperienceManager script to an object in the scene besides the character (its best to create an object only with this script attached to it)
@L3GEND4RYvN
@L3GEND4RYvN Жыл бұрын
Did you ever find a fix for this?
@lighting150
@lighting150 Жыл бұрын
Can you show a tutorial for the ui in the intro?
@eileeng2492
@eileeng2492 Жыл бұрын
So useful , great, thank you
@personalgamedevyt9830
@personalgamedevyt9830 Жыл бұрын
Very concise. Thank you!
@Charybdis47
@Charybdis47 Жыл бұрын
If you have this Error:*NullReferenceException: Object reference not set to an instance of an object* Follow this: You can fix this error without manipuliating the execution order(I also recommend it because changing it can lead to funny errors). This error usally happens when you have an Awake() function somewhere in your code that requires and Object/Prefab that uses the ExpereinceManager methods, because the OnEnable() method is executed after the Awake() function so it requires the object before it is enabled leading to the null Reference Exception. So in short.... Dont use Awake() when possible always use Start()
@toooasted656
@toooasted656 Жыл бұрын
still doesn't work for me any other ideas?
@Charybdis47
@Charybdis47 Жыл бұрын
​@@hazen7645 it seems you have misunderstood my comment. I am not talking about the awake function from the experience manager class, but another class that may use the events that this function enables. Then it triggers an error like this, because it tries to acess the Manager which hasnt been enabled yet with OnEnable(). Thats why I suggested to only use Awake() when truly necessary which is almost never. I didnt suggest to not use Awake() in the ExperieninceManager. All you do is confuse people who got this error like me. Just look at the comments....
@Charybdis47
@Charybdis47 Жыл бұрын
@@hazen7645 listen buddy I dont know why you try to start an argument even tho I explained it 2 times already but here we go again..... You have the player class which has OnEnable() and OnDisable() which subscribe or unsubscribe to the ExerienceManager method. This player object can be called at the start of the game to spawn on 1 or more player prefabs that have this script attached. When you work with a bad codebase LIKE I DID, in the spawnScript there was an Awake() function which instantiated a player prefab which couldnt call the OnEnable() method ,because Awake() triggered it to early, causing a NullReferenceException. THEREFORE I said dont use Awake() only when you dont have to cause it can cause funny Errors like that. It has NOTHING to do with the Awake() method in ExperienceManager class. Will you say I dont understand this again yes??
@Charybdis47
@Charybdis47 Жыл бұрын
@@hazen7645 i literally said:"error usually happens when you have an Awake() function somwhere in your code that requires and Object/prefab that uses the ExperienceManager methods" bro learn to read before you write instead of accusing me of being stupid💀
@gamingprochampion5822
@gamingprochampion5822 Жыл бұрын
For some reason, all of the code worked at first, but when i closed and reopened my project, all the experience gain just stopped working. The hp all worked fine, but the exp gain was not working. Does anyone know the solution to this?
@FoilGames
@FoilGames Жыл бұрын
Have you checked if you have any other EventSystem or maybe anything disabling your gameObject tha has the Character.cs script?
@Charybdis47
@Charybdis47 Жыл бұрын
This error usally happens when you have an Awake() function somewhere in your code that requires and Object/Prefab that uses the ExpereinceManager methods, because the OnEnable() method is executed after the Awake() function so it requires the object before it is enabled leading to the null Reference Exception. So in short.... Dont use Awake() when possible always use Start()
@Malkat21
@Malkat21 Жыл бұрын
NullReferenceException: Object reference not set to an instance of an object
@Charybdis47
@Charybdis47 Жыл бұрын
You can fix this error without manipuliating the execution order(I also recommend it because changing it can lead to funny errors). This error usally happens when you have an Awake() function somewhere in your code that requires and Object/Prefab that uses the ExpereinceManager methods, because the OnEnable() method is executed after the Awake() function so it requires the object before it is enabled leading to the null Reference Exception. So in short.... Dont use Awake() when possible always use Start()
@ĐôTrầntrọng-i7j
@ĐôTrầntrọng-i7j 9 ай бұрын
@@Charybdis47 What does that mean? I don't get it
@yensi1994
@yensi1994 7 ай бұрын
I have the same issue, I just made the OnExperienceChange event static in the ExperienceManager class and it works. hope it helps
@pedromaganin2519
@pedromaganin2519 7 ай бұрын
@@yensi1994 how did you do that? I tried that as well but then I get another error
@artZs-chaos
@artZs-chaos Жыл бұрын
Really amazing Tutorials! Can you make one all about like coins and shop systems.
@mike_b10
@mike_b10 Жыл бұрын
dude you are a gem
@ftrwar
@ftrwar 17 күн бұрын
this is awsome
@twinguy9633
@twinguy9633 10 ай бұрын
You could have explained the stuff in more detail...
@gamingprochampion5822
@gamingprochampion5822 Жыл бұрын
It all worked until i reloaded, at which point the exp gain stopped working. how do i fix this?
@Charybdis47
@Charybdis47 Жыл бұрын
You can fix this error without manipuliating the execution order(I also recommend it because changing it can lead to funny errors). This error usally happens when you have an Awake() function somewhere in your code that requires and Object/Prefab that uses the ExpereinceManager methods, because the OnEnable() method is executed after the Awake() function so it requires the object before it is enabled leading to the null Reference Exception. So in short.... Dont use Awake() when possible always use Start()
@mandamoon9149
@mandamoon9149 Жыл бұрын
I will unsubscribe from the event but never from this channel
@OfficialGooseGames
@OfficialGooseGames Жыл бұрын
I will add this
@bigp0y
@bigp0y Жыл бұрын
Outro tune is a jam
@headed_weast
@headed_weast Жыл бұрын
This was hot
@EasyGetFreezy
@EasyGetFreezy Жыл бұрын
perfect,
@Stompin40
@Stompin40 Жыл бұрын
Pog
@GameVersionHack
@GameVersionHack Жыл бұрын
NullReferenceException: Object reference not set to an instance of an object
@LeonardoSinibaldi
@LeonardoSinibaldi 6 ай бұрын
It signals that you haven't put the object in unity that you want to reference in the script
Flexible LOOT SYSTEM in Unity with Random Drop Rates
13:24
Unity3D Beginners  - Add leveling to your game
17:23
Andy W
Рет қаралды 15 М.
VIP ACCESS
00:47
Natan por Aí
Рет қаралды 30 МЛН
СИНИЙ ИНЕЙ УЖЕ ВЫШЕЛ!❄️
01:01
DO$HIK
Рет қаралды 3,3 МЛН
So Cute 🥰 who is better?
00:15
dednahype
Рет қаралды 19 МЛН
Cheerleader Transformation That Left Everyone Speechless! #shorts
00:27
Fabiosa Best Lifehacks
Рет қаралды 16 МЛН
Lex Fridman on the Kinesis keyboard and laptop set-up
6:10
Lex Clips
Рет қаралды 20 М.
EXPERIENCE and LEVELING System | Unity Tutorial
5:03
Pogle
Рет қаралды 6 М.
I Made the Same Game in 8 Engines
12:34
Emeral
Рет қаралды 4,3 МЛН
What does a Game Engine actually do?
16:45
Ellie Rasmussen
Рет қаралды 177 М.
Can I 100% Superliminal and Get a Refund?
23:36
Gronf
Рет қаралды 301 М.
I Made A Platformer Game But You're The Enemy
6:12
BMo
Рет қаралды 664 М.
I coded ur STUPID ideas to Minecraft
12:40
Element X
Рет қаралды 315 М.
A new way to generate worlds (stitched WFC)
10:51
Watt
Рет қаралды 553 М.
Character Stats in Unity #1 - Base Implementation
10:34
Kryzarel
Рет қаралды 102 М.
VIP ACCESS
00:47
Natan por Aí
Рет қаралды 30 МЛН