Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Writing plugins to improve workflows

Discussion in 'Open Projects' started by Neonage, Sep 29, 2020.

  1. Neonage

    Neonage

    Joined:
    May 22, 2020
    Posts:
    242
    The first thing i saw after opening the project is bad game objects organization:
    upload_2020-9-29_13-0-22.png

    This is hard to work with, so i've wrote hierarchy extension that displays folders.
    upload_2020-9-29_15-28-50.png

    How can it be contributed to the project? Added as git package, like "Game Ingredients" in Boat Attack repo?
     
  2. cirocontinisio

    cirocontinisio

    Joined:
    Jun 20, 2016
    Posts:
    884
    Hehe, that scene is a big WIP so don't judge me too hard on that.

    The plugin is cool!! What does it do, is it displaying an icon next to designated empty game objects? How do you designate them?

    And as for how to add it, I think a git package is a good way. Is it already hosted on Github?
     
    luisquid, Proddan_FR and Neonage like this.
  3. Neonage

    Neonage

    Joined:
    May 22, 2020
    Posts:
    242
    Just some reflection: HierarchyWindow > SceneHierarchy > TreeView > FindItem
    And directly setting it's icon :)
    But there is no folders in play mode as they're getting detached, would need to bash my head around it
    Adding some final touches to the inspector, will host soon
     
  4. cirocontinisio

    cirocontinisio

    Joined:
    Jun 20, 2016
    Posts:
    884
    Ah you mean the icon of the GO, like the one that appears in the scene too?

    What happens when you press Play? Do those objects disappear and the children are detached?
     
  5. Neonage

    Neonage

    Joined:
    May 22, 2020
    Posts:
    242
    No, internal hierarchy icon only
    And i think i've gone loose now :D
    upload_2020-9-29_21-26-20.png
    Yep, thanks to IProcessSceneWithReport
     
  6. Neonage

    Neonage

    Joined:
    May 22, 2020
    Posts:
    242
    Phah, it's the most obvious hack i've ever made xD
    upload_2020-9-29_21-56-45.png
    upload_2020-9-29_21-56-29.png
     
  7. Neonage

    Neonage

    Joined:
    May 22, 2020
    Posts:
    242
    Hmm, maybe we should keep folder GameObject in build, so components can be attached there?
    upload_2020-9-29_22-20-56.png
     
  8. cirocontinisio

    cirocontinisio

    Joined:
    Jun 20, 2016
    Posts:
    884
    Hmm, I wouldn't suggest going with all that customisation because it creates a lot of visual noise. You don't need to know at all times all the components that every object has.
    The folders should be enough.

    Sorry I didn't get what you mean here.
     
  9. Neonage

    Neonage

    Joined:
    May 22, 2020
    Posts:
    242
    It's not all the components, it's main component only.
    Trying to find game objects just by it's name was always frustrating to me.
    Now i always see where is all my lights, particles, UI elements, cameras and etc.
    But anyway, I'll make a lot of preferences later :)

    Currently only Folder component is stripped from build, so custom components can be added to object. But if there's transform related components it may introduce errors
     
  10. cirocontinisio

    cirocontinisio

    Joined:
    Jun 20, 2016
    Posts:
    884
    So, the way the plugin works is that it requires a "folder" component to be attached to the GameObject to display the icon?

    This sounds a bit worrying :)
     
  11. Neonage

    Neonage

    Joined:
    May 22, 2020
    Posts:
    242
    Yes, when you add this component, it hides GameObject and Transform GUI for this object.

    Of course, need to add warning in inspector and option to completely strip folder object.
    Or maybe just disallow excess components for consistency :)
     
  12. cirocontinisio

    cirocontinisio

    Joined:
    Jun 20, 2016
    Posts:
    884
    Thanks, Neonage. I need to see how the plugin works and whether it's easy to build with it before I can merge it into the repo. If it's a hard procedure, it might not be worth pushing it to everyone. I welcome custom tools, but for any modification we introduce we need to enable and teach everyone on the project how to use it.

    Also, I feel like the additional icons are a lot, since they hide the status of whether an object is a Prefab or just a regular GameObject, and they add a lot of visual noise. So it would be nice if you can make them optional.
     
  13. Neonage

    Neonage

    Joined:
    May 22, 2020
    Posts:
    242
    Well, i'm trying to make it as intuitive as possible, so there would be minimal need to teach.
    Just add package and boom - quality of life improvements!

    When item is selected, it shows related prefab icon. Maybe show it on hover as well?

    Alright, it's live now :)
    https://github.com/neon-age/Smart-Hierarchy
     
    io-games likes this.
  14. hyagogow

    hyagogow

    Joined:
    Apr 25, 2014
    Posts:
    26
    That's a really good tool to organize your scenes. :)
    Thank you for sharing!
     
  15. Neonage

    Neonage

    Joined:
    May 22, 2020
    Posts:
    242
    I'm gonna make whole bunch of them for this project ;)