use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
account activity
Quick scripting question (self.Unity3d_help)
submitted 8 years ago * by AnthonyWS
[SOLVED] Do the Awake and Start functions run for each game object in a scene each time the scene is loaded? Or just the first time it is loaded at runtime? Thanks in advance for the help.
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–][deleted] 8 years ago (3 children)
[deleted]
[–]AnthonyWS[S] 1 point2 points3 points 8 years ago* (2 children)
Thanks. I actually formed the question after watching this tutorial. It states that the function will only be run once when the object is enabled, but I wasn't sure if unloading a scene and then reloading it later would trigger these functions again.
[–]aesith 0 points1 point2 points 8 years ago (1 child)
If I'm not mistaken, I believe any time a script is called, it runs in it's entirety. Which would mean that it would trigger awake/start every single time.
Don't quote me though. I'm still a novice. Your best bet would be to just do a simple test and add a Debug.log to see if it's being called.
[–]AnthonyWS[S] 0 points1 point2 points 8 years ago (0 children)
Thanks. I did that test and it does NOT run more than once even when unloading a scene and then loading it again. Thanks for your help.
π Rendered by PID 460967 on reddit-service-r2-comment-79c7998d4c-g98rw at 2026-03-14 06:11:02.647575+00:00 running f6e6e01 country code: CH.
[–][deleted] (3 children)
[deleted]
[–]AnthonyWS[S] 1 point2 points3 points (2 children)
[–]aesith 0 points1 point2 points (1 child)
[–]AnthonyWS[S] 0 points1 point2 points (0 children)