Built-in IDE
Roslyn completion, navigation, builds and C# debugging.
Open project code
The built-in IDE uses C# and a Roslyn project model. Types, assembly references and project documents determine its view of the code. An incorrectly configured .csproj can therefore cause bad completion even when the source text is correct.
- Double-click a
.csfile in Assets. An assigned script can also be opened through Inspector. - Let the editor load the C# project and finish initial document processing.
- Make a small code change and save the document.
- Build the project; if it fails, read the first error.
- Run the intended scene and inspect the result in the game window.
A configured external editor may receive file-opening requests. Selecting one does not remove the need for a matching SDK and project references.
Completion and navigation
| Tool | Use |
|---|---|
| Code completion | Find available properties and overloads |
| Signature help and XML documentation | Check argument order and API meaning |
| Go to definition | Open a type or member declaration |
| Find references | Locate callers before changing a shared method |
| Rename | Update related C# references through Roslyn |
| Diagnostics | Find errors with a file and line |
Reference search and renaming understand C# symbols, but need not rewrite arbitrary resource-path strings. After moving files, check asset:// strings and stored external references.
Do not work around a missing API by inventing a class with the same name. Check Reckfell.NET.Sdk, project version and the installed editor distribution first. Your first C# script.
Debug gameplay code
Place a breakpoint in a method that actually executes, then run the appropriate document or project. Inspect the call stack and variable values when it stops; step forward to observe state changes.
If the breakpoint never triggers, check the build, Debug configuration, active object instance and attached component. Open source text can differ from the executing assembly when edits are unsaved or the latest build failed.
New text in the IDE does not prove that running logic has been hot-replaced. After changing class structure, exported properties or component relationships, rebuild and restart the game when necessary.
Work with SharpGraph
The graph/C# view helps relate blocks to generated code. Once converted to editable C#, the created files are ordinary source files. Before editing, check which behavior is attached to the object: the graph variant or its C# replacement.