Skip to content

Refining forced shutdown to check for writes first - #32

Draft
BitWizrd-Dev wants to merge 11 commits into
H3VR-Modding:devfrom
BitWizrd-Dev:main
Draft

Refining forced shutdown to check for writes first#32
BitWizrd-Dev wants to merge 11 commits into
H3VR-Modding:devfrom
BitWizrd-Dev:main

Conversation

@BitWizrd-Dev

Copy link
Copy Markdown
Contributor

Refining forced shutdown to check for writes first. This allows LastSceneManagerSetup.txt, CurrentLayout.dwlt, and potentially other metadata to be written in a timely manner instead of forced abruptly.

BitWizrd-Dev and others added 11 commits March 25, 2026 21:41
Lots of rework for how assemblies are generated, how assemblies are handled during building, and how they're handled post-build to prevent missing assembly errors and crashing in the Unity Editor.

The Unity Editor likes to lose the paths to the proper assemblies if you look at it wrong and this should help it always right itself when that happens.

PlayHelper added for play mode to prevent crashing when loading in. Contains workarounds to prevent the FistVR code from throwing a ton of errors due to missing game manager processes.
…tive hooks

- Add EATI, AHVTI, BPEVST, ACSC, RequestScriptReload, and STOA native hooks
- Implement TypeTree backup/restore during builds to prevent metadata corruption
- Replace reflection-based MonoScript repair with native RebuildFromAwake calls
- Add EATI flag management for proper build state tracking
- Implement pending DLL import recovery system for sharing violations
- Add Mono IO-worker thread detection to prevent STOA deadlock
- Improve error handling with EATI flag resets in exception handlers
- Add support for legacy Unity version detection
- Extend NativeHookFunctionOffsets with new hook function addresses
…yHelper

AssemblyImporter:
- Add WriteSafely() method to handle IOException when DLL is locked by child domain
- Stage locked DLL writes to Library/PendingDllImports/ for deferred application
- Integrate with ManagedPluginDomainFix.StageForPendingImport() for recovery
- Use WriteSafely for both firstpass and main assembly writes

PlayHelper:
- Implement recursive null-healer for [Serializable] fields after MeatKit builds
- Add type-level caching for reflection performance (per-type field cache)
- Replace VerboseLogs with streamlined logging approach
- Add Harmony Finalizer for exception swallowing in patched methods
- Simplify modder opt-out documentation for Enabled flag
- Handle nested arrays and List<T> healing up to configurable depth
…aces, extract helpers

- Simplify long nested Path.Combine calls by extracting libraryDir variable
- Change _pendingManifestPath from mutable to readonly
- Remove full System.Collections.Generic namespace qualifiers (rely on using statements)
- Use Dictionary<,> and List<T> without System.Collections.Generic prefix
- Extract CopyDllIfChanged() helper method to reduce duplication
- Simplify PlayHelper Enabled field documentation to brief comment
- Refactor disposal patterns in AssemblyImporter to use cast-check approach
- Simplify RedirectedAssemblyResolver.Dispose() method
- Add checkbox option for opening build folder after build completion
- Minor formatting improvements for readability
- Simplify Build.cs with improved error handling and logging
- Add AssemblyImporter enhancements for assembly management
- Update EditorVersion.cs with hook offset improvements
- Expand Extensions.cs with additional utility methods
- Major refactor of ManagedPluginDomainFix with reduced complexity (2202 deletions)
- Enhance NativeHookManager with improved hook management (300+ lines)
- Optimize overall code structure and reduce technical debt
Added BakeryLightFilter, BakeryNamedSection, and BakeryNamedSectionSelector to the Bakery section of the strip list.
Refining forced shutdown to check for writes first. This allows LastSceneManagerSetup.txt, CurrentLayout.dwlt, and potentially other metadata to be written in a timely manner instead of forced abruptly.
@BitWizrd-Dev
BitWizrd-Dev marked this pull request as draft July 29, 2026 17:26
@BitWizrd-Dev

Copy link
Copy Markdown
Contributor Author

Converting to draft after receiving some feedback from testing causing a lockup after successful build. Currently investigating.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant