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

Further unity integration #2

Closed
Saticmotion opened this issue Jun 2, 2019 · 5 comments
Closed

Further unity integration #2

Saticmotion opened this issue Jun 2, 2019 · 5 comments
Labels
enhancement New feature or request

Comments

@Saticmotion
Copy link

So the last couple of days I've been looking into further Unity integration, so that we could assign a basis texture to a texture field in the inspector, and show previews in the editor.

Previews are possible as far as I can tell, but will have quite the overhead. The editor would have to transcode every single texture to a format the editor can handle (Is there a format that's supported on all 3 editor platforms?).

Convincing unity that a basis file is a texture seems to be impossible. That part of the engine is all in the cpp side, so I don't see a way to do this. If further integration is not possible, users will always have to assign textures through code.

Any ideas?

@atteneder
Copy link
Owner

I did not make anything like this before, but maybe this is a solution:
https://docs.unity3d.com/Manual/ScriptedImporters.html

@atteneder atteneder added the enhancement New feature or request label Jun 2, 2019
@Saticmotion
Copy link
Author

Scripted Importers can't tell the engine that a certain file is actually a texture.
There's also the related TextureGenerator, but that also has no way to tell unity that a file it can't read as a texture is actually a texture.
Maybe I should try pinging some Unity devs on Twitter! I've seen someone ask a unity dev about something similar a while back, but it was solved via DM.

@Saticmotion
Copy link
Author

I got confirmation from a Unity dev, and from someone trying to do the same thing with a different texture format, that what I want to do is not possible at this time. But Unity devs are working on APIs that will make it possible in the future. So for now we can't provide real integration of .basis in the editor.

@hybridherbst
Copy link
Contributor

I believe this can be closed since there's now a ScriptedImporter for .ktx2 in this package at least

@atteneder
Copy link
Owner

I agree, we got something now. Not saying the current ScriptedImporter is perfect/complete, but I'd rather open new issues with a clear scope.

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

No branches or pull requests

3 participants