Search Unity

Feedback Script Dependency Graph or Visualizer

Discussion in 'General Discussion' started by liquify, Jan 16, 2022.

  1. liquify

    liquify

    Joined:
    Dec 9, 2014
    Posts:
    187
    If I don't work on a project for several years, I usually forget about the project code structure. It would be nice to have a tool from Unity, to visualize or to view the script dependency graph, so we could easily recall the code structure.

    There is Script Dependency Visualizer on the Asset Store, but it's just for MonoBehaviour. NDepend is a highly sophisticated software, but the subscription fee isn't cheap.

    I think Unity could attract more developers if it comes with its own IDE and dependency graph or visualizer. Do you use similar tool for your projects?
     
  2. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,983
    I completely disagree with this idea, that is a terrible use of resources. Unity is a content creation engine, they are not IDE developers. There are plenty of IDEs with first party support for unity, this would be a complete waste of time.

    If you need an IDE look at rider, or vs code, or visual studio. There is no need for a unity specific IDE, when there are already many fully featured ones. What would a unity IDE solve?

    The idea of a script dependency graph I suppose is a bit better but again, plenty of tools exist for this sort of thing already.

    https://docs.microsoft.com/en-us/visualstudio/modeling/visualize-code?view=vs-2022

    https://www.codesee.io/

    https://marketplace.visualstudio.com/items?itemName=YaobinOuyang.CodeAtlas

    https://gource.io/

    The list goes on, there are so many this would be a waste of resources - just use something that is available.
     
  3. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,573
    Ah, no, absolutely not.

    When an engine includes its own ide, the expectation is that it is going to be half-assed broken tool, because it has been indevelopment for shorter amount of time than existing choices.

    The engine should instead focus on supporting widely used choices and indsutry standard IDEs if there are any.
     
    MadeFromPolygons likes this.
  4. liquify

    liquify

    Joined:
    Dec 9, 2014
    Posts:
    187
    Thanks for the links.
     
  5. liquify

    liquify

    Joined:
    Dec 9, 2014
    Posts:
    187
    I thought it was going to be easy for Unity, to develop their own IDE, since they made the API.
     
  6. Stardog

    Stardog

    Joined:
    Jun 28, 2010
    Posts:
    1,913
    It would be useful, but obviously they won't do it.

    Try this instead - https://assetstore.unity.com/packages/tools/visual-scripting/script-inspector-3-3535

    Godot has one, and soon Unreal with Verse will likely have it integrated, leaving Unity without.
     
    liquify likes this.
  7. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    10,160
    Why would they when IDEs already exist and cover a wide variety of use cases?
     
    MadeFromPolygons likes this.
  8. liquify

    liquify

    Joined:
    Dec 9, 2014
    Posts:
    187
  9. liquify

    liquify

    Joined:
    Dec 9, 2014
    Posts:
    187
    I don't think any existing IDE can show Unity script dependency graph comprehensively. Do you know an IDE that has that feature?
     
  10. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    10,160
    There are tools for this, including the commercial versions of Visual Studio itself.
     
    MadeFromPolygons likes this.
  11. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,620
    Unity used to have its own IDE. They created and "maintained" a Unity-specific version of MonoDevelop for some time. I remember it being fine, until it suddenly wasn't.
     
    MadeFromPolygons likes this.
  12. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,983
    I literally linked you to some tools that do this. I am assuming you did not actually try them / did not read their docs properly if you did.
     
  13. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,338
    You're misremembering. To be fair, at the time the only real competition was Visual Studio 2015, and when everything on the market is buggy, slow garbage, it's easy to get Stockholm Syndromed into thinking that one of the alternatives is decent.

    But yeah no it was never fine. It often thought that half a file were comments, starting in the middle of a line, for no particular reason. The debugger never worked. It looked ugly. It punched babies and kicked kittens!

    @liquify, if your code is laid out neatly enough that you'd get a clear understanding from looking at a graph of type dependencies, it's probably neat enough that it's possible to get a good overview from just looking through the code for like an hour.
     
    NotaNaN likes this.