Skip to content

Conversation

@from2001
Copy link
Collaborator

No description provided.

@from2001 from2001 requested a review from Copilot August 26, 2025 13:42
Copy link
Contributor

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 refactors the SDK setup process to avoid crashes by replacing async/await patterns with a step-by-step callback approach using EditorApplication.delayCall. The changes also consolidate XR settings initialization functionality.

  • Replaces async/await methods with sequential step-based execution to prevent timing issues
  • Consolidates XR initialization functionality into SetupSdkUtils
  • Updates menu naming from "Switch HMD SDKs" to "Setup HMD SDKs"

Reviewed Changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
SetupSdkUtils.cs Adds new XR initialization methods and reflection helper utilities
SetupSdkMenu.cs Updates menu item text from "Switch" to "Setup" terminology
SetupSdk.cs Adds test code for package installation
Device setup files Refactors async methods to step-based execution pattern with EditorApplication.delayCall
CreateXRGeneralSettingsPerBuildTarget.cs Removes entire file - functionality moved to SetupSdkUtils

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines 26 to 32
public static void TestFunc()
{
// You can add more test logic here if needed
string packageIdentifier = "com.htc.upm.vive.openxr@2.5.1";
AddUnityPackage(packageIdentifier);

}
Copy link

Copilot AI Aug 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test code should not be committed to production. This hardcoded package installation in TestFunc() should be removed or replaced with proper test logic.

Suggested change
public static void TestFunc()
{
// You can add more test logic here if needed
string packageIdentifier = "com.htc.upm.vive.openxr@2.5.1";
AddUnityPackage(packageIdentifier);
}

Copilot uses AI. Check for mistakes.
@from2001 from2001 merged commit 9cbf8fa into develop Aug 26, 2025
@from2001 from2001 deleted the fix/AvoidCrash branch August 31, 2025 15:01
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.

2 participants