Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Game only runs as administrator on Windows Tablet

Discussion in 'Windows' started by diekeure, Oct 22, 2021.

  1. diekeure

    diekeure

    Joined:
    Jan 25, 2013
    Posts:
    221
    We are getting reports from users that one of our released games only runs as administrator on their Windows tablet. Our game is aimed at a young target audience, so the user wants to be able to have their child play the game while using a restricted user profile.
    When analysing the crash dump (can be found as attachment), we see that the crash originates from the Unityplayer.dll
    Any ideas how we could solve this issue for our user or in what way they can solve this on their end?
     

    Attached Files:

  2. timke

    timke

    Unity Technologies

    Joined:
    Nov 30, 2017
    Posts:
    395
    Unity doesn't call any Windows APIs that require administrator privileges.

    If the title requires elevated privileges, it means the developer has added functionality that utilizes protected Windows features. Most likely, the developer is using a 3rd party plugin or something from the Asset Store that's causing this.

    The crash dump doesn't reveal a whole lot; it's crashing within
    AssetBundleLoadFromAsyncOperation::TryToLoadAndInitializeAssetBundle()
    which indicates the problem might be with a 3rd party asset or plugin (although there could still be a Unity bug here).

    My suggestion is:
    • File a Unity bug (for the crash) as that's the best way for us to investigate it
    • Developer needs to carefully examine the Assets/Plugins used by the title and try to find the one calling into protected/restricted Windows APIs.
    We'd need more information on the game to identify the functionality that requires admin access, but here are some things to look for:
    • Attempting to open files in protected directories, e.g. Program Files
    • Attempting to access user data (files or info) from a different Windows user
    • Attempting to access protected settings from the Registry
    Also, can you clarify if the game actually requires "Administrator" access, e.g. a UAC prompt is shown when launching the app, as opposed to a Windows "Child Account"? A child account is different and has additional limitations compared to a regular (non Admin) account, but these restrictions can be managed by another "Adult" account on the device.
     
  3. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,507
    It does sound like it's a combination of the game trying to load an asset bundle from a location it doesn't have access to, and a bug in Unity that causes it to crash instead of fail to load the bundle.
     
  4. diekeure

    diekeure

    Joined:
    Jan 25, 2013
    Posts:
    221
    Ok, thanks for the input. I'll continue my search and be sure to update this thread if I find an answer.