handzlikchris / handzlikchris/FastScriptReload

Ability to add original filepath/lineNo on call to methods with [CallerFilePath] and alike attributes

Open
#195 0 comments 0 reactions 0 assignees View on GitHub
feature user-code-rewrite
Dominant language
C#
Stars
2.2k
Forks
167
PR merge metrics
No merged PRs in 30d

Description

It seems doable to manually rewrite outputs so that methods with caller attributes can redirect to original file
Said method example
```c#
public static void Trace(string module, string message, UnityEngine.Object extraInfo, [CallerMemberName] string methodName = null, [CallerFilePath] string fileName = null, [CallerLineNumber] int lineNo = -1, bool stacktrace = false)
```

```c#
//Original file myFile.cs - Right now rewrites leaves it as is
1203: Logger.Debug("Test", "Go here", gameObject);

//Proposed feature "Rewrite caller attributes"
1267 : Logger.Debug("Test", "Go here", gameObject, "CallerMethod", "Path/To", "myFile.cs", 1203);
```

This would streamline development process so one could jump back to hotreloaded files easily.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.