Search Unity

ScreenOrientation Unknow not documented...

Discussion in 'Documentation' started by tyoc213, Dec 9, 2014.

  1. tyoc213

    tyoc213

    Joined:
    Nov 14, 2011
    Posts:
    168
    Because Screen.orientation is not read only (I have read that it should be only used for programming) then I think it should be read-only.

    Anyway, here http://docs.unity3d.com/ScriptReference/ScreenOrientation.html ScreenOrientation.Unknown is not documented we can't learn the "purpose" or effect of setting Screen.orientation = ScreenOrientation.Unknown....
     
  2. MD_Reptile

    MD_Reptile

    Joined:
    Jan 19, 2012
    Posts:
    2,664
    You can change it like this:

    Code (csharp):
    1. Screen.Orientation = ScreenOrientation.LandscapeRight
    I think autocomplete lists these out for you when you type it in monodevelop.

    But yes your right it should have a little more detail on those pages. EDIT: wait it pretty much covers it in each of the sections on every orientation. What were you thinking it should be changed to?
     
  3. feiting

    feiting

    Joined:
    Oct 26, 2012
    Posts:
    33
    Um, I don't think you should ever set it to be unknown. Unknown is usually the uninitialized variable anyway, it would only exist on start-up, before you'd have anything show up. It might be a good check if-loaded if you do any preloading stuff, but it would be a hack. Just my thoughts
     
  4. MD_Reptile

    MD_Reptile

    Joined:
    Jan 19, 2012
    Posts:
    2,664
    Oh I see what your saying, I wasn't aware that unknown was even one of the options. It's probably not documented because it must be a default state before unity assesses what orientation the device is in, and they planned on nobody trying to use it. I figure a page saying "hey don't use this" would at least help those wondering what it's for. Interesting find.
     
  5. tyoc213

    tyoc213

    Joined:
    Nov 14, 2011
    Posts:
    168
    I didn't think of an orientation but more like a reset or some like that... I mean, we already know that unity has some problems if you set orientation specially on iOS8 that has far as I know are not solved yet even with their "new logic" (I mean this Screen.orientation is writeable if it should only be read, then it should be in the API like that...).

    So if it is writeable and you can write it as unknow it should be documented what it means... I think, just my IMHO about good APIs and documentation
     
  6. khanhabib

    khanhabib

    Joined:
    Oct 11, 2018
    Posts:
    29
    ScreenOrientation.Unknown' is obsolete: 'Enum member Unknown has been deprecated.'
    how to update is?
     
    makaka-org likes this.