A tool for managing and switching platform-specific scripting defines in Unity.
Unity Platform Define Switcher is an editor extension for Unity that allows developers to easily manage and switch between different platform-specific scripting define symbols. This tool simplifies the process of setting up build configurations for multiple platforms by providing a user-friendly interface within the Unity Editor.
- Easy Platform Switching: Switch between predefined platforms with a single click.
- Customizable Defines: Add or remove scripting define symbols for each platform.
- Editor Integration: Seamlessly integrated into the Unity Editor through a custom window.
- Supports Multiple Platforms: Pre-configured for platforms like RU_STORE, YANDEX_GAMES, GOOGLE_PLAY, NASH_STORE, and easily extendable.
-
Open your Unity project.
-
Navigate to Window > Package Manager.
-
Click on the ➕ button and select "Add package from git URL...".
-
Enter the Git URL of the repository:
https://github.com/RimuruDev/Unity-PlatformDefineSwitcher.git
-
Click Add to install the package.
- Clone or download the repository from GitHub.
- Copy the
Packages/com.rimurudev.platform-define-switcher
folder into your project'sPackages
directory.
-
After installation, go to Platform Build Settings > Platform Build Settings in the Unity Editor menu.
-
The Platform Build Settings window will appear.
-
In the window, you can:
- View the Current platform define.
- Select a platform from the dropdown menu.
-
Click Apply to set the scripting define symbols for the selected platform.
-
The tool will automatically add or remove defines based on your selection.
- RU_STORE
- YANDEX_GAMES
- GOOGLE_PLAY
- NASH_STORE
To add more platforms:
-
Open the
BuildPlatform.cs
script located inRuntime/
.namespace AbyssMoth { public enum BuildPlatform { None = 0, RU_STORE = 1, YANDEX_GAMES = 2, GOOGLE_PLAY = 3, NASH_STORE = 4, // Add your new platforms here :D // MY_NEW_PLATFORM = 5, } }
-
Add your new platform to the
BuildPlatform
enum. -
Update the switch cases in
PlatformBuildSettings.cs
to handle the new platform.
This project is licensed under the MIT License - see the LICENSE.md file for details.
- Author: RimuruDev
- Email: [email protected]
- GitHub: https://github.com/RimuruDev
- LinkedIn: https://www.linkedin.com/in/rimuru/
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create your feature branch (
git checkout -b feature/NewFeature
). - Commit your changes (
git commit -m 'Add some feature'
). - Push to the branch (
git push origin feature/NewFeature
). - Open a pull request.
If you encounter any issues or have questions, please open an issue on GitHub.
- Inspired by the need to simplify platform-specific build configurations in Unity projects.
- Thanks to the Unity community for their continuous support and contributions.
- Add hotkey
- Add all popular stores