Esempio n. 1
0
    // Returns GUID of first found folder by name, null if not found.
    private static string GetOneSignalConfigGUIDByName()
    {
        var guid = OSUnityEditorUtils.FindFirstFileGUIDByName(FOLDER_NAME_ONESIGNAL_CONFIG_NAMES);

        if (guid != null)
        {
            return(guid);
        }

        var folderNames = String.Join(",", FOLDER_NAME_ONESIGNAL_CONFIG_NAMES);

        Debug.LogError($"OneSignal - Could not find required Android folder from list of names; '{folderNames}'");
        return(null);
    }
Esempio n. 2
0
    // This renames the folder "OneSignalConfig" to "OneSignal.plugin".
    // ".plugin" is Unity documented folder post-fix required for some plugins features.
    //    - This is required to fix Unity 2020+ capability.
    // This is done via a script since .unitypackage files do not support renaming
    // and so this is required for those upgrading from an older version of the SDK.
    private static void RenameAndroidOneSignalConfig()
    {
        var path = OneSignalFileLocator.GetOneSignalConfigFolderNameWithPath();

        OSUnityEditorUtils.AppendFileExtensionIfMissing(path, "plugin");
    }