I use glTFast library to load our models with custom vertex attributes which later used in shader for styling purposes.
I initially hacked my way directly in the code, which worked fine; but recently we decided to release this code publicly and to reduce the future maintenance work (especially for updating core glTFast library), I went back to it and tried to reduce and isolate my custom changes as much as possible.
(As a disclaimer I feel like I should add that at this second run I used Claude.)
After some back and forth, I now have a working version which uses a custom addon to load the custom vertex attribute. There's a custom gltfImport class which uses m_ImportInstances field and DisposeVolatileData method to let addon know when data load is completed; so when this triggers, addon get accessor data, decode and set the values.
Only problem is; m_ImportInstances field and DisposeVolatileData method are private in the base GltfImport class.
Changing m_ImportInstances field as protected and DisposeVolatileData method as protected virtual allows all this to work.
Inheriting from GltfImportBase would mean immense code duplication.
If those changes makes sense for the glTFast itself, I will be able to not include whole package but only use it as a dependency reference.

I use glTFast library to load our models with custom vertex attributes which later used in shader for styling purposes.
I initially hacked my way directly in the code, which worked fine; but recently we decided to release this code publicly and to reduce the future maintenance work (especially for updating core glTFast library), I went back to it and tried to reduce and isolate my custom changes as much as possible.
(As a disclaimer I feel like I should add that at this second run I used Claude.)
After some back and forth, I now have a working version which uses a custom addon to load the custom vertex attribute. There's a custom gltfImport class which uses
m_ImportInstancesfield andDisposeVolatileDatamethod to let addon know when data load is completed; so when this triggers, addon get accessor data, decode and set the values.Only problem is;
m_ImportInstancesfield andDisposeVolatileDatamethod are private in the base GltfImport class.Changing
m_ImportInstancesfield asprotectedandDisposeVolatileDatamethod asprotected virtualallows all this to work.Inheriting from
GltfImportBasewould mean immense code duplication.If those changes makes sense for the glTFast itself, I will be able to not include whole package but only use it as a dependency reference.