-
Notifications
You must be signed in to change notification settings - Fork 462
Fix/windows auto reload managescript #254
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix/windows auto reload managescript #254
Conversation
…ous ImportAsset and RequestScriptCompilation\n- Debounced refresh calls ImportAsset instead of Refresh\n- Path sanitation for Assets/ and slashes\n- Atomic writes with Windows-safe fallbacks\n- Nudge Editor tick for debounce reliability
Caution Review failedThe pull request is closed. WalkthroughAdds asset path sanitization via ManageScriptRefreshHelpers.SanitizeAssetsPath and routes schedule/import flows through it. Updates AssetDatabase.ImportAsset flags to ForceUpdate | ForceSynchronousImport. Invokes EditorApplication.QueuePlayerLoopUpdate in Schedule to trigger ticks when unfocused. Public helper added. Server version bumped from 3.1.1 to 3.2.0. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor Caller
participant MS as ManageScript
participant H as ManageScriptRefreshHelpers
participant ED as EditorApplication
participant AD as AssetDatabase
rect rgba(230,245,255,0.5)
note over Caller,MS: ScheduleScriptRefresh flow (updated)
Caller->>MS: ScheduleScriptRefresh(path)
MS->>H: SanitizeAssetsPath(path)
H-->>MS: sanitizedPath
MS->>ED: QueuePlayerLoopUpdate() %% new nudge
MS-->>Caller: Scheduled (debounced)
end
rect rgba(240,255,230,0.5)
note over Caller,AD: Import and compile flow (updated)
Caller->>MS: ImportAndRequestCompile(path)
MS->>H: SanitizeAssetsPath(path)
H-->>MS: sanitizedPath
MS->>AD: ImportAsset(sanitizedPath, ForceUpdate|ForceSynchronousImport)
AD-->>MS: Import complete
MS-->>Caller: Compile requested
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 💡 Knowledge Base configuration:
You can enable these sources in your CodeRabbit configuration. 📒 Files selected for processing (2)
✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
Stabilizes script auto-reload on Windows by forcing import/compile after edits, debouncing reliably, and hardening path handling and writes. Behavior on macOS remains unchanged.
Key changes:
Verification:
Summary by CodeRabbit
New Features
Bug Fixes
Chores