Search Unity

Add on Enter Function without scripts like UI Button

Discussion in 'General Discussion' started by EmeraldThunder, Jun 12, 2019.

  1. EmeraldThunder

    EmeraldThunder

    Joined:
    Jan 10, 2016
    Posts:
    50
    Hey everyone, what is up?:)

    I was thinking about this since along time ago and it is I think very helpful to save time

    I am asking Unity team to add this option to Unity3D

    Add on Enter Function without scripts like UI Button for colliders, yes colliders.

    like advanced trigger option when you assign target object to do something when it enters trigger collider

    like Disabling/Enabling other object or playing sound, video or animation or anything else just like "toggle button" when you check it on it makes another object active or inactive.

    like here I mean on Enter Triger Collider it: GameObject.SetActive

    and select object you want it active or not
    OnEnter.jpg
    orrr

    like here I mean on Enter Triger Collider it: AudioSource.Play
    ddddd.jpg


    and therefore no need for Scripting;)

    tadaaaaa:D


    Thanks alot:):):):)

     
    Last edited: Jun 12, 2019
  2. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    10,162
    1. Format your posts normally. Reading an entirely bolded post with almost random colour changes is a pain in the ass.
    2. This is trivial to implement on your own and you can just save the code and use it again later.
     
  3. EmeraldThunder

    EmeraldThunder

    Joined:
    Jan 10, 2016
    Posts:
    50

    Well Bold is better than tiny font and I like it and colors are kinda related to Unity3d kinda like colliders which are green and audio Orange
     
    Last edited: Jun 12, 2019
  4. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    10,162
    Bold is not "better" because the increased glyph weight makes it more difficult to focus. If people want the text to be bigger on their end, there is an entire function built into every modern browser that does just that. On top of that, it doesn't matter if the colliders and audio stuff is like that in the engine because we are not using the engine. We are using a forum. On top of that, you even used green in an entirely different context for another reason.

    And that doesn't address the main point: this is trivial to implement on your own and you can just reuse your code in other projects.
     
    MadeFromPolygons likes this.
  5. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    You can already do this with existing functionality.

    No. Bold is not better then standard. Every single forum user has their screen size and resolution set up around what's comfortable reading for them. Which means that in 99.9% of cases the default is better.
     
  6. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,205
    Haven't read your post and won't read it until it's formatted in a way that doesn't make my eyes and head hurt. Based on your images though it's a safe bet that you think UnityEvents will somehow eliminate the need to write a line of code and that's just not the case.
     
  7. EmeraldThunder

    EmeraldThunder

    Joined:
    Jan 10, 2016
    Posts:
    50
    but In
    the game making process will be faster and easier
     
  8. EmeraldThunder

    EmeraldThunder

    Joined:
    Jan 10, 2016
    Posts:
    50
    changed to normal
     
    MadeFromPolygons likes this.
  9. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,620
    I agree it'd be cool for Unity to do this kind of thing rather than rely on the existing solution with some magic names.

    However, this is also true:
    Make a script with OnCollisionEnter/Stay/Exit methods. Add UnityEvents for each of those things. Have the methods invoke the events.

    Also, a benefit to doing this yourself is that you can control which ones you need, and have separate components for triggers and standard colliders, and things like that. If Unity did it for us they'd have to take the kitchen sink approach, or simplify what's available, or assume that we always do/don't want the parameters calculated...
     
  10. EmeraldThunder

    EmeraldThunder

    Joined:
    Jan 10, 2016
    Posts:
    50
    Unity should make things easier more and more
     
  11. EmeraldThunder

    EmeraldThunder

    Joined:
    Jan 10, 2016
    Posts:
    50

    if it would be as I mentioned above there wont be need for scripts, variables, function bla bla bla.....
     
  12. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,620
    Well... you're making a game. You need scripts and variables and functions. It's how video games work.
     
  13. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    10,162
    As even specific examples have pointed out, this is a trivial thing to implement and the kind of thing you can just copy into another project. Do you... not have a repo full of common techniques your games share?
     
    EmeraldThunder and zombiegorilla like this.
  14. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,205
    Having spent a number of months with a project that is heavily utilizing UnityEvents... I have to say that they're not the magic bullet some people want to believe they are. There are some very serious limitations to them and they can be difficult to follow compared to following the flow of code.

    Unity has been progressively making game development easier with every release, but regardless of how much time passes there will always be a need for programming. Core concepts like variables, functions, etc won't go away and truthfully that's not a problem because they were never difficult concepts to begin with.
     
    taptpci likes this.
  15. zombiegorilla

    zombiegorilla

    Moderator

    Joined:
    May 8, 2012
    Posts:
    9,052
    As others have said is very trivial. And it would be no different than a UI button. That is just a script. You could even extend the collider so every one gets that functionality. Unity doesn't add built in components for every single need, they built that into the editor and other classes to let you tailor the app to your needs. Not everyone wants or needs that functionality. Jamming everything everyone wants onto every inspector just junks everything up and adds a bunch of stuff that may take resources. Instead, the solution is simple and clear, it is trivial and if it is something you want, just add it. Adding it to your project would have taken less time than it to make that first post.
     
    Joe-Censored and SparrowGS like this.
  16. EmeraldThunder

    EmeraldThunder

    Joined:
    Jan 10, 2016
    Posts:
    50
    but making game in a faster and easier way is better
     
  17. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    10,162
    Then, once again, code it once and save the code.
     
  18. EmeraldThunder

    EmeraldThunder

    Joined:
    Jan 10, 2016
    Posts:
    50
    it is different from UI Button because button is clicked or touched then some thing happen, but a trigger collider is different, for example player enter it, it activates an Inactive UI button like for example Enter the door or turn light on when you get close to a 3d model of Door or light key having trigger collider, and Unity wont lose anything by adding such a feature and those who think it is trivial and unimportant it is their opinion and respected and this is my opinion and I like it to be added to Unity3D that I use, you don't like it just don't use it, you don't have to

    thanks
     
  19. EmeraldThunder

    EmeraldThunder

    Joined:
    Jan 10, 2016
    Posts:
    50
    doing this is good but, My idea is not bad at all for lazy people like me haha
     
  20. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,205
    They won't gain anything either. Unless you think dragging people in who will never be able to make a game is useful.
     
    EmeraldThunder likes this.
  21. EmeraldThunder

    EmeraldThunder

    Joined:
    Jan 10, 2016
    Posts:
    50
    they will gain my love and respect
     
  22. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,205
    Just finished looking through all your past threads... and literally every thread has been nothing but trolling.
     
    MadeFromPolygons likes this.
  23. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    10,162
    Lazy people don't make games.
     
    Joe-Censored and EmeraldThunder like this.
  24. EmeraldThunder

    EmeraldThunder

    Joined:
    Jan 10, 2016
    Posts:
    50
    thnx
     
  25. EmeraldThunder

    EmeraldThunder

    Joined:
    Jan 10, 2016
    Posts:
    50
    If you are developer of Unity dont Add this feature but if you are not please kindly leave here

    thnx
     
  26. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    10,162
    No. I'm here forever. I'm like that rash you got after that time you went to Tallahassee.
     
  27. EmeraldThunder

    EmeraldThunder

    Joined:
    Jan 10, 2016
    Posts:
    50
    hehehe you must be extremly free hahahaha
     
  28. kdgalla

    kdgalla

    Joined:
    Mar 15, 2013
    Posts:
    4,639
    If you don't like to code, why not just buy PlayMaker or something?
     
  29. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,620
    They'll get a little more code to maintain, a more cluttered interface... what's not to love? :)
     
    MadeFromPolygons, Ryiah and SparrowGS like this.
  30. SparrowGS

    SparrowGS

    Joined:
    Apr 6, 2017
    Posts:
    2,536
    Oh my god I'm this close to just writing an extension for you just to shut you up, you could've had it up and running by the time you made the first god damn post!

    btw, I don't really mind the bold, but the light green is a F***ing killer - especially with out the bold, heh.
     
  31. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    3,296
    wellthen.gif

    On topic:
    Use scripting and UnityEvents. Add those to the mix to any script you like, and you've got your desired functionality. Extend requested classes on your own for bonus points.

    Also note: UnityEvents are F***ing abysmal and evil at the same time.
    Once you hook up too many things visually it just becomes a visual spaghetti mess.

    Also, adding these callbacks to those components will make things even worse.

    If you want to do some visual scripting, use proper tools instead. Like PlayMaker.
     
    MadeFromPolygons likes this.
  32. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,620
    Personally, I don't hook up anything "important" in the Inspector. By "important" I mean anything that has to do with core game functionality. That stuff is all done in code., with AddListener(...) and co.

    I do still find it useful to have events in the Inspector, but I use this mostly for "dressing". For instance, an OnDeath event might be hooked up to a particle system and some sound effects. Now I can play these without needing to bloat my code with a bunch of simple but verbose presentation stuff. At the same time, if something comes unhooked it's not the end of the world, and - importantly - I'm not hooking up complex stuff like that, which is then a pain in the backside to debug.

    If your tools are making more work than they save then either they're bad tools or youneed to change how you're using them. And I can attest that events are excellent tools. ;)

    Events are "proper tools". However, they are not the tool for that job. They are not intended as a visual scripting solution, and don't provide everything you would need for that. It's kind of like using a hammer to drive screws.
     
    Ryiah and xVergilx like this.
  33. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,983
    After reading all these posts I still cant tell if you are for real or just trolling. What your asking for takes basically a couple of lines of code to implement, and clutters the interface as well as uses UnityEvents which are by nature not very performant and difficult to debug. That is why no unity developer is going to make this trivial to add thing built in by default.

    If you want to add this then add it, but no-one is going to make the engine worse just because you, OP, cannot be bothered to learn even the most basic unity scripting from the most basic of unity tutorials.

    I feel like from the way you are posting that you are just purposefully wasting peoples time, which is annoying given that many respected members of this forum have popped up in this thread to give you sound advice. So take the advice, or stop (seemingly) trolling and write the couple of lines of code that has already been explained to you in like 2-3 different ways in this very thread.
     
    SparrowGS and xVergilx like this.
  34. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    I don't think the OP's idea is inherently a terrible idea as an extra component that you can add to your object. I don't think the functionality should be built into the rigidbody or other commonly used components.

    Terrible reason. Unity is not designed for the lazy. It is designed for building professional quality games, which inherently disqualifies lazy people. Try Roblox instead.

    Making design changes to cater to the lazy would be the end of Unity taken seriously.
     
    xVergilx likes this.