Search Unity

[SOLVED] How can I see what statements Unity / C# methods call?

Discussion in 'Documentation' started by Deleted User, Nov 20, 2014.

  1. Deleted User

    Deleted User

    Guest

    Or even if I wanted to see the Input class in detail, how would I do that?
     
  2. Rasmus Selsmark

    Rasmus Selsmark

    Joined:
    Mar 13, 2013
    Posts:
    120
    Can you explain a little more what the problem is that you are trying to solve?
     
  3. Deleted User

    Deleted User

    Guest

    I want to have a look at the built-in Unity classes and methods. How can I do that?

    For example, Vector2.MoveTowards. I know it does some math behind the scenes. If I wanted to look at what it does exactly, where would I look? Not just that one, but all of them.
     
  4. Rasmus Selsmark

    Rasmus Selsmark

    Joined:
    Mar 13, 2013
    Posts:
    120
    So you are basically asking for the Unity source code? :)

    I think the best answer I can give you now is http://blogs.unity3d.com/2014/08/20/more-open-source-initiatives-from-unity/, i.e. we're starting to make source code for selected parts of Unity available as open source, although not the specific areas you are asking for.

    But I'm still curious, why are you asking for this?
     
    Deleted User and Stoven like this.
  5. Deleted User

    Deleted User

    Guest

    Yes. :p

    I need it for learning purposes and also for scripting purposes.
    But mostly for learning purposes. :)
     
  6. alexzzzz

    alexzzzz

    Joined:
    Nov 20, 2010
    Posts:
    1,447
    I guess if somebody by accident look inside UnityEngine.dll with any .net reflection tool, he will find no commercial secrets there.
     
    sootie8 likes this.
  7. Rasmus Selsmark

    Rasmus Selsmark

    Joined:
    Mar 13, 2013
    Posts:
    120
    Also thought about just reflecting the assemblies, but you'll in most cases find that they are simply a thin layer on top of the C++ core. I will see if I can get some more suggestions for you
     
    shkar-noori likes this.
  8. Rasmus Selsmark

    Rasmus Selsmark

    Joined:
    Mar 13, 2013
    Posts:
    120
    Deleted User likes this.
  9. Deleted User

    Deleted User

    Guest

    Thanks but I already know that one. It's just the first one that came into my head when I was writing the thread.
    I'm more interested in looking at the touch and input classes.
     
  10. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    If you are using MonoDevelop and you right click on a methode like MoveTowards, you can select "Go to Declaration".
    What you will find there is not really spectacular. Be aware that they obfuscated the variable names.