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. Voting for the Unity Awards are OPEN! We’re looking to celebrate creators across games, industry, film, and many more categories. Cast your vote now for all categories
    Dismiss Notice
  3. Dismiss Notice

How to see which functions are being called the most?

Discussion in 'Getting Started' started by NewSystemGames, Mar 3, 2018.

  1. NewSystemGames

    NewSystemGames

    Joined:
    May 23, 2017
    Posts:
    303
    Is there a way to know which functions i wrote are being called most? (aside from update ofc)
     
  2. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,840
    Yes, that's what the Profiler does for you.
     
    Kiwasi likes this.
  3. NewSystemGames

    NewSystemGames

    Joined:
    May 23, 2017
    Posts:
    303
    Does assets that are on the project but not used count up when building? I.e, do you have to find & delete unused assets before building or does Unity discard those for you?
     
  4. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,091
    Unity will ignore unused assets when building the project unless they're in a folder named Resources. It's possible to have multiple Resources folders too so if you add third party assets to your project you may need to check to see if any of them add folders with that name.

    https://docs.unity3d.com/Manual/SpecialFolders.html
    https://unity3d.com/learn/tutorials/topics/best-practices/resources-folder
     
    JoeStrout likes this.
  5. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    Use the profiler. In many cases, Update isn't your culprit.