Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

The tools I wrote to cope with the impossibly ambitious games we are making

Discussion in 'Made With Unity' started by John_Leorid, Dec 7, 2021.

  1. John_Leorid

    John_Leorid

    Joined:
    Nov 5, 2012
    Posts:
    637
    Scene Load Editor Window - lets us (teamwork) quickly switch between Testing-Scene, Game-Scene, Menu-Scene & load/unload Scene Groups (Tutorial_Static_Geo, Tutorial_Logic, Tutorial_Lightning, ..). (Having a lot of scenes helps to avoid merge conflicts when collaborating)
    upload_2021-12-7_20-51-10.png

    Scene Networking Window - to show who is working on a scene, we have a tool that connects to a server and lets us lock scenes. They can only be unlocked, when a push happend (using GIT Hooks to ensure this) and only acquired after a pull that happend later than the unlock (Date-Time stuff). Status is displayed in the Hierarchy.
    upload_2021-12-7_20-49-35.png

    Scene References - A tool to check any and all References to any GameObject in the Scene. It's very fast because it uses a cache and is super useful when working on puzzles.
    upload_2021-12-7_20-51-40.png

    Selection History - Jump back and forth in your selection like in visual studio by using the same keybinds:
    CTRL + - (Minus Key) -> Go to previous selected
    CTRL + SHIFT + - (Minus Key) -> Go to next selected (basically undoing "go to previous")
    CTRL + ALT + - (Minus Key) -> Open Selection History Editor Window to save & access favorites
    (works even when the editor window is not visible because I register to the
    SelectionChanged 
    Event in an
    [InitializeOnLoadMethod] 
    )
    upload_2021-12-7_20-49-35.png

    Sector System - Create Sectors (a bunch of Boxes in the Scene which define a volume) to enable/disable GameObjects. This fixed the performance for our big game. Basically like Sectr, but with specific features to support our multi-scene-setup and trimmed to efficiency by using an Octree, Math. I also wrote custom shaders to see the lines where a sector ends (intersection-line shader? IDK how to call it).
    upload_2021-12-7_20-52-33.png

    upload_2021-12-7_20-52-55.png
     
  2. John_Leorid

    John_Leorid

    Joined:
    Nov 5, 2012
    Posts:
    637
    Dialogue Trees - Setup Dialogues with branches, actions, any amount of characters - automatically saves into the (Unity native) "new Localization System"-Assets
    Dialogue Tree Example.png

    Logic Graph - Our Puzzles are complicated and there are always lots of references. Writing them in code would lead to lots of duplicate code, also I wanted to leveldesigner to be able to write his own puzzles. I started to write a system that works in the inspector, setting up references lead to very confusing connections and debugging was a pain.
    Then I used OnDrawGizmos to have everything visible in the SceneView but this wasn't any less confusing because we ended up with millions of lines between the objects and we always had to fly to them (with the scene view camera) to select them.
    That's why I built the Logic Graph, a tool to setup connections and references, everything visible in one graph (for one puzzle).
    upload_2021-12-7_21-1-55.png

    Behaviour Trees - an Editor to setup Behaviour Trees for the AI, visually indicates the state when an agent is selected but it has ~1200 calls to a dictionary each frame with ~5 Agents, which leads to very bad performance .. I will eventually find a way to fix this tho xD I am very happy that the trees don't create any garbage per frame anymore, had huge issues with boxing.
    upload_2021-12-7_21-8-24.png
     
  3. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,796
    Great work. keep it up
     
  4. John_Leorid

    John_Leorid

    Joined:
    Nov 5, 2012
    Posts:
    637
    Custom Transform Inspector oh boy, that was some hard work, but worth every second.

    upload_2021-12-11_2-15-33.png

    Functions:
    • Double-Click on a Label to round the Vector to the next full number (0.2 -> 0, 8.7 -> 9)
    • Right Mouse on a Label to open a menu to copy&paste values
      upload_2021-12-11_2-19-9.png
    • L = Lock (blue highlight when active), locks the children, so the transform can be moved/rotated independently of its childs. (also works with the move gizmo in the scene view)
    • U = Uniform Scale - when the scale changes, it will scale uniformly ((1, 1, 1) -> (2.2, 2.2, 2.2))
    • Click on the "Align" Button will bring up a menu with useful align options (works in combination with lock)
      upload_2021-12-11_2-16-45.png
    • "Pos", "Rot" Buttons: when multiple objects are selected, snap all to the position/rotation of the last one (a short-hand for "Right Mouse -> Copy Position (World) -> selecting other object -> Right Mouse -> Paste Position (World)". Basically "Move A to B"
    • Global = global position/rotation/scale (scale is an estimate based on lossy scale - useful for checking if an object has ~(1,1,1) scale of if any parent is scaled)
    • Circle-Arrow = Reset will reset Position/Rotation to (0,0,0) and Scale to (1,1,1) - also attempts to reset lossy scale to (1,1,1)
    • Parent = parent the whole selection to the last selected or a new empty (which is a child of the last selected GameObject) (excluding the last selected itself of course) upload_2021-12-11_2-16-59.png
    Built entirely on UI Elements.

    To be honest, I always wondered why the Transform Inspector doesn't have a lot of functionality built in. I mean, it's probably the most used Inspector. Also it has one of the worst context menus (in terms of efficiency). xD

    Maybe they kept it simple because they expect users to customize it to their needs?

    649 lines of code, visuals created in a seperate UXML File with USS classes for highlight and the circle icons.

    btw. I started this thread to give other developers ideas for their tools. I was looking for such a list myself and couldn't find any. Maybe some of those tools are clever time savers, one hasn't thought of.

    And please, feel free to post your own custom tools (but assetstore products are not allowed in this forum). ^^
     
    Last edited: Apr 26, 2022
    andreiagmu likes this.