public JsonTreePrototype(TreePrototype src_, ResourceMapper resMap)
        {
            src            = src_;
            prefabId       = resMap.getRootPrefabId(src.prefab, true);
            prefabObjectId = resMap.getPrefabObjectId(src.prefab, true);

            meshIdData = new MeshIdData(src.prefab, resMap);

            /*
             * meshId = -1;
             * meshMaterials.Clear();
             *
             * var srcObj = src.prefab as GameObject;
             * if (!srcObj)
             *      return;
             * var filter = srcObj.GetComponent<MeshFilter>();
             * if (filter && filter.sharedMesh){
             *      meshId = resMap.getMeshId(filter.sharedMesh);
             * }
             * var renderer = srcObj.GetComponent<Renderer>();
             * if (renderer){
             *      foreach(var cur in renderer.sharedMaterials){
             *              meshMaterials.Add(resMap.getMaterialId(cur));
             *      }
             * }
             */
        }
        public JsonTerrainDetailPrototype(DetailPrototype data_, ResourceMapper resMap)
        {
            data = data_;

            textureId            = resMap.getTextureId(data.prototypeTexture);
            detailPrefabId       = resMap.getRootPrefabId(data.prototype, true);
            detailPrefabObjectId = resMap.getPrefabObjectId(data.prototype, true);

            meshIdData = new MeshIdData(data.prototype, resMap);
            //meshId = resMap.getPrefabObjectId
        }