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

Add to "extras" during GLB export. #21

Open
OwenSignaturize opened this issue Jun 10, 2024 · 4 comments
Open

Add to "extras" during GLB export. #21

OwenSignaturize opened this issue Jun 10, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@OwenSignaturize
Copy link

It is currently not possible to add to extras when performing a GLB export as far as I can tell.

I would like for the extras field to be added to GLTFast.Schema.Node (and other relevant areas), and not just to GLTFast.Newtonsoft.Schema.Node.

Alternatively being easily able to extend the GameObjectExporter and/or GLTFWriter to enable custom manipulation of the Json Serialization step of GLB Export would be fine.

Im currently having to modify the source code in my project to allow for this, as I require GLB export. Because this repo isnt up to date with version 6.6 (the version I get when adding the package "com.unity.cloud.gltfast" via package manager, I cant even just fork this repo to get things to work I have to copy files from the PackageCache, and make modifications to it locally.

If I've missed something then it would be great if the documentation could explain more clearly how to achieve adding extras to GLB files.

@OwenSignaturize OwenSignaturize added the enhancement New feature or request label Jun 10, 2024
@freezy
Copy link

freezy commented Jan 30, 2025

@OwenSignaturize would you be willing to share a diff of your changes? I also need to write extras data.

EDIT: Never mind, found it on your fork!

@atteneder
Copy link
Collaborator

Hi @OwenSignaturize ,

Apologies for not keeping the public mirror up-to-date at times. I'm trying to do a better job at that in the future.

That being said, I agree that this is a great use-case and I'm not happy with the limitations of the current JSON (de)serialization. I'm currently not focusing on export, but I'm keeping one eye on it.

If you want to champion this topic by bringing a first proposal forward, feel free to open a PR.

Thanks.

@OwenSignaturize
Copy link
Author

@freezy sorry if I misled you with that fork, I don't think that actually works, and I should probably shut it down for now to avoid confusion. I have my own local repo that works for me but was based on the files for version 6.6, which I couldn't make a diff against at the time, and I have since moved on from actively working on it. When I get time ill see if I can tidy it up & pr here, but it probably wont be for a few weeks.

@atteneder Should PRs go here or on your glTFast repo? I am a bit confused as to which repo is ahead of what.

@freezy
Copy link

freezy commented Feb 7, 2025

@OwenSignaturize No worries! I'm not sure which fork I should contribute to, either. For now, I'm sideloading the extras in a different container, so there's no hurry.

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