Unity 6.3
0 онлайн 49 гостей 3 в системе
Вход

AndroidExternalToolsSettings.keystoresDedicatedLocation

Declaration

public static string keystoresDedicatedLocation;

Описание

Путь к расположению, предназначенному для хранилищ ключей для подписания приложений Android.

Дополнительные ресурсы: Создать новое хранилище ключей

using System.IO;
using UnityEngine;
using UnityEditor;
using UnityEditor.Android;

public class KeystoresDedicatedLocationSample { [MenuItem("Build/Set Custom Keystores Location")] public static void SetKeystoresLocation() { // Example custom location. Replace this with the actual path. string customPath = "/path/to/your/keystores";

// Validate the directory before setting it if (Directory.Exists(customPath)) { AndroidExternalToolsSettings.keystoresDedicatedLocation = customPath; Debug.Log($"Custom Keystores Location set to: {AndroidExternalToolsSettings.keystoresDedicatedLocation}"); } else { Debug.LogError($"Invalid Keystores Location. Directory does not exist: {customPath}"); } }

[MenuItem("Build/Get Current Keystores Location")] public static void GetKeystoresLocation() { // Retrieve the currently configured location of the keystores string currentLocation = AndroidExternalToolsSettings.keystoresDedicatedLocation; Debug.Log($"Current Keystores Location: {currentLocation}"); } }