Serially icon indicating copy to clipboard operation
Serially copied to clipboard

Use `MonoScript` instead of `GuidAttribute` and `ProvideSourceInfo` attributes

Open jasonboukheir opened this issue 1 year ago • 0 comments

GuidAttribute and ProvideSourceInfo attributes are used to uniquely reference classes. The Unity Editor already does this with meta files, and exposes it through the MonoScript asset.

The guid should be gotten from the MonoScript asset, and the pinging of the file can be handled through this asset as well.

The only flaw through this method, is that it will scale as O(n) to lookup types through the MonoImporter.GetAllRuntimeMonoScripts. Caching can help reduce any bottlenecks.

jasonboukheir avatar Dec 25 '23 20:12 jasonboukheir