Search Unity

Scene Cleaner Pro - The 1 click solution for a clean scene hierarchy

Discussion in 'Assets and Asset Store' started by jorisshh, Jun 18, 2016.

  1. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522



    When designing a level in Unity, the hierarchy oftentimes gets messy very quickly, and manually reformatting the hierarchy is A LOT of painful and boring work.

    The Scene Cleaner Pro asset allows you to automatically clean your scene hierarchy to keep your game projects clean. This saves a lot of time while developing and prototyping!

    The tool allows you to easily clean up Unity scenes based on both pre-defined and user-defined unique rulesets.


    Scene Cleaner Pro will re-format all objects in your scene in a clean and easy to view way, allowing you to quickly get an overview of the hierarchy.


    Main features:
    - Avoid breaking up prefabs while easily cleaning a Unity scene
    - Clean empty objects based on a ruleset that first checks if some objects can be deleted, merged, or re-arranged.
    - Clean hierarchy based on rule-set
    - Create area's with their own rules. This allows you to group all objects in a specific area like a village.

    By default, Scene Cleaner Pro allows you to clean up a scene hierarchy based on the following rulesets:

    - Sort by Tag
    - Sort by Component Type
    - Sort by Name Prefix
    - Sort by Defined Area
    - Clean empty objects

    Custom rules can also be added.


    This project was created in cooperation with Devdog and Valdemar Voss
     
    Last edited: Oct 13, 2016
    ElroyUnity likes this.
  2. iamsam

    iamsam

    Joined:
    Dec 22, 2013
    Posts:
    233
    Very interesting idea and seems like it will be useful in large projects. The main thing I usually struggle with is the addition of primitives when I am quickly changing a few things around the level. How would it handle these additional additions? Would it be possible to group them based on some kind of level design. For example proximity to pillars will group them with pillars or something similar.
     
    jorisshh likes this.
  3. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
    That would make a nice addition, however to avoid cluttering the scene with components that are only relevant for cleanup this would be quite difficult (at least, in an automatic way).

    There are grouping area's that can be used to create a ruleset within that area, such as a city.
     
    iamsam likes this.
  4. iamsam

    iamsam

    Joined:
    Dec 22, 2013
    Posts:
    233
    I like the grouping area idea :). How does one define the area? This in itself should resolve the problem as the gameobjects I am usually looking to group are usually confined to a particular area.
     
  5. ValdemarVoss

    ValdemarVoss

    Joined:
    Jun 20, 2016
    Posts:
    7
    The way areas work Is you add a CleaningArea component from the asset to an object, and then use a box collider as a bounding box for the area (it does not rely on collisions, only the pivot points)
    The box collider should not interfere with gameplay in anyway.
     
    jorisshh likes this.
  6. iamsam

    iamsam

    Joined:
    Dec 22, 2013
    Posts:
    233
    Sounds good! I think it would also be worth to try to define the area based on the colliders of selected GOs. So if I were to select a few GOs, the plugin could calculate the max bounds of those colliders and group additional GOs created later within the bounds. This would avoid having to create new GOs just for the sole purpose of grouping objects and adding more objects to the hierarchy.

    Will keep an eye on when it is released on the asset store :).
     
  7. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    I love this!!!

    I try to organize as I go but it never seems to work out that way. I forget and then have a huge mess of a scene that I have to go through and fix...which is so boring. My team members lecture me about my messy scenes. I love the idea of automating this.
     
    TeagansDad, ValdemarVoss and jorisshh like this.
  8. erich202

    erich202

    Joined:
    Sep 24, 2016
    Posts:
    38
    Clicking on Clean doesn't seem to do anything. Is there something I need to do first? Select the objects? Activate the scene?
     
  9. jorisshh

    jorisshh

    Joined:
    Oct 6, 2009
    Posts:
    1,522
  10. erich202

    erich202

    Joined:
    Sep 24, 2016
    Posts:
    38
    Seems like it! I'm looking at this scene and expecting it to clean it up. Am I mistaken?

    upload_2016-9-24_8-42-21.png

    Unrelated.. it's not compatible with SciFi UI. Seems like there's a bunch of places it's looking for things in the "Devdog.SceneCleanerPro.FullSerializer" namespace, but it's including the "Devdog.General.ThirdParty.FullSerializer" namespace. When I include the other one and continue, I get until the point it's trying to create an instance of fsConfig, which appears to be a static class. It's almost like I have half new files half outdated files. But this is a fresh import. Ah, maybe SciFi. Removing all Devdog and starting from scratch, yah it now shows the tools again.

    upload_2016-9-24_8-38-10.png
     
  11. ValdemarVoss

    ValdemarVoss

    Joined:
    Jun 20, 2016
    Posts:
    7
    The problem with it not sorting anything is that right now the asset does (unintentionally) not support using additive scenes , to get it working for now all other scenes must be removed from the hierarchy
    I will see about adding support as soon as possible. Thanks
     
  12. erich202

    erich202

    Joined:
    Sep 24, 2016
    Posts:
    38
    Thanks for getting back to me Valedemar. It seems like there's something else as well.
    upload_2016-9-25_21-57-35.png
    That line is:
    _groupObject = _objectsToClean.Find(x => x.name == "Group_" + groupName);

    So.. I gather it's not matching on anything and freaking out

    Same thing in a fresh Untitled scene.
     
  13. ValdemarVoss

    ValdemarVoss

    Joined:
    Jun 20, 2016
    Posts:
    7
    I'll look in to the issue

    Edit:
    I do not seem to be able to recreate this issue, have you tried reimporting the asset? Or using it in a new project?
     
    Last edited: Sep 27, 2016
  14. ValdemarVoss

    ValdemarVoss

    Joined:
    Jun 20, 2016
    Posts:
    7
    Functionality for using additive scenes has now been added, where the active scene is cleaned. Expect to see an asset update soon. :)

    Edit: This also fixes the null reference issue
     
    Last edited: Oct 2, 2016
    jorisshh likes this.
  15. ValdemarVoss

    ValdemarVoss

    Joined:
    Jun 20, 2016
    Posts:
    7
    Now the file conflict when using other Devdog assets has been fixed as well :)
    New release coming soon
     
  16. ValdemarVoss

    ValdemarVoss

    Joined:
    Jun 20, 2016
    Posts:
    7
    The new version is now live on the asset store! :)

    What's new in 0.2:
    • Added support for cleaning while using additive scenes
    • Fixed compatibility issues with other DevDog assets
     
    Last edited: Oct 13, 2016
  17. SuneT

    SuneT

    Joined:
    Feb 29, 2016
    Posts:
    41
    Quick update: You can win our newest asset; Odin Inspector & Serializer for free in a giveaway we just launched to celebrate that Odin is soon ready for release! :)

    Join here: http://vyper.io/c/1059
     
  18. RecursiveRuby

    RecursiveRuby

    Joined:
    Jun 5, 2013
    Posts:
    163
    Hey so I just picked this up and after installing it I can no longer build my project. I'm pretty sure it is because a script "CleanArea.cs" is using the UnityEditor namespace outside of the Editor folder. I don't really want to play around with it since I'm afraid I could break something so thought I'd post here and ask if you guys are getting this same issue.
     
    SuneT likes this.
  19. SuneT

    SuneT

    Joined:
    Feb 29, 2016
    Posts:
    41
    Thanks a lot for the bug report - I've forwarded this to the developer, and we'll be looking into it! Stay tuned.
     
  20. ValdemarVoss

    ValdemarVoss

    Joined:
    Jun 20, 2016
    Posts:
    7
    Thank you for the report, the bug has been fixed, however it will take a bit of time to be posted.
    If you need to build something now, then I can confirm that it is safe to remove the "Using UnityEditor" you simply have to remove the reset method in the "CleaningArea.cs" script.
     
  21. SuneT

    SuneT

    Joined:
    Feb 29, 2016
    Posts:
    41
    A bit of news
    We've decided to turn our own forums at forum.devdog.io to "read-only" and instead switch to our own Discord server.

    The Discord server will allow for faster support and quicker messaging back and forth! ;)

    So if you're experiencing any issues, have feedback, or just want to show-off whatever you've made using any of our tools and hang out with us, come join: https://discord.gg/zjNj5zZ