/ Forums
Applications are now open to attend this year's Oculus Connect. Join us October 11–12 and be first in line for an inside look at what’s new and next for VR.

Oculus Connect 4: Speaker Preview

We've revealed some of the Oculus speakers who'll present at Oculus Connect 4 this year! Click here to learn more.
New To The Forum? Click Here To Read The How To Guide. -- Developers Click Here.

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

panmasterpanmaster Posts: 189
Art3mis
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?

Comments

  • imperativityimperativity Posts: 1,172 Oculus Staff
    Hi,

    In the interest of reproducing this on our end, can you elaborate on the steps you took that led you to this error?

    Also, have you consulted the documentation on OVROverlay's best practices here?





  • DebraNinjaMultimediaDebraNinjaMultimedia Posts: 5
    Virtual Boy (or Girl)
    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?
  • imperativityimperativity Posts: 1,172 Oculus Staff
    edited July 11
    @DebraNinjaMultimedia

    Could you list out the steps you took and software environment (unity version, oculus software, etc) you are in that resulted in this error? We have no other reports of this issue aside from the developer above. Any information would be great so we can reproduce this and/or push a fix if this turns out to be a bug.
  • DebraNinjaMultimediaDebraNinjaMultimedia Posts: 5
    Virtual Boy (or Girl)
    @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!
  • imperativityimperativity Posts: 1,172 Oculus Staff
    @DebraNinjaMultimedia

    Thanks! I'm going to try and reproduce this now.
  • X-IngredientX-Ingredient Posts: 1
    Virtual Boy (or Girl)
    Same for me! Got notice after updating to the new 2017.1.0f3 version of Unity.

  • NZadenNZaden Posts: 33
    Lawnmower Man (or Woman)
    Same here.
  • iamtheonlyiamtheonly Posts: 2
    Virtual Boy (or Girl)
    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



  • DebraNinjaMultimediaDebraNinjaMultimedia Posts: 5
    Virtual Boy (or Girl)
    edited July 13
    @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.

  • DebraNinjaMultimediaDebraNinjaMultimedia Posts: 5
    Virtual Boy (or Girl)
    edited July 13
    .
  • imperativityimperativity Posts: 1,172 Oculus Staff
    @DebraNinjaMultimedia

    I am having our integration team look into this issue as this has not been a problem until recently. I will update this thread when I have something additional to share.
  • JeffNikJeffNik Posts: 79
    Hiro Protagonist
    The above "fix" worked for me, too... looking forward to hearing a final solution.
  • PinelliPinelli Posts: 4
    Virtual Boy (or Girl)
    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.
  • psutterpsutter Posts: 1
    Virtual Boy (or Girl)
    I used the line of code and 4 new errors showed up. Maybe im missing something guess im reinstalling my ovr.
  • mixstahmixstah Posts: 1
    Virtual Boy (or Girl)
    This also worked for me too
  • andysonofbobandysonofbob Posts: 131
    Art3mis
    edited August 10
    Also having the same issues
    Updated the two lines of code in the editor, got the 4 new errors like the poster above.

    I can't see where the method is created in the file?

    How to reproduce?
    Start new project.
    Import Custom Package --> OculusUtilities.unitypackage
    Once imported
    errors

  • DebraNinjaMultimediaDebraNinjaMultimedia Posts: 5
    Virtual Boy (or Girl)
    @andysonofbob
    Open up the OVROverlay.cs script, find line 385 and delete "isSrgb, " from that line. That should do it

  • andysonofbobandysonofbob Posts: 131
    Art3mis
    Soz  That didnt work.

    Assets/OVR/Scripts/OVROverlay.cs(385,20): error CS1501: No overload for method `CreateExternalTexture' takes `5' arguments
    I also tried removing the argument from the else too.  It then gave two errors

    I am also getting this error.  I seem to log in fine though...

    Error loading launcher://unity/C:/Users/[SNIP]/AppData/Roaming/Unity/Packages/node_modules/unity-editor-home/dist/index.html?code=giCk8xeUP56X1XIctEW82Q00af&locale=en&session_state=b5c3f7321a9bde0d303f1d666289ef558480a2491dc7fca89e553ee7564e1db8.yaP4gRFOlLqiiAdtz9MEng01bf#/login


  • MalisceMalisce Posts: 1
    Virtual Boy (or Girl)
    I am stuck on this issue as well. proposed changes just created more issues :)
  • neilsarkarneilsarkar Posts: 3
    Virtual Boy (or Girl)
    Pinelli said:
    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.
    yep, this solved the issue for me as well. 

    also, I opted to download oculus utilities 1.15.0 instead of the latest (1.16-beta as of this writing), so this issue might already be fixed in the latest without manual intervention.
Sign In or Register to comment.