Comments (3)
f.Key("field_name"); f.Value(field_name);
というようにペアで使ってください。
key value key valueの順番で来ることをチェックしていて違反したとき(key value value
など)にJsonFormatException: key exptected
が出ます。
from univrm.
JsonにSerializeするときに使っています。
protected override void SerializeMembers(GLTFJsonFormatter f)
{
f.KeyValue(() => name); // これを実装するのに使っている
}
下記の記法に置換すれば、KeyValue関数を削除できると思います。
f.Key("name"); f.Value(name); // これと同じ意味
from univrm.
ありがとうございます!
KeyValueに当たる部分全て置換して、一部gltfクラスの変数にはGLTFValue()を設定しました。
上記対応して実行したところ、JsonFormatException: key not exptected エラーで止まってしまったのですがこの場合のエラーの原因はわかりますか?
誤字かと思い見直してみましたが、そうではなさそうでした。
エラー全文です
JsonFormatException: key exptected
UniJSON.JsonFormatter.CommaCheck (Boolean isKey) (at Assets/VRM/UniGLTF/UniJSON/Scripts/JsonFormatter.cs:121)
UniJSON.JsonFormatter.Value (Int32 x) (at Assets/VRM/UniGLTF/UniJSON/Scripts/JsonFormatter.cs:254)
UniGLTF.glTFAttributes.SerializeMembers (UniGLTF.GLTFJsonFormatter f) (at Assets/VRM/UniGLTF/Core/Scripts/Format/glTFMesh.cs:56)
UniGLTF.JsonSerializableBase.ToJson () (at Assets/VRM/UniGLTF/Core/Scripts/Format/JsonSerializableBase.cs:16)
UniGLTF.GLTFJsonFormatter.GLTFValue (UniGLTF.JsonSerializableBase s) (at Assets/VRM/UniGLTF/Core/Scripts/Format/JsonFormatter.cs:13)
UniGLTF.glTFPrimitives.SerializeMembers (UniGLTF.GLTFJsonFormatter f) (at Assets/VRM/UniGLTF/Core/Scripts/Format/glTFMesh.cs:127)
UniGLTF.JsonSerializableBase.ToJson () (at Assets/VRM/UniGLTF/Core/Scripts/Format/JsonSerializableBase.cs:16)
UniGLTF.GLTFJsonFormatter.GLTFValue (UniGLTF.JsonSerializableBase s) (at Assets/VRM/UniGLTF/Core/Scripts/Format/JsonFormatter.cs:13)
UniGLTF.GLTFJsonFormatter.GLTFValue[glTFPrimitives] (IEnumerable`1 values) (at Assets/VRM/UniGLTF/Core/Scripts/Format/JsonFormatter.cs:21)
UniGLTF.glTFMesh.SerializeMembers (UniGLTF.GLTFJsonFormatter f) (at Assets/VRM/UniGLTF/Core/Scripts/Format/glTFMesh.cs:174)
UniGLTF.JsonSerializableBase.ToJson () (at Assets/VRM/UniGLTF/Core/Scripts/Format/JsonSerializableBase.cs:16)
UniGLTF.GLTFJsonFormatter.GLTFValue (UniGLTF.JsonSerializableBase s) (at Assets/VRM/UniGLTF/Core/Scripts/Format/JsonFormatter.cs:13)
UniGLTF.GLTFJsonFormatter.GLTFValue[glTFMesh] (IEnumerable`1 values) (at Assets/VRM/UniGLTF/Core/Scripts/Format/JsonFormatter.cs:21)
UniGLTF.glTF.SerializeMembers (UniGLTF.GLTFJsonFormatter f) (at Assets/VRM/UniGLTF/Core/Scripts/Format/glTF.cs:347)
UniGLTF.JsonSerializableBase.ToJson () (at Assets/VRM/UniGLTF/Core/Scripts/Format/JsonSerializableBase.cs:16)
UniGLTF.glTF.ToGlbBytes () (at Assets/VRM/UniGLTF/Core/Scripts/Format/glTF.cs:397)
from univrm.
Related Issues (20)
- Retarget Animation from another avatar with animator to uniVRM HOT 1
- SpringBone does not work correctly if you change the model size, for example scale (8,8,8). HOT 3
- MToonで発生するNaNを条件演算子でシンプルに回避出来そう
- v0.119.0での正規化の処理順が逆な気がする HOT 1
- [gh-pages] https://vrm-c.github.io/UniVRM/ のクローズ作業 HOT 1
- [MeshUtility] GUIで統合対象のメッシュを変更できない HOT 1
- KeyNotFoundException when exporting VRM1.0 HOT 1
- [vrma] specversion
- サンプルのVRM10Viewer.unityのシーン設定が黄色ライトになっている
- Feature Request: Support for Unity Polyspatial
- 軽量bake として BoneWeight 付与を作る
- [URP] MToon10 Outline
- [BoxMan] 機能強化(SpringBone, Expression)
- [Sample]VrmViewer-1.0のPostProcessが無い
- UNITYでVRMAを使えるようにしてください。
- Got NullReferenceException when try to export vrm 0.x HOT 1
- NullReferenceException when Export VRM file from VRChat avatar HOT 1
- Exporting Issue HOT 1
- UniVRM request to not reset in-project shaders HOT 1
- Spring Bone get rotated by 90 degrees when export
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from univrm.