This all arises from the fact that Unity wont observe EXIF metadata in images from the camera being loaded into a Texture2D resulting in the displayed image having the wrong orientation.
I know how to rectify this only IF I can query the images orientation and take action.
And there’s the rub, getting the metadata to query!
I found this asset: Unity Asset Store - The Best Assets for Game Making which I thought would be my saviour until I run on my Samsung Galaxy S6 which gives the error:
Unity: System.ArgumentException: Encoding name ‘Shift-JIS’ not supported
Speaking to the dev he put me onto here: http://helpdesk.unity3d.co.jp/hc/ja/articles/204694010-System-Text-Encoding-で-Shift-JIS-を使いたい
That suggests copying the Unity Editor dll files, l18N.dll and l18N.CJK.dll to the projects Asset folder but this then results in the error:
Unity: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. —> System.InvalidProgramException: Invalid IL code in I18N.Common.Manager:get_PrimaryManager (): IL_0000: ret
So I am now totally out of my depth and lost as well as depressed.
I have spent days trying to doing something that should be so straightforward like loading an image and having it orientated the correct way!
Can anyone please help?