0

When wondering how the source code of the .NET API is implemented, I check the mscorlib of dotPeek.

I recently started studying Unity, and I'm curious about the inside of the UnityEngine namespae.

using UnityEngine; // This one!

How can I check the inside of UnityEngine namespace in dotPeek?

Here's what I've tried:

  • I looked for MSDN API Browser but couldn't find it.
  • I downloaded and decompiled UnityEngine.dll, but it wasn't what I want.
  • I downloaded the Unity Engine decompiled file from GitHub, but it was the engine itself, not the namespace.
  • I searched the official Unity website, but could only find an explanation of the terminology.

Currently I am using the Go to definition method provided by Visual Studio 2022.

It's a really great feature, but it's a pity because it can only be used when there is a written source code.

I really desperately want your help. Thanks for reading.

ProgrammingLlama
  • 36,677
  • 7
  • 67
  • 86
  • Multiple libraries can declare types (classes, etc.) within the same namespace. In fact, you could write the following code in your own project: `namespace UnityEngine { public class MyClass { } }` and then `MyClass` would be available anywhere where you have using UnityEngine;. I don't know about Unity, but it's entirely possible that the code you're looking for isn't contained in a single assembly. Unless Unity is open source, the only way you can sort of see the code is to decompile the libraries. – ProgrammingLlama Mar 09 '22 at 01:34
  • Have you looked through the source code that unity has made available? [Here is the gitHub](https://github.com/Unity-Technologies/UnityCsReference) It isn't everything, but if you are looking for something in particular, it is a useful resource. – hijinxbassist Mar 09 '22 at 01:36
  • 2
    [Unity Scripting API](https://docs.unity3d.com/Packages/com.unity.ugui@1.0/api/index.html) – quaabaam Mar 09 '22 at 01:39
  • 1
    @quaabaam oops.. docs were there... Thank you. –  Mar 09 '22 at 01:50
  • @quaabaam lol ^^ – derHugo Mar 09 '22 at 08:05
  • You can try to take a look at https://docs.unity3d.com/Manual/UsingDLL.html, Thank you – Housheng-MSFT Mar 14 '22 at 08:51

1 Answers1

0

The Unity Scripting Engine is documented. That should be enough to do what you need for game development. Stuff like RigidBody can be found unter UnityEngine and then Classes.

Thomas Weller
  • 55,411
  • 20
  • 125
  • 222