I use Unity Unity 2017.1.0b8 (64-bit), I get error Assets/OVR/Scripts/OVROverlay.cs(385,20): error CS1501: No overload for method `CreateExternalTexture' takes `6' arguments
I am very on the wtf side with solving this, any ideas?
@imperativity I am using Unity Version2017.1.0f3 Personal, Oculus App Version 1.16.0.409144, on Windows 10.
I originally tried it on an old Unity file, downloaded Oculus Utilities for Unity 5 1.16.0-beta. I imported this package into my file and got that error. I also made sure to change the build, player, and quality settings accordingly to these instructions.
Thinking it had something to do with my old project, perhaps something was not properly replaced in the Utilities package import, I started a new project from scratch. I followed this tutorial until I got to Part 2: Add a control script to your Player. When I tried to add the script to the player, that's when I started getting " Assets/OVR/Scripts/OVROverlay.cs(385,20): error CS1501: No overload for method `CreateExternalTexture' takes `6' arguments " and it would not allow me to add the PlayerController script because I need to "Please fix compile errors before creating new script components".
It's because CreateExternalTexture method of Cubemap class probably got changed with Unity 2017. It now takes only 4 arguments and the SDK tries to pass 6 arguments, and there is no overload for 6.
You just have to change the parameters. Cubemap method has only 1 size value because its texture is a rectangle, so you don't have to pass both width and height because they are equal.
Also there is no parameter for color space - the "isSrgb" one.
So if you fix those your method should look like
et = Cubemap.CreateExternalTexture(size.w, txFormat, mipLevels > 1, externalTex);
and you're good to go, but please wait for opinion from @imperativity . By no means I know how the SDK should work 😛