/// <summary> /// This model objects saves the current model to the DB /// </summary> private void SaveToApi() { // here we get all the info to save ModelObj model = new ModelObj(); byte[] imgData = File.ReadAllBytes(@"MyFolder\Temp\myZip.zip"); model.model_data = string.Concat(imgData.Select(b => b.ToString("X2")).ToArray()); model.model_offset = Model.transform.position.y; model.model_location = string.Format("POINT({0} {1})", pntLongitude, pntLatitude); model.model_rotation = JsonUtility.ToJson(Model.transform.rotation); model.model_scaling = JsonUtility.ToJson(Model.transform.localScale); // do the save api.AddModel(model); }