coolishbee / universal-sdk-unity

The Universal SDK for Unity provides a modern way of implementing Social Login APIs.
43 stars 10 forks source link

UniversalSDKSettings.asset Not applied in batchmode for iOS Builds #48

Open SeongSeopLIm opened 1 month ago

SeongSeopLIm commented 1 month ago

When building for iOS in batch mode, the SDKSettings values are not applied.

In PListUpdating.OnPostprocessBuild, which inputs information into Info.plist, the UniversalSDKSettings.Instance value is not set.

[PostProcessBuildAttribute(1)]
public static void OnPostprocessBuild(BuildTarget target, string pathToBuiltProject)
{
    ...
}

During builds in the GUI editor, the Instance is set from UniversalSDKSettingsEditor, so there are no issues. However, in batchmode, it seems to bypass UniversalSDKSettingsEditor.OnInspectorGUI and directly go to UniversalSDKSettings.Instance.

Since UniversalSDKSettings.Instance does not handle the UNITY_EDITOR condition, it fails to fetch the asset via AssetDatabase.LoadAssetAtPath, leading to the failure of proper value settings.

Unity version : 2022.3.20 SDK version :1.3.2

coolishbee commented 1 month ago

Thanks for the good report. I'll make sure it's resolved ASAP.