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

Separate unigltf #625

Merged
merged 30 commits into from
Dec 9, 2020
Merged

Separate unigltf #625

merged 30 commits into from
Dec 9, 2020

Conversation

ousttrue
Copy link
Contributor

@ousttrue ousttrue commented Nov 24, 2020

シリアライザーを分離した。UniGLTF側は、VRMの型を知る必要が無くなった。

#623

  • VRM-1.0 からも見えるようにしたいので UniGLTF を MeshUtility に移動するかも
  • 独立UPM

@ousttrue
Copy link
Contributor Author

ousttrue commented Nov 24, 2020

{
  "name": "com.vrmc.unigltf",
  "version": "2.0.0",
  "displayName": "UniGLTF",
  "description": "GLTF importer and exporter",
  "unity": "2018.4",
  "keywords": [
    "gltf"
  ],
  "author": {
    "name": "VRM Consortium"
  },
  "dependencies": {
    "com.vrmc.vrmshaders": "0.62.0"
  }
}

@ousttrue
Copy link
Contributor Author

manifest.json

{
  "dependencies": {

    "com.vrmc.meshutility": "https://github.com/ousttrue/UniVRM.git?path=/Assets/MeshUtility#unigltf2",
    "com.vrmc.vrmshaders": "https://github.com/ousttrue/UniVRM.git?path=/Assets/VRMShaders#unigltf2",
    "com.vrmc.unigltf": "https://github.com/ousttrue/UniVRM.git?path=/Assets/UniGLTF#unigltf2",
    "com.vrmc.univrm": "https://github.com/ousttrue/UniVRM.git?path=/Assets/VRM#unigltf2",

@ousttrue
Copy link
Contributor Author

難読だった Reflection によるシリアライザは廃止された。

  • Assets/UniGLTF/UniGLTF/Editor/Serialization/DeserializerGenerator.cs
  • Assets/UniGLTF/UniGLTF/Editor/Serialization/SerializerGenerator.cs

がコード生成で、やっていることは Reflection の時と同様(Objfect の FieldInfo を再帰的にたどっていく)なのだけど、
Runtime での Static type キャッシュなどのややこしい処理が無くなってシンプルなコードになった。
生成されたコードに対して、UnitTest を書いたり、breakpoint できるのでデバッグも楽になった。

utf8バイト列 <= UniJson => Json <= シリアライザ => gltf, vrm の入れ物

@hiroj hiroj merged commit 1be9853 into vrm-c:master Dec 9, 2020
This was referenced Dec 9, 2020
@ousttrue
Copy link
Contributor Author

ousttrue commented Feb 2, 2021

#590

@ousttrue ousttrue deleted the separate_unigltf branch April 2, 2021 04:34
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

Successfully merging this pull request may close these issues.

2 participants