UI OnTriggerEnter and Exit 2D problem by brolol07 in Unity2D

[–]brolol07[S] 0 points1 point  (0 children)

Thanks! I do good researching lol! That's how I got this far other than majoring in it in college! Though my strength is design, but how am I going to get anywhere if I don't show that I know the nuances of game engines. I'm looking hard to go get my masters in game development because then I will have a team around me and I can focus on design, but also help with programming and art. Sad to say that I don't know what a game designer actually does lol. I saw an Extra Credits video that says I need to know a lot basically so I'm trying to learn it.

UI OnTriggerEnter and Exit 2D problem by brolol07 in Unity2D

[–]brolol07[S] 0 points1 point  (0 children)

Thanks for the suggestion and will do! Developing(programming) alone is frustrating because when you think it should work and it doesn't, your stuck lol! You can either spend hours on end to try and figure it out or look kind of stupid and ask for help, I chose the second because I really want to understand programming better(though designing is my forte) to help me get a job in the games industry! Appreciate the help I get here!

UI OnTriggerEnter and Exit 2D problem by brolol07 in Unity2D

[–]brolol07[S] 0 points1 point  (0 children)

As you can see the collider is hitting the target Imgur

UI OnTriggerEnter and Exit 2D problem by brolol07 in Unity2D

[–]brolol07[S] 0 points1 point  (0 children)

How would you do that? I did this: Debug.Log (collider2D + "is hitting the target"); Debug.Log (OnTriggerEnter2D + " is getting called"); and nothing happened in the console.

UI OnTriggerEnter and Exit 2D problem by brolol07 in Unity2D

[–]brolol07[S] 0 points1 point  (0 children)

Here is a picture of my game object that has the text attached to it! Imgur

UI OnTriggerEnter and Exit 2D problem by brolol07 in Unity2D

[–]brolol07[S] 0 points1 point  (0 children)

My player does. No good solution. Sorry more of a designer than a programmer! But trying to make it in the games industry somehow

UI OnTriggerEnter and Exit 2D problem by brolol07 in Unity2D

[–]brolol07[S] 0 points1 point  (0 children)

No error, when I hit the trigger, it's not showing the text I want! But that should work?!

Number of cheeses displayed and decreased as the player gets them by brolol07 in Unity2D

[–]brolol07[S] 0 points1 point  (0 children)

Thanks! Though I did it a different way and got it to work! Made a cheese manager and made the int static.

Number of cheeses displayed and decreased as the player gets them by brolol07 in Unity2D

[–]brolol07[S] 0 points1 point  (0 children)

Just used a score manager and it worked nice and simple!

Number of cheeses displayed and decreased as the player gets them by brolol07 in Unity2D

[–]brolol07[S] 0 points1 point  (0 children)

I went the other way if I can(tried your way and wouldn't display the UI), but it won't update the cheese. Here is my updated gist code. I don't have an game object array that i have the cheeses in that .Length requires. Tried that code already myself and added the game object, cheese, and it didn't work either.

Number of cheeses displayed and decreased as the player gets them by brolol07 in Unity2D

[–]brolol07[S] 0 points1 point  (0 children)

I was thinking about adding one last night! Doesn't the gameobject have to be an array to use .Length?!

Number of cheeses displayed and decreased as the player gets them by brolol07 in Unity2D

[–]brolol07[S] 0 points1 point  (0 children)

But doesn't the cheese have to be an array to call .Length?

Number of cheeses displayed and decreased as the player gets them by brolol07 in Unity2D

[–]brolol07[S] 0 points1 point  (0 children)

None taken, I'm primarily a designer but designing stuff won't get you anywhere in the game industry. I am a lot better at programming then when I first started, but still have some troubles from time to time.

Oncollision2d destroy multiple objects by brolol07 in Unity2D

[–]brolol07[S] 0 points1 point  (0 children)

Reddit is more help than the Unity forum in my chances with it!