cancel
Showing results for 
Search instead for 
Did you mean: 

OVROverlay.cs(385,20): error CS1501: No overload for method `CreateExternalTextur

panmaster
Expert Protege
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?
19 REPLIES 19

DebraNinjaMulti
Honored Guest
I am encountering the same issue. As far as I can tell, my OVROverlay.cs script is not attached to any object. Did you end up figuring this out?

DebraNinjaMulti
Honored Guest
@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".

Please advise! Thank you!

X-Ingredient
Honored Guest
Same for me! Got notice after updating to the new 2017.1.0f3 version of Unity.

NZaden
Protege
Same here.

iamtheonly
Honored Guest
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 😛



DebraNinjaMulti
Honored Guest
@iamtheonly Your solution worked for now, it got rid of the error. Thanks!

Will still wait to hear back from @imperativity before building anything final.

DebraNinjaMulti
Honored Guest
.

JeffNik
MVP
MVP
The above "fix" worked for me, too... looking forward to hearing a final solution.

Pinelli
Explorer
I was having the same issue and the change mentioned above from

et = Cubemap.CreateExternalTexture(size.w, size.h, txFormat, mipLevels > 1, isSrgb, externalTex);

To

et = Cubemap.CreateExternalTexture(size.w, txFormat, mipLevels > 1, externalTex);

solved the errors on rebuild for me.