Uzaktan yapılandırma

Uzaktan konfigürasyonu (Remote Config) etkinleştirmek için Yandex Games SDK'dan getFlags yönteminin kullanımını ekleyin.

Kaydedilen bayrakların değerlerini elde etmek için her yeni oturum başlatıldığında getFlags yöntemini çağırın.

let discount_percent = 10; // varsayılan indirim
let banner_location = 'top'; // varsayılan banner konumu

YaGames.init()
    .then(ysdk => ysdk.getFlags())
    .then(flags => {
        discount_percent = Number(flags.discount_percent);
        // ...
        banner_location = flags.banner_location;
        // ...
    })
    .catch(e => {
        // hatayı işle
    });

YaGames.init()
    .then(ysdk => ysdk.getFlags())
    .then(flags => {
        complexity = flags.complexity;
        // ...
    })
    .catch(e => {
        // hatayı işle
    });


YaGames.init()
    .then(ysdk => ysdk.getFlags({ defaultFlags: { complexity: 'low' } }))
    .then(flags => {
        complexity = flags.complexity; // 'hard'
        // ...
    })
    .catch(e => {
        // hatayı işle
    });

const flags3 = await ysdk.getFlags({
  defaultFlags: {},
  clientFeatures: []
});

const flags3 = await ysdk.getFlags(optional?);

const flags4 = await ysdk.getFlags({
  defaultFlags: { complexity: 'low' }
});

const flags5 = await ysdk.getFlags({
  defaultFlags: { complexity: 'low' },
  clientFeatures: [ { name: 'coreUser', value: '1' } ]
});


Not

Destek ekibi, hazır oyunu Yandex Oyun platformuna yerleştirmenize yardımcı olur. Geliştirme ve test etme konularındaki uygulamalı sorulara ise diğer geliştiriciler Discord Topluluğu yanıt verir.

Yandex Games SDK kullanırken sorunla karşılaşırsanız veya sorunuz varsa, lütfen destek ekibiyle iletişime geçin:

Sohbete yaz
Sonraki