7 Commits

Author SHA1 Message Date
Shutong Wu 777e8a9c7a fix: trust the pipeline flag when a domain reload is deferred (#1276)
EditorApplication.isCompiling conflates three states: actually compiling,
compilation queued, and finished-but-reload-deferred. A project holding
EditorApplication.LockReloadAssemblies sits in the third state for as long
as the lock is held, with no compilation running, and isCompiling stays
true the whole time.

Eight call sites gated on that raw flag, so they refused work indefinitely:
the stdio bridge would not start, unity_reflect and manage_scriptable_object
returned "Unity is compiling", refresh_unity reported the wrong resulting
state and never completed its wait, the stdio reload handler deferred its
resume, and TestJobManager both mis-attributed its init timeout and reported
a bogus "compiling" block reason.

Route all eight through EditorStateCache.GetActualIsCompiling(), which falls
back to the event-tracked CompilationPipeline flag, and drop the isPlaying
gate that previously limited the workaround to play mode.

Verified live: with LockReloadAssemblies held after RequestScriptCompilation,
EditorApplication.isCompiling is true while the pipeline flag is false, so
CompilationPipeline.compilationFinished does fire while the reload is held.
2026-07-28 12:05:30 -04:00
Shutong Wu 1fba42998c Update0503
1.Add Compat based scripts revolving around UnityCompatShims.cs, that will document our current API Compatibility changes in several files.
2.Add custom screenshot folder selection
2026-05-03 18:16:10 -04:00
dsarno a3465587d2 fix: Unity 2021.3 compat — compile errors, Mono crash, 19 test failures (#1036) 2026-04-05 18:07:06 -07:00
Shutong Wu 6a8c774167 fix: address code review findings (round 2)
- get_member now resolves extension methods as fallback before "not found"
- lookup preserves original-case slugs for Manual pages (UIE-USS-Properties-Reference)
- lookup surfaces per-source errors instead of silently dropping them
2026-03-16 03:41:47 -04:00
Shutong Wu 263bdb5876 fix: address C# code review findings for UnityReflect
- Fix lock ordering deadlock: switch ExtensionMethodCache to ConcurrentDictionary
- Add ambiguity check to get_member (was missing, get_type already had it)
- Add Dictionary<TKey, TValue> generic resolution test
2026-03-16 03:21:21 -04:00
Shutong Wu 80295e7857 refactor: simplify unity_reflect and unity_docs after code review
- CLI docs.py: call _get_doc() directly instead of duplicating fallback logic
- UnityReflect.cs: use UnityTypeResolver.ResolveAny() for primary type resolution
- UnityReflect.cs: cache GetAssemblyTypeCache() before loops (avoid repeated lock)
- UnityReflect.cs: cache ObsoleteAttribute lookup (was called twice per method)
- UnityReflect.cs: use HashSet instead of List for obsolete member dedup
- UnityReflect.cs: reuse assembly cache in FindExtensionMethods
2026-03-16 00:14:50 -04:00
Shutong Wu 4992727d90 feat: add UnityReflect C# reflection engine
Implements get_type, get_member, and search actions via live
C# reflection. Assembly cache with domain reload invalidation,
extension method discovery, ambiguity detection, generic type parsing.
2026-03-16 00:14:50 -04:00