Search Unity

Built MacOS app failed to access WebCam

Discussion in 'macOS' started by coldsheepTW, Sep 15, 2022.

  1. coldsheepTW

    coldsheepTW

    Joined:
    Oct 27, 2015
    Posts:
    2
    Trying to build a game with webcam.

    It works fine in Editor and on iOS with
    Code (CSharp):
    1.  Application.RequestUserAuthorization(UserAuthorization.WebCam);
    However, after I build it as a MacOS app, it didn't popout an authority request for Camera.
    I already checked the following:
    1) Build Setting -> Player settings -> Camera Usage Description = "for Game"
    2) Mac system preference -> Safe and Security -> Camera: The game app not shown here

    Is there any code or setting required to ask access for Mac Webcam? Thanks!
     
  2. Alexey

    Alexey

    Unity Technologies

    Joined:
    May 10, 2010
    Posts:
    1,624
    argh, it seems that RequestUserAuthorization indeed does nothing on macos (we have a special code for ios/tvos)
    can you please file a bug?
     
  3. coldsheepTW

    coldsheepTW

    Joined:
    Oct 27, 2015
    Posts:
    2
    Do you mean report bug from Unity Editor -> Help? Sure.
    Thanks for your reply.
     
  4. hansijk98

    hansijk98

    Joined:
    Aug 22, 2022
    Posts:
    1
    @coldsheepTW Hi!, Did you resolve this ? I am having the same issue. (2021.3.13f1 Unity macOS Monterey)
     
  5. ah224rp

    ah224rp

    Joined:
    Mar 5, 2024
    Posts:
    1
    I have same issues ????? HELP__????