Open
Description
Description
Currently, the library may not fully handle path differences across operating systems when working with Unity project paths. This can lead to inconsistent behavior when using methods like openProject
, createProject
, and other file-system operations across Windows, macOS, and Linux.
Problem
When working with Unity projects on different operating systems, path separators and environment-specific path handling can cause issues:
- Windows uses backslashes (
\
) while Unix-based systems use forward slashes (/
) - Special folder paths like AppData are platform-specific
- The Unity Hub and Unity Editor may have different path conventions on each platform
Proposed Changes
- Implement robust path normalization throughout the codebase
- Create platform-specific path handling utilities in a dedicated module
- Add automatic path separator conversion for cross-platform compatibility
- Improve error messages related to path issues with platform-specific guidance
- Add tests that verify functionality across simulated platform environments
Benefits
- More reliable operation across all supported platforms
- Reduced user error and confusion when using the library on different operating systems
- Improved developer experience through consistent path handling APIs
Implementation Notes
- Consider using Node.js
path
module more extensively - Add platform detection utilities beyond the current automatic detection
- Document platform-specific considerations in the README and code comments
- Create examples showing proper path usage for each operating system