Jump to content
  • Advertisement
Sign in to follow this  
  • entries
  • comments
  • views

About this blog

fun, learning based games for healthcare providers

Entries in this blog


Script execution order

Just had my first lesson in script execution order in Unity. I have a MyMethod() within Update() that looks to a static integer set by another script. MyMethod() was not functioning because upon starting the game, the method would break due to the static int being set to 0. The static in question is dynamic but it's range is not allowed to fall to 0 per it's script. How on earth could it be 0?? Then I decided to debug.log the static in Update() and upon Start(). I found that the static was 0 in the first frame, then it would set correctly from the script that initializes it every frame after. However, just one frame of 0 was all it took to break my method within Update(). I'm sure I could get around this other ways but I found the quickest way to fix this issue was to use the script execution order in Unity. I set the script with MyMethod() to run last, allowing Unity time to initialize the static integer. I won't tell you how long it took me to diagnose this, but I'm writing this post out of relief. Anyone else encountered this?




My first game: EKG learning game

I've enjoyed reading and looking at the interesting things you guys do on this site. Please go check out my game and tell me what you think. The game: https://www.mysicu.com/games/EKGSimulator/index.html Reddit post: https://www.reddit.com/r/nursing/comments/5ygpx1/update_i_created_an_ekg_game/ I'm a nurse trying to learn game development because, I have fun doing it, and because I want to create more exciting learning experiences for healthcare providers. I have a million and one ideas, just trying to learn as fast as I can, if anyone is willing to answer questions, let me know. [sharedmedia=gallery:images:8384] Learning Mode: [sharedmedia=gallery:images:8386] Play Mode: [sharedmedia=gallery:images:8385] Contact me through Facebook: https://www.facebook.com/VirtualRnEducation/ IG: Virtual.RN Twitter: Virtual_RN



Sign in to follow this  
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!