-
Notifications
You must be signed in to change notification settings - Fork 10
Remove deprecated Unity APIs and prepare for future Unity releases #238
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: develop
Are you sure you want to change the base?
Conversation
|
Claude finished @skibitsky's task in 2m 24s —— View job Code Review CompleteTasks
Issue 1: Duplicate using statement in ListItem.csFile: src/Reown.AppKit.Unity/Runtime/Components/ListItem.cs:1-4 using System;
using Reown.AppKit.Unity.Utils;
using UnityEngine;
using UnityEngine.UIElements;
using Reown.AppKit.Unity.Utils; // Duplicate
Issue 2: Potential memory leak in RegisterCallbackOnce compatibility shimFile: src/Reown.AppKit.Unity/Runtime/Utils/UnityVersionCompat.cs:20-36 The Recommendation: Wrap the callback invocation in try-finally: onceCallback = evt =>
{
try
{
callback(evt);
}
finally
{
element.UnregisterCallback(onceCallback);
}
};Issue 3: Missing null check in IsEscapeKeyPressed for New Input SystemFile: src/Reown.AppKit.Unity/Runtime/Utils/UnityVersionCompat.cs:59-70 public static bool IsEscapeKeyPressed()
{
#if ENABLE_INPUT_SYSTEM
var keyboard = UnityEngine.InputSystem.Keyboard.current;
return keyboard != null && keyboard.escapeKey.wasPressedThisFrame;While the null check for Recommendation: Add defensive null check for return keyboard != null && keyboard.escapeKey?.wasPressedThisFrame == true;Issue 4: SetPlaceholder is no-op on Unity < 6.0 without user feedbackFile: src/Reown.AppKit.Unity/Runtime/Utils/UnityVersionCompat.cs:44-52 The Recommendation: Add a compile-time warning or runtime debug log to inform developers that the feature is unavailable: #else
// Placeholder API not available in Unity versions before 6.0
Debug.LogWarning($"TextField placeholder not supported in Unity {Application.unityVersion}. Upgrade to Unity 6+ for placeholder support.");
#endifIssue 5: Trailing empty line in NetworkButton.csFile: src/Reown.AppKit.Unity/Runtime/Components/NetworkButton.cs:89-91 UnityVersionCompat.RegisterCallbackOnce<GeometryChangedEvent>(this, _ => UpdateNetworkButton(AppKit.NetworkController.ActiveChain));
Clickable = new Clickable(() => AppKit.OpenModal(ViewType.NetworkSearch));Double empty line (line 90-91) - inconsistent formatting. Issue 6: Missing using directive for UnityEngine.InputSystemFile: src/Reown.AppKit.Unity/Runtime/Utils/UnityVersionCompat.cs:1-2 The file references Recommendation: Add conditional using directive: #if ENABLE_INPUT_SYSTEM
using UnityEngine.InputSystem;
#endifThen use |
|
|
Waiting for game-ci/docker#271 to release Unity 6.3 LTS images to fix our CI |



Overview
This PR removes deprecated Unity and UI Toolkit APIs from AppKit to ensure compatibility with current and future Unity releases. The project has been upgraded to Unity 6.3 LTS.
Core Changes
UI Toolkit API Migration
Version Compatibility Layer
Project Updates
Impact