Skip to content
This repository was archived by the owner on May 9, 2023. It is now read-only.

Commit 0f431e9

Browse files
committed
Update README.md
1 parent 2107df7 commit 0f431e9

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,32 @@
4646
* <b>C# Console</b>: Interactive console for evaluating C# methods on the fly, with some basic helpers.
4747
* <b>Inspect-under-mouse</b>: Hover over an object with a collider and inspect it by clicking on it. There's also a UI mode to inspect UI objects.
4848

49+
### C# Console Tips
50+
51+
The C# Console can be used to define temporary classes and methods, or it can be used to evaluate an expression, but you cannot do both at the same time.
52+
53+
For example, you could run this code to define a temporary class (it will be visible within the console until you run `Reset();`).
54+
55+
```csharp
56+
public class MyClass
57+
{
58+
public static void Method()
59+
{
60+
UnityExplorer.ExplorerCore.Log("hello");
61+
}
62+
}
63+
```
64+
65+
You could then delete or comment out the class and run the following expression to run that method:
66+
67+
```csharp
68+
MyClass.Method();
69+
```
70+
71+
However, you cannot define a class and run it both at the same time. You must either define class(es) and run that, or define an expression and run that.
72+
73+
You can also make use of the helper methods in the console to simplify some tasks, which you can see listed when the console has nothing entered for input. These methods are **not** accessible within any temporary classes you define, they can only be used in the expression context.
74+
4975
## How to install
5076

5177
### BepInEx

0 commit comments

Comments
 (0)