How to disable window resize on UWP PC

hi, how do i disable window resize (maximize and miniminze) for my uwp game on pc?

I don’t think that is possible in UWP application.

my game is made for portrait, i have set the screen size to 600x800 , but i am able adjust the window size which makes it harder for ui and it looks very bad in fullscreen, because clearly it is not made for fullscreen and landscape mode.

i just need to know how should set the restriction and why is it not possible?

You can’t restrict windows size because Microsoft decided that. However, you can always add letter boxing to force certain aspect ratio.

can u suggest me how to do it? does windows provide any tool to do this, or i must manually do it myself in unity?


hey i guess i made the letterbox view…but can u look at this IAP error that shows up?

 void Start()
    {
        am = GetComponent<AudioManager>();
        var builder = ConfigurationBuilder.Instance(StandardPurchasingModule.Instance());
        builder.AddProduct(shard1, ProductType.Consumable);
        builder.AddProduct(item1, ProductType.Consumable);
        builder.AddProduct(item2, ProductType.Consumable);
        builder.AddProduct(item3, ProductType.Consumable);
        builder.AddProduct(item4, ProductType.Consumable);

        UnityPurchasing.Initialize(this, builder);
        int i = 0;
        foreach (var product in controller.products.all)
        {
            Debug.Log(product.metadata.localizedTitle);
            Debug.Log(product.metadata.localizedDescription);
            Debug.Log(product.metadata.localizedPriceString);
            priceText[i].text = product.metadata.localizedPriceString;
            i++;
        }

    }

Which line gives you the null reference exception?

i don’t know, the error doesnt show up in android or editor, just when i run in windows.
for reference

Why don’t you step through the code with a debugger and find that out?

sorry for late reply, it seems the bug only happens in debug build and build that is
downloaded from store, playing the live build doesnt seem to generate bug and shows buy popup, how ever the build size of the game is very high, it seems like UWP makes build for 3 architectures while downloading from store the game size is shoots up to 153 mb, is there a way to reduce that, i mean people will rather prefer to download just for their device and it will reduce the size by huge amount.

P.S it happens going through theloop.

foreach (var product in controller.products.all)
        {
            Debug.Log(product.metadata.localizedTitle);
            Debug.Log(product.metadata.localizedDescription);
            Debug.Log(product.metadata.localizedPriceString);
            priceText[i].text = product.metadata.localizedPriceString;
            i++;
        }

You already only download the build that is for your device. It’s always been that way on Windows Store - it doesn’t download files it doesn’t need.

Is that 153 MB download size or installed size? I assume the latter.

As for that loop: probably one of your variables is null.