teenageengineering / videolab

MIT License
737 stars 65 forks source link

Can't Use Imported Videolab Assets #32

Open sportsdrink opened 4 years ago

sportsdrink commented 4 years ago

I've imported the videolab 1.1.1 package into Unity, but I am unable to right click in the Hierarchy and add a Midijack or any videolab asset really. The error message I'm getting is:

Microsoft (R) Visual C# Compiler version 2.9.1.65535 (9d34608e) Copyright (C) Microsoft Corporation. All rights reserved.

error CS2001: Source file '/Users/damien/New Unity Project (3)/%' could not be found. error CS2001: Source file '/Users/damien/New Unity Project (3)/Silence' could not be found. error CS2001: Source file '/Users/damien/New Unity Project (3)/warning' could not be found.

I am a new Unity user who's learning Unity to create Videopaks for the Op-Z. Besides some really helpful user tutorials on the subject, I can't find any info related to the issue I have and the error message I'm getting.

I'm using Unity 2018.4.16f1, the Videolab 1.1.1, and I have downloaded and updated Visual Studio in case it's related to it.

Thanks in advance.

shroomist commented 4 years ago

same here - fresh install and not being able to import the assets. tried several versions of unity down to 2018.4.8 with no luck. @dromsynt as a latest contributor, any ideas?

finnTE commented 4 years ago

We noticed that you need to set Graphics API to OpenGLES2 in your project before building videopaks (this was not necessary with Unity 2018.2). The next version of OP-Z will use Metal. https://github.com/teenageengineering/videolab/wiki/Exporting-for-OP%E2%80%90Z

shroomist commented 4 years ago

That did work with importing assets from the repository, no luck with videolab-1.1.1.unitypackage, fyi. thanks, also great news on using Metal, looking forward to it.

sinewave440hz commented 4 years ago

So for the time being, to use the pre-built package video lab-1.1.1, should we use Unity 2018.2?

sinewave440hz commented 4 years ago

videolab-1.1.1 package or from /Assets and Unity 2018.2 didn't work...? How do I import the assets so that they are usable in the hierarchy? Any version of anything, just want to move on...

shroomist commented 4 years ago

@sinewave440hz I believe prebuilt videolab-1.1.1 package did work for me on 2018.2.(21f or something) New Project -> Edit -> Import Package

sinewave440hz commented 4 years ago

Thanks. Didn't work for me on macOS Catalina with 2018.2.21f and videolab-1.1.1, importing as you described. :/

shroomist commented 4 years ago

I had same setup, now moved on to 2018.4

TBH had hard times getting this to work at first. Still having troubles getting keijiro/VideolabTest projects to work. Still unable to run the custom shadertoys. perhaps it makes sense to wait for the next update featuring Metal.

sinewave440hz commented 4 years ago

Maybe...depends how long a wait, I suppose. I'm thinking there must be a magic combination that will allow me just to even test in Unity... I only have OpenGLCore available on my Mac. Do I need to install OpenGLES2?

sinewave440hz commented 4 years ago

Ok, this is a small detail that makes a big difference; it worked fine to import assets by cloning the project and dropping the contents of the assets folder into the project - under Assets/Scenes. Putting it under just Assets didn't work. Maybe that's obvious to Unity users, but it wasn't to me and it was probably the cause of my issue all along! In any case, know that this applies to the latest repo and Unity 2018.4.19f1.

sinewave440hz commented 4 years ago

Still not convinced this is a correct installation (see issue #35 ). These are the errors I get if I try to follow the suggested import procedure of using Import Custom Package from the menu:

Microsoft (R) Visual C# Compiler version 2.9.1.65535 (9d34608e) Copyright (C) Microsoft Corporation. All rights reserved.

error CS2001: Source file '/Users/sinewave440hz/teset1/assigned' could not be found. error CS2001: Source file '/Users/sinewave440hz/teset1/%' could not be found. error CS2001: Source file '/Users/sinewave440hz/teset1/Silence' could not be found. error CS2001: Source file '/Users/sinewave440hz/teset1/warning' could not be found. error CS2001: Source file '/Users/sinewave440hz/teset1/about' could not be found. error CS2001: Source file '/Users/sinewave440hz/teset1/serialized' could not be found. error CS2001: Source file '/Users/sinewave440hz/teset1/fields' could not be found. error CS2001: Source file '/Users/sinewave440hz/teset1/not' could not be found. error CS2001: Source file '/Users/sinewave440hz/teset1/being' could not be found.

Any ideas?

shroomist commented 4 years ago

setting Graphics API to OpenGLES2 fixed this for me.

sinewave440hz commented 4 years ago

Yeah, like I said, I don't have OpenGLES2 as an option. Only OpenGLCore. This is in project settings -> player -> uncheck for Auto Graphics for Mac and move OpenGLCore above metal. Or something else? It didn't make a difference, doing this before/after package import.

westhom commented 4 years ago

Also having this issue on MacOS 10.15 Catalina, Unity 2018.4.2.0. I import the package but right clicking on the hierarchy doesn't show menu options. I am also seeing the errors shown above in the error console.

I have tried to change the Graphics API, but there is no OpenGLES2 option (see below).

Screen Shot 2020-03-30 at 8 34 22 AM

This may be a Catalina-specific thing, because Apple is deprecating OpenGL.

sinewave440hz commented 4 years ago

And apparently a metal version is on the way. But...somewhere out there is someone who knows which version of what with which version of what else will allow us to at least get started with Videolab development and save valuable time now...right?!

sichtbeton commented 4 years ago

@sinewave440hz I second that too. What works to see the Keijiri examples on Mac? Which version of videolab and which unity? the wiki info is obviously wrong. come on TE. Work this out.

westhom commented 4 years ago

Couple of new findings:

The unity graphics API option for OpenGLES2 is Windows only. I see the option when I'm in Windows 10 Unity 2018.4.2. Unity documentation says windows only.

tempsnip

Even after making that change, importing the .unitypackage still fails, with the errors shown in the OP. BUT if you just download the repo as a .zip file and open it with unity like a project, all the right click options are there.

Opening the repo contents like a unity project works on Mac too. No idea about status of exporting without the OpenGLES2 option though.

sinewave440hz commented 4 years ago

Thankyou @westhom! And @sichtbeton this should work for you. My immediate issues were solved by downloading the .zip as you suggested and opening that. I was then able to access the imported assets correctly (well, ok, I only actually tried the patch asset, but the others were available. I was also able to create a Midi In object, which solves my other issue #35 . So now I can move to next steps, knowing that this is a working flow. I did get a warning, but not sure how that will impact things. I'm still on Unity 2018.4.19f1. Presumably the .zip file is analogous to building the latest from source and that's what made the difference...?

sichtbeton commented 4 years ago

@sinewave440hz glad you're moving on too. its all a tad confusing and mostly time consuming. a prebuilt package (right unity version + videolab installed + examples + apps all working) would highly facilitate this strange cluttered workflow.

finnTE commented 4 years ago

Not sure why you need to download the zip-file, maybe there is a unityPackage compatibility issue between mac and windows.

Added some missing info here: https://github.com/teenageengineering/videolab/wiki/Exporting-for-OP%E2%80%90Z

westhom commented 4 years ago

@finnTE Thank you for updating the wiki. The requirements are clearer now. However there is still the issue with importing the official videolab.unitypackage 1.1.1 release.

The problem is with Assets/csc.rsp

% Silence warning about serialized fields not being assigned
-nowarn:0649

The first line comment is for some reason being parsed / split out into command line arguments, which results in Unity displaying C# compile errors after a failed .unitypackage import:

Screen Shot 2020-04-03 at 8 45 37 AM

Looking at this Microsoft documentation it looks like it wants comments to use #. I opened a PR with this change, but I don't know enough about unity to recompile into a .unitypackage to test.

westhom commented 4 years ago

Hi all, I've spent more time on this issue, because hey, we're in global lockdown. I've confirmed the issue being the comment formatting in Assets/csc.rsp. The errors shown in the debug log are not just warnings, they halt script compilation which is why none of the right click options show in hierarchy view.

@finnTE I have a PR open with the fix. I think this will clear up issues a lot of people are seeing right now.

I've created a 1.1.1 test hot fix, download here: https://www.dropbox.com/s/cnrqydrnn7na6ml/videolab-1.1.1-hotfix.unitypackage?dl=1

I've tested with 2018.4.20f1, macOS Catalina and Windows 10.

Let me know if it works for you!

finnTE commented 4 years ago

Fabulous!