{"id":27957548,"url":"https://github.com/tharindu714/unity-mobile-game-components-basic","last_synced_at":"2026-02-25T16:34:32.818Z","repository":{"id":291448950,"uuid":"977656832","full_name":"Tharindu714/unity-Mobile-game-Components-Basic","owner":"Tharindu714","description":"Provide a solid foundation for mobile game development in Unity","archived":false,"fork":false,"pushed_at":"2025-05-04T18:24:32.000Z","size":58270,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-07T18:13:24.435Z","etag":null,"topics":["csharp","game-development","mobile","unity"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Tharindu714.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-04T17:39:37.000Z","updated_at":"2025-05-07T13:27:03.000Z","dependencies_parsed_at":"2025-05-04T18:43:19.223Z","dependency_job_id":null,"html_url":"https://github.com/Tharindu714/unity-Mobile-game-Components-Basic","commit_stats":null,"previous_names":["tharindu714/unity-mobile-game-components-basic"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tharindu714%2Funity-Mobile-game-Components-Basic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tharindu714%2Funity-Mobile-game-Components-Basic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tharindu714%2Funity-Mobile-game-Components-Basic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tharindu714%2Funity-Mobile-game-Components-Basic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Tharindu714","download_url":"https://codeload.github.com/Tharindu714/unity-Mobile-game-Components-Basic/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252931550,"owners_count":21827112,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["csharp","game-development","mobile","unity"],"created_at":"2025-05-07T18:13:30.276Z","updated_at":"2025-10-25T03:38:06.863Z","avatar_url":"https://github.com/Tharindu714.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Unity Mobile Game Components Basic Project 🎮\n\n\u003e **Objective:** Provide a solid foundation for mobile game development in Unity, showcasing a modular Main Menu system, scene management, UI components, and project configuration.\n\n---\n\n## 📁 Project Structure\n\n```\nunity-Mobile-game-Components-Basic/\n├── **Assets/**                 # Unity assets: Scenes, Scripts, Prefabs, UI, Audio\n│   ├── **Scenes/**             # .unity scene files (MainMenu, Level1, etc.)\n│   ├── **Scripts/**            # C# scripts controlling game flow and UI\n│   ├── **Prefabs/**            # Reusable GameObjects (buttons, panels)\n│   ├── **UI/**                 # Canvas, Button, Text, and other UI assets\n│   └── **Audio/**              # Background music and SFX clips\n│\n├── **Logs/**                   # Runtime log files (Editor \u0026 device)\n├── **Packages/**               # Package manifest (manifest.json)\n├── **ProjectSettings/**        # Unity project settings (Input, Tags, Graphics)\n├── **UserSettings/**           # Personal editor preferences (EditorUserSettings.asset)\n├── **obj/Debug/**              # Local build artifacts\n├── Assembly-CSharp.csproj      # C# project definition\n├── Assembly-CSharp-Editor.csproj\n├── all-files.txt               # Listing of all files (utility)\n├── ignore.conf                 # Custom ignore rules\n└── mobile-Main-menu game.sln   # Visual Studio solution for IDE support\n```\n\n---\n\n## 🛠️ Prerequisites \u0026 Setup\n\n1. **Unity**: Version 2020.3 LTS or newer.\n2. **Mobile Build Support**: Install Android and/or iOS modules via Unity Hub.\n3. **IDE**: Visual Studio or Rider with Unity integration.\n\n**Clone \u0026 Open**:\n\n```bash\ngit clone https://github.com/Tharindu714/unity-Mobile-game-Components-Basic.git\ncd unity-Mobile-game-Components-Basic\n```\n\n* Open `mobile-Main-menu game.sln` in your IDE (optional).\n* Launch **Unity Hub**, click **Add**, select the project folder, and **Open**.\n\n---\n\n## 🎬 Scenes \u0026 Navigation Flow\n\n1. **MainMenu.unity**: Entry scene, contains:\n\n   * **Canvas** with Buttons: `Start`, `Options`, `Quit`.\n   * **MainMenuManager** script attached to an empty GameObject for handling button callbacks.\n\n2. **GameScene.unity**: Placeholder for gameplay.\n\n   * Load scene with a **SceneLoader** script.\n\n3. **Options.unity** (optional): Audio and control settings UI.\n\n**Scene Management Script** (`SceneLoader.cs`):\n\n```csharp\npublic class SceneLoader : MonoBehaviour {\n    public void LoadScene(string sceneName) {\n        SceneManager.LoadScene(sceneName);\n    }\n}\n```\n\n* **Usage**: Hook each button’s **OnClick()** event to `LoadScene(\"GameScene\")` or `LoadScene(\"MainMenu\")`.\n\n---\n\n## 🤖 Core Scripts\n\n### 1. MainMenuManager.cs\n\nManages menu button logic:\n\n```csharp\npublic class MainMenuManager : MonoBehaviour {\n    public void OnStartGame()   =\u003e SceneManager.LoadScene(\"GameScene\");\n    public void OnOptions()     =\u003e SceneManager.LoadScene(\"Options\");\n    public void OnQuitGame()    {\n#if UNITY_EDITOR\n        UnityEditor.EditorApplication.isPlaying = false;\n#else\n        Application.Quit();\n#endif\n    }\n}\n```\n\n* **Attach** to an empty GameObject in `MainMenu.unity`.\n* **Assign** UI Buttons to corresponding public methods.\n\n### 2. UIManager.cs\n\nCentralizes UI transitions and notifications:\n\n```csharp\npublic class UIManager : MonoBehaviour {\n    public GameObject panel;\n    public void TogglePanel() {\n        panel.SetActive(!panel.activeSelf);\n    }\n}\n```\n\n* **Use Case**: Show/hide settings panels, help overlays, or pause menus.\n\n---\n\n## 🎨 Prefabs \u0026 UI Artifacts\n\n* **Button\\_Prefab**: Standardized Unity UI Button with default font, size, and colors.\n* **Panel\\_Prefab**: Background panel with `Image` component for grouping UI elements.\n* **Text\\_Prefab**: Default `TextMeshPro` text styling for titles and labels.\n\n\u003e **Tip:** Keep UI elements as prefabs for consistent look \u0026 feel across scenes.\n\n---\n\n## ⚙️ Project \u0026 Build Configuration\n\n1. **Player Settings** (`ProjectSettings/ProjectSettings.asset`):\n\n   * **Company Name**: e.g., `Delta Codex`\n   * **Product Name**: `MobileGameComponentsBasic`\n   * **Default Orientation**: Portrait\n   * **API Compatibility Level**: .NET 4.x for modern C# features.\n\n2. **Input Settings** (`InputManager.asset`):\n\n   * Define **Virtual Axes** for `Horizontal`, `Vertical`, and touch controls.\n\n3. **Build Settings**:\n\n   * **Platform**: Switch to **Android** or **iOS**.\n   * **Scenes In Build**: Ensure `MainMenu` and `GameScene` are checked.\n\n4. **Package Management**:\n\n   * Check `Packages/manifest.json` for required packages: `com.unity.textmeshpro`, `com.unity.inputsystem`.\n\n---\n\n## 📱 Build \u0026 Run on Device\n\n1. **Switch Platform** in **File ▶ Build Settings**.\n2. **Connect** Android device via USB (enable USB debugging) or pair iOS device.\n3. **Player Settings ▶ Other Settings**: Set **Bundle Identifier** and **Minimum API Level**.\n4. **Build And Run**: Choose a location, Unity compiles and installs the APK/IPA.\n\n---\n\n## 📸 Screenshots\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/user-attachments/assets/91f8c388-1451-43a1-8a41-f2113ccaf672\" width=\"45%\" /\u003e\n  \u0026nbsp;\n  \u003cimg src=\"https://github.com/user-attachments/assets/35146390-544c-4130-883f-b7dd32159698\" width=\"45%\" /\u003e\n\u003c/p\u003e\n\n---\n\n## 📖 Logging \u0026 Diagnostics\n\n* **Runtime Logs**: Stored under `Logs/`, review `output.log` for errors on device.\n* **Debugging**: Use `Debug.Log()`, `Debug.Warning()`, and `Debug.Error()` in scripts.\n\n---\n\n## 🚀 Next Steps \u0026 Enhancements\n\n* **Gameplay Mechanics**: Implement player controllers, enemy AI, and level progression.\n* **Settings Menu**: Add volume sliders and control remapping.\n* **Analytics**: Integrate Unity Analytics or Firebase for user metrics.\n* **Asset Optimization**: Use **Addressables** for dynamic asset loading.\n* **Input System**: Migrate to Unity’s **New Input System** for advanced touch gestures.\n\n---\n\n\u003e This README gives you a clear roadmap to explore each part of the Unity mobile template. Tweak, extend, and build upon it to launch your own mobile game. Happy developing!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftharindu714%2Funity-mobile-game-components-basic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftharindu714%2Funity-mobile-game-components-basic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftharindu714%2Funity-mobile-game-components-basic/lists"}