Skip to main content
Up and Coming
July 4, 2017

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

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?
    This topic has been closed for replies.

    19 replies

    Participant
    July 11, 2017
    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?
    Participant
    July 11, 2017
    @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!
    New Participant
    July 12, 2017
    Same for me! Got notice after updating to the new 2017.1.0f3 version of Unity.

    Up and Coming
    July 12, 2017
    Same here.
    New Participant
    July 12, 2017
    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 :P



    Participant
    July 12, 2017
    .
    Participant
    July 12, 2017
    @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.

    JeffNik
    Honored Contributor
    July 14, 2017
    The above "fix" worked for me, too... looking forward to hearing a final solution.
    New Participant
    July 14, 2017
    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.
    New Participant
    August 1, 2017
    I used the line of code and 4 new errors showed up. Maybe im missing something guess im reinstalling my ovr.