Skip to content
This repository has been archived by the owner on Sep 7, 2022. It is now read-only.

Shader error failed to open source file #192

Closed
piotrszpruta opened this issue Jul 2, 2021 · 10 comments
Closed

Shader error failed to open source file #192

piotrszpruta opened this issue Jul 2, 2021 · 10 comments
Labels
question Further information is requested

Comments

@piotrszpruta
Copy link

piotrszpruta commented Jul 2, 2021

Environment:
Unity: 2019.4.28f1
Package: straight from github uiwidgets_1.0

Reproduction steps:
create new project
import uiwidgets_1.0 from github

After importing package to unity project, I've got pink screen with following errors:
obraz

Those files exists in \Packages\com.unity.uiwidgets\com.unity.uiwidgets\Runtime\Resources\shaders\

@zhuxingwei
Copy link
Contributor

Hi, sorry for the late response!

We have tried to follow your reproduction steps but no error message comes up. Could you please give us more info to address this problem:
(1) how did you import uiwidgets package from github?
(2) what is your os (mac or windows?)
(3) what is the target platform (android?)

Thanks !

@piotrszpruta
Copy link
Author

piotrszpruta commented Jul 6, 2021

Sure

Host: Windows
Target: Android

I've downloaded uiwidgets_1.0 with

git clone https://github.com/Unity-Technologies/com.unity.uiwidgets.git --branch uiwidgets_1.0

And then I've followed readme

In PackageManger of unity, select add local file. select package.json under /com.unity.uiwidgets

@zhuxingwei
Copy link
Contributor

zhuxingwei commented Jul 6, 2021

Hi, I have tried again according to your reproduction environment but still no error bumps out. Could you please share us your project (or a minimum MVP to reproduce the errors) ? Thanks !

btw, since this is a "file not found" issue on windows, maybe it is relevant to the path of your project, it would be either too long or contains invalid characters. So can you try to put the project and uiwidget package to a simple path (e.g., D://test/project and D://test/com.unity.uiwidgets/) and try again?

@piotrszpruta
Copy link
Author

Path in my opinion is fine F:\ihelpar\Packages\com.unity.uiwidgets\com.unity.uiwidgets its in two folders because first one is with Samples

Can I upload it to google drive or smth because I cant add zip there and i cant push to github because there are large files (lol)

@zhuxingwei
Copy link
Contributor

github is ok. Thanks!

@piotrszpruta
Copy link
Author

i cant push to github so im sending it on google drive

link

@zhuxingwei
Copy link
Contributor

Thanks and I will look into it later.

@zhuxingwei
Copy link
Contributor

Hi I have tried your demo project and reproduced the shader error. By now I still cannot figure out what is happening :(.

However, I have tried to open the sample project under com.unity.uiwidgets/Samples/ and it works fine, so I am sure the problem should be somewhere inside your demo project. Yet I need more time to investigate it and will let you know when I have any progress.

For a quick work-around, maybe you can start your job using our sample project by adding your uiwidgets panel classes there.

Cheers!

@zhuxingwei
Copy link
Contributor

Hi @piotrszpruta

The problem is that, you cannot clone the uiwidgets repo directly to the Packages folder of your project since Unity will treat any folder there as a local package: however, com.unity.uiwidgets itself is not a package (the package is com.unity.uiwidgets/com.unity.uiwidgets), therefore Unity will be confused when collecting build-in resources for it.

To fix this issue, please move com.unity.uiwidgets into somewhere different (e.g., YouProjectPath/thirdparty/com.unity.uiwidgets) and add reference to it using package manager. Then reimport all and things will work.

@zhuxingwei zhuxingwei added the question Further information is requested label Jul 13, 2021
@piotrszpruta
Copy link
Author

Ohh okay I get it now, interesting I didn't saw any info about that anywhere. Thank you so much I can finally work on my app :D

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants