public void writeRawJsonValue(FastJsonWriter writer)
 {
     writer.beginRawObject();
     writer.writeKeyVal("initialized", initialized);
     writeImporterData(writer);
     writer.endObject();
 }
        public string toJsonString()
        {
            FastJsonWriter writer = new FastJsonWriter();

            writeRawJsonValue(writer);
            return(writer.getString());
        }
Exemplo n.º 3
0
        public bool isNull;       // = false;

        public void writeRawJsonValue(FastJsonWriter writer)
        {
            writer.beginRawObject();
            writer.writeKeyVal("instanceId", instId);
            writer.writeKeyVal("isNull", isNull);
            writer.endObject();
        }
Exemplo n.º 4
0
 public void writeRawJsonValue(FastJsonWriter writer)
 {
     writer.beginRawObject();
     writer.writeKeyVal("center", center);
     writer.writeKeyVal("size", size);
     writer.endObject();
 }
        public void writeRawJsonValue(FastJsonWriter writer)
        {
            writer.beginRawObject();
            writer.writeKeyVal("colliderType", colliderType);
            writer.writeKeyVal("colliderIndex", colliderIndex);
            writer.writeKeyVal("center", center);
            writer.writeKeyVal("size", size);
            writer.writeKeyVal("direction", direction);
            writer.writeKeyVal("radius", radius);
            writer.writeKeyVal("height", height);
            writer.writeKeyVal("meshId", meshId);

            if (!collider)
            {
                Debug.LogWarningFormat("Collider not set");
                return;
            }

            writer.writeKeyVal("enabled", collider.enabled);
            writer.writeKeyVal("contactOffset", collider.contactOffset);
            writer.writeKeyVal("bounds", new JsonBounds(collider.bounds));
            writer.writeKeyVal("isTrigger", collider.isTrigger);

            writer.writeKeyVal("triMeshCollision", triMeshCollision);
            writer.writeKeyVal("convexMeshCollision", convexMeshCollision);

            //material(physics), sharedMaterial, tag, hideFlags, name....
            //TODO: physics material...
            writer.endObject();
        }
Exemplo n.º 6
0
 public void writeRawJsonValue(FastJsonWriter writer)
 {
     writer.beginRawObject();
     writer.writeKeyVal("min", min);
     writer.writeKeyVal("max", max);
     writer.endObject();
 }
Exemplo n.º 7
0
 public void writeRawJsonValue(FastJsonWriter writer)
 {
     //writer.beginObjectValue();
     writer.beginRawObject();
     writeJsonObjectFields(writer);
     writer.endObject();
 }
        public void writeRawJsonValue(FastJsonWriter writer)
        {
            writer.beginRawObject();
            writer.writeKeyVal("name", name);
            writer.writeKeyVal("id", id);
            writer.writeKeyVal("path", path);
            writer.writeKeyVal("filterMode", filterMode);
            writer.writeKeyVal("mipMapBias", mipMapBias);
            writer.writeKeyVal("width", width);
            writer.writeKeyVal("height", height);
            writer.writeKeyVal("format", format);
            writer.writeKeyVal("wrapMode", wrapMode);
            writer.writeKeyVal("isTex2D", isTex2D);
            writer.writeKeyVal("isRenderTarget", isRenderTarget);
            writer.writeKeyVal("alphaTransparency", alphaTransparency);
            writer.writeKeyVal("anisoLevel", anisoLevel);
            writer.writeKeyVal("sRGB", sRGB);
            writer.writeKeyVal("normalMapFlag", normalMapFlag);
            writer.writeKeyVal("importDataFound", importDataFound);
            writer.writeKeyVal("textureType", textureType);

            writer.writeKeyVal("texParams", texParams);
            writer.writeKeyVal("texImportParams", texImportParams);

            writer.endObject();
        }
        /*
         * public JsonSkeleton skeleton = new JsonSkeleton();
         * public List<JsonSkinRendererData> skinMeshes = new List<JsonSkinRendererData>();
         * public JsonAnimatorController animatorController = new JsonAnimatorController();
         */

        public void writeRawJsonValue(FastJsonWriter writer)
        {
            writer.beginRawObject();
            writer.writeKeyVal("name", name);
            writer.writeKeyVal("skeletonId", skeletonId);
            //slots?
            writer.writeKeyVal("skinMeshIds", skinMeshIds);
            writer.writeKeyVal("animatorControllerId", animatorControllerId);

            writer.writeKeyVal("applyRootMotion", animator.applyRootMotion);
            writer.writeKeyVal("cullingMode", animator.cullingMode.ToString());
            writer.writeKeyVal("hasRootMotion", animator.hasRootMotion);
            writer.writeKeyVal("hasTransformHierarchy", animator.hasTransformHierarchy);
            writer.writeKeyVal("humanScale", animator.humanScale);
            writer.writeKeyVal("isHuman", animator.isHuman);
            writer.writeKeyVal("layerCount", animator.layerCount);
            writer.writeKeyVal("layersAffectMassCenter", animator.layersAffectMassCenter);
            //writer.writeKeyVal("linearVelocityBlending", animator.linearVelocityBlending);
            writer.writeKeyVal("speed", animator.speed);
            writer.writeKeyVal("stabilizeFeet", animator.stabilizeFeet);

            writer.writeKeyVal("humanBones", humanBones);

            //writer.writeKeyVal("skeleton", skeleton);
            //writer.writeKeyVal("animatorController", animatorController);
            writer.endObject();
        }
 public void writeRawJsonValue(FastJsonWriter writer)
 {
     writer.beginRawObject(false);
     writer.writeKeyVal("time", time, false);
     writer.writeKeyVal("frame", frame, false);
     writer.writeKeyVal("val", val, false);
     writer.endObject(false);
 }
Exemplo n.º 11
0
        public override void writeJsonObjectFields(FastJsonWriter writer)
        {
            writer.writeKeyVal("id", id);
            writer.writeKeyVal("name", name);
            //writer.writeKeyVal("defaultBoneNames", defaultBoneNames);

            writer.writeKeyVal("bones", bones);
        }
 public void writeRawJsonValue(FastJsonWriter writer)
 {
     writer.beginRawObject();
     writer.writeKeyVal("time", time);
     writer.writeKeyVal("frame", frame);
     writer.writeKeyVal("local", local);
     writer.writeKeyVal("world", world);
     writer.endObject();
 }
 public void writeRawJsonValue(FastJsonWriter writer)
 {
     writer.beginRawObject();
     writer.writeKeyVal("prefabId", prefabId);
     writer.writeKeyVal("prefabObjectId", prefabObjectId);
     writer.writeKeyVal("meshId", meshIdData.meshId);
     writer.writeKeyVal("meshMaterials", meshIdData.meshMaterials);
     writer.endObject();
 }
Exemplo n.º 14
0
 public void writeRawJsonValue(FastJsonWriter writer)
 {
     writer.beginRawObject();
     writer.writeKeyVal("objectName", objectName);
     writer.writeKeyVal("objectPath", objectPath);
     writer.writeKeyVal("length", (keys != null) ? keys.Count: 0);
     writer.writeKeyVal("keys", keys);
     writer.endObject();
 }
Exemplo n.º 15
0
 public void writeRawJsonValue(FastJsonWriter writer)
 {
     writer.beginRawObject();
     writer.writeKeyVal("name", name);
     writer.writeKeyVal("path", path);
     writer.writeKeyVal("buildIndex", buildIndex);
     writeJsonObjectFields(writer);            //the hell? Why?
     writer.endObject();
 }
 public void writeRawJsonValue(FastJsonWriter writer)
 {
     writer.beginRawObject();
     writer.writeKeyVal("name", name);
     writer.writeKeyVal("index", index);
     writer.writeKeyVal("numFrames", numFrames);
     writer.writeKeyVal("frames", frames);
     writer.endObject();
 }
 public void writeRawJsonValue(FastJsonWriter writer)
 {
     writer.beginRawObject();
     writer.writeKeyVal("length", length);
     writer.writeKeyVal("preWrapMode", preWrapMode);
     writer.writeKeyVal("postWrapMode", postWrapMode);
     writer.writeKeyVal("keys", keys);
     writer.endObject();
 }
Exemplo n.º 18
0
        public void writeRawJsonValue(FastJsonWriter writer)
        {
            writer.beginRawObject();

            writer.writeKeyVal("name", name);
            writer.writeKeyVal("path", path);
            writer.writeKeyVal("exportPath", exportPath);

            writer.writeKeyVal("heightMapRawPath", heightMapRawPath);
            writer.writeKeyVal("alphaMapRawPaths", alphaMapRawPaths);
            writer.writeKeyVal("detailMapRawPaths", detailMapRawPaths);

            writer.writeKeyVal("alphaMapWidth", terrainData.alphamapWidth);
            writer.writeKeyVal("alphaMapHeight", terrainData.alphamapHeight);
            writer.writeKeyVal("alphaMapLayers", terrainData.alphamapLayers);
            writer.writeKeyVal("alphaMapResolution", terrainData.alphamapResolution);
            //writer.writeKeyVal("alphaMapTextureIds", alphaMapTextureIds);

            writer.writeKeyVal("baseMapResolution", terrainData.baseMapResolution);
            writer.writeKeyVal("bounds", bounds);

            writer.writeKeyVal("detailWidth", terrainData.detailWidth);
            writer.writeKeyVal("detailHeight", terrainData.detailHeight);
            writer.writeKeyVal("detailPrototypes", detailPrototypes);
            writer.writeKeyVal("detailResolution", terrainData.detailResolution);

                #if UNITY_2019_3_OR_NEWER
            writer.writeKeyVal("heightmapWidth", terrainData.heightmapResolution);
            writer.writeKeyVal("heightmapHeight", terrainData.heightmapResolution);
                #else
            writer.writeKeyVal("heightmapWidth", terrainData.heightmapWidth);
            writer.writeKeyVal("heightmapHeight", terrainData.heightmapHeight);
                #endif

            writer.writeKeyVal("heightmapResolution", terrainData.heightmapResolution);
            writer.writeKeyVal("heightmapScale", terrainData.heightmapScale);

            writer.writeKeyVal("worldSize", terrainData.size);
                #if UNITY_2019_3_OR_NEWER
            writer.writeKeyVal("thickness", 0.0f);
                #else
            writer.writeKeyVal("thickness", terrainData.thickness);
                #endif
            writer.writeKeyVal("treeInstanceCount", terrainData.treeInstanceCount);

            writer.writeKeyVal("splatPrototypes", splatPrototypes);
            writer.writeKeyVal("treePrototypes", treePrototypes);
            writer.writeKeyVal("treeInstances", treeInstances);

            writer.writeKeyVal("wavingGrassAmount", terrainData.wavingGrassAmount);
            writer.writeKeyVal("wavingGrassSpeed", terrainData.wavingGrassSpeed);
            writer.writeKeyVal("wavingGrassStrength", terrainData.wavingGrassStrength);
            writer.writeKeyVal("wavingGrassTint", terrainData.wavingGrassTint);

            writer.endObject();
        }
 public void writeRawJsonValue(FastJsonWriter writer)
 {
     writer.beginRawObject();
     writer.writeKeyVal("name", name);
     writer.writeKeyVal("assetPath", assetPath);
     writer.writeKeyVal("skeleton", skeleton);
     writer.writeKeyVal("animatorController", animatorController);
     writer.writeKeyVal("attachedObjects", attachedObjects);
     writer.endObject();
 }
Exemplo n.º 20
0
 public void writeRawJsonValue(FastJsonWriter writer)
 {
     writer.beginRawObject();
     writer.writeKeyVal("name", animParam.name);
     writer.writeKeyVal("animType", animParam.type.ToString());
     writer.writeKeyVal("defaultBool", animParam.defaultBool);
     writer.writeKeyVal("defaultInt", animParam.defaultInt);
     writer.writeKeyVal("defaultFloat", animParam.defaultFloat);
     writer.endObject();
 }
 public void writeRawJsonValue(FastJsonWriter writer)
 {
     writer.beginRawObject();
     writer.writeKeyVal("lightmapIndex", lightmapIndex);
     writer.writeKeyVal("shadowCastingMode", shadowCastingMode);
     writer.writeKeyVal("lightmapScaleOffset", lightmapScaleOffset);
     writer.writeKeyVal("materials", materials);
     writer.writeKeyVal("receiveShadows", receiveShadows);
     writer.endObject();
 }
 public void writeRawJsonValue(FastJsonWriter writer)
 {
     writer.beginRawObject();
     writer.writeKeyVal("index", index);
     writer.writeKeyVal("weight", weight);
     writer.writeKeyVal("deltaVerts", deltaVerts, 3 * JsonMesh.vertsPerLine);
     writer.writeKeyVal("deltaNormals", deltaNormals, 3 * JsonMesh.vertsPerLine);
     writer.writeKeyVal("deltaTangents", deltaTangents, 3 * JsonMesh.vertsPerLine);
     writer.endObject();
 }
 public void writeRawJsonValue(FastJsonWriter writer)
 {
     writer.beginRawObject();
     writer.writeKeyVal("damper", joint.damper);
     writer.writeKeyVal("maxDistance", joint.maxDistance);
     writer.writeKeyVal("minDistance", joint.minDistance);
     writer.writeKeyVal("spring", joint.spring);
     writer.writeKeyVal("tolerance", joint.tolerance);
     writer.endObject();
 }
Exemplo n.º 24
0
 public void writeRawJsonValue(FastJsonWriter writer)
 {
     writer.beginRawObject();
     writer.writeKeyVal("propertyName", binding.propertyName);
     writer.writeKeyVal("isDiscreteCurve", binding.isDiscreteCurve);
     writer.writeKeyVal("isPPtrCurve", binding.isPPtrCurve);
     writer.writeKeyVal("path", binding.path);
     writer.writeKeyVal("curves", curves);
     writer.endObject();
 }
 public void writeRawJsonValue(FastJsonWriter writer)
 {
     writer.beginRawObject();
     writer.writeKeyVal("name", name);
     writer.writeKeyVal("pivot", pivot);
     writer.writeKeyVal("border", border);
     writer.writeKeyVal("alignment", alignment);
     writer.writeKeyVal("rect", rect);
     writer.endObject();
 }
Exemplo n.º 26
0
        public void writeRawJsonValue(FastJsonWriter writer)
        {
            writer.beginRawObject();
            writer.writeKeyVal("name", name);
            writer.writeKeyVal("instanceId", instanceId);
            writer.writeKeyVal("id", id);

            writer.writeKeyVal("scenePath", scenePath);

            writer.writeKeyVal("localPosition", localPosition);
            writer.writeKeyVal("localRotation", localRotation);
            writer.writeKeyVal("localScale", localScale);
            writer.writeKeyVal("worldMatrix", worldMatrix);
            writer.writeKeyVal("localMatrix", localMatrix);

            writer.writeKeyVal("localTransform", new JsonTransform(localMatrix));
            writer.writeKeyVal("globalTransform", new JsonTransform(worldMatrix));

            writer.writeKeyVal("children", children);
            writer.writeKeyVal("childNames", childNames);
            writer.writeKeyVal("parent", parent);
            writer.writeKeyVal("parentName", parentName);
            writer.writeKeyVal("mesh", mesh);
            writer.writeKeyVal("isStatic", isStatic);
            writer.writeKeyVal("lightMapStatic", lightMapStatic);
            writer.writeKeyVal("navigationStatic", navigationStatic);
            writer.writeKeyVal("occluderStatic", occluderStatic);
            writer.writeKeyVal("occludeeStatic", occludeeStatic);
            writer.writeKeyVal("reflectionProbeStatic", reflectionProbeStatic);

            writer.writeKeyVal("activeSelf", activeSelf);
            writer.writeKeyVal("activeInHierarchy", activeInHierarchy);

            writer.writeKeyVal("nameClash", nameClash);
            writer.writeKeyVal("uniqueName", uniqueName);

            writer.writeKeyVal("prefabRootId", prefabRootId);
            writer.writeKeyVal("prefabObjectId", prefabObjectId);
            writer.writeKeyVal("prefabInstance", prefabInstance);
            writer.writeKeyVal("prefabModelInstance", prefabModelInstance);
            writer.writeKeyVal("prefabType", prefabType);

            //TODO remove empty arrays
            writer.writeKeyVal("renderer", renderer, true);
            writer.writeKeyVal("light", light, true);
            writer.writeKeyVal("reflectionProbes", reflectionProbes, true);
            writer.writeKeyVal("skinRenderers", skinRenderers, true);
            writer.writeKeyVal("animators", animators, true);
            writer.writeKeyVal("terrains", terrains, true);
            writer.writeKeyVal("colliders", colliders, true);
            writer.writeKeyVal("rigidbodies", rigidbodies, true);
            writer.writeKeyVal("joints", joints, true);

            writer.endObject();
        }
        public void writeRawJsonValue(FastJsonWriter writer)
        {
            writer.beginRawObject(false);

            writer.writeKeyVal("x", x, false);
            writer.writeKeyVal("y", y, false);
            writer.writeKeyVal("z", z, false);
            writer.writeKeyVal("pos", pos, false);

            writer.endObject(false);
        }
Exemplo n.º 28
0
        public static string toJsonString <T>(this T arg) where T : IFastJsonValue
        {
            if (arg == null)
            {
                return(string.Empty);
            }
            var writer = new FastJsonWriter();

            arg.writeRawJsonValue(writer);
            return(writer.getString());
        }
Exemplo n.º 29
0
 //public int objectInstanceId = -1;
 public void writeRawJsonValue(FastJsonWriter writer)
 {
     writer.beginRawObject(false);
     writer.writeKeyVal("boneName", boneName, false);
     writer.writeKeyVal("objectName", objectName, false);
     writer.writeKeyVal("objectPath", objectPath, false);
     //writer.writeKeyVal("objectId", objectId, false);
     writer.writeKeyVal("objInstanceId", objInstanceId, false);
     writer.writeKeyVal("transfInstanceId", transfInstanceId, false);
     writer.endObject(false);
 }
Exemplo n.º 30
0
        public void writeRawJsonValue(FastJsonWriter writer)
        {
            writer.beginRawObject();
            writer.writeKeyVal("name", name);
            writer.writeKeyVal("path", path);
            writer.writeKeyVal("id", id);

            writer.writeKeyVal("parameters", parameters);
            //writer.writeKeyVal("animations", animations);
            writer.writeKeyVal("animationIds", animationIds);
            writer.endObject();
        }