-
Notifications
You must be signed in to change notification settings - Fork 490
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
Get the json from the gltf #743
Comments
hey, when the file is a gltf (not glb), then you can just send the whole gltf file. It's all json. Or do i miss here something? |
hey, but in the loading process from youre plugin you dispose the complete result from the json ? |
Are you downloading the glb? |
Nope i load it with a gltf. I mean i can access the root from the plugin but all i get in return its from the first article. I did not get back the whole gltf json. |
I don't think it would make sense to expose the loaded json string. When you need them, just load the json string with File.ReadAllText(gtlfFilePath). To read the file twice should not be a problem in any case. You just read the string without any deserialisation and send it to the javascript. |
@MarcusGT076 can you say a bit more what your goal is? Do you just want to display the JSON data somewhere else, both for files loaded as glTF and as glb? You get the parsed JSON object (gltfroot) in an importer plugin and can do with it what you want. This is a JObject that is serializable back to readable JSON if that’s your goal. |
Yes in this case its not a problem to load it twice i already did that. My goal is : i create a hierarchy list in javascript on an html site that take the data with all its children and submeshes. So it was only a thought when the loader get the file to access it and send it to javascript that i dont have to load it second time, because its already there in youre loader. I mean in gltfast i could access the root after loading and it showed the gltf file in its original form. With your loader i can access also the root but it has not all the data as the original gltf. I am sending the gltf as a string through unity to javascript and parse it there back to an json. |
Hello there,
i want to access the complete json from the gltf file. I tried to get the root, but he is not displaying the whole json from the gltf file ?
This is what i see when i access the root of the GLTFSsceneImporter.
{
"ExtensionsUsed": [
"KHR_draco_mesh_compression",
"KHR_materials_emissive_strength"
],
"ExtensionsRequired": [
"KHR_draco_mesh_compression"
],
"IsGLB": false
}
I want to send the whole structure of the gltf to javascript as a json with all inside.
How is this possible to get those data that i need ?
Cheers :)
The text was updated successfully, but these errors were encountered: