ScreenOrientation Unknow not documented...

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 Unity - Scripting API: ScreenOrientation ScreenOrientation.Unknown is not documented we can’t learn the “purpose” or effect of setting Screen.orientation = ScreenOrientation.Unknown…

You can change it like this:

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?

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

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.

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

ScreenOrientation.Unknown’ is obsolete: ‘Enum member Unknown has been deprecated.’
how to update is?

1 Like