-
Notifications
You must be signed in to change notification settings - Fork 1
Various small improvements to Hiro Challenges. #18
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds copyright headers, refactors private field naming conventions, and improves code organization for the Hiro Challenges Unity project. The changes include transitioning from manual leaderboard creation to configuration-based management via Hiro's LeaderboardsSystem.
- Added Apache 2.0 copyright headers to all C# source files
- Refactored private fields to use underscore prefix naming convention (_fieldName)
- Migrated leaderboard configuration from runtime creation to Hiro's LeaderboardsSystem
Reviewed Changes
Copilot reviewed 10 out of 14 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| HiroChallengesCoordinator.cs | Added copyright header, sealed class modifier, and optimized system retrieval |
| HiroChallengesController.cs | Added copyright header and renamed all private fields to use underscore prefix |
| ChallengeView.cs | Added copyright header, sealed class modifier, and updated field naming |
| ChallengeParticipantView.cs | Added copyright header, sealed class modifier, and updated field naming |
| main.go | Removed manual leaderboard creation, added LeaderboardsSystem initialization |
| local.yml | New configuration file with server settings (full file addition) |
| lib/.gitignore | Removed .gitignore entries (directory structure change) |
| base-leaderboards.json | New leaderboard configuration file for Hiro system |
| .gitignore | Expanded with comprehensive development environment patterns |
| .editorconfig | New editor configuration for consistent formatting |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| protected override void SystemsInitializeCompleted() | ||
| { | ||
| ReceivedStartSuccess?.Invoke(this.GetSystem<NakamaSystem>().Session); | ||
| var nakamaSystem = Instance.GetSystem<NakamaSystem>(); |
Copilot
AI
Nov 3, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed from this.GetSystem<NakamaSystem>() to Instance.GetSystem<NakamaSystem>(). This assumes HiroChallengesCoordinator follows a singleton pattern. If Instance is null or if this class doesn't implement a proper singleton pattern, this will cause a NullReferenceException. If the intent was to use the current instance, this should be used instead.
| var nakamaSystem = Instance.GetSystem<NakamaSystem>(); | |
| var nakamaSystem = this.GetSystem<NakamaSystem>(); |
| console: | ||
| max_message_size_bytes: 409600 | ||
| leaderboard: | ||
| blacklist_rank_cache: | ||
| - "*" | ||
| logger: | ||
| level: "DEBUG" | ||
| runtime: | ||
| env: | ||
| - "ENV=dev1" | ||
| - "HIRO_LICENSE=" | ||
| session: | ||
| token_expiry_sec: 86400 # 24 hours | ||
| refresh_token_expiry_sec: 604800 # 7 days | ||
| socket: | ||
| max_message_size_bytes: 4096 # reserved buffer | ||
| max_request_size_bytes: 131072 |
Copilot
AI
Nov 3, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The configuration file is being added despite local.yml being listed in the .gitignore (line 2). This file contains a placeholder for HIRO_LICENSE which should remain secret. Adding this file to the repository could expose sensitive configuration or encourage developers to commit credentials. Consider whether this should be a template file (e.g., local.yml.example) instead.
|
@DannyIsYog can you update the Readme.asset file, it's still referring to the Nakama Groups template. |
No description provided.