Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't compile for Unity - no such file or directory proto.shader #74

Closed
bradparks opened this issue Aug 26, 2016 · 3 comments
Closed

Can't compile for Unity - no such file or directory proto.shader #74

bradparks opened this issue Aug 26, 2016 · 3 comments

Comments

@bradparks
Copy link

bradparks commented Aug 26, 2016

When I try and build a project for the Unity target (works for html5/osx), using I get this error:

{ Error: ENOENT: no such file or directory, open 'Users/bparks/gitrepos/kha_super_cobra1/Empty/Kha/Tools/khamake/Data/unity/Shaders/proto.shader'

which I hardcode fixed by editing this file:
/Users/bparks/gitrepos/kha_super_cobra1/Empty/Kha/Tools/khamake/out/main.js

and inserting a '/' at the begin of the join.. So changed this:

let proto = fs.readFileSync(path.join(options.from, options.kha, 'Tools', 'khamake', 'Data', 'unity', 'Shaders', 'proto.shader'), 'utf8');

to this:

let proto = fs.readFileSync(path.join('/',options.from, options.kha, 'Tools', 'khamake', 'Data', 'unity', 'Shaders', 'proto.shader'), 'utf8');

Here's how I compiled.

$ khamake --t unity                                   
Creating Kha project.
Exporting asset 1 of 24 (arial.ttf).
...
Exporting asset 2 of 24 (bomb1.wav).
Compiling shader 8 of 8 (painter-video.vert.glsl).
{ Error: ENOENT: no such file or directory, open 'Users/bparks/gitrepos/kha_super_cobra1/Empty/Kha/Tools/khamake/Data/unity/Shaders/proto.shader'
    at Error (native)
    at Object.fs.openSync (fs.js:640:18)
    at Object.fs.readFileSync (fs.js:508:33)
    at /Users/bparks/gitrepos/kha_super_cobra1/Empty/Kha/Tools/khamake/out/main.js:317:28
    at next (native)
    at fulfilled (/Users/bparks/gitrepos/kha_super_cobra1/Empty/Kha/Tools/khamake/out/main.js:4:58)
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: 'Users/bparks/gitrepos/kha_super_cobra1/Empty/Kha/Tools/khamake/Data/unity/Shaders/proto.shader' }

@jeremyfa
Copy link

jeremyfa commented Jan 3, 2017

Same issue here.

@RblSb
Copy link
Contributor

RblSb commented Aug 11, 2023

Can be closed

@RobDangerous
Copy link
Member

Aye, Unity support was discontinued. Sorry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants