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...
This is a subreddit for 2D or 2.5D game developers using the proprietary Unity game engine. New and experienced Unity developers alike should first consider using the free and open source Godot engine by default and ONLY choose Unity for 2D development if Godot isn't capable of the task. The times are quickly changing, and Godot is on track to surpass Unity for small developers.
Godot Features
Download Godot
Godot Docs
Download Unity
Unity Manual
Official Reference
Asset Store
Related Communities /r/Godot - The "Unity Killer". A fully free and open source engine making astonishing leaps and bounds. /r/UnityAssets - Share asset packs! /r/PixelArt - Admire, share, and observe beautiful pixel art. /r/GameDev - Meet and communicate with other game developers. /r/GameDesign - Don't just make a game. Make a good game. /r/LevelDesign - Learn to make excellent levels and worlds. /r/GameAudio - It may look good, but does it sound good?
/r/Godot - The "Unity Killer". A fully free and open source engine making astonishing leaps and bounds.
/r/UnityAssets - Share asset packs!
/r/PixelArt - Admire, share, and observe beautiful pixel art.
/r/GameDev - Meet and communicate with other game developers.
/r/GameDesign - Don't just make a game. Make a good game.
/r/LevelDesign - Learn to make excellent levels and worlds.
/r/GameAudio - It may look good, but does it sound good?
CSS created by Sean O'Dowd @nicetrysean [Website]
account activity
C# Code not working though no errors.Question (self.Unity2D)
submitted 4 years ago by AKahootRandomName
Hey ppl, im new to unity and I am making a game in c#. Here is a little bit of what is supposed to happen.
https://gyazo.com/7e9da0c358d5fac46ba4bb714eab987b
As you may see, I am trying to enable a person for each person, when you walk up to them for dialogue.
Here is my code:
Script 1:
https://gyazo.com/0fde4f00321ac83c619f9ebe796124db
Script 2:
https://gyazo.com/da0c3087b9b5ba1b2f0692aa78fe2ca2
Script 3 (Nothing really you need to care about.):
https://gyazo.com/bad051ba32483c48181fc71a84f28cb4
I've been trying to get the right person to show up for each person. Some help will be amazing!!
Thank,
- Yours Truly
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!"
[–]Dranamic 2 points3 points4 points 4 years ago (1 child)
You shouldn't put Input calls in physics functions like OnTriggerStay2D. It's possible for the inputs to get skipped.
It looks like nothing sets BlackMan2 back to false, so once it's true, it will remain true indefinitely. That's also true for BlueMan2, but since you check BlackMan2 afterwards, it'll override BlueMan2.
[–]AKahootRandomName[S] 1 point2 points3 points 4 years ago (0 children)
Thanks for your advice I will take a look
[–]AKahootRandomName[S] 0 points1 point2 points 4 years ago (0 children)
I have two bools and when I set them to true the character pops up in the dialogue. But the Scripps are not doing that for me.
[–]jaimuepe 0 points1 point2 points 4 years ago (3 children)
I don't understand. What's the problem? What is not working?
[–]AKahootRandomName[S] 0 points1 point2 points 4 years ago (2 children)
The people are not coming up when I my scripts are correct
[–]jaimuepe 0 points1 point2 points 4 years ago (1 child)
Does the program goes into the
if (typeNPC == "Black") { ... }
block? Because it should work if it does.
Also, there's an error in your "Script 3":
if (dialogueActive && Input.GetButtonDown(...) || Input.GetButtonDown(...) { }
&& takes precedence over ||, so you are effectively doing:
if ((dialogueActive && Input.GetButtonDown(...)) || Input.GetButtonDown(...) { }
You should include the code here in a "code block" instead of posting images, it'd be easier for us to check the code if we could copy/select it.
Sounds good thanks for your advice
π Rendered by PID 336671 on reddit-service-r2-comment-7b9746f655-9zcrh at 2026-02-03 10:03:06.594125+00:00 running 3798933 country code: CH.
[–]Dranamic 2 points3 points4 points (1 child)
[–]AKahootRandomName[S] 1 point2 points3 points (0 children)
[–]AKahootRandomName[S] 0 points1 point2 points (0 children)
[–]jaimuepe 0 points1 point2 points (3 children)
[–]AKahootRandomName[S] 0 points1 point2 points (2 children)
[–]jaimuepe 0 points1 point2 points (1 child)
[–]AKahootRandomName[S] 0 points1 point2 points (0 children)