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

How do i check if i'm running on a FaceBook Gameroom build?

Discussion in 'Scripting' started by eyalm, Jun 22, 2017.

  1. eyalm

    eyalm

    Joined:
    Dec 20, 2015
    Posts:
    42
    just like I have UNITY_ANDROID...
    I didn't find any way to check it for Facebook Gameroom.
     
  2. Brathnann

    Brathnann

    Joined:
    Aug 12, 2014
    Posts:
    7,146
    Gameroom is essentially a windows build. That is how we had to do it before they added in the direct FB build. I believe you have to use the UNITY_STANDALONE_WIN tag for it.
     
  3. eyalm

    eyalm

    Joined:
    Dec 20, 2015
    Posts:
    42
    I see but I need a different login menu while in Gameroom because over there the user can connect with his Facebook account.
     
  4. Brathnann

    Brathnann

    Joined:
    Aug 12, 2014
    Posts:
    7,146
    What other platform are you releasing to that uses the pc build?
     
  5. eyalm

    eyalm

    Joined:
    Dec 20, 2015
    Posts:
    42
    Normal Build ( via downloadable launcher ).
    Not everybody enters FaceBook Gameroom.
     
  6. Brathnann

    Brathnann

    Joined:
    Aug 12, 2014
    Posts:
    7,146
    It looks like there is a UNITY_FACEBOOK so you could probalby just do a tag with both the Standalone and the facebook one to count for gameroom.

    Or just the facebook one if you don't have a webgl version.
     
  7. eyalm

    eyalm

    Joined:
    Dec 20, 2015
    Posts:
    42
    Thanks but how do you know UNITY_FACEBOOK will work?
    It doesn't show in their documentations.
    https://docs.unity3d.com/Manual/PlatformDependentCompilation.html
     
  8. eyalm

    eyalm

    Joined:
    Dec 20, 2015
    Posts:
    42
    Ok, I've just tested it and it works. I guess they need to update the documentations. Thanks again.
     
  9. Brathnann

    Brathnann

    Joined:
    Aug 12, 2014
    Posts:
    7,146
    Yeah, their doc is out of date. I just took a guess since Facebook is a build target, it made sense so I tried it out to see what it would do. Glad it's working!