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
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Utilities Devoolio.com - work-in-progress tools site for Unity projects

Discussion in 'Tools In Progress' started by Maccyfin, Apr 4, 2022.

  1. Maccyfin

    Maccyfin

    Joined:
    Aug 19, 2012
    Posts:
    87
    Hey all. i'm working on a site which I plan will contain some handy tools for working with Unity projects. It's super early stage. Only functionality I've added so far is a CS file line counter:

    upload_2022-4-4_17-54-44.png

    The line counter page

    The next tool I'm working on is an Optimization Scanner. Basically it goes through the code and looks for slow / heavy functions such as Debug.Log(); or Instantiate();

    upload_2022-4-4_17-58-18.png
    The Optimization Scanner page

    This is similar to the highlights seen in the Rider IDE but instead its a search for all heavy functions across all the cs files.

    QUESTIONS

    1) Would anyone find this useful?
    2) If so would anyone like access to try it out? The line counter is already live at Devoolio.com
    3) What heavy function checks would you like to see added?
    4) What other searches in cs files would you like to see added? Eg, the use of foreach as opposed to for. Whether or not a summary has been added to the top of each cs file etc.


    upload_2022-4-4_18-2-3.png
    Example of a summary comment

    Would be great to get some feedback / input and hear what the community wants.

    Thanks all :)
    Martin
     
    mgear likes this.
  2. BetaMark

    BetaMark

    Joined:
    Sep 27, 2014
    Posts:
    229
    Can I bake this into a CI/CD pipeline with PlasticSCM?
     
  3. Maccyfin

    Maccyfin

    Joined:
    Aug 19, 2012
    Posts:
    87
    hey @BetaMark . thanks for the reply.
    It would be very cool to do that. Honestly at the moment I have no idea how it would be done, but if devs find it useful then its something I can look into for sure.

    Im adding a few more checks but aiming to get an early beta release out in the next few days. Very simple, early days, but it'll hopefully prove useful.

    I'm curious. You have a pretty large code base and often look for use of 'heavy' function calls?
     
  4. BetaMark

    BetaMark

    Joined:
    Sep 27, 2014
    Posts:
    229
    I'm still pretty early in my unity career, so a lot of my projects are built on top of asset "frameworks".

    What I'd be looking for is a source code control integrated tool that keeps my whole teams quality high, like I do with Rider on my local laptop (but can't force my team to do), hence the question about ci/cd integration.
     
  5. Maccyfin

    Maccyfin

    Joined:
    Aug 19, 2012
    Posts:
    87
    @BetaMark - makes sense. I'll keep everyone updated here on progress. If CI/CD is in the pipeline i'll let you know for sure.
     
  6. Maccyfin

    Maccyfin

    Joined:
    Aug 19, 2012
    Posts:
    87
    hey all + @BetaMark. The Optimization Scanner v1 is now live. Go to devoolio.com.
    Any feedback / feature request, let me know.
     

    Attached Files:

  7. Maccyfin

    Maccyfin

    Joined:
    Aug 19, 2012
    Posts:
    87
    Hey all. It's been a while since I've pinged here.
    Been a super busy few months but finally managed to make some progress on the next tool within Devoolio.com.

    At the moment its called 'Entry Point' but that will change. It allows you to quickly find the Unity callback functions in any scene, eg. Awake() Start() Update(). This should be handy with new projects and for just generally knowing where code is getting started from.

    upload_2022-6-13_4-55-30.png

    I'm personally not a big fan of using Update() on many game objects. Instead I prefer using a single Update() function where possible, and having that call a ManualUpdate() on all the other game objects.

    In the screenshot below I can see Update() is being called on several objects in a few different scenes:

    upload_2022-6-13_4-59-12.png
     
    Last edited: Jun 13, 2022
  8. Maccyfin

    Maccyfin

    Joined:
    Aug 19, 2012
    Posts:
    87
    By the way, any feedback / ideas are always welcome please ping here.

    And just for funsies. Here's part of the monster json object I needed to create. Basically I've parsed the unity scene yaml file into a js object, and through parsing the .cs.meta files, grabbed the associated cs file and parsed that for the built-in callback functions (Awake, Start, Update etc). It's turned out to be a lot deeper task than i originally thought.

    upload_2022-6-13_5-16-33.png
     
  9. Maccyfin

    Maccyfin

    Joined:
    Aug 19, 2012
    Posts:
    87
    Hey all. It's been a big long while since I posted an update on this thread.
    I finally got a beta version of the new utility tool called Entry Point which can be found here: https://www.devoolio.com/entryPoint

    upload_2022-9-3_12-8-49.png

    It turned out to be way way way more complicated than I thought. Dealing with the unity scene files, deserializing them from a yaml text file to a js object, parsing all the .meta.cs files for a guid, parsing all the cs files in the scenes for the unity event functions, and then adding functions to the gameobject objects in the scene file, etc etc etc.

    I learnt a lot adding this utility to the site, but if i have to be honest, I don't think it's very useful. Originally in my head it seemed like something I'd use often, but so far I've only used it because i've been building it and testing.

    WHAT DOES IT DO
    In a nutshell, Entry Point helps you find all the Awake() Start() and Update() calls used in your scenes. Ie, calls which are actually fired off when playing a scene.

    Let's say I have a new project. I have no idea where code execution starts within the scenes, and there are a ton of objects within the scene. I can of course open VS Code and start to look for all instances of Awake() and Start(). However this is a very manual process.

    So instead in Entry Point I:

    1) Select the Asset folder of the project I want to analyse.
    2) Select the scene i want to find all instances of Awake() Start() and Update() in.
    3) Click Scan Scene

    upload_2022-9-3_12-16-12.png


    4) In the lower table I can now see that Awake() and Start() is called on a bunch of objects in the scene. I can also see the name of the game object they are attached to and the line number of the function:

    upload_2022-9-3_12-20-6.png

    One lacking feature at the moment is that it doesn't support finding these functions in scripts attached to prefabs. Prefab data isn't listed in the scene file and so a separate yaml file would need to be parsed and included, a big ol rabbit hole lol.

    I'll be working on some more utilities for the site from my own ideas. But I'd like to get some ideas from the community as well. Any feedback is welcome too of course :)

    Thanks all
     

    Attached Files:

    Last edited: Sep 3, 2022