Skip to content

Conversation

@novabyte
Copy link
Member

@novabyte novabyte commented Nov 3, 2025

No description provided.

Copy link

Copilot AI left a 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>();
Copy link

Copilot AI Nov 3, 2025

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.

Suggested change
var nakamaSystem = Instance.GetSystem<NakamaSystem>();
var nakamaSystem = this.GetSystem<NakamaSystem>();

Copilot uses AI. Check for mistakes.
Comment on lines +1 to +17
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
Copy link

Copilot AI Nov 3, 2025

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.

Copilot uses AI. Check for mistakes.
@DapperDino
Copy link
Contributor

@DannyIsYog can you update the Readme.asset file, it's still referring to the Nakama Groups template.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants