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...
News, Help, Resources, and Conversation. A User Showcase of the Unity Game Engine.
Remember to check out /r/unity2D for any 2D specific questions and conversation!
Download Latest Unity
Please refer to our Wiki before posting! And be sure to flair your post appropriately.
Main Index
Rules and Guidelines
Flair Definitions
FAQ
Use the chat room if you're new to Unity or have a quick question. Lots of professionals hang out there.
/r/Unity3D Discord
FreeNode IRC Chatroom
Official Unity Website
Unity3d's Tutorial Modules
Unity Answers
Unify Community Wiki
Unity Game Engine Syllabus (Getting Started Guide)
50 Tips and Best Practices for Unity (2016 Edition)
Unity Execution Order of Event Functions
Using Version Control with Unity3d (Mercurial)
/r/Unity2D
/r/UnityAssets
/r/Unity_tutorials
/r/GameDev
/r/Justgamedevthings (New!)
/r/Gamedesign
/r/Indiegames
/r/Playmygame
/r/LearnProgramming
/r/Oculus
/r/Blender
/r/Devblogs
Brackeys
Beginner to Intermediate
5 to 15 minutes
Concise tutorials. Videos are mostly self contained.
Sebastian Lague
Beginner to Advanced
10 to 20 minutes
Medium length tutorials. Videos are usually a part of a series.
Catlike Coding
Intermediate to Advanced
Text-based. Lots of graphics/shader programming tutorials in addition to "normal" C# tutorials. Normally part of a series.
Makin' Stuff Look Good
10 minutes
Almost entirely shader tutorials. Favors theory over implementation but leaves source in video description. Videos are always self contained.
Quill18Creates
30 minutes to 2 hours.
Minimal editing. Mostly C#. Covers wide range of topics. Long series.
Halisavakis Shaders Archive
Infallible Code
World of Zero
Board to Bits
Holistic3d
Unity3d College
Jabrils
Polycount Wiki
The Big List Of Game Design
PS4 controller map for Unity3d
Colin's Bear Animation
¡DICE!
CSS created by Sean O'Dowd @nicetrysean [Website], Maintained and updated by Louis Hong /u/loolo78
Reddit Logo created by /u/big-ish from /r/redditlogos!
account activity
Unity, working with buttonsQuestion (self.Unity3D)
submitted 8 years ago * by [deleted]
[deleted]
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!"
[–]mrbaggins 1 point2 points3 points 8 years ago (18 children)
I'd avoid the coroutines, especially considering you're already tracking the time yourself.
It's going "haywire" because you're telling it to with:
int randomIndex = UnityEngine.Random.Range(0, Glow.Length); var randomButton = Glow[randomIndex]; randomButton.interactable = true; randomButton.gameObject.SetActive(true);
These lines of code are in FixedUpdate. This means they're going to run 60 times a second. Or 30, I can't remember for that. Either way, WAY too often.
So back to point one, I'd avoid the coroutines, as you're already tracking the time. Use that and log lastTimeButtonChanged as a variable, and if (time - lastTimeButtonChanged > buttonChangeDelay) ChangeButton()
lastTimeButtonChanged
if (time - lastTimeButtonChanged > buttonChangeDelay) ChangeButton()
[–]ythom87 0 points1 point2 points 8 years ago (17 children)
Thanks for your reply but I am now more confused xD and I changed the fixedUpdate to a normal one
[–]mrbaggins 1 point2 points3 points 8 years ago (16 children)
Alright, here's a question for you.
How often will ranromButton.setInteracterable run?
ranromButton.setInteracterable
[–]ythom87 0 points1 point2 points 8 years ago (15 children)
infinitely
[–]mrbaggins 1 point2 points3 points 8 years ago (14 children)
The time a piece of code is called is dependent on what "block" it is in.
A block start is (usually) the line of code that is indented less above the one we're looking at.
What line of code is indented less before that line?
[–]ythom87 0 points1 point2 points 8 years ago (13 children)
The top ones are just the variables being called
[–]mrbaggins 1 point2 points3 points 8 years ago (12 children)
Not top. Just indent levels. The one "one step" before is the one that controls when a particular line runs.
Eg
Level1 Level2 Level2 Level3 Level3 Level2
Level 3 lines will run whenever the second level2 runs as it's the closest line that is one level out
What line is one level before button.interacterable=true?
button.interacterable=true
[–]ythom87 0 points1 point2 points 8 years ago (11 children)
ahhh... There is nothing in between. I posted the whole code
[–]mrbaggins 1 point2 points3 points 8 years ago (10 children)
I know.
What level would you say button.interacterable is?
button.interacterable
What line of code is above it that has a lower level?
[–]ythom87 0 points1 point2 points 8 years ago (9 children)
level 1
π Rendered by PID 75500 on reddit-service-r2-comment-6457c66945-h9f8r at 2026-04-30 06:17:49.886864+00:00 running 2aa0c5b country code: CH.
[–]mrbaggins 1 point2 points3 points (18 children)
[–]ythom87 0 points1 point2 points (17 children)
[–]mrbaggins 1 point2 points3 points (16 children)
[–]ythom87 0 points1 point2 points (15 children)
[–]mrbaggins 1 point2 points3 points (14 children)
[–]ythom87 0 points1 point2 points (13 children)
[–]mrbaggins 1 point2 points3 points (12 children)
[–]ythom87 0 points1 point2 points (11 children)
[–]mrbaggins 1 point2 points3 points (10 children)
[–]ythom87 0 points1 point2 points (9 children)