From cacdb96ff243b489bab0d906459f0ff2a7c64e84 Mon Sep 17 00:00:00 2001 From: Andreas Atteneder Date: Fri, 12 Feb 2021 13:00:10 +0100 Subject: [PATCH 01/71] feat: Split up Decoder::DecodeMeshFromBuffer into two steps. Step 1 proceeds until all mesh and vertex attributes are known (This is required for clients to prepare resources like allocating buffers). Step two does the actual decoding of vertex attributes. This change allows for certain optimization in the Unity integration. Note: WIP Only tested on MeshEdgebreakerDecoder. --- .../animation/keyframe_animation_decoder.cc | 6 ++- src/draco/compression/decode.cc | 37 +++++++++++++++++-- src/draco/compression/decode.h | 9 ++++- src/draco/compression/mesh/mesh_decoder.cc | 8 +++- src/draco/compression/mesh/mesh_decoder.h | 5 ++- .../point_cloud/point_cloud_decoder.cc | 28 ++++++++++---- .../point_cloud/point_cloud_decoder.h | 7 +++- src/draco/unity/draco_unity_plugin.cc | 35 +++++++++++++----- src/draco/unity/draco_unity_plugin.h | 6 ++- 9 files changed, 112 insertions(+), 29 deletions(-) diff --git a/src/draco/animation/keyframe_animation_decoder.cc b/src/draco/animation/keyframe_animation_decoder.cc index 20659468..09248763 100644 --- a/src/draco/animation/keyframe_animation_decoder.cc +++ b/src/draco/animation/keyframe_animation_decoder.cc @@ -19,11 +19,15 @@ namespace draco { Status KeyframeAnimationDecoder::Decode(const DecoderOptions &options, DecoderBuffer *in_buffer, KeyframeAnimation *animation) { - const auto status = PointCloudSequentialDecoder::Decode( + auto status = PointCloudSequentialDecoder::DecodeStep1( options, in_buffer, static_cast(animation)); if (!status.ok()) { return status; } + status = PointCloudSequentialDecoder::DecodeStep2(); + if (!status.ok()) { + return status; + } return OkStatus(); } diff --git a/src/draco/compression/decode.cc b/src/draco/compression/decode.cc index 92ae4ff6..3c597232 100644 --- a/src/draco/compression/decode.cc +++ b/src/draco/compression/decode.cc @@ -90,6 +90,18 @@ StatusOr> Decoder::DecodeMeshFromBuffer( return std::move(mesh); } +StatusOr> Decoder::DecodeMeshFromBufferStep1( + DecoderBuffer *in_buffer) { + mesh_ = std::unique_ptr(new Mesh()); + DRACO_RETURN_IF_ERROR(DecodeBufferToGeometryStep1(in_buffer, mesh_.get())) + return std::move(mesh_); +} + +Status Decoder::DecodeMeshFromBufferStep2() { + DRACO_RETURN_IF_ERROR(DecodeBufferToGeometryStep2()) + return OkStatus(); +} + Status Decoder::DecodeBufferToGeometry(DecoderBuffer *in_buffer, PointCloud *out_geometry) { #ifdef DRACO_POINT_CLOUD_COMPRESSION_SUPPORTED @@ -109,7 +121,7 @@ Status Decoder::DecodeBufferToGeometry(DecoderBuffer *in_buffer, #endif } -Status Decoder::DecodeBufferToGeometry(DecoderBuffer *in_buffer, +Status Decoder::DecodeBufferToGeometryStep1(DecoderBuffer *in_buffer, Mesh *out_geometry) { #ifdef DRACO_MESH_COMPRESSION_SUPPORTED DecoderBuffer temp_buffer(*in_buffer); @@ -118,10 +130,29 @@ Status Decoder::DecodeBufferToGeometry(DecoderBuffer *in_buffer, if (header.encoder_type != TRIANGULAR_MESH) { return Status(Status::DRACO_ERROR, "Input is not a mesh."); } - DRACO_ASSIGN_OR_RETURN(std::unique_ptr decoder, + DRACO_ASSIGN_OR_RETURN(decoder_, CreateMeshDecoder(header.encoder_method)) - DRACO_RETURN_IF_ERROR(decoder->Decode(options_, in_buffer, out_geometry)) + { + const draco::Status _local_status = decoder_->DecodeStep1(options_, in_buffer, out_geometry); + if (!_local_status.ok()) { + decoder_.reset(); + return _local_status; + } + } + return OkStatus(); +#else + return Status(Status::DRACO_ERROR, "Unsupported geometry type."); +#endif +} + +Status Decoder::DecodeBufferToGeometryStep2() { +#ifdef DRACO_MESH_COMPRESSION_SUPPORTED + const draco::Status _local_status = decoder_->DecodeStep2(); + decoder_.reset(); + if (!_local_status.ok()) { + return _local_status; + } return OkStatus(); #else return Status(Status::DRACO_ERROR, "Unsupported geometry type."); diff --git a/src/draco/compression/decode.h b/src/draco/compression/decode.h index 5f3fad26..2ca341ff 100644 --- a/src/draco/compression/decode.h +++ b/src/draco/compression/decode.h @@ -21,6 +21,7 @@ #include "draco/core/status_or.h" #include "draco/draco_features.h" #include "draco/mesh/mesh.h" +#include "draco/compression/mesh/mesh_decoder.h" namespace draco { @@ -50,13 +51,17 @@ class Decoder { StatusOr> DecodeMeshFromBuffer( DecoderBuffer *in_buffer); + StatusOr> DecodeMeshFromBufferStep1(DecoderBuffer *in_buffer); + Status DecodeMeshFromBufferStep2(); + // Decodes the buffer into a provided geometry. If the geometry is // incompatible with the encoded data. For example, when |out_geometry| is // draco::Mesh while the data contains a point cloud, the function will return // an error status. Status DecodeBufferToGeometry(DecoderBuffer *in_buffer, PointCloud *out_geometry); - Status DecodeBufferToGeometry(DecoderBuffer *in_buffer, Mesh *out_geometry); + Status DecodeBufferToGeometryStep1(DecoderBuffer *in_buffer, Mesh *out_geometry); + Status DecodeBufferToGeometryStep2(); // When set, the decoder is going to skip attribute transform for a given // attribute type. For example for quantized attributes, the decoder would @@ -73,6 +78,8 @@ class Decoder { private: DecoderOptions options_; + std::unique_ptr mesh_; + std::unique_ptr decoder_; }; } // namespace draco diff --git a/src/draco/compression/mesh/mesh_decoder.cc b/src/draco/compression/mesh/mesh_decoder.cc index 6e48e56f..6757a07b 100644 --- a/src/draco/compression/mesh/mesh_decoder.cc +++ b/src/draco/compression/mesh/mesh_decoder.cc @@ -18,10 +18,14 @@ namespace draco { MeshDecoder::MeshDecoder() : mesh_(nullptr) {} -Status MeshDecoder::Decode(const DecoderOptions &options, +Status MeshDecoder::DecodeStep1(const DecoderOptions &options, DecoderBuffer *in_buffer, Mesh *out_mesh) { mesh_ = out_mesh; - return PointCloudDecoder::Decode(options, in_buffer, out_mesh); + return PointCloudDecoder::DecodeStep1(options, in_buffer, out_mesh); +} + +Status MeshDecoder::DecodeStep2() { + return PointCloudDecoder::DecodeStep2(); } bool MeshDecoder::DecodeGeometryData() { diff --git a/src/draco/compression/mesh/mesh_decoder.h b/src/draco/compression/mesh/mesh_decoder.h index 397a679d..eecf7721 100644 --- a/src/draco/compression/mesh/mesh_decoder.h +++ b/src/draco/compression/mesh/mesh_decoder.h @@ -33,9 +33,12 @@ class MeshDecoder : public PointCloudDecoder { } // The main entry point for mesh decoding. - Status Decode(const DecoderOptions &options, DecoderBuffer *in_buffer, + Status DecodeStep1(const DecoderOptions &options, DecoderBuffer *in_buffer, Mesh *out_mesh); + // The main entry point for mesh decoding. + Status DecodeStep2(); + // Returns the base connectivity of the decoded mesh (or nullptr if it is not // initialized). virtual const CornerTable *GetCornerTable() const { return nullptr; } diff --git a/src/draco/compression/point_cloud/point_cloud_decoder.cc b/src/draco/compression/point_cloud/point_cloud_decoder.cc index 85f7bc94..6b8d1630 100644 --- a/src/draco/compression/point_cloud/point_cloud_decoder.cc +++ b/src/draco/compression/point_cloud/point_cloud_decoder.cc @@ -63,7 +63,7 @@ Status PointCloudDecoder::DecodeMetadata() { return OkStatus(); } -Status PointCloudDecoder::Decode(const DecoderOptions &options, +Status PointCloudDecoder::DecodeStep1(const DecoderOptions &options, DecoderBuffer *in_buffer, PointCloud *out_point_cloud) { options_ = &options; @@ -119,21 +119,29 @@ Status PointCloudDecoder::Decode(const DecoderOptions &options, if (!DecodeGeometryData()) { return Status(Status::DRACO_ERROR, "Failed to decode geometry data."); } - if (!DecodePointAttributes()) { + if (!DecodePointAttributesStep1()) { return Status(Status::DRACO_ERROR, "Failed to decode point attributes."); } return OkStatus(); } -bool PointCloudDecoder::DecodePointAttributes() { - uint8_t num_attributes_decoders; - if (!buffer_->Decode(&num_attributes_decoders)) { +Status PointCloudDecoder::DecodeStep2() { + if (!DecodePointAttributesStep2()) { + return Status(Status::DRACO_ERROR, "Failed to decode point attributes."); + } + return OkStatus(); +} + +bool PointCloudDecoder::DecodePointAttributesStep1() { + + uint8_t tmp_num_attributes_decoders; + if (!buffer_->Decode(&tmp_num_attributes_decoders)) { return false; } // Create all attribute decoders. This is implementation specific and the // derived classes can use any data encoded in the // PointCloudEncoder::EncodeAttributesEncoderIdentifier() call. - for (int i = 0; i < num_attributes_decoders; ++i) { + for (int i = 0; i < tmp_num_attributes_decoders; ++i) { if (!CreateAttributesDecoder(i)) { return false; } @@ -147,14 +155,18 @@ bool PointCloudDecoder::DecodePointAttributes() { } // Decode any data needed by the attribute decoders. - for (int i = 0; i < num_attributes_decoders; ++i) { + for (int i = 0; i < tmp_num_attributes_decoders; ++i) { if (!attributes_decoders_[i]->DecodeAttributesDecoderData(buffer_)) { return false; } } + return true; +} + +bool PointCloudDecoder::DecodePointAttributesStep2() { // Create map between attribute and decoder ids. - for (int i = 0; i < num_attributes_decoders; ++i) { + for (int i = 0; i < num_attributes_decoders(); ++i) { const int32_t num_attributes = attributes_decoders_[i]->GetNumAttributes(); for (int j = 0; j < num_attributes; ++j) { int att_id = attributes_decoders_[i]->GetAttributeId(j); diff --git a/src/draco/compression/point_cloud/point_cloud_decoder.h b/src/draco/compression/point_cloud/point_cloud_decoder.h index 4af7f5cd..24dd26b3 100644 --- a/src/draco/compression/point_cloud/point_cloud_decoder.h +++ b/src/draco/compression/point_cloud/point_cloud_decoder.h @@ -37,9 +37,11 @@ class PointCloudDecoder { static Status DecodeHeader(DecoderBuffer *buffer, DracoHeader *out_header); // The main entry point for point cloud decoding. - Status Decode(const DecoderOptions &options, DecoderBuffer *in_buffer, + Status DecodeStep1(const DecoderOptions &options, DecoderBuffer *in_buffer, PointCloud *out_point_cloud); + Status DecodeStep2(); + bool SetAttributesDecoder( int att_decoder_id, std::unique_ptr decoder) { if (att_decoder_id < 0) { @@ -87,7 +89,8 @@ class PointCloudDecoder { // Creates an attribute decoder. virtual bool CreateAttributesDecoder(int32_t att_decoder_id) = 0; virtual bool DecodeGeometryData() { return true; } - virtual bool DecodePointAttributes(); + virtual bool DecodePointAttributesStep1(); + virtual bool DecodePointAttributesStep2(); virtual bool DecodeAllAttributes(); virtual bool OnAttributesDecoded() { return true; } diff --git a/src/draco/unity/draco_unity_plugin.cc b/src/draco/unity/draco_unity_plugin.cc index e80279b8..6c024910 100644 --- a/src/draco/unity/draco_unity_plugin.cc +++ b/src/draco/unity/draco_unity_plugin.cc @@ -152,14 +152,20 @@ void EXPORT_API ReleaseDracoData(DracoData **data_ptr) { *data_ptr = nullptr; } -int EXPORT_API DecodeDracoMesh(char *data, unsigned int length, - DracoMesh **mesh) { +int EXPORT_API DecodeDracoMeshStep1( + char *data, + unsigned int length, + DracoMesh **mesh, + draco::Decoder** decoder, + draco::DecoderBuffer** buffer + ) +{ if (mesh == nullptr || *mesh != nullptr) { return -1; } - draco::DecoderBuffer buffer; - buffer.Init(data, length); - auto type_statusor = draco::Decoder::GetEncodedGeometryType(&buffer); + *buffer = new draco::DecoderBuffer(); + (*buffer)->Init(data, length); + auto type_statusor = draco::Decoder::GetEncodedGeometryType(*buffer); if (!type_statusor.ok()) { // TODO(draco-eng): Use enum instead. return -2; @@ -169,21 +175,32 @@ int EXPORT_API DecodeDracoMesh(char *data, unsigned int length, return -3; } - draco::Decoder decoder; - auto statusor = decoder.DecodeMeshFromBuffer(&buffer); + *mesh = new DracoMesh(); + *decoder = new draco::Decoder(); + auto statusor = (*decoder)->DecodeMeshFromBufferStep1(*buffer); if (!statusor.ok()) { return -4; } + std::unique_ptr in_mesh = std::move(statusor).value(); - *mesh = new DracoMesh(); DracoMesh *const unity_mesh = *mesh; unity_mesh->num_faces = in_mesh->num_faces(); unity_mesh->num_vertices = in_mesh->num_points(); unity_mesh->num_attributes = in_mesh->num_attributes(); unity_mesh->private_mesh = static_cast(in_mesh.release()); - return unity_mesh->num_faces; + return 0; +} + +int EXPORT_API DecodeDracoMeshStep2(DracoMesh **mesh,draco::Decoder* decoder, draco::DecoderBuffer* buffer) { + auto status = decoder->DecodeMeshFromBufferStep2(); + delete decoder; + delete buffer; + if (!status.ok()) { + return -4; + } + return 0; } bool EXPORT_API GetAttribute(const DracoMesh *mesh, int index, diff --git a/src/draco/unity/draco_unity_plugin.h b/src/draco/unity/draco_unity_plugin.h index 2f878889..9d7cd91e 100644 --- a/src/draco/unity/draco_unity_plugin.h +++ b/src/draco/unity/draco_unity_plugin.h @@ -81,8 +81,10 @@ void EXPORT_API ReleaseDracoData(DracoData **data_ptr); // Decodes compressed Draco mesh in |data| and returns |mesh|. On input, |mesh| // must be null. The returned |mesh| must be released with ReleaseDracoMesh. -int EXPORT_API DecodeDracoMesh(char *data, unsigned int length, - DracoMesh **mesh); +int EXPORT_API DecodeDracoMeshStep1(char *data, unsigned int length, + DracoMesh **mesh, draco::Decoder** decoder,draco::DecoderBuffer** buffer); +int EXPORT_API DecodeDracoMeshStep2(DracoMesh **mesh,draco::Decoder* decoder, draco::DecoderBuffer* buffer); + // Returns |attribute| at |index| in |mesh|. On input, |attribute| must be // null. The returned |attribute| must be released with ReleaseDracoAttribute. From ac08ac8c0e62b6eea1cd2cedff44652c63dcb984 Mon Sep 17 00:00:00 2001 From: Andreas Atteneder Date: Mon, 15 Feb 2021 12:50:00 +0100 Subject: [PATCH 02/71] feat: Added option to convert mesh's coordinate space from right-hand to left-hand (required for glTF embed Draco data) --- src/draco/unity/draco_unity_plugin.cc | 81 ++++++++++++++++++++++----- src/draco/unity/draco_unity_plugin.h | 4 +- 2 files changed, 69 insertions(+), 16 deletions(-) diff --git a/src/draco/unity/draco_unity_plugin.cc b/src/draco/unity/draco_unity_plugin.cc index 6c024910..1cfa5300 100644 --- a/src/draco/unity/draco_unity_plugin.cc +++ b/src/draco/unity/draco_unity_plugin.cc @@ -67,23 +67,65 @@ T *CopyAttributeData(int num_points, const draco::PointAttribute *attr) { return data; } +// Returns the attribute data in |attr| as an array of type T. +template +T *CopyAttributeDataFlipped(int num_points, const draco::PointAttribute *attr) { + const int num_components = attr->num_components(); + T *const data = new T[num_points * num_components]; + + for (draco::PointIndex i(0); i < num_points; ++i) { + const draco::AttributeValueIndex val_index = attr->mapped_index(i); + bool got_data = false; + T* outPtr = data + i.value() * num_components; + switch (num_components) { + case 1: + got_data = attr->ConvertValue(val_index,outPtr); + break; + case 2: + got_data = attr->ConvertValue(val_index,outPtr); + // Texture coordinate right-handed top left to left-handed lower left conversion + *(outPtr+1) = 1-*(outPtr+1); + break; + case 3: + got_data = attr->ConvertValue(val_index,outPtr); + // Position/Normal right-hand to left-handed coordinate system switch: flip Z axis + *(outPtr+2) *= -1; + break; + case 4: + got_data = attr->ConvertValue(val_index,outPtr); + // Tangent right-hand to left-handed coordinate system switch: flip X and Z axis + *(outPtr) *= -1; + *(outPtr+2) *= -1; + break; + default: + break; + } + if (!got_data) { + delete[] data; + return nullptr; + } + } + + return data; +} + // Returns the attribute data in |attr| as an array of void*. -void *ConvertAttributeData(int num_points, const draco::PointAttribute *attr) { +void *ConvertAttributeData(int num_points, const draco::PointAttribute *attr, bool flip) { switch (attr->data_type()) { case draco::DataType::DT_INT8: - return static_cast(CopyAttributeData(num_points, attr)); + return static_cast(flip ? CopyAttributeDataFlipped(num_points, attr) : CopyAttributeData(num_points, attr)); case draco::DataType::DT_UINT8: - return static_cast(CopyAttributeData(num_points, attr)); + return static_cast(flip ? CopyAttributeDataFlipped(num_points, attr) : CopyAttributeData(num_points, attr)); case draco::DataType::DT_INT16: - return static_cast(CopyAttributeData(num_points, attr)); + return static_cast(flip ? CopyAttributeDataFlipped(num_points, attr) : CopyAttributeData(num_points, attr)); case draco::DataType::DT_UINT16: - return static_cast(CopyAttributeData(num_points, attr)); + return static_cast(flip ? CopyAttributeDataFlipped(num_points, attr) : CopyAttributeData(num_points, attr)); case draco::DataType::DT_INT32: - return static_cast(CopyAttributeData(num_points, attr)); + return static_cast(flip ? CopyAttributeDataFlipped(num_points, attr) : CopyAttributeData(num_points, attr)); case draco::DataType::DT_UINT32: - return static_cast(CopyAttributeData(num_points, attr)); + return static_cast(flip ? CopyAttributeDataFlipped(num_points, attr) : CopyAttributeData(num_points, attr)); case draco::DataType::DT_FLOAT32: - return static_cast(CopyAttributeData(num_points, attr)); + return static_cast(flip ? CopyAttributeDataFlipped(num_points, attr) : CopyAttributeData(num_points, attr)); default: return nullptr; } @@ -248,16 +290,27 @@ bool EXPORT_API GetAttributeByUniqueId(const DracoMesh *mesh, int unique_id, return true; } -bool EXPORT_API GetMeshIndices(const DracoMesh *mesh, DracoData **indices) { +bool EXPORT_API GetMeshIndices(const DracoMesh *mesh, DracoData **indices, bool flip) { if (mesh == nullptr || indices == nullptr || *indices != nullptr) { return false; } const Mesh *const m = static_cast(mesh->private_mesh); int *const temp_indices = new int[m->num_faces() * 3]; - for (draco::FaceIndex face_id(0); face_id < m->num_faces(); ++face_id) { - const Mesh::Face &face = m->face(draco::FaceIndex(face_id)); - memcpy(temp_indices + face_id.value() * 3, + if(flip) { + for (draco::FaceIndex face_id(0); face_id < m->num_faces(); ++face_id) { + const Mesh::Face &face = m->face(draco::FaceIndex(face_id)); + int32_t* const dest = temp_indices + face_id.value() * 3; + const int32_t* src = reinterpret_cast(face.data()); + *dest = *src; + *(dest+1) = *(src+2); + *(dest+2) = *(src+1); + } + } else { + for (draco::FaceIndex face_id(0); face_id < m->num_faces(); ++face_id) { + const Mesh::Face &face = m->face(draco::FaceIndex(face_id)); + memcpy(temp_indices + face_id.value() * 3, reinterpret_cast(face.data()), sizeof(int) * 3); + } } DracoData *const draco_data = new DracoData(); draco_data->data = temp_indices; @@ -268,7 +321,7 @@ bool EXPORT_API GetMeshIndices(const DracoMesh *mesh, DracoData **indices) { bool EXPORT_API GetAttributeData(const DracoMesh *mesh, const DracoAttribute *attribute, - DracoData **data) { + DracoData **data, bool flip) { if (mesh == nullptr || data == nullptr || *data != nullptr) { return false; } @@ -276,7 +329,7 @@ bool EXPORT_API GetAttributeData(const DracoMesh *mesh, const PointAttribute *const attr = static_cast(attribute->private_attribute); - void *temp_data = ConvertAttributeData(m->num_points(), attr); + void *temp_data = ConvertAttributeData(m->num_points(), attr, flip); if (temp_data == nullptr) { return false; } diff --git a/src/draco/unity/draco_unity_plugin.h b/src/draco/unity/draco_unity_plugin.h index 9d7cd91e..4bb5eec2 100644 --- a/src/draco/unity/draco_unity_plugin.h +++ b/src/draco/unity/draco_unity_plugin.h @@ -105,13 +105,13 @@ bool EXPORT_API GetAttributeByUniqueId(const DracoMesh *mesh, int unique_id, // Returns the indices as well as the type of data in |indices|. On input, // |indices| must be null. The returned |indices| must be released with // ReleaseDracoData. -bool EXPORT_API GetMeshIndices(const DracoMesh *mesh, DracoData **indices); +bool EXPORT_API GetMeshIndices(const DracoMesh *mesh, DracoData **indices, bool flip); // Returns the attribute data from attribute as well as the type of data in // |data|. On input, |data| must be null. The returned |data| must be released // with ReleaseDracoData. bool EXPORT_API GetAttributeData(const DracoMesh *mesh, const DracoAttribute *attribute, - DracoData **data); + DracoData **data, bool flip); // DracoToUnityMesh is deprecated. struct EXPORT_API DracoToUnityMesh { From 5780e03fd26b3188de3475e37e04933fbe65d3ef Mon Sep 17 00:00:00 2001 From: Andreas Atteneder Date: Mon, 1 Mar 2021 09:56:22 +0100 Subject: [PATCH 03/71] fix: Compilation for Emscripten --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a93267d2..f83eafc8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1049,7 +1049,7 @@ else() endif() if(DRACO_UNITY_PLUGIN) - if(IOS) + if(IOS OR EMSCRIPTEN) set(unity_decoder_lib_type STATIC) else() set(unity_decoder_lib_type MODULE) From 84cd91aff7ea454bb4bd0d74c35f194dff05eee4 Mon Sep 17 00:00:00 2001 From: Andreas Atteneder Date: Tue, 2 Mar 2021 11:26:27 +0100 Subject: [PATCH 04/71] fix: Brought back DecodeBufferToGeometry (combined Step 1+2), which fixes the tests. --- src/draco/compression/decode.cc | 10 +++++++++- src/draco/compression/decode.h | 1 + .../mesh/mesh_edgebreaker_encoding_test.cc | 13 +++++++++---- .../point_cloud_kd_tree_encoding_test.cc | 3 ++- .../point_cloud_sequential_encoding_test.cc | 5 ++++- 5 files changed, 25 insertions(+), 7 deletions(-) diff --git a/src/draco/compression/decode.cc b/src/draco/compression/decode.cc index 3c597232..f2c5182d 100644 --- a/src/draco/compression/decode.cc +++ b/src/draco/compression/decode.cc @@ -114,13 +114,21 @@ Status Decoder::DecodeBufferToGeometry(DecoderBuffer *in_buffer, DRACO_ASSIGN_OR_RETURN(std::unique_ptr decoder, CreatePointCloudDecoder(header.encoder_method)) - DRACO_RETURN_IF_ERROR(decoder->Decode(options_, in_buffer, out_geometry)) + DRACO_RETURN_IF_ERROR(decoder->DecodeStep1(options_, in_buffer, out_geometry)) + DRACO_RETURN_IF_ERROR(decoder->DecodeStep2()) return OkStatus(); #else return Status(Status::DRACO_ERROR, "Unsupported geometry type."); #endif } +Status Decoder::DecodeBufferToGeometry(DecoderBuffer *in_buffer, + Mesh *out_geometry) { + DRACO_RETURN_IF_ERROR(DecodeBufferToGeometryStep1(in_buffer,out_geometry)) + DRACO_RETURN_IF_ERROR(DecodeBufferToGeometryStep2()) + return OkStatus(); +} + Status Decoder::DecodeBufferToGeometryStep1(DecoderBuffer *in_buffer, Mesh *out_geometry) { #ifdef DRACO_MESH_COMPRESSION_SUPPORTED diff --git a/src/draco/compression/decode.h b/src/draco/compression/decode.h index 2ca341ff..57c03997 100644 --- a/src/draco/compression/decode.h +++ b/src/draco/compression/decode.h @@ -60,6 +60,7 @@ class Decoder { // an error status. Status DecodeBufferToGeometry(DecoderBuffer *in_buffer, PointCloud *out_geometry); + Status DecodeBufferToGeometry(DecoderBuffer *in_buffer, Mesh *out_geometry); Status DecodeBufferToGeometryStep1(DecoderBuffer *in_buffer, Mesh *out_geometry); Status DecodeBufferToGeometryStep2(); diff --git a/src/draco/compression/mesh/mesh_edgebreaker_encoding_test.cc b/src/draco/compression/mesh/mesh_edgebreaker_encoding_test.cc index 523303b0..f0bb2bed 100644 --- a/src/draco/compression/mesh/mesh_edgebreaker_encoding_test.cc +++ b/src/draco/compression/mesh/mesh_edgebreaker_encoding_test.cc @@ -53,7 +53,9 @@ class MeshEdgebreakerEncodingTest : public ::testing::Test { std::unique_ptr decoded_mesh(new Mesh()); DecoderOptions dec_options; DRACO_ASSERT_OK( - decoder.Decode(dec_options, &dec_buffer, decoded_mesh.get())); + decoder.DecodeStep1(dec_options, &dec_buffer, decoded_mesh.get())); + DRACO_ASSERT_OK( + decoder.DecodeStep2()); // Cleanup the input mesh to make sure that input and output can be // compared (edgebreaker method discards degenerated triangles and isolated @@ -133,12 +135,15 @@ TEST_F(MeshEdgebreakerEncodingTest, TestDecoderReuse) { std::unique_ptr decoded_mesh_0(new Mesh()); DecoderOptions dec_options; DRACO_ASSERT_OK( - decoder.Decode(dec_options, &dec_buffer, decoded_mesh_0.get())); - + decoder.DecodeStep1(dec_options, &dec_buffer, decoded_mesh_0.get())); + DRACO_ASSERT_OK( + decoder.DecodeStep2()); dec_buffer.Init(buffer.data(), buffer.size()); std::unique_ptr decoded_mesh_1(new Mesh()); DRACO_ASSERT_OK( - decoder.Decode(dec_options, &dec_buffer, decoded_mesh_1.get())); + decoder.DecodeStep1(dec_options, &dec_buffer, decoded_mesh_1.get())); + DRACO_ASSERT_OK( + decoder.DecodeStep2()); // Make sure both of the meshes are identical. MeshAreEquivalent eq; diff --git a/src/draco/compression/point_cloud/point_cloud_kd_tree_encoding_test.cc b/src/draco/compression/point_cloud/point_cloud_kd_tree_encoding_test.cc index 7a7b597f..ba985a72 100644 --- a/src/draco/compression/point_cloud/point_cloud_kd_tree_encoding_test.cc +++ b/src/draco/compression/point_cloud/point_cloud_kd_tree_encoding_test.cc @@ -76,7 +76,8 @@ class PointCloudKdTreeEncodingTest : public ::testing::Test { std::unique_ptr out_pc(new PointCloud()); DecoderOptions dec_options; - DRACO_ASSERT_OK(decoder.Decode(dec_options, &dec_buffer, out_pc.get())); + DRACO_ASSERT_OK(decoder.DecodeStep1(dec_options, &dec_buffer, out_pc.get())); + DRACO_ASSERT_OK(decoder.DecodeStep2()); ComparePointClouds(pc, *out_pc); } diff --git a/src/draco/compression/point_cloud/point_cloud_sequential_encoding_test.cc b/src/draco/compression/point_cloud/point_cloud_sequential_encoding_test.cc index 32be120d..721e2e33 100644 --- a/src/draco/compression/point_cloud/point_cloud_sequential_encoding_test.cc +++ b/src/draco/compression/point_cloud/point_cloud_sequential_encoding_test.cc @@ -37,7 +37,10 @@ class PointCloudSequentialEncodingTest : public ::testing::Test { std::unique_ptr out_pc(new PointCloud()); DecoderOptions dec_options; - if (!decoder.Decode(dec_options, &dec_buffer, out_pc.get()).ok()) { + if (!decoder.DecodeStep1(dec_options, &dec_buffer, out_pc.get()).ok()) { + return nullptr; + } + if (!decoder.DecodeStep2().ok()) { return nullptr; } return out_pc; From 0f3e467ebeaf882d8bdf6bae31d912fd5266bf7d Mon Sep 17 00:00:00 2001 From: Andreas Atteneder Date: Tue, 2 Mar 2021 13:20:33 +0100 Subject: [PATCH 05/71] feat: GitHub action to build Unity libraries --- .github/workflows/dracodec_unity.yml | 240 +++++++++++++++++++++++++++ cmake/toolchains/i686-linux.cmake | 16 ++ 2 files changed, 256 insertions(+) create mode 100644 .github/workflows/dracodec_unity.yml create mode 100644 cmake/toolchains/i686-linux.cmake diff --git a/.github/workflows/dracodec_unity.yml b/.github/workflows/dracodec_unity.yml new file mode 100644 index 00000000..0eb1e9bb --- /dev/null +++ b/.github/workflows/dracodec_unity.yml @@ -0,0 +1,240 @@ +name: Draco Decoder Unity library CI + +on: + # Trigger the workflow on pull request, + # but only for the main branch + pull_request: + branches: + - main + # Also trigger on release created events + release: + types: + - created + workflow_dispatch: + + +jobs: + + mac: + + runs-on: macOS-latest + + steps: + - uses: actions/checkout@v1 + + - uses: maxim-lobanov/setup-xcode@v1 + with: + xcode-version: latest-stable + + - uses: seanmiddleditch/gha-setup-ninja@master + + - name: configure_mac + # ARCHS_STANDARD explicitely enables Apple silicon on Xcode 12.2 + run: cmake . -G Ninja -B build_mac -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" -DDRACO_UNITY_PLUGIN=ON -DDRACO_GLTF=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF + - name: build_mac + run: cmake --build build_mac --config MinSizeRel --target dracodec_unity + + - name: configure_ios + run: cmake . -G Xcode -B build_ios -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_ARCHITECTURES=armv7\;armv7s\;arm64 -DCMAKE_OSX_DEPLOYMENT_TARGET=10.0 -DDRACO_UNITY_PLUGIN=ON -DDRACO_GLTF=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF + - name: build_ios + run: cmake --build build_ios --config MinSizeRel --target dracodec_unity + + - name: package Apple + run: | + mkdir draco_apple + mkdir draco_apple/x86_64 + mv build_mac/dracodec_unity.bundle draco_apple/x86_64 + mkdir draco_apple/iOS + mv build_ios/MinSizeRel-iphoneos/libdracodec_unity.a draco_apple/iOS + - name: upload artifact + uses: actions/upload-artifact@v2 + with: + name: draco_apple + path: draco_apple + + + windows: + + runs-on: windows-latest + + steps: + - uses: actions/checkout@v1 + + - name: configure_win64 + run: cmake . -G "Visual Studio 16 2019" -A x64 -Bbuild_win_64 -DDRACO_UNITY_PLUGIN=ON -DDRACO_GLTF=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF + - name: build_win64 + run: cmake --build build_win_64 --config MinSizeRel --target dracodec_unity + + - name: configure_win32 + run: cmake . -G "Visual Studio 16 2019" -A Win32 -Bbuild_win_32 -DDRACO_UNITY_PLUGIN=ON -DDRACO_GLTF=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF + - name: build_win32 + run: cmake --build build_win_32 --config MinSizeRel --target dracodec_unity + + # Universal Windows Platform + - name: configure_uwp_arm + run: cmake . -G "Visual Studio 16 2019" -A ARM -Bbuild_uwp_arm -DDRACO_UNITY_PLUGIN=ON -DDRACO_GLTF=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF -DCMAKE_SYSTEM_NAME:String=WindowsStore -DCMAKE_SYSTEM_VERSION:String="10.0" + - name: build_uwp_arm + run: cmake --build build_uwp_arm --config MinSizeRel --target dracodec_unity + + - name: configure_uwp_arm64 + run: cmake . -G "Visual Studio 16 2019" -A ARM64 -Bbuild_uwp_arm64 -DDRACO_UNITY_PLUGIN=ON -DDRACO_GLTF=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF -DCMAKE_SYSTEM_NAME:String=WindowsStore -DCMAKE_SYSTEM_VERSION:String="10.0" + - name: build_uwp_arm64 + run: cmake --build build_uwp_arm64 --config MinSizeRel --target dracodec_unity + + - name: configure_uwp_x86 + run: cmake . -G "Visual Studio 16 2019" -A Win32 -Bbuild_uwp_x86 -DDRACO_UNITY_PLUGIN=ON -DDRACO_GLTF=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF -DCMAKE_SYSTEM_NAME:String=WindowsStore -DCMAKE_SYSTEM_VERSION:String="10.0" + - name: build_uwp_x86 + run: cmake --build build_uwp_x86 --config MinSizeRel --target dracodec_unity + + - name: configure_uwp_x64 + run: cmake . -G "Visual Studio 16 2019" -A x64 -Bbuild_uwp_x64 -DDRACO_UNITY_PLUGIN=ON -DDRACO_GLTF=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF -DCMAKE_SYSTEM_NAME:String=WindowsStore -DCMAKE_SYSTEM_VERSION:String="10.0" + - name: build_uwp_x64 + run: cmake --build build_uwp_x64 --config MinSizeRel --target dracodec_unity + + - name: package Windows + run: | + mkdir draco_win/x86 + mkdir draco_win/x86_64 + mkdir draco_win/WSA/ARM + mkdir draco_win/WSA/ARM64 + mkdir draco_win/WSA/x86 + mkdir draco_win/WSA/x64 + mv build_win_32\MinSizeRel\dracodec_unity.dll draco_win/x86 + mv build_win_64\MinSizeRel\dracodec_unity.dll draco_win/x86_64 + mv build_uwp_arm\MinSizeRel\dracodec_unity.dll draco_win/WSA/ARM + mv build_uwp_arm64\MinSizeRel\dracodec_unity.dll draco_win/WSA/ARM64 + mv build_uwp_x86\MinSizeRel\dracodec_unity.dll draco_win/WSA/x86 + mv build_uwp_x64\MinSizeRel\dracodec_unity.dll draco_win/WSA/x64 + - name: upload artifact + uses: actions/upload-artifact@v2 + with: + name: draco_win + path: draco_win + + + linux: + + runs-on: ubuntu-20.04 + + steps: + - uses: actions/checkout@v1 + + ## Probably not needed anymore with ubuntu 20.04 + # - name: install_cmake + # run: | + # sudo apt update + # sudo apt install apt-transport-https ca-certificates gnupg software-properties-common wget + # wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | sudo apt-key add - + # sudo apt-add-repository 'deb https://apt.kitware.com/ubuntu/ bionic main' + # sudo apt update + # sudo apt install cmake + + - name: apt install + run: | + sudo apt-get -qq update + sudo apt-get -qq install ninja-build + + # Android + - name: install Android NDK + run: if [ ! -f android-ndk-r21d-linux-x86_64.zip ]; then echo "Installing Android NDK"; wget https://dl.google.com/android/repository/android-ndk-r21d-linux-x86_64.zip; unzip android-ndk-r21d-linux-x86_64.zip; echo "Installed Android NDK"; else echo "Android NDK already installed"; fi + + - name: configure_android_arm64-v8a + run: cmake -Bbuild_android_arm64-v8a -DANDROID_ABI=arm64-v8a -DCMAKE_BUILD_TYPE=MinSizeRel -DANDROID_NDK=android-ndk-r21d -DCMAKE_TOOLCHAIN_FILE="android-ndk-r21d/build/cmake/android.toolchain.cmake" -DDRACO_UNITY_PLUGIN=ON -DDRACO_GLTF=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF + - name: build_android_arm64-v8a + run: cmake --build build_android_arm64-v8a --target dracodec_unity -j + + - name: configure_android_armeabi-v7a + run: cmake -Bbuild_android_armeabi-v7a -DANDROID_ABI=armeabi-v7a -DCMAKE_BUILD_TYPE=MinSizeRel -DANDROID_NDK=android-ndk-r21d -DCMAKE_TOOLCHAIN_FILE="android-ndk-r21d/build/cmake/android.toolchain.cmake" -DDRACO_UNITY_PLUGIN=ON -DDRACO_GLTF=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF + - name: build_android_armeabi-v7a + run: cmake --build build_android_armeabi-v7a --target dracodec_unity -j + + - name: configure_android_x86 + run: cmake -Bbuild_android_x86 -DANDROID_ABI=x86 -DCMAKE_BUILD_TYPE=MinSizeRel -DANDROID_NDK=android-ndk-r21d -DCMAKE_TOOLCHAIN_FILE="android-ndk-r21d/build/cmake/android.toolchain.cmake" -DDRACO_UNITY_PLUGIN=ON -DDRACO_GLTF=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF + - name: build_android_x86 + run: cmake --build build_android_x86 --target dracodec_unity -j + + # Linux 64 + - name: configure_linux64 + run: cmake . -G Ninja -Bbuild_linux_64 -DCMAKE_BUILD_TYPE=MinSizeRel -DDRACO_UNITY_PLUGIN=ON -DDRACO_GLTF=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF + - name: build_linux64 + run: cmake --build build_linux_64 --target dracodec_unity -j + + # Linux 32 + - name: install_i386_env + run: sudo apt-get -qq install build-essential gcc-multilib g++-multilib + - name: configure_linux32 + run: cmake . -G Ninja -Bbuild_linux_32 -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_TOOLCHAIN_FILE=cmake/toolchains/i686-linux.cmake -DDRACO_UNITY_PLUGIN=ON -DDRACO_GLTF=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF + - name: build_linux32 + run: cmake --build build_linux_32 --target dracodec_unity -j + + # Emscripten + - name: setup Emscripten + uses: mymindstorm/setup-emsdk@v7 + with: + version: 1.38.48-fastcomp + actions-cache-folder: 'emsdk-cache' + - name: configure WebAssembly + run: emcmake cmake -Bbuild_web -DCMAKE_BUILD_TYPE=MinSizeRel -DEMSCRIPTEN_GENERATE_BITCODE_STATIC_LIBRARIES=1 -DDRACO_JS_GLUE=OFF -DDRACO_UNITY_PLUGIN=ON -DDRACO_GLTF=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF + - name: build WebAssembly + run: cmake --build build_web --target dracodec_unity -j + + # Linux, WebGL and Android artifact + - name: package Web Android Linux + run: | + mkdir -p draco_web_android_linux/x86_64 + mv build_linux_64/libdracodec_unity.so draco_web_android_linux/x86_64 + mkdir -p draco_web_android_linux/x86 + mv build_linux_32/libdracodec_unity.so draco_web_android_linux/x86 + mkdir -p draco_web_android_linux/WebGL + mv build_web/libdracodec_unity.bc draco_web_android_linux/WebGL + mkdir -p draco_web_android_linux/Android/libs/arm64-v8a + mkdir -p draco_web_android_linux/Android/libs/armeabi-v7a + mkdir -p draco_web_android_linux/Android/libs/x86 + mv build_android_arm64-v8a/libdracodec_unity.so draco_web_android_linux/Android/libs/arm64-v8a + mv build_android_armeabi-v7a/libdracodec_unity.so draco_web_android_linux/Android/libs/armeabi-v7a + mv build_android_x86/libdracodec_unity.so draco_web_android_linux/Android/libs/x86 + - name: upload artifact + uses: actions/upload-artifact@v2 + with: + name: draco_web_android_linux + path: draco_web_android_linux + + + combine: + name: combine artifacts + runs-on: ubuntu-latest + needs: [mac, windows, linux] + steps: + - name: download artifacts + uses: actions/download-artifact@v2 + with: + path: artifacts + - name: Display structure of downloaded files + run: ls -R + working-directory: artifacts + - name: combine + run: | + mkdir draco + cp -r artifacts/draco_apple/* draco + cp -r artifacts/draco_win/* draco + cp -r artifacts/draco_web_android_linux/* draco + - name: zip + run: zip -r draco.zip draco + - name: upload release assets + uses: AButler/upload-release-assets@v2.0 + if: github.event_name == 'release' && github.event.action == 'created' + with: + files: draco.zip + repo-token: ${{ secrets.GITHUB_TOKEN }} + - name: upload artifact + uses: actions/upload-artifact@v2 + with: + name: draco + path: draco + - name: delete obsolete artifacts + uses: geekyeggo/delete-artifact@v1 + with: + name: | + draco_apple + draco_win + draco_web_android_linux diff --git a/cmake/toolchains/i686-linux.cmake b/cmake/toolchains/i686-linux.cmake new file mode 100644 index 00000000..391e1b5d --- /dev/null +++ b/cmake/toolchains/i686-linux.cmake @@ -0,0 +1,16 @@ +set(CMAKE_SYSTEM_NAME Linux) +set(CMAKE_SYSTEM_VERSION 1) +set(CMAKE_SYSTEM_PROCESSOR "i686") + +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32" CACHE STRING "c++ flags") +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32" CACHE STRING "c flags") + +set(BIN_LIBROOT "linux") +set(BIN_RPATH "\$ORIGIN/lib") + +set(CMAKE_SKIP_BUILD_RPATH TRUE) +set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE) +set(CMAKE_INSTALL_RPATH ${BIN_RPATH}) +set(CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE) + +set(FORCE32 ON) From 6f5f750bd279787456c6b9f5209e76518d81678b Mon Sep 17 00:00:00 2001 From: Andreas Atteneder Date: Tue, 2 Mar 2021 14:51:54 +0100 Subject: [PATCH 06/71] fix: UWP arm builds --- CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index f83eafc8..92da3664 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1074,6 +1074,14 @@ else() if(APPLE) set_target_properties(dracodec_unity PROPERTIES BUNDLE true) endif() + if (WIN32 AND ${CMAKE_SYSTEM_NAME} STREQUAL "WindowsStore") + # Ignoring Error C4146 unary minus operator applied to unsigned type, result still unsigned + target_compile_options(draco_core PRIVATE "/wd4146" ) + target_compile_options(draco_io PRIVATE "/wd4146" ) + target_compile_options(draco_compression_bit_coders PRIVATE "/wd4146" ) + target_compile_options(draco_compression_mesh_dec PRIVATE "/wd4146" ) + target_compile_options(draco_compression_entropy PRIVATE "/wd4146" ) + endif() endif() if(DRACO_MAYA_PLUGIN) From 65be1ed1c361d8a7ea2499e5d2a52c4ba362524a Mon Sep 17 00:00:00 2001 From: Andreas Atteneder Date: Tue, 2 Mar 2021 14:53:24 +0100 Subject: [PATCH 07/71] fix: Ensure iOS bitcode generation --- CMakeLists.txt | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 92da3664..56cf269b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1074,6 +1074,27 @@ else() if(APPLE) set_target_properties(dracodec_unity PROPERTIES BUNDLE true) endif() + if(IOS) + # Workaround to ensure bitcode is generated when + # generating an iOS library with Makefiles as generator. + target_compile_options( dracodec_unity PUBLIC -fembed-bitcode ) + target_compile_options( draco_attributes PUBLIC -fembed-bitcode ) + target_compile_options( draco_compression_attributes_dec PUBLIC -fembed-bitcode ) + target_compile_options( draco_compression_bit_coders PUBLIC -fembed-bitcode ) + target_compile_options( draco_compression_decode PUBLIC -fembed-bitcode ) + target_compile_options( draco_compression_entropy PUBLIC -fembed-bitcode ) + target_compile_options( draco_compression_mesh_dec PUBLIC -fembed-bitcode ) + target_compile_options( draco_compression_point_cloud_dec PUBLIC -fembed-bitcode ) + target_compile_options( draco_core PUBLIC -fembed-bitcode ) + target_compile_options( draco_dec_config PUBLIC -fembed-bitcode ) + target_compile_options( draco_io PUBLIC -fembed-bitcode ) + target_compile_options( draco_mesh PUBLIC -fembed-bitcode ) + target_compile_options( draco_metadata PUBLIC -fembed-bitcode ) + target_compile_options( draco_metadata_dec PUBLIC -fembed-bitcode ) + target_compile_options( draco_point_cloud PUBLIC -fembed-bitcode ) + target_compile_options( draco_points_dec PUBLIC -fembed-bitcode ) + target_compile_options( draco_unity_plugin PUBLIC -fembed-bitcode ) + endif() if (WIN32 AND ${CMAKE_SYSTEM_NAME} STREQUAL "WindowsStore") # Ignoring Error C4146 unary minus operator applied to unsigned type, result still unsigned target_compile_options(draco_core PRIVATE "/wd4146" ) From ac1abbf3dbcd0d5f994e6c06f6adf3294aaeba60 Mon Sep 17 00:00:00 2001 From: Andreas Atteneder Date: Tue, 2 Mar 2021 15:11:51 +0100 Subject: [PATCH 08/71] fix: UWP arm builds --- CMakeLists.txt | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 56cf269b..c753bbc3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1097,11 +1097,15 @@ else() endif() if (WIN32 AND ${CMAKE_SYSTEM_NAME} STREQUAL "WindowsStore") # Ignoring Error C4146 unary minus operator applied to unsigned type, result still unsigned - target_compile_options(draco_core PRIVATE "/wd4146" ) - target_compile_options(draco_io PRIVATE "/wd4146" ) + target_compile_options(draco_compression_attributes_enc PRIVATE "/wd4146" ) target_compile_options(draco_compression_bit_coders PRIVATE "/wd4146" ) - target_compile_options(draco_compression_mesh_dec PRIVATE "/wd4146" ) target_compile_options(draco_compression_entropy PRIVATE "/wd4146" ) + target_compile_options(draco_compression_mesh_dec PRIVATE "/wd4146" ) + target_compile_options(draco_compression_mesh_enc PRIVATE "/wd4146" ) + target_compile_options(draco_core PRIVATE "/wd4146" ) + target_compile_options(draco_io PRIVATE "/wd4146" ) + target_compile_options(draco_metadata_dec PRIVATE "/wd4146" ) + target_compile_options(draco_metadata_enc PRIVATE "/wd4146" ) endif() endif() From ff8e6be5bc0804c7b768da1c5fde8c3c97efdb18 Mon Sep 17 00:00:00 2001 From: Andreas Atteneder Date: Thu, 18 Feb 2021 14:52:05 +0100 Subject: [PATCH 09/71] feat: Added library that has C bindings for encoding meshes in Unity. --- CMakeLists.txt | 20 +++++++ src/draco/unity/draco_unity_enc_plugin.cc | 65 +++++++++++++++++++++++ src/draco/unity/draco_unity_enc_plugin.h | 43 +++++++++++++++ 3 files changed, 128 insertions(+) create mode 100644 src/draco/unity/draco_unity_enc_plugin.cc create mode 100644 src/draco/unity/draco_unity_enc_plugin.h diff --git a/CMakeLists.txt b/CMakeLists.txt index c753bbc3..603ba37e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -533,6 +533,10 @@ list(APPEND draco_unity_plug_sources "${draco_src_root}/unity/draco_unity_plugin.cc" "${draco_src_root}/unity/draco_unity_plugin.h") +list(APPEND draco_unity_enc_plug_sources + "${draco_src_root}/unity/draco_unity_enc_plugin.cc" + "${draco_src_root}/unity/draco_unity_enc_plugin.h") + list(APPEND draco_maya_plug_sources "${draco_src_root}/maya/draco_maya_plugin.cc" "${draco_src_root}/maya/draco_maya_plugin.h") @@ -1070,9 +1074,25 @@ else() OBJLIB_DEPS draco_unity_plugin LIB_DEPS ${draco_plugin_dependency}) + draco_add_library( + NAME draco_unity_enc_plugin + TYPE OBJECT + SOURCES ${draco_unity_enc_plug_sources} + DEFINES ${draco_defines} + INCLUDES ${draco_include_paths}) + + draco_add_library( + NAME dracoenc_unity + TYPE ${unity_decoder_lib_type} + DEFINES ${draco_defines} + INCLUDES ${draco_include_paths} + OBJLIB_DEPS draco_unity_enc_plugin + LIB_DEPS ${draco_plugin_dependency}) + # For Mac, we need to build a .bundle for the unity plugin. if(APPLE) set_target_properties(dracodec_unity PROPERTIES BUNDLE true) + set_target_properties(dracoenc_unity PROPERTIES BUNDLE true) endif() if(IOS) # Workaround to ensure bitcode is generated when diff --git a/src/draco/unity/draco_unity_enc_plugin.cc b/src/draco/unity/draco_unity_enc_plugin.cc new file mode 100644 index 00000000..0ba35c12 --- /dev/null +++ b/src/draco/unity/draco_unity_enc_plugin.cc @@ -0,0 +1,65 @@ +// Copyright 2021 The Draco Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#include "draco/unity/draco_unity_enc_plugin.h" + +#ifdef DRACO_UNITY_PLUGIN + +namespace draco { + + void* EXPORT_API CreateDracoMeshEncoder( uint32_t faceCount ) { + auto mesh_builder = new TriangleSoupMeshBuilder(); + mesh_builder->Start(faceCount); + return mesh_builder; + } + + int EXPORT_API DracoMeshAddAttribute(void * dracoMesh, int attributeType, DataType dataType, int numComponents) { + TriangleSoupMeshBuilder *const mesh_builder = static_cast(dracoMesh); + return mesh_builder->AddAttribute((GeometryAttribute::Type)attributeType, numComponents, dataType); + } + + void EXPORT_API DracoMeshAddFaceValues(void * dracoMesh, int faceIndex, int attributeId, int numComponents, const char* data0, const char* data1, const char* data2) { + TriangleSoupMeshBuilder *const mesh_builder = static_cast(dracoMesh); + mesh_builder->SetAttributeValuesForFace(attributeId, draco::FaceIndex(faceIndex), data0, data1, data2); + } + + void EXPORT_API DracoMeshFinalize(void* dracoMesh, void** bufferPtr, const char** result, int* size) { + TriangleSoupMeshBuilder *const mesh_builder = static_cast(dracoMesh); + auto mesh = mesh_builder->Finalize(); + draco::ExpertEncoder encoder(*mesh); + + // TODO: set quantization parameters + // encoder.SetAttributeQuantization(0, 16); // Position quantization. + // encoder.SetAttributeQuantization(1, 15); // Tex-coord 0 quantization. + // encoder.SetAttributeQuantization(2, 14); // Tex-coord 1 quantization. + + auto buffer = new EncoderBuffer(); + encoder.EncodeToBuffer(buffer); + + delete mesh_builder; + + *bufferPtr = buffer; + *result = buffer->data(); + *size = buffer->size(); + } + + void EXPORT_API ReleaseDracoMeshBuffer(void * bufferPtr) { + EncoderBuffer *const buffer = static_cast(bufferPtr); + delete buffer; + } + +} // namespace draco + +#endif // DRACO_UNITY_PLUGIN diff --git a/src/draco/unity/draco_unity_enc_plugin.h b/src/draco/unity/draco_unity_enc_plugin.h new file mode 100644 index 00000000..280700fa --- /dev/null +++ b/src/draco/unity/draco_unity_enc_plugin.h @@ -0,0 +1,43 @@ +// Copyright 2021 The Draco Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +#ifndef DRACO_UNITY_ENC_DRACO_UNITY_PLUGIN_H_ +#define DRACO_UNITY_ENC_DRACO_UNITY_PLUGIN_H_ + +#ifdef DRACO_UNITY_PLUGIN + +// If compiling with Visual Studio. +#if defined(_MSC_VER) +#define EXPORT_API __declspec(dllexport) +#else +// Other platforms don't need this. +#define EXPORT_API +#endif // defined(_MSC_VER) + +namespace draco { + +extern "C" { + + void* EXPORT_API CreateDracoMeshEncoder( uint32_t faceCount ); + int EXPORT_API DracoMeshAddAttribute(void * dracoMesh, int attributeType, DataType dataType, int numComponents); + void EXPORT_API DracoMeshAddFaceValues(void * dracoMesh, int faceIndex, int attributeId, int numComponents, const char* data0, const char* data1, const char* data2); + void EXPORT_API DracoMeshFinalize(void* dracoMesh, void** bufferPtr, const char** result, int* size); + void EXPORT_API ReleaseDracoMeshBuffer(void * bufferPtr); +} // extern "C" + +} // namespace draco + +#endif // DRACO_UNITY_PLUGIN + +#endif // DRACO_UNITY_ENC_DRACO_UNITY_PLUGIN_H_ From ce7ca011e95f1ecd756a6beb0b2645dac0533500 Mon Sep 17 00:00:00 2001 From: Andreas Atteneder Date: Mon, 1 Mar 2021 10:02:43 +0100 Subject: [PATCH 10/71] fix: Initial, working version of draco encoding in Unity --- src/draco/unity/draco_unity_enc_plugin.cc | 28 +++++++++++++++++------ src/draco/unity/draco_unity_enc_plugin.h | 7 +++++- 2 files changed, 27 insertions(+), 8 deletions(-) diff --git a/src/draco/unity/draco_unity_enc_plugin.cc b/src/draco/unity/draco_unity_enc_plugin.cc index 0ba35c12..ecd24202 100644 --- a/src/draco/unity/draco_unity_enc_plugin.cc +++ b/src/draco/unity/draco_unity_enc_plugin.cc @@ -17,6 +17,9 @@ #ifdef DRACO_UNITY_PLUGIN +#include "draco/mesh/triangle_soup_mesh_builder.h" +#include "draco/compression/expert_encode.h" + namespace draco { void* EXPORT_API CreateDracoMeshEncoder( uint32_t faceCount ) { @@ -35,20 +38,31 @@ namespace draco { mesh_builder->SetAttributeValuesForFace(attributeId, draco::FaceIndex(faceIndex), data0, data1, data2); } - void EXPORT_API DracoMeshFinalize(void* dracoMesh, void** bufferPtr, const char** result, int* size) { + void EXPORT_API DracoMeshCreateEncoder(void* dracoMesh, void **meshPtr, void** encoderPtr) { TriangleSoupMeshBuilder *const mesh_builder = static_cast(dracoMesh); auto mesh = mesh_builder->Finalize(); - draco::ExpertEncoder encoder(*mesh); + *encoderPtr = new draco::ExpertEncoder(*mesh); + *meshPtr = mesh.release(); + } + + void EXPORT_API DracoMeshSetAttributeQuantization(void* encoderPtr, int attributeId, int quantization) { + ExpertEncoder *const encoder = static_cast(encoderPtr); + encoder->SetAttributeQuantization(attributeId, quantization); + } + + void EXPORT_API DracoMeshFinalize(void* dracoMesh, void* encoderPtr, void* meshPtr, void** bufferPtr, const char** result, int* size) { + TriangleSoupMeshBuilder *const mesh_builder = static_cast(dracoMesh); + ExpertEncoder *const encoder = static_cast(encoderPtr); - // TODO: set quantization parameters - // encoder.SetAttributeQuantization(0, 16); // Position quantization. - // encoder.SetAttributeQuantization(1, 15); // Tex-coord 0 quantization. - // encoder.SetAttributeQuantization(2, 14); // Tex-coord 1 quantization. + encoder->SetSpeedOptions(0,0); + encoder->SetTrackEncodedProperties(true); auto buffer = new EncoderBuffer(); - encoder.EncodeToBuffer(buffer); + encoder->EncodeToBuffer(buffer); delete mesh_builder; + delete (ExpertEncoder*) encoder; + delete (Mesh*) meshPtr; *bufferPtr = buffer; *result = buffer->data(); diff --git a/src/draco/unity/draco_unity_enc_plugin.h b/src/draco/unity/draco_unity_enc_plugin.h index 280700fa..d234eb3a 100644 --- a/src/draco/unity/draco_unity_enc_plugin.h +++ b/src/draco/unity/draco_unity_enc_plugin.h @@ -15,6 +15,9 @@ #ifndef DRACO_UNITY_ENC_DRACO_UNITY_PLUGIN_H_ #define DRACO_UNITY_ENC_DRACO_UNITY_PLUGIN_H_ +// No idea why, but if this (or any other draco header) is not included DRACO_UNITY_PLUGIN is not defined +#include "draco/core/draco_types.h" + #ifdef DRACO_UNITY_PLUGIN // If compiling with Visual Studio. @@ -32,7 +35,9 @@ extern "C" { void* EXPORT_API CreateDracoMeshEncoder( uint32_t faceCount ); int EXPORT_API DracoMeshAddAttribute(void * dracoMesh, int attributeType, DataType dataType, int numComponents); void EXPORT_API DracoMeshAddFaceValues(void * dracoMesh, int faceIndex, int attributeId, int numComponents, const char* data0, const char* data1, const char* data2); - void EXPORT_API DracoMeshFinalize(void* dracoMesh, void** bufferPtr, const char** result, int* size); + void EXPORT_API DracoMeshCreateEncoder(void* dracoMesh, void **meshPtr, void** encoderPtr); + void EXPORT_API DracoMeshSetAttributeQuantization(void* encoderPtr, int attributeId, int quantization); + void EXPORT_API DracoMeshFinalize(void* dracoMesh, void* encoderPtr, void* meshPtr, void** bufferPtr, const char** result, int* size); void EXPORT_API ReleaseDracoMeshBuffer(void * bufferPtr); } // extern "C" From 59fabf4ec6dd5d894cc3d70bf34adf01ebc757f3 Mon Sep 17 00:00:00 2001 From: Andreas Atteneder Date: Mon, 1 Mar 2021 14:27:06 +0100 Subject: [PATCH 11/71] feat: Next version of encoder based on Blender-glTF-IO C bindings yielding better compression --- src/draco/unity/draco_unity_enc_plugin.cc | 170 +++++++++++++++++----- src/draco/unity/draco_unity_enc_plugin.h | 45 +++++- 2 files changed, 172 insertions(+), 43 deletions(-) diff --git a/src/draco/unity/draco_unity_enc_plugin.cc b/src/draco/unity/draco_unity_enc_plugin.cc index ecd24202..9f606bdd 100644 --- a/src/draco/unity/draco_unity_enc_plugin.cc +++ b/src/draco/unity/draco_unity_enc_plugin.cc @@ -17,61 +17,159 @@ #ifdef DRACO_UNITY_PLUGIN -#include "draco/mesh/triangle_soup_mesh_builder.h" -#include "draco/compression/expert_encode.h" +#include namespace draco { - void* EXPORT_API CreateDracoMeshEncoder( uint32_t faceCount ) { - auto mesh_builder = new TriangleSoupMeshBuilder(); - mesh_builder->Start(faceCount); - return mesh_builder; + DracoEncoder * dracoEncoderCreate(uint32_t vertexCount) + { + DracoEncoder *encoder = new DracoEncoder; + encoder->mesh.set_num_points(vertexCount); + return encoder; } - int EXPORT_API DracoMeshAddAttribute(void * dracoMesh, int attributeType, DataType dataType, int numComponents) { - TriangleSoupMeshBuilder *const mesh_builder = static_cast(dracoMesh); - return mesh_builder->AddAttribute((GeometryAttribute::Type)attributeType, numComponents, dataType); + void dracoEncoderRelease(DracoEncoder *encoder) + { + delete encoder; } - void EXPORT_API DracoMeshAddFaceValues(void * dracoMesh, int faceIndex, int attributeId, int numComponents, const char* data0, const char* data1, const char* data2) { - TriangleSoupMeshBuilder *const mesh_builder = static_cast(dracoMesh); - mesh_builder->SetAttributeValuesForFace(attributeId, draco::FaceIndex(faceIndex), data0, data1, data2); + void dracoEncoderSetCompressionSpeed(DracoEncoder *encoder, uint32_t speedLevel) { + encoder->speed = speedLevel; } - void EXPORT_API DracoMeshCreateEncoder(void* dracoMesh, void **meshPtr, void** encoderPtr) { - TriangleSoupMeshBuilder *const mesh_builder = static_cast(dracoMesh); - auto mesh = mesh_builder->Finalize(); - *encoderPtr = new draco::ExpertEncoder(*mesh); - *meshPtr = mesh.release(); + void dracoEncoderSetQuantizationBits(DracoEncoder *encoder, uint32_t position, uint32_t normal, uint32_t uv, uint32_t color, uint32_t generic) + { + encoder->quantization.position = position; + encoder->quantization.normal = normal; + encoder->quantization.uv = uv; + encoder->quantization.color = color; + encoder->quantization.generic = generic; } - void EXPORT_API DracoMeshSetAttributeQuantization(void* encoderPtr, int attributeId, int quantization) { - ExpertEncoder *const encoder = static_cast(encoderPtr); - encoder->SetAttributeQuantization(attributeId, quantization); + bool dracoEncoderEncode(DracoEncoder *encoder, uint8_t preserveTriangleOrder) + { + draco::Encoder dracoEncoder; + dracoEncoder.SetSpeedOptions(encoder->speed, encoder->speed); + dracoEncoder.SetAttributeQuantization(draco::GeometryAttribute::POSITION, encoder->quantization.position); + dracoEncoder.SetAttributeQuantization(draco::GeometryAttribute::NORMAL, encoder->quantization.normal); + dracoEncoder.SetAttributeQuantization(draco::GeometryAttribute::TEX_COORD, encoder->quantization.uv); + dracoEncoder.SetAttributeQuantization(draco::GeometryAttribute::COLOR, encoder->quantization.color); + dracoEncoder.SetAttributeQuantization(draco::GeometryAttribute::GENERIC, encoder->quantization.generic); + dracoEncoder.SetTrackEncodedProperties(true); + + if (preserveTriangleOrder) { + dracoEncoder.SetEncodingMethod(draco::MESH_SEQUENTIAL_ENCODING); + } + + auto encoderStatus = dracoEncoder.EncodeMeshToBuffer(encoder->mesh, &encoder->encoderBuffer); + if (encoderStatus.ok()) { + encoder->encodedVertices = static_cast(dracoEncoder.num_encoded_points()); + encoder->encodedIndices = static_cast(dracoEncoder.num_encoded_faces() * 3); + return true; + } else { + return false; + } } - void EXPORT_API DracoMeshFinalize(void* dracoMesh, void* encoderPtr, void* meshPtr, void** bufferPtr, const char** result, int* size) { - TriangleSoupMeshBuilder *const mesh_builder = static_cast(dracoMesh); - ExpertEncoder *const encoder = static_cast(encoderPtr); + uint32_t dracoEncoderGetEncodedVertexCount(DracoEncoder *encoder) + { + return encoder->encodedVertices; + } + + uint32_t dracoEncoderGetEncodedIndexCount(DracoEncoder *encoder) + { + return encoder->encodedIndices; + } - encoder->SetSpeedOptions(0,0); - encoder->SetTrackEncodedProperties(true); + uint64_t dracoEncoderGetByteLength(DracoEncoder *encoder) + { + return encoder->encoderBuffer.size(); + } + + void dracoEncoderCopy(DracoEncoder *encoder, uint8_t *data) + { + memcpy(data, encoder->encoderBuffer.data(), encoder->encoderBuffer.size()); + } - auto buffer = new EncoderBuffer(); - encoder->EncodeToBuffer(buffer); + bool dracoEncodeIndices(DracoEncoder *encoder, uint32_t indexCount, DataType indexType, void *indices) + { + switch (indexType) + { + case DataType::DT_UINT16: + dracoEncodeIndices(encoder,indexCount,static_cast(indices)); + break; + case DataType::DT_UINT32: + dracoEncodeIndices(encoder,indexCount,static_cast(indices)); + break; + default: + return false; + } + + return true; + } - delete mesh_builder; - delete (ExpertEncoder*) encoder; - delete (Mesh*) meshPtr; + template + void dracoEncodeIndices(DracoEncoder *encoder, uint32_t indexCount, T *indices) + { + int face_count = indexCount / 3; + encoder->mesh.SetNumFaces(static_cast(face_count)); + encoder->rawSize += indexCount * sizeof(T); + + for (int i = 0; i < face_count; ++i) + { + draco::Mesh::Face face = { + draco::PointIndex(indices[3 * i + 0]), + draco::PointIndex(indices[3 * i + 1]), + draco::PointIndex(indices[3 * i + 2]) + }; + encoder->mesh.SetFace(draco::FaceIndex(static_cast(i)), face); + } + } - *bufferPtr = buffer; - *result = buffer->data(); - *size = buffer->size(); + bool dracoEncoderSetIndices(DracoEncoder *encoder, DataType indexComponentType, uint32_t indexCount, void *indices) + { + switch (indexComponentType) + { + case DataType::DT_INT8: + dracoEncodeIndices(encoder, indexCount, reinterpret_cast(indices)); + break; + case DataType::DT_UINT8: + dracoEncodeIndices(encoder, indexCount, reinterpret_cast(indices)); + break; + case DataType::DT_INT16: + dracoEncodeIndices(encoder, indexCount, reinterpret_cast(indices)); + break; + case DataType::DT_UINT16: + dracoEncodeIndices(encoder, indexCount, reinterpret_cast(indices)); + break; + case DataType::DT_UINT32: + dracoEncodeIndices(encoder, indexCount, reinterpret_cast(indices)); + break; + default: + return false; + } + return true; } - void EXPORT_API ReleaseDracoMeshBuffer(void * bufferPtr) { - EncoderBuffer *const buffer = static_cast(bufferPtr); - delete buffer; + uint32_t dracoEncoderSetAttribute(DracoEncoder *encoder, GeometryAttribute::Type attributeType, draco::DataType dracoDataType, int32_t componentCount, int32_t stride, void *data) + { + auto buffer = std::unique_ptr( new draco::DataBuffer()); + uint32_t count = encoder->mesh.num_points(); + + draco::GeometryAttribute attribute; + attribute.Init(attributeType, &*buffer, componentCount, dracoDataType, false, stride, 0); + + auto id = static_cast(encoder->mesh.AddAttribute(attribute, true, count)); + auto dataBytes = reinterpret_cast(data); + + for (uint32_t i = 0; i < count; i++) + { + encoder->mesh.attribute(id)->SetAttributeValue(draco::AttributeValueIndex(i), dataBytes + i * stride); + } + + encoder->buffers.emplace_back(std::move(buffer)); + encoder->rawSize += count * stride; + return id; } } // namespace draco diff --git a/src/draco/unity/draco_unity_enc_plugin.h b/src/draco/unity/draco_unity_enc_plugin.h index d234eb3a..7a4c1c45 100644 --- a/src/draco/unity/draco_unity_enc_plugin.h +++ b/src/draco/unity/draco_unity_enc_plugin.h @@ -17,6 +17,10 @@ // No idea why, but if this (or any other draco header) is not included DRACO_UNITY_PLUGIN is not defined #include "draco/core/draco_types.h" +#include "draco/mesh/mesh.h" +#include "draco/core/encoder_buffer.h" +#include "draco/compression/encode.h" + #ifdef DRACO_UNITY_PLUGIN @@ -30,15 +34,42 @@ namespace draco { + struct DracoEncoder + { + draco::Mesh mesh; + uint32_t encodedVertices; + uint32_t encodedIndices; + std::vector> buffers; + draco::EncoderBuffer encoderBuffer; + uint32_t speed = 0; + std::size_t rawSize = 0; + struct + { + uint32_t position = 14; + uint32_t normal = 10; + uint32_t uv = 12; + uint32_t color = 10; + uint32_t generic = 12; + } quantization; + }; + + template + void dracoEncodeIndices(DracoEncoder *encoder, uint32_t indexCount, T *indices); + extern "C" { - void* EXPORT_API CreateDracoMeshEncoder( uint32_t faceCount ); - int EXPORT_API DracoMeshAddAttribute(void * dracoMesh, int attributeType, DataType dataType, int numComponents); - void EXPORT_API DracoMeshAddFaceValues(void * dracoMesh, int faceIndex, int attributeId, int numComponents, const char* data0, const char* data1, const char* data2); - void EXPORT_API DracoMeshCreateEncoder(void* dracoMesh, void **meshPtr, void** encoderPtr); - void EXPORT_API DracoMeshSetAttributeQuantization(void* encoderPtr, int attributeId, int quantization); - void EXPORT_API DracoMeshFinalize(void* dracoMesh, void* encoderPtr, void* meshPtr, void** bufferPtr, const char** result, int* size); - void EXPORT_API ReleaseDracoMeshBuffer(void * bufferPtr); + DracoEncoder * EXPORT_API dracoEncoderCreate(uint32_t vertexCount); + void EXPORT_API dracoEncoderRelease(DracoEncoder *encoder); + void EXPORT_API dracoEncoderSetCompressionSpeed(DracoEncoder *encoder, uint32_t speedLevel); + void EXPORT_API dracoEncoderSetQuantizationBits(DracoEncoder *encoder, uint32_t position, uint32_t normal, uint32_t uv, uint32_t color, uint32_t generic); + bool EXPORT_API dracoEncoderEncode(DracoEncoder *encoder, uint8_t preserveTriangleOrder); + uint32_t EXPORT_API dracoEncoderGetEncodedVertexCount(DracoEncoder *encoder); + uint32_t EXPORT_API dracoEncoderGetEncodedIndexCount(DracoEncoder *encoder); + uint64_t EXPORT_API dracoEncoderGetByteLength(DracoEncoder *encoder); + void EXPORT_API dracoEncoderCopy(DracoEncoder *encoder, uint8_t *data); + bool EXPORT_API dracoEncoderSetIndices(DracoEncoder *encoder, DataType indexComponentType, uint32_t indexCount, void *indices); + uint32_t EXPORT_API dracoEncoderSetAttribute(DracoEncoder *encoder, GeometryAttribute::Type attributeType, draco::DataType dracoDataType, int32_t componentCount, int32_t stride, void *data); + } // extern "C" } // namespace draco From e9518e99c2c3fcd0201d9058d148c7866a674e5b Mon Sep 17 00:00:00 2001 From: Andreas Atteneder Date: Tue, 2 Mar 2021 18:00:37 +0100 Subject: [PATCH 12/71] feat: Added dracoenc_unity to GH actions build for Editor platforms (Windows/macOS/Linux, 64-bit variants) --- .github/workflows/dracodec_unity.yml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dracodec_unity.yml b/.github/workflows/dracodec_unity.yml index 0eb1e9bb..f5ab5cdc 100644 --- a/.github/workflows/dracodec_unity.yml +++ b/.github/workflows/dracodec_unity.yml @@ -31,8 +31,10 @@ jobs: - name: configure_mac # ARCHS_STANDARD explicitely enables Apple silicon on Xcode 12.2 run: cmake . -G Ninja -B build_mac -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" -DDRACO_UNITY_PLUGIN=ON -DDRACO_GLTF=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF - - name: build_mac + - name: build_mac_dracodec_unity run: cmake --build build_mac --config MinSizeRel --target dracodec_unity + - name: build_mac_dracoenc_unity + run: cmake --build build_mac --config MinSizeRel --target dracoenc_unity - name: configure_ios run: cmake . -G Xcode -B build_ios -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_ARCHITECTURES=armv7\;armv7s\;arm64 -DCMAKE_OSX_DEPLOYMENT_TARGET=10.0 -DDRACO_UNITY_PLUGIN=ON -DDRACO_GLTF=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF @@ -44,6 +46,7 @@ jobs: mkdir draco_apple mkdir draco_apple/x86_64 mv build_mac/dracodec_unity.bundle draco_apple/x86_64 + mv build_mac/dracoenc_unity.bundle draco_apple/x86_64 mkdir draco_apple/iOS mv build_ios/MinSizeRel-iphoneos/libdracodec_unity.a draco_apple/iOS - name: upload artifact @@ -62,8 +65,10 @@ jobs: - name: configure_win64 run: cmake . -G "Visual Studio 16 2019" -A x64 -Bbuild_win_64 -DDRACO_UNITY_PLUGIN=ON -DDRACO_GLTF=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF - - name: build_win64 + - name: build_win64_dracodec_unity run: cmake --build build_win_64 --config MinSizeRel --target dracodec_unity + - name: build_win64_dracoenc_unity + run: cmake --build build_win_64 --config MinSizeRel --target dracoenc_unity - name: configure_win32 run: cmake . -G "Visual Studio 16 2019" -A Win32 -Bbuild_win_32 -DDRACO_UNITY_PLUGIN=ON -DDRACO_GLTF=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF @@ -101,6 +106,7 @@ jobs: mkdir draco_win/WSA/x64 mv build_win_32\MinSizeRel\dracodec_unity.dll draco_win/x86 mv build_win_64\MinSizeRel\dracodec_unity.dll draco_win/x86_64 + mv build_win_64\MinSizeRel\dracoenc_unity.dll draco_win/x86_64 mv build_uwp_arm\MinSizeRel\dracodec_unity.dll draco_win/WSA/ARM mv build_uwp_arm64\MinSizeRel\dracodec_unity.dll draco_win/WSA/ARM64 mv build_uwp_x86\MinSizeRel\dracodec_unity.dll draco_win/WSA/x86 @@ -156,8 +162,10 @@ jobs: # Linux 64 - name: configure_linux64 run: cmake . -G Ninja -Bbuild_linux_64 -DCMAKE_BUILD_TYPE=MinSizeRel -DDRACO_UNITY_PLUGIN=ON -DDRACO_GLTF=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF - - name: build_linux64 + - name: build_linux64_dracodec_unity run: cmake --build build_linux_64 --target dracodec_unity -j + - name: build_linux64_dracoenc_unity + run: cmake --build build_linux_64 --target dracoenc_unity -j # Linux 32 - name: install_i386_env @@ -183,6 +191,7 @@ jobs: run: | mkdir -p draco_web_android_linux/x86_64 mv build_linux_64/libdracodec_unity.so draco_web_android_linux/x86_64 + mv build_linux_64/libdracoenc_unity.so draco_web_android_linux/x86_64 mkdir -p draco_web_android_linux/x86 mv build_linux_32/libdracodec_unity.so draco_web_android_linux/x86 mkdir -p draco_web_android_linux/WebGL From c5683825c4b712b08f3c0d49d0928fdb8ff1ef6c Mon Sep 17 00:00:00 2001 From: Andreas Atteneder Date: Tue, 2 Mar 2021 20:16:18 +0100 Subject: [PATCH 13/71] fix: MSVC compiler error --- src/draco/unity/draco_unity_enc_plugin.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/draco/unity/draco_unity_enc_plugin.h b/src/draco/unity/draco_unity_enc_plugin.h index 7a4c1c45..1f569919 100644 --- a/src/draco/unity/draco_unity_enc_plugin.h +++ b/src/draco/unity/draco_unity_enc_plugin.h @@ -58,7 +58,7 @@ namespace draco { extern "C" { - DracoEncoder * EXPORT_API dracoEncoderCreate(uint32_t vertexCount); + EXPORT_API DracoEncoder * dracoEncoderCreate(uint32_t vertexCount); void EXPORT_API dracoEncoderRelease(DracoEncoder *encoder); void EXPORT_API dracoEncoderSetCompressionSpeed(DracoEncoder *encoder, uint32_t speedLevel); void EXPORT_API dracoEncoderSetQuantizationBits(DracoEncoder *encoder, uint32_t position, uint32_t normal, uint32_t uv, uint32_t color, uint32_t generic); From dab5b105ebbb04335222c2a2efaec0409a6c0c9c Mon Sep 17 00:00:00 2001 From: Andreas Atteneder Date: Tue, 2 Mar 2021 20:16:53 +0100 Subject: [PATCH 14/71] chore: renamed GH action yaml --- .github/workflows/{dracodec_unity.yml => unity.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{dracodec_unity.yml => unity.yml} (100%) diff --git a/.github/workflows/dracodec_unity.yml b/.github/workflows/unity.yml similarity index 100% rename from .github/workflows/dracodec_unity.yml rename to .github/workflows/unity.yml From 5ab3b313941581bce17b2d61363bc3e3dd297f52 Mon Sep 17 00:00:00 2001 From: Andreas Atteneder Date: Wed, 3 Mar 2021 00:51:08 +0100 Subject: [PATCH 15/71] fix: dracodec_unity is a smaller, single file static lib now for Emscripten/iOS builds --- CMakeLists.txt | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 603ba37e..ae34a2a0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1059,6 +1059,30 @@ else() set(unity_decoder_lib_type MODULE) endif() + set(unity_lib_dependency ${draco_plugin_dependency}) + set(unity_objlib_dependency draco_unity_plugin) + if(EMSCRIPTEN OR IOS) + unset(unity_lib_dependency) + list(APPEND unity_objlib_dependency + # Link selected object libs directly instead of ${draco_plugin_dependency} + # minimizes build size + # results in a single static lib file + draco_attributes + draco_compression_attributes_dec + draco_compression_bit_coders + draco_compression_decode + draco_compression_entropy + draco_compression_mesh_dec + draco_compression_point_cloud_dec + draco_core + draco_mesh + draco_metadata + draco_metadata_dec + draco_point_cloud + draco_points_dec + ) + endif() + draco_add_library( NAME draco_unity_plugin TYPE OBJECT @@ -1071,8 +1095,8 @@ else() TYPE ${unity_decoder_lib_type} DEFINES ${draco_defines} INCLUDES ${draco_include_paths} - OBJLIB_DEPS draco_unity_plugin - LIB_DEPS ${draco_plugin_dependency}) + OBJLIB_DEPS ${unity_objlib_dependency} + LIB_DEPS ${unity_lib_dependency}) draco_add_library( NAME draco_unity_enc_plugin From 615d29c93250e06277bd302e779f13777dbeb02a Mon Sep 17 00:00:00 2001 From: Andreas Atteneder Date: Wed, 3 Mar 2021 00:52:45 +0100 Subject: [PATCH 16/71] fix: Renamed action --- .github/workflows/unity.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unity.yml b/.github/workflows/unity.yml index f5ab5cdc..12378112 100644 --- a/.github/workflows/unity.yml +++ b/.github/workflows/unity.yml @@ -1,4 +1,4 @@ -name: Draco Decoder Unity library CI +name: Draco Unity library CI on: # Trigger the workflow on pull request, From ffad4bf7c69d18997037f1d6a2c587cd69456472 Mon Sep 17 00:00:00 2001 From: Andreas Atteneder Date: Wed, 3 Mar 2021 15:29:24 +0100 Subject: [PATCH 17/71] feat: Exposing both encode and decode speed for better fine-tuning --- src/draco/unity/draco_unity_enc_plugin.cc | 7 ++++--- src/draco/unity/draco_unity_enc_plugin.h | 5 +++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/draco/unity/draco_unity_enc_plugin.cc b/src/draco/unity/draco_unity_enc_plugin.cc index 9f606bdd..d4c282d3 100644 --- a/src/draco/unity/draco_unity_enc_plugin.cc +++ b/src/draco/unity/draco_unity_enc_plugin.cc @@ -33,8 +33,9 @@ namespace draco { delete encoder; } - void dracoEncoderSetCompressionSpeed(DracoEncoder *encoder, uint32_t speedLevel) { - encoder->speed = speedLevel; + void dracoEncoderSetCompressionSpeed(DracoEncoder *encoder, uint32_t encodingSpeed, uint32_t decodingSpeed) { + encoder->encodingSpeed = encodingSpeed; + encoder->decodingSpeed = decodingSpeed; } void dracoEncoderSetQuantizationBits(DracoEncoder *encoder, uint32_t position, uint32_t normal, uint32_t uv, uint32_t color, uint32_t generic) @@ -49,7 +50,7 @@ namespace draco { bool dracoEncoderEncode(DracoEncoder *encoder, uint8_t preserveTriangleOrder) { draco::Encoder dracoEncoder; - dracoEncoder.SetSpeedOptions(encoder->speed, encoder->speed); + dracoEncoder.SetSpeedOptions(encoder->encodingSpeed, encoder->decodingSpeed); dracoEncoder.SetAttributeQuantization(draco::GeometryAttribute::POSITION, encoder->quantization.position); dracoEncoder.SetAttributeQuantization(draco::GeometryAttribute::NORMAL, encoder->quantization.normal); dracoEncoder.SetAttributeQuantization(draco::GeometryAttribute::TEX_COORD, encoder->quantization.uv); diff --git a/src/draco/unity/draco_unity_enc_plugin.h b/src/draco/unity/draco_unity_enc_plugin.h index 1f569919..7c1072df 100644 --- a/src/draco/unity/draco_unity_enc_plugin.h +++ b/src/draco/unity/draco_unity_enc_plugin.h @@ -41,7 +41,8 @@ namespace draco { uint32_t encodedIndices; std::vector> buffers; draco::EncoderBuffer encoderBuffer; - uint32_t speed = 0; + uint32_t encodingSpeed = 0; + uint32_t decodingSpeed = 0; std::size_t rawSize = 0; struct { @@ -60,7 +61,7 @@ extern "C" { EXPORT_API DracoEncoder * dracoEncoderCreate(uint32_t vertexCount); void EXPORT_API dracoEncoderRelease(DracoEncoder *encoder); - void EXPORT_API dracoEncoderSetCompressionSpeed(DracoEncoder *encoder, uint32_t speedLevel); + void EXPORT_API dracoEncoderSetCompressionSpeed(DracoEncoder *encoder, uint32_t encodingSpeed, uint32_t decodingSpeed); void EXPORT_API dracoEncoderSetQuantizationBits(DracoEncoder *encoder, uint32_t position, uint32_t normal, uint32_t uv, uint32_t color, uint32_t generic); bool EXPORT_API dracoEncoderEncode(DracoEncoder *encoder, uint8_t preserveTriangleOrder); uint32_t EXPORT_API dracoEncoderGetEncodedVertexCount(DracoEncoder *encoder); From d96929823f357ab257a0e2f63376fee4898faf46 Mon Sep 17 00:00:00 2001 From: Andreas Atteneder Date: Fri, 5 Mar 2021 17:55:26 +0100 Subject: [PATCH 18/71] fix: Increase backwards compatibility by building Linux libs on Ubuntu 18.04 --- .github/workflows/unity.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/unity.yml b/.github/workflows/unity.yml index 12378112..cc402930 100644 --- a/.github/workflows/unity.yml +++ b/.github/workflows/unity.yml @@ -120,20 +120,20 @@ jobs: linux: - runs-on: ubuntu-20.04 + runs-on: ubuntu-18.04 steps: - uses: actions/checkout@v1 - ## Probably not needed anymore with ubuntu 20.04 - # - name: install_cmake - # run: | - # sudo apt update - # sudo apt install apt-transport-https ca-certificates gnupg software-properties-common wget - # wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | sudo apt-key add - - # sudo apt-add-repository 'deb https://apt.kitware.com/ubuntu/ bionic main' - # sudo apt update - # sudo apt install cmake + # Probably not needed anymore with ubuntu 20.04 + - name: install_cmake + run: | + sudo apt update + sudo apt install apt-transport-https ca-certificates gnupg software-properties-common wget + wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | sudo apt-key add - + sudo apt-add-repository 'deb https://apt.kitware.com/ubuntu/ bionic main' + sudo apt update + sudo apt install cmake - name: apt install run: | From 1dfaa568ee12023595e57f842846790c7c1ebbf8 Mon Sep 17 00:00:00 2001 From: Andreas Atteneder Date: Fri, 14 May 2021 14:52:14 +0200 Subject: [PATCH 19/71] fix: consistent GH action version --- .github/workflows/unity.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/unity.yml b/.github/workflows/unity.yml index cc402930..c4200d98 100644 --- a/.github/workflows/unity.yml +++ b/.github/workflows/unity.yml @@ -20,7 +20,7 @@ jobs: runs-on: macOS-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - uses: maxim-lobanov/setup-xcode@v1 with: @@ -61,7 +61,7 @@ jobs: runs-on: windows-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - name: configure_win64 run: cmake . -G "Visual Studio 16 2019" -A x64 -Bbuild_win_64 -DDRACO_UNITY_PLUGIN=ON -DDRACO_GLTF=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF @@ -123,7 +123,7 @@ jobs: runs-on: ubuntu-18.04 steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 # Probably not needed anymore with ubuntu 20.04 - name: install_cmake From c25c02a0190415bb394b1fc2bce715b9604597ef Mon Sep 17 00:00:00 2001 From: Andreas Atteneder Date: Fri, 14 May 2021 16:16:21 +0200 Subject: [PATCH 20/71] chore: split up long commands/lines --- .github/workflows/unity.yml | 164 ++++++++++++++++++++++++++++++------ 1 file changed, 140 insertions(+), 24 deletions(-) diff --git a/.github/workflows/unity.yml b/.github/workflows/unity.yml index c4200d98..10482813 100644 --- a/.github/workflows/unity.yml +++ b/.github/workflows/unity.yml @@ -30,14 +30,28 @@ jobs: - name: configure_mac # ARCHS_STANDARD explicitely enables Apple silicon on Xcode 12.2 - run: cmake . -G Ninja -B build_mac -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" -DDRACO_UNITY_PLUGIN=ON -DDRACO_GLTF=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF + run: > + cmake . -G Ninja -B build_mac + -DCMAKE_BUILD_TYPE=MinSizeRel + -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" + -DDRACO_UNITY_PLUGIN=ON + -DDRACO_GLTF=ON + -DDRACO_BACKWARDS_COMPATIBILITY=OFF - name: build_mac_dracodec_unity run: cmake --build build_mac --config MinSizeRel --target dracodec_unity - name: build_mac_dracoenc_unity run: cmake --build build_mac --config MinSizeRel --target dracoenc_unity - name: configure_ios - run: cmake . -G Xcode -B build_ios -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_ARCHITECTURES=armv7\;armv7s\;arm64 -DCMAKE_OSX_DEPLOYMENT_TARGET=10.0 -DDRACO_UNITY_PLUGIN=ON -DDRACO_GLTF=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF + run: > + cmake . -G Xcode -B build_ios + -DCMAKE_BUILD_TYPE=MinSizeRel + -DCMAKE_SYSTEM_NAME=iOS + -DCMAKE_OSX_ARCHITECTURES=armv7\;armv7s\;arm64 + -DCMAKE_OSX_DEPLOYMENT_TARGET=10.0 + -DDRACO_UNITY_PLUGIN=ON + -DDRACO_GLTF=ON + -DDRACO_BACKWARDS_COMPATIBILITY=OFF - name: build_ios run: cmake --build build_ios --config MinSizeRel --target dracodec_unity @@ -64,37 +78,87 @@ jobs: - uses: actions/checkout@v2 - name: configure_win64 - run: cmake . -G "Visual Studio 16 2019" -A x64 -Bbuild_win_64 -DDRACO_UNITY_PLUGIN=ON -DDRACO_GLTF=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF + run: > + cmake . -G "Visual Studio 16 2019" -A x64 -B build_win_64 + -DDRACO_UNITY_PLUGIN=ON + -DDRACO_GLTF=ON + -DDRACO_BACKWARDS_COMPATIBILITY=OFF - name: build_win64_dracodec_unity - run: cmake --build build_win_64 --config MinSizeRel --target dracodec_unity + run: > + cmake --build build_win_64 + --config MinSizeRel + --target dracodec_unity - name: build_win64_dracoenc_unity - run: cmake --build build_win_64 --config MinSizeRel --target dracoenc_unity + run: > + cmake --build build_win_64 + --config MinSizeRel + --target dracoenc_unity - name: configure_win32 - run: cmake . -G "Visual Studio 16 2019" -A Win32 -Bbuild_win_32 -DDRACO_UNITY_PLUGIN=ON -DDRACO_GLTF=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF + run: > + cmake . -G "Visual Studio 16 2019" -A Win32 -B build_win_32 + -DDRACO_UNITY_PLUGIN=ON + -DDRACO_GLTF=ON + -DDRACO_BACKWARDS_COMPATIBILITY=OFF - name: build_win32 run: cmake --build build_win_32 --config MinSizeRel --target dracodec_unity # Universal Windows Platform - name: configure_uwp_arm - run: cmake . -G "Visual Studio 16 2019" -A ARM -Bbuild_uwp_arm -DDRACO_UNITY_PLUGIN=ON -DDRACO_GLTF=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF -DCMAKE_SYSTEM_NAME:String=WindowsStore -DCMAKE_SYSTEM_VERSION:String="10.0" + run: > + cmake . -G "Visual Studio 16 2019" -A ARM -B build_uwp_arm + -DDRACO_UNITY_PLUGIN=ON + -DDRACO_GLTF=ON + -DDRACO_BACKWARDS_COMPATIBILITY=OFF + -DCMAKE_SYSTEM_NAME:String=WindowsStore + -DCMAKE_SYSTEM_VERSION:String="10.0" - name: build_uwp_arm - run: cmake --build build_uwp_arm --config MinSizeRel --target dracodec_unity + run: > + cmake --build build_uwp_arm + --config MinSizeRel + --target dracodec_unity - name: configure_uwp_arm64 - run: cmake . -G "Visual Studio 16 2019" -A ARM64 -Bbuild_uwp_arm64 -DDRACO_UNITY_PLUGIN=ON -DDRACO_GLTF=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF -DCMAKE_SYSTEM_NAME:String=WindowsStore -DCMAKE_SYSTEM_VERSION:String="10.0" + run: > + cmake . -G "Visual Studio 16 2019" -A ARM64 -B build_uwp_arm64 + -DDRACO_UNITY_PLUGIN=ON + -DDRACO_GLTF=ON + -DDRACO_BACKWARDS_COMPATIBILITY=OFF + -DCMAKE_SYSTEM_NAME:String=WindowsStore + -DCMAKE_SYSTEM_VERSION:String="10.0" - name: build_uwp_arm64 - run: cmake --build build_uwp_arm64 --config MinSizeRel --target dracodec_unity + run: > + cmake --build build_uwp_arm64 + --config MinSizeRel + --target dracodec_unity - name: configure_uwp_x86 - run: cmake . -G "Visual Studio 16 2019" -A Win32 -Bbuild_uwp_x86 -DDRACO_UNITY_PLUGIN=ON -DDRACO_GLTF=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF -DCMAKE_SYSTEM_NAME:String=WindowsStore -DCMAKE_SYSTEM_VERSION:String="10.0" + run: > + cmake . -G "Visual Studio 16 2019" -A Win32 -B build_uwp_x86 + -DDRACO_UNITY_PLUGIN=ON + -DDRACO_GLTF=ON + -DDRACO_BACKWARDS_COMPATIBILITY=OFF + -DCMAKE_SYSTEM_NAME:String=WindowsStore + -DCMAKE_SYSTEM_VERSION:String="10.0" - name: build_uwp_x86 - run: cmake --build build_uwp_x86 --config MinSizeRel --target dracodec_unity + run: > + cmake --build build_uwp_x86 + --config MinSizeRel + --target dracodec_unity - name: configure_uwp_x64 - run: cmake . -G "Visual Studio 16 2019" -A x64 -Bbuild_uwp_x64 -DDRACO_UNITY_PLUGIN=ON -DDRACO_GLTF=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF -DCMAKE_SYSTEM_NAME:String=WindowsStore -DCMAKE_SYSTEM_VERSION:String="10.0" + run: > + cmake . -G "Visual Studio 16 2019" -A x64 -B build_uwp_x64 + -DDRACO_UNITY_PLUGIN=ON + -DDRACO_GLTF=ON + -DDRACO_BACKWARDS_COMPATIBILITY=OFF + -DCMAKE_SYSTEM_NAME:String=WindowsStore + -DCMAKE_SYSTEM_VERSION:String="10.0" - name: build_uwp_x64 - run: cmake --build build_uwp_x64 --config MinSizeRel --target dracodec_unity + run: > + cmake --build build_uwp_x64 + --config MinSizeRel + --target dracodec_unity - name: package Windows run: | @@ -142,26 +206,62 @@ jobs: # Android - name: install Android NDK - run: if [ ! -f android-ndk-r21d-linux-x86_64.zip ]; then echo "Installing Android NDK"; wget https://dl.google.com/android/repository/android-ndk-r21d-linux-x86_64.zip; unzip android-ndk-r21d-linux-x86_64.zip; echo "Installed Android NDK"; else echo "Android NDK already installed"; fi + run: | + if [ ! -f android-ndk-r21d-linux-x86_64.zip ] + then + echo "Installing Android NDK" + wget https://dl.google.com/android/repository/android-ndk-r21d-linux-x86_64.zip + unzip android-ndk-r21d-linux-x86_64.zip + echo "Installed Android NDK" + else + echo "Android NDK already installed" + fi - name: configure_android_arm64-v8a - run: cmake -Bbuild_android_arm64-v8a -DANDROID_ABI=arm64-v8a -DCMAKE_BUILD_TYPE=MinSizeRel -DANDROID_NDK=android-ndk-r21d -DCMAKE_TOOLCHAIN_FILE="android-ndk-r21d/build/cmake/android.toolchain.cmake" -DDRACO_UNITY_PLUGIN=ON -DDRACO_GLTF=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF + run: > + cmake -B build_android_arm64-v8a -DANDROID_ABI=arm64-v8a + -DCMAKE_BUILD_TYPE=MinSizeRel + -DANDROID_NDK=android-ndk-r21d + -DCMAKE_TOOLCHAIN_FILE="android-ndk-r21d/build/cmake/android.toolchain.cmake" + -DDRACO_UNITY_PLUGIN=ON + -DDRACO_GLTF=ON + -DDRACO_BACKWARDS_COMPATIBILITY=OFF - name: build_android_arm64-v8a run: cmake --build build_android_arm64-v8a --target dracodec_unity -j - name: configure_android_armeabi-v7a - run: cmake -Bbuild_android_armeabi-v7a -DANDROID_ABI=armeabi-v7a -DCMAKE_BUILD_TYPE=MinSizeRel -DANDROID_NDK=android-ndk-r21d -DCMAKE_TOOLCHAIN_FILE="android-ndk-r21d/build/cmake/android.toolchain.cmake" -DDRACO_UNITY_PLUGIN=ON -DDRACO_GLTF=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF + run: > + cmake -B build_android_armeabi-v7a -DANDROID_ABI=armeabi-v7a + -DCMAKE_BUILD_TYPE=MinSizeRel + -DANDROID_NDK=android-ndk-r21d + -DCMAKE_TOOLCHAIN_FILE="android-ndk-r21d/build/cmake/android.toolchain.cmake" + -DDRACO_UNITY_PLUGIN=ON + -DDRACO_GLTF=ON + -DDRACO_BACKWARDS_COMPATIBILITY=OFF - name: build_android_armeabi-v7a run: cmake --build build_android_armeabi-v7a --target dracodec_unity -j - name: configure_android_x86 - run: cmake -Bbuild_android_x86 -DANDROID_ABI=x86 -DCMAKE_BUILD_TYPE=MinSizeRel -DANDROID_NDK=android-ndk-r21d -DCMAKE_TOOLCHAIN_FILE="android-ndk-r21d/build/cmake/android.toolchain.cmake" -DDRACO_UNITY_PLUGIN=ON -DDRACO_GLTF=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF + run: > + cmake -B build_android_x86 + -DANDROID_ABI=x86 + -DCMAKE_BUILD_TYPE=MinSizeRel + -DANDROID_NDK=android-ndk-r21d + -DCMAKE_TOOLCHAIN_FILE="android-ndk-r21d/build/cmake/android.toolchain.cmake" + -DDRACO_UNITY_PLUGIN=ON + -DDRACO_GLTF=ON + -DDRACO_BACKWARDS_COMPATIBILITY=OFF - name: build_android_x86 run: cmake --build build_android_x86 --target dracodec_unity -j # Linux 64 - name: configure_linux64 - run: cmake . -G Ninja -Bbuild_linux_64 -DCMAKE_BUILD_TYPE=MinSizeRel -DDRACO_UNITY_PLUGIN=ON -DDRACO_GLTF=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF + run: > + cmake . -G Ninja -B build_linux_64 + -DCMAKE_BUILD_TYPE=MinSizeRel + -DDRACO_UNITY_PLUGIN=ON + -DDRACO_GLTF=ON + -DDRACO_BACKWARDS_COMPATIBILITY=OFF - name: build_linux64_dracodec_unity run: cmake --build build_linux_64 --target dracodec_unity -j - name: build_linux64_dracoenc_unity @@ -171,7 +271,13 @@ jobs: - name: install_i386_env run: sudo apt-get -qq install build-essential gcc-multilib g++-multilib - name: configure_linux32 - run: cmake . -G Ninja -Bbuild_linux_32 -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_TOOLCHAIN_FILE=cmake/toolchains/i686-linux.cmake -DDRACO_UNITY_PLUGIN=ON -DDRACO_GLTF=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF + run: > + cmake . -G Ninja -B build_linux_32 + -DCMAKE_BUILD_TYPE=MinSizeRel + -DCMAKE_TOOLCHAIN_FILE=cmake/toolchains/i686-linux.cmake + -DDRACO_UNITY_PLUGIN=ON + -DDRACO_GLTF=ON + -DDRACO_BACKWARDS_COMPATIBILITY=OFF - name: build_linux32 run: cmake --build build_linux_32 --target dracodec_unity -j @@ -182,7 +288,14 @@ jobs: version: 1.38.48-fastcomp actions-cache-folder: 'emsdk-cache' - name: configure WebAssembly - run: emcmake cmake -Bbuild_web -DCMAKE_BUILD_TYPE=MinSizeRel -DEMSCRIPTEN_GENERATE_BITCODE_STATIC_LIBRARIES=1 -DDRACO_JS_GLUE=OFF -DDRACO_UNITY_PLUGIN=ON -DDRACO_GLTF=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF + run: > + emcmake cmake -B build_web + -DCMAKE_BUILD_TYPE=MinSizeRel + -DEMSCRIPTEN_GENERATE_BITCODE_STATIC_LIBRARIES=1 + -DDRACO_JS_GLUE=OFF + -DDRACO_UNITY_PLUGIN=ON + -DDRACO_GLTF=ON + -DDRACO_BACKWARDS_COMPATIBILITY=OFF - name: build WebAssembly run: cmake --build build_web --target dracodec_unity -j @@ -199,9 +312,12 @@ jobs: mkdir -p draco_web_android_linux/Android/libs/arm64-v8a mkdir -p draco_web_android_linux/Android/libs/armeabi-v7a mkdir -p draco_web_android_linux/Android/libs/x86 - mv build_android_arm64-v8a/libdracodec_unity.so draco_web_android_linux/Android/libs/arm64-v8a - mv build_android_armeabi-v7a/libdracodec_unity.so draco_web_android_linux/Android/libs/armeabi-v7a - mv build_android_x86/libdracodec_unity.so draco_web_android_linux/Android/libs/x86 + mv build_android_arm64-v8a/libdracodec_unity.so \ + draco_web_android_linux/Android/libs/arm64-v8a + mv build_android_armeabi-v7a/libdracodec_unity.so \ + draco_web_android_linux/Android/libs/armeabi-v7a + mv build_android_x86/libdracodec_unity.so \ + draco_web_android_linux/Android/libs/x86 - name: upload artifact uses: actions/upload-artifact@v2 with: From 09cf8cdaf854ade49fd80bf30d34a606b0dae641 Mon Sep 17 00:00:00 2001 From: Andreas Atteneder Date: Fri, 14 May 2021 16:18:49 +0200 Subject: [PATCH 21/71] fix: Pinned Xcode version to current live stable --- .github/workflows/unity.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unity.yml b/.github/workflows/unity.yml index 10482813..b33f2628 100644 --- a/.github/workflows/unity.yml +++ b/.github/workflows/unity.yml @@ -24,7 +24,7 @@ jobs: - uses: maxim-lobanov/setup-xcode@v1 with: - xcode-version: latest-stable + xcode-version: '12.5' - uses: seanmiddleditch/gha-setup-ninja@master From d7e70cad73475ea4ea0a99e884d17eb4382b339e Mon Sep 17 00:00:00 2001 From: Andreas Atteneder Date: Fri, 14 May 2021 16:34:17 +0200 Subject: [PATCH 22/71] fix: Replaced manual ninja-build installation with GH action --- .github/workflows/unity.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/unity.yml b/.github/workflows/unity.yml index b33f2628..3b79285c 100644 --- a/.github/workflows/unity.yml +++ b/.github/workflows/unity.yml @@ -188,6 +188,7 @@ jobs: steps: - uses: actions/checkout@v2 + - uses: seanmiddleditch/gha-setup-ninja@master # Probably not needed anymore with ubuntu 20.04 - name: install_cmake @@ -199,11 +200,6 @@ jobs: sudo apt update sudo apt install cmake - - name: apt install - run: | - sudo apt-get -qq update - sudo apt-get -qq install ninja-build - # Android - name: install Android NDK run: | From f3061b23f6c71dbd0d0896217375cc67101c5ead Mon Sep 17 00:00:00 2001 From: Andreas Atteneder Date: Fri, 14 May 2021 17:14:46 +0200 Subject: [PATCH 23/71] fix: Simplified iOS C++ flag settings --- CMakeLists.txt | 21 --------------------- cmake/draco_build_definitions.cmake | 6 ++++++ 2 files changed, 6 insertions(+), 21 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ae34a2a0..3133a03b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1118,27 +1118,6 @@ else() set_target_properties(dracodec_unity PROPERTIES BUNDLE true) set_target_properties(dracoenc_unity PROPERTIES BUNDLE true) endif() - if(IOS) - # Workaround to ensure bitcode is generated when - # generating an iOS library with Makefiles as generator. - target_compile_options( dracodec_unity PUBLIC -fembed-bitcode ) - target_compile_options( draco_attributes PUBLIC -fembed-bitcode ) - target_compile_options( draco_compression_attributes_dec PUBLIC -fembed-bitcode ) - target_compile_options( draco_compression_bit_coders PUBLIC -fembed-bitcode ) - target_compile_options( draco_compression_decode PUBLIC -fembed-bitcode ) - target_compile_options( draco_compression_entropy PUBLIC -fembed-bitcode ) - target_compile_options( draco_compression_mesh_dec PUBLIC -fembed-bitcode ) - target_compile_options( draco_compression_point_cloud_dec PUBLIC -fembed-bitcode ) - target_compile_options( draco_core PUBLIC -fembed-bitcode ) - target_compile_options( draco_dec_config PUBLIC -fembed-bitcode ) - target_compile_options( draco_io PUBLIC -fembed-bitcode ) - target_compile_options( draco_mesh PUBLIC -fembed-bitcode ) - target_compile_options( draco_metadata PUBLIC -fembed-bitcode ) - target_compile_options( draco_metadata_dec PUBLIC -fembed-bitcode ) - target_compile_options( draco_point_cloud PUBLIC -fembed-bitcode ) - target_compile_options( draco_points_dec PUBLIC -fembed-bitcode ) - target_compile_options( draco_unity_plugin PUBLIC -fembed-bitcode ) - endif() if (WIN32 AND ${CMAKE_SYSTEM_NAME} STREQUAL "WindowsStore") # Ignoring Error C4146 unary minus operator applied to unsigned type, result still unsigned target_compile_options(draco_compression_attributes_enc PRIVATE "/wd4146" ) diff --git a/cmake/draco_build_definitions.cmake b/cmake/draco_build_definitions.cmake index 4dc23233..1de9a922 100644 --- a/cmake/draco_build_definitions.cmake +++ b/cmake/draco_build_definitions.cmake @@ -153,5 +153,11 @@ macro(draco_set_build_definitions) FLAG_LIST_VAR_LINKER draco_base_exe_linker_flags) endif() + if(IOS) + # ensure bitcode is generated when generating an iOS library with Makefiles + # as generator. + list(APPEND draco_base_cxx_flags "-fembed-bitcode") + endif() + draco_configure_sanitizer() endmacro() From a62b35f816151c9662ab47ee162a1b672d4785c6 Mon Sep 17 00:00:00 2001 From: Andreas Atteneder Date: Fri, 14 May 2021 17:18:01 +0200 Subject: [PATCH 24/71] fix: Simplified WindowsStore C++ flag settings --- CMakeLists.txt | 12 ------------ cmake/draco_build_definitions.cmake | 6 ++++++ 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3133a03b..14a8921e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1118,18 +1118,6 @@ else() set_target_properties(dracodec_unity PROPERTIES BUNDLE true) set_target_properties(dracoenc_unity PROPERTIES BUNDLE true) endif() - if (WIN32 AND ${CMAKE_SYSTEM_NAME} STREQUAL "WindowsStore") - # Ignoring Error C4146 unary minus operator applied to unsigned type, result still unsigned - target_compile_options(draco_compression_attributes_enc PRIVATE "/wd4146" ) - target_compile_options(draco_compression_bit_coders PRIVATE "/wd4146" ) - target_compile_options(draco_compression_entropy PRIVATE "/wd4146" ) - target_compile_options(draco_compression_mesh_dec PRIVATE "/wd4146" ) - target_compile_options(draco_compression_mesh_enc PRIVATE "/wd4146" ) - target_compile_options(draco_core PRIVATE "/wd4146" ) - target_compile_options(draco_io PRIVATE "/wd4146" ) - target_compile_options(draco_metadata_dec PRIVATE "/wd4146" ) - target_compile_options(draco_metadata_enc PRIVATE "/wd4146" ) - endif() endif() if(DRACO_MAYA_PLUGIN) diff --git a/cmake/draco_build_definitions.cmake b/cmake/draco_build_definitions.cmake index 1de9a922..252255be 100644 --- a/cmake/draco_build_definitions.cmake +++ b/cmake/draco_build_definitions.cmake @@ -159,5 +159,11 @@ macro(draco_set_build_definitions) list(APPEND draco_base_cxx_flags "-fembed-bitcode") endif() + if(WIN32 AND ${CMAKE_SYSTEM_NAME} STREQUAL "WindowsStore") + # Ignoring Error C4146 unary minus operator applied to unsigned type, result + # still unsigned + list(APPEND draco_msvc_cxx_flags "/wd4146") + endif() + draco_configure_sanitizer() endmacro() From 833c4dc39efcdb8a401117ab4711b396c5bb1888 Mon Sep 17 00:00:00 2001 From: Andreas Atteneder Date: Fri, 14 May 2021 18:22:16 +0200 Subject: [PATCH 25/71] fix: Removing 32 bit Linux build (not supported anymore in Unity 2019.2 or later) --- .github/workflows/unity.yml | 16 ---------------- cmake/toolchains/i686-linux.cmake | 16 ---------------- 2 files changed, 32 deletions(-) delete mode 100644 cmake/toolchains/i686-linux.cmake diff --git a/.github/workflows/unity.yml b/.github/workflows/unity.yml index 3b79285c..4a3befe5 100644 --- a/.github/workflows/unity.yml +++ b/.github/workflows/unity.yml @@ -263,20 +263,6 @@ jobs: - name: build_linux64_dracoenc_unity run: cmake --build build_linux_64 --target dracoenc_unity -j - # Linux 32 - - name: install_i386_env - run: sudo apt-get -qq install build-essential gcc-multilib g++-multilib - - name: configure_linux32 - run: > - cmake . -G Ninja -B build_linux_32 - -DCMAKE_BUILD_TYPE=MinSizeRel - -DCMAKE_TOOLCHAIN_FILE=cmake/toolchains/i686-linux.cmake - -DDRACO_UNITY_PLUGIN=ON - -DDRACO_GLTF=ON - -DDRACO_BACKWARDS_COMPATIBILITY=OFF - - name: build_linux32 - run: cmake --build build_linux_32 --target dracodec_unity -j - # Emscripten - name: setup Emscripten uses: mymindstorm/setup-emsdk@v7 @@ -301,8 +287,6 @@ jobs: mkdir -p draco_web_android_linux/x86_64 mv build_linux_64/libdracodec_unity.so draco_web_android_linux/x86_64 mv build_linux_64/libdracoenc_unity.so draco_web_android_linux/x86_64 - mkdir -p draco_web_android_linux/x86 - mv build_linux_32/libdracodec_unity.so draco_web_android_linux/x86 mkdir -p draco_web_android_linux/WebGL mv build_web/libdracodec_unity.bc draco_web_android_linux/WebGL mkdir -p draco_web_android_linux/Android/libs/arm64-v8a diff --git a/cmake/toolchains/i686-linux.cmake b/cmake/toolchains/i686-linux.cmake deleted file mode 100644 index 391e1b5d..00000000 --- a/cmake/toolchains/i686-linux.cmake +++ /dev/null @@ -1,16 +0,0 @@ -set(CMAKE_SYSTEM_NAME Linux) -set(CMAKE_SYSTEM_VERSION 1) -set(CMAKE_SYSTEM_PROCESSOR "i686") - -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32" CACHE STRING "c++ flags") -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32" CACHE STRING "c flags") - -set(BIN_LIBROOT "linux") -set(BIN_RPATH "\$ORIGIN/lib") - -set(CMAKE_SKIP_BUILD_RPATH TRUE) -set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE) -set(CMAKE_INSTALL_RPATH ${BIN_RPATH}) -set(CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE) - -set(FORCE32 ON) From 95ae62d4786aeb0c1cf39fffce3ac3290f1887e6 Mon Sep 17 00:00:00 2001 From: Andreas Atteneder Date: Fri, 14 May 2021 18:24:58 +0200 Subject: [PATCH 26/71] fix: rollback using specific Xcode version --- .github/workflows/unity.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unity.yml b/.github/workflows/unity.yml index 4a3befe5..2ea8315f 100644 --- a/.github/workflows/unity.yml +++ b/.github/workflows/unity.yml @@ -24,7 +24,7 @@ jobs: - uses: maxim-lobanov/setup-xcode@v1 with: - xcode-version: '12.5' + xcode-version: latest-stable - uses: seanmiddleditch/gha-setup-ninja@master From 21438374fbd17b8210a948e1549b28a0c10f1692 Mon Sep 17 00:00:00 2001 From: Andreas Atteneder Date: Fri, 14 May 2021 18:25:27 +0200 Subject: [PATCH 27/71] fix: Pinning gha-setup-ninja version --- .github/workflows/unity.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/unity.yml b/.github/workflows/unity.yml index 2ea8315f..5e59d987 100644 --- a/.github/workflows/unity.yml +++ b/.github/workflows/unity.yml @@ -26,7 +26,7 @@ jobs: with: xcode-version: latest-stable - - uses: seanmiddleditch/gha-setup-ninja@master + - uses: seanmiddleditch/gha-setup-ninja@v3 - name: configure_mac # ARCHS_STANDARD explicitely enables Apple silicon on Xcode 12.2 @@ -188,7 +188,7 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: seanmiddleditch/gha-setup-ninja@master + - uses: seanmiddleditch/gha-setup-ninja@v3 # Probably not needed anymore with ubuntu 20.04 - name: install_cmake From 00fb3e70bcfa1516f2e9714d2a23ce0119e68279 Mon Sep 17 00:00:00 2001 From: Andreas Atteneder Date: Tue, 18 May 2021 10:30:08 +0200 Subject: [PATCH 28/71] fix: Changed the way coordinate system is converted. Instead of flipping the Z-axis, we now flip the X-axis. --- src/draco/unity/draco_unity_plugin.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/draco/unity/draco_unity_plugin.cc b/src/draco/unity/draco_unity_plugin.cc index 1cfa5300..76821f97 100644 --- a/src/draco/unity/draco_unity_plugin.cc +++ b/src/draco/unity/draco_unity_plugin.cc @@ -88,13 +88,13 @@ T *CopyAttributeDataFlipped(int num_points, const draco::PointAttribute *attr) { break; case 3: got_data = attr->ConvertValue(val_index,outPtr); - // Position/Normal right-hand to left-handed coordinate system switch: flip Z axis - *(outPtr+2) *= -1; + // Position/Normal right-hand to left-handed coordinate system switch: flip X axis + *(outPtr) *= -1; break; case 4: got_data = attr->ConvertValue(val_index,outPtr); - // Tangent right-hand to left-handed coordinate system switch: flip X and Z axis - *(outPtr) *= -1; + // Tangent right-hand to left-handed coordinate system switch: flip Y and Z axis + *(outPtr+1) *= -1; *(outPtr+2) *= -1; break; default: From e22c11ced2209cc0dd0055a39a1acdea7e075bff Mon Sep 17 00:00:00 2001 From: Andreas Atteneder Date: Wed, 30 Jun 2021 10:53:34 +0200 Subject: [PATCH 29/71] feat: Updated Android NDK to r21e and use GH action for installing it --- .github/workflows/unity.yml | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/.github/workflows/unity.yml b/.github/workflows/unity.yml index 5e59d987..d326550b 100644 --- a/.github/workflows/unity.yml +++ b/.github/workflows/unity.yml @@ -202,23 +202,18 @@ jobs: # Android - name: install Android NDK - run: | - if [ ! -f android-ndk-r21d-linux-x86_64.zip ] - then - echo "Installing Android NDK" - wget https://dl.google.com/android/repository/android-ndk-r21d-linux-x86_64.zip - unzip android-ndk-r21d-linux-x86_64.zip - echo "Installed Android NDK" - else - echo "Android NDK already installed" - fi + uses: nttld/setup-ndk@v1 + id: setup-ndk + with: + ndk-version: r21e + add-to-path: false - name: configure_android_arm64-v8a run: > cmake -B build_android_arm64-v8a -DANDROID_ABI=arm64-v8a -DCMAKE_BUILD_TYPE=MinSizeRel - -DANDROID_NDK=android-ndk-r21d - -DCMAKE_TOOLCHAIN_FILE="android-ndk-r21d/build/cmake/android.toolchain.cmake" + -DANDROID_NDK=${{ steps.setup-ndk.outputs.ndk-path }} + -DCMAKE_TOOLCHAIN_FILE="${{ steps.setup-ndk.outputs.ndk-path }}/build/cmake/android.toolchain.cmake" -DDRACO_UNITY_PLUGIN=ON -DDRACO_GLTF=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF @@ -229,8 +224,8 @@ jobs: run: > cmake -B build_android_armeabi-v7a -DANDROID_ABI=armeabi-v7a -DCMAKE_BUILD_TYPE=MinSizeRel - -DANDROID_NDK=android-ndk-r21d - -DCMAKE_TOOLCHAIN_FILE="android-ndk-r21d/build/cmake/android.toolchain.cmake" + -DANDROID_NDK=${{ steps.setup-ndk.outputs.ndk-path }} + -DCMAKE_TOOLCHAIN_FILE="${{ steps.setup-ndk.outputs.ndk-path }}/build/cmake/android.toolchain.cmake" -DDRACO_UNITY_PLUGIN=ON -DDRACO_GLTF=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF @@ -242,8 +237,8 @@ jobs: cmake -B build_android_x86 -DANDROID_ABI=x86 -DCMAKE_BUILD_TYPE=MinSizeRel - -DANDROID_NDK=android-ndk-r21d - -DCMAKE_TOOLCHAIN_FILE="android-ndk-r21d/build/cmake/android.toolchain.cmake" + -DANDROID_NDK=${{ steps.setup-ndk.outputs.ndk-path }} + -DCMAKE_TOOLCHAIN_FILE="${{ steps.setup-ndk.outputs.ndk-path }}/build/cmake/android.toolchain.cmake" -DDRACO_UNITY_PLUGIN=ON -DDRACO_GLTF=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF From ca8872117f1f5f6dbb009d040d12e4feafa094ef Mon Sep 17 00:00:00 2001 From: Andreas Atteneder Date: Wed, 30 Jun 2021 11:18:08 +0200 Subject: [PATCH 30/71] feat: Updated Emscripten build required for Unity 2021.2 - Split up Linux based builds into `linux` (updated to ubuntu latest) and `linux_legacy` (ubuntu 18.04) - Emscripten is cached now - Linux builds are still done on legacy/18.04 - CMake is upgraded via simpler GH action now --- .github/workflows/unity.yml | 133 +++++++++++++++++++++++++----------- 1 file changed, 92 insertions(+), 41 deletions(-) diff --git a/.github/workflows/unity.yml b/.github/workflows/unity.yml index d326550b..e7de679f 100644 --- a/.github/workflows/unity.yml +++ b/.github/workflows/unity.yml @@ -12,6 +12,13 @@ on: - created workflow_dispatch: +env: + # Emscripten version that comes with Unity 2021.2 + EM_VERSION: 2.0.19 + EM_CACHE_FOLDER: 'emsdk-cache' + # Emscripten version that comes with older Unity versions + EM_LEGACY_VERSION: 1.38.48-fastcomp + EM_LEGACY_CACHE_FOLDER: 'emsdk-legacy-cache' jobs: @@ -184,22 +191,18 @@ jobs: linux: - runs-on: ubuntu-18.04 + runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - name: Setup cache + id: cache-system-libraries + uses: actions/cache@v2 + with: + path: ${{env.EM_CACHE_FOLDER}} + key: ${{env.EM_VERSION}}-${{ runner.os }} - uses: seanmiddleditch/gha-setup-ninja@v3 - # Probably not needed anymore with ubuntu 20.04 - - name: install_cmake - run: | - sudo apt update - sudo apt install apt-transport-https ca-certificates gnupg software-properties-common wget - wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | sudo apt-key add - - sudo apt-add-repository 'deb https://apt.kitware.com/ubuntu/ bionic main' - sudo apt update - sudo apt install cmake - # Android - name: install Android NDK uses: nttld/setup-ndk@v1 @@ -245,6 +248,60 @@ jobs: - name: build_android_x86 run: cmake --build build_android_x86 --target dracodec_unity -j + # Emscripten + - name: setup Emscripten + uses: mymindstorm/setup-emsdk@v10 + with: + version: ${{env.EM_VERSION}} + actions-cache-folder: ${{env.EM_CACHE_FOLDER}} + - name: configure WebAssembly + run: > + emcmake cmake -B build_web + -DCMAKE_BUILD_TYPE=MinSizeRel + -DDRACO_JS_GLUE=OFF + -DDRACO_UNITY_PLUGIN=ON + -DDRACO_GLTF=ON + -DDRACO_BACKWARDS_COMPATIBILITY=OFF + - name: build WebAssembly + run: cmake --build build_web --target dracodec_unity -j + + # Linux artifacts + - name: package Linux + run: | + mkdir -p draco_linux/WebGL + mv build_web/libdracodec_unity.a draco_linux/WebGL + mkdir -p draco_linux/Android/libs/arm64-v8a + mkdir -p draco_linux/Android/libs/armeabi-v7a + mkdir -p draco_linux/Android/libs/x86 + mv build_android_arm64-v8a/libdracodec_unity.so \ + draco_linux/Android/libs/arm64-v8a + mv build_android_armeabi-v7a/libdracodec_unity.so \ + draco_linux/Android/libs/armeabi-v7a + mv build_android_x86/libdracodec_unity.so \ + draco_linux/Android/libs/x86 + - name: upload artifact + uses: actions/upload-artifact@v2 + with: + name: draco_linux + path: draco_linux + + linux_legacy: + + runs-on: ubuntu-18.04 + + steps: + - uses: actions/checkout@v2 + - name: Setup cache + id: cache-system-libraries + uses: actions/cache@v2 + with: + path: ${{env.EM_LEGACY_CACHE_FOLDER}} + key: ${{env.EM_LEGACY_VERSION}}-${{ runner.os }} + + # CMake that comes with Ubuntu 18.04 is too old, so install a recent version here + - name: Get latest CMake and ninja + uses: lukka/get-cmake@latest + # Linux 64 - name: configure_linux64 run: > @@ -258,52 +315,44 @@ jobs: - name: build_linux64_dracoenc_unity run: cmake --build build_linux_64 --target dracoenc_unity -j - # Emscripten - - name: setup Emscripten - uses: mymindstorm/setup-emsdk@v7 + # Emscripten legacy + - name: setup Emscripten legacy + uses: mymindstorm/setup-emsdk@v10 with: - version: 1.38.48-fastcomp - actions-cache-folder: 'emsdk-cache' - - name: configure WebAssembly + version: ${{env.EM_LEGACY_VERSION}} + actions-cache-folder: ${{env.EM_LEGACY_CACHE_FOLDER}} + - name: configure WebAssembly legacy run: > - emcmake cmake -B build_web + emcmake cmake -B build_web_legacy -DCMAKE_BUILD_TYPE=MinSizeRel -DEMSCRIPTEN_GENERATE_BITCODE_STATIC_LIBRARIES=1 -DDRACO_JS_GLUE=OFF -DDRACO_UNITY_PLUGIN=ON -DDRACO_GLTF=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF - - name: build WebAssembly - run: cmake --build build_web --target dracodec_unity -j + - name: build WebAssembly legacy + run: cmake --build build_web_legacy --target dracodec_unity -j - # Linux, WebGL and Android artifact - - name: package Web Android Linux + # Linux legacy artifacts + - name: package Linux legacy run: | - mkdir -p draco_web_android_linux/x86_64 - mv build_linux_64/libdracodec_unity.so draco_web_android_linux/x86_64 - mv build_linux_64/libdracoenc_unity.so draco_web_android_linux/x86_64 - mkdir -p draco_web_android_linux/WebGL - mv build_web/libdracodec_unity.bc draco_web_android_linux/WebGL - mkdir -p draco_web_android_linux/Android/libs/arm64-v8a - mkdir -p draco_web_android_linux/Android/libs/armeabi-v7a - mkdir -p draco_web_android_linux/Android/libs/x86 - mv build_android_arm64-v8a/libdracodec_unity.so \ - draco_web_android_linux/Android/libs/arm64-v8a - mv build_android_armeabi-v7a/libdracodec_unity.so \ - draco_web_android_linux/Android/libs/armeabi-v7a - mv build_android_x86/libdracodec_unity.so \ - draco_web_android_linux/Android/libs/x86 + mkdir -p draco_linux_legacy/x86_64 + mv build_linux_64/libdracodec_unity.so draco_linux_legacy/x86_64 + mv build_linux_64/libdracoenc_unity.so draco_linux_legacy/x86_64 + mkdir -p draco_linux_legacy/WebGL + mv build_web_legacy/libdracodec_unity.bc draco_linux_legacy/WebGL - name: upload artifact uses: actions/upload-artifact@v2 with: - name: draco_web_android_linux - path: draco_web_android_linux + name: draco_linux_legacy + path: draco_linux_legacy + combine: name: combine artifacts runs-on: ubuntu-latest - needs: [mac, windows, linux] + needs: [mac, windows, linux, linux_legacy] steps: - name: download artifacts uses: actions/download-artifact@v2 @@ -317,7 +366,8 @@ jobs: mkdir draco cp -r artifacts/draco_apple/* draco cp -r artifacts/draco_win/* draco - cp -r artifacts/draco_web_android_linux/* draco + cp -r artifacts/draco_linux/* draco + cp -r artifacts/draco_linux_legacy/* draco - name: zip run: zip -r draco.zip draco - name: upload release assets @@ -337,4 +387,5 @@ jobs: name: | draco_apple draco_win - draco_web_android_linux + draco_linux + draco_linux_legacy From 59d1bb20e88ad205de8da7508978321d6320f0b0 Mon Sep 17 00:00:00 2001 From: Andreas Atteneder Date: Fri, 27 Aug 2021 10:27:37 +0200 Subject: [PATCH 31/71] feat: Added support for 16 bit unsigned integer indices to the Unity plugin --- src/draco/unity/draco_unity_plugin.cc | 85 ++++++++++++++++++++------- src/draco/unity/draco_unity_plugin.h | 2 +- 2 files changed, 66 insertions(+), 21 deletions(-) diff --git a/src/draco/unity/draco_unity_plugin.cc b/src/draco/unity/draco_unity_plugin.cc index 76821f97..86c55a0a 100644 --- a/src/draco/unity/draco_unity_plugin.cc +++ b/src/draco/unity/draco_unity_plugin.cc @@ -130,6 +130,56 @@ void *ConvertAttributeData(int num_points, const draco::PointAttribute *attr, bo return nullptr; } } + +uint16_t *const GetMeshIndicesUInt16(const draco::DracoMesh *mesh, bool flip) { + + const draco::Mesh *const m = static_cast(mesh->private_mesh); + uint16_t *const temp_indices = new uint16_t[m->num_faces() * 3]; + + if(flip) { + for (draco::FaceIndex face_id(0); face_id < m->num_faces(); ++face_id) { + const draco::Mesh::Face &face = m->face(draco::FaceIndex(face_id)); + uint16_t* const dest = temp_indices + face_id.value() * 3; + const int32_t* src = reinterpret_cast(face.data()); + *dest = *src; + *(dest+1) = *(src+2); + *(dest+2) = *(src+1); + } + } else { + for (draco::FaceIndex face_id(0); face_id < m->num_faces(); ++face_id) { + const draco::Mesh::Face &face = m->face(draco::FaceIndex(face_id)); + uint16_t* const dest = temp_indices + face_id.value() * 3; + const int32_t* src = reinterpret_cast(face.data()); + *dest = *src; + *(dest+1) = *(src+1); + *(dest+2) = *(src+2); + } + } + return temp_indices; +} + +uint32_t *const GetMeshIndicesUInt32(const draco::DracoMesh *mesh, bool flip) { + + const draco::Mesh *const m = static_cast(mesh->private_mesh); + uint32_t *const temp_indices = new uint32_t[m->num_faces() * 3]; + if(flip) { + for (draco::FaceIndex face_id(0); face_id < m->num_faces(); ++face_id) { + const draco::Mesh::Face &face = m->face(draco::FaceIndex(face_id)); + uint32_t* const dest = temp_indices + face_id.value() * 3; + const int32_t* src = reinterpret_cast(face.data()); + *dest = *src; + *(dest+1) = *(src+2); + *(dest+2) = *(src+1); + } + } else { + for (draco::FaceIndex face_id(0); face_id < m->num_faces(); ++face_id) { + const draco::Mesh::Face &face = m->face(draco::FaceIndex(face_id)); + memcpy(temp_indices + face_id.value() * 3, + reinterpret_cast(face.data()), sizeof(uint32_t) * 3); + } + } + return temp_indices; +} } // namespace namespace draco { @@ -290,31 +340,26 @@ bool EXPORT_API GetAttributeByUniqueId(const DracoMesh *mesh, int unique_id, return true; } -bool EXPORT_API GetMeshIndices(const DracoMesh *mesh, DracoData **indices, bool flip) { +bool EXPORT_API GetMeshIndices(const DracoMesh *mesh, DracoData **indices, DataType dataType, bool flip) { if (mesh == nullptr || indices == nullptr || *indices != nullptr) { return false; } - const Mesh *const m = static_cast(mesh->private_mesh); - int *const temp_indices = new int[m->num_faces() * 3]; - if(flip) { - for (draco::FaceIndex face_id(0); face_id < m->num_faces(); ++face_id) { - const Mesh::Face &face = m->face(draco::FaceIndex(face_id)); - int32_t* const dest = temp_indices + face_id.value() * 3; - const int32_t* src = reinterpret_cast(face.data()); - *dest = *src; - *(dest+1) = *(src+2); - *(dest+2) = *(src+1); - } - } else { - for (draco::FaceIndex face_id(0); face_id < m->num_faces(); ++face_id) { - const Mesh::Face &face = m->face(draco::FaceIndex(face_id)); - memcpy(temp_indices + face_id.value() * 3, - reinterpret_cast(face.data()), sizeof(int) * 3); - } + + void *tmp; + switch(dataType) { + case DT_UINT16: + tmp = GetMeshIndicesUInt16(mesh,flip); + break; + case DT_UINT32: + tmp = GetMeshIndicesUInt32(mesh,flip); + break; + default: + return false; } + DracoData *const draco_data = new DracoData(); - draco_data->data = temp_indices; - draco_data->data_type = DT_INT32; + draco_data->data = tmp; + draco_data->data_type = dataType; *indices = draco_data; return true; } diff --git a/src/draco/unity/draco_unity_plugin.h b/src/draco/unity/draco_unity_plugin.h index 4bb5eec2..66b3c652 100644 --- a/src/draco/unity/draco_unity_plugin.h +++ b/src/draco/unity/draco_unity_plugin.h @@ -105,7 +105,7 @@ bool EXPORT_API GetAttributeByUniqueId(const DracoMesh *mesh, int unique_id, // Returns the indices as well as the type of data in |indices|. On input, // |indices| must be null. The returned |indices| must be released with // ReleaseDracoData. -bool EXPORT_API GetMeshIndices(const DracoMesh *mesh, DracoData **indices, bool flip); +bool EXPORT_API GetMeshIndices(const DracoMesh *mesh, DracoData **indices, DataType dataType, bool flip); // Returns the attribute data from attribute as well as the type of data in // |data|. On input, |data| must be null. The returned |data| must be released // with ReleaseDracoData. From e2d85b9b068a51a80ed33cfdda03990ae48a7c16 Mon Sep 17 00:00:00 2001 From: Andreas Atteneder Date: Fri, 27 Aug 2021 13:18:56 +0200 Subject: [PATCH 32/71] feat: Avoid allocation of temporary index buffer by writing indices into Unity's index buffer directly. --- src/draco/unity/draco_unity_plugin.cc | 33 ++++++++++++++------------- src/draco/unity/draco_unity_plugin.h | 8 +++---- 2 files changed, 21 insertions(+), 20 deletions(-) diff --git a/src/draco/unity/draco_unity_plugin.cc b/src/draco/unity/draco_unity_plugin.cc index 86c55a0a..02fd0085 100644 --- a/src/draco/unity/draco_unity_plugin.cc +++ b/src/draco/unity/draco_unity_plugin.cc @@ -131,10 +131,13 @@ void *ConvertAttributeData(int num_points, const draco::PointAttribute *attr, bo } } -uint16_t *const GetMeshIndicesUInt16(const draco::DracoMesh *mesh, bool flip) { +bool GetMeshIndicesUInt16(const draco::DracoMesh *mesh, void* indices, uint32_t indicesCount, bool flip) { const draco::Mesh *const m = static_cast(mesh->private_mesh); - uint16_t *const temp_indices = new uint16_t[m->num_faces() * 3]; + if(indicesCount < m->num_faces() * 3) { + return false; + } + uint16_t *const temp_indices = static_cast(indices); if(flip) { for (draco::FaceIndex face_id(0); face_id < m->num_faces(); ++face_id) { @@ -155,13 +158,17 @@ uint16_t *const GetMeshIndicesUInt16(const draco::DracoMesh *mesh, bool flip) { *(dest+2) = *(src+2); } } - return temp_indices; + return true; } -uint32_t *const GetMeshIndicesUInt32(const draco::DracoMesh *mesh, bool flip) { +bool GetMeshIndicesUInt32(const draco::DracoMesh *mesh, void* indices, uint32_t indicesCount, bool flip) { const draco::Mesh *const m = static_cast(mesh->private_mesh); - uint32_t *const temp_indices = new uint32_t[m->num_faces() * 3]; + if(indicesCount < m->num_faces() * 3) { + return false; + } + uint32_t *const temp_indices = static_cast(indices); + if(flip) { for (draco::FaceIndex face_id(0); face_id < m->num_faces(); ++face_id) { const draco::Mesh::Face &face = m->face(draco::FaceIndex(face_id)); @@ -178,7 +185,7 @@ uint32_t *const GetMeshIndicesUInt32(const draco::DracoMesh *mesh, bool flip) { reinterpret_cast(face.data()), sizeof(uint32_t) * 3); } } - return temp_indices; + return true; } } // namespace @@ -340,27 +347,21 @@ bool EXPORT_API GetAttributeByUniqueId(const DracoMesh *mesh, int unique_id, return true; } -bool EXPORT_API GetMeshIndices(const DracoMesh *mesh, DracoData **indices, DataType dataType, bool flip) { - if (mesh == nullptr || indices == nullptr || *indices != nullptr) { +bool EXPORT_API GetMeshIndices(const DracoMesh *mesh, DataType dataType, void* indices, uint32_t indicesCount, bool flip) { + if (mesh == nullptr || indices == nullptr) { return false; } void *tmp; switch(dataType) { case DT_UINT16: - tmp = GetMeshIndicesUInt16(mesh,flip); - break; + return GetMeshIndicesUInt16(mesh,indices,indicesCount,flip); case DT_UINT32: - tmp = GetMeshIndicesUInt32(mesh,flip); - break; + return GetMeshIndicesUInt32(mesh,indices,indicesCount,flip); default: return false; } - DracoData *const draco_data = new DracoData(); - draco_data->data = tmp; - draco_data->data_type = dataType; - *indices = draco_data; return true; } diff --git a/src/draco/unity/draco_unity_plugin.h b/src/draco/unity/draco_unity_plugin.h index 66b3c652..6e82112b 100644 --- a/src/draco/unity/draco_unity_plugin.h +++ b/src/draco/unity/draco_unity_plugin.h @@ -102,10 +102,10 @@ bool EXPORT_API GetAttributeByType(const DracoMesh *mesh, // null. The returned |attribute| must be released with ReleaseDracoAttribute. bool EXPORT_API GetAttributeByUniqueId(const DracoMesh *mesh, int unique_id, DracoAttribute **attribute); -// Returns the indices as well as the type of data in |indices|. On input, -// |indices| must be null. The returned |indices| must be released with -// ReleaseDracoData. -bool EXPORT_API GetMeshIndices(const DracoMesh *mesh, DracoData **indices, DataType dataType, bool flip); +// Write the indices into |indices|, a provided buffer. +// |indicesCount| multiplied by |dataType| specific component length +// gives you the size of |indices| +bool EXPORT_API GetMeshIndices(const DracoMesh *mesh, DataType dataType, void* indices, uint32_t indicesCount, bool flip); // Returns the attribute data from attribute as well as the type of data in // |data|. On input, |data| must be null. The returned |data| must be released // with ReleaseDracoData. From 0446a908904d81f263d301c9656a5bf5b4aa553b Mon Sep 17 00:00:00 2001 From: camnewnham Date: Wed, 4 Aug 2021 10:30:46 +1000 Subject: [PATCH 33/71] add point cloud compression to DRACO_GLTF options --- cmake/draco_options.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/cmake/draco_options.cmake b/cmake/draco_options.cmake index 08514977..ce6fe3ec 100644 --- a/cmake/draco_options.cmake +++ b/cmake/draco_options.cmake @@ -190,6 +190,7 @@ macro(draco_set_optional_features) draco_enable_feature(FEATURE "DRACO_MESH_COMPRESSION_SUPPORTED") draco_enable_feature(FEATURE "DRACO_NORMAL_ENCODING_SUPPORTED") draco_enable_feature(FEATURE "DRACO_STANDARD_EDGEBREAKER_SUPPORTED") + draco_enable_feature(FEATURE "DRACO_POINT_CLOUD_COMPRESSION_SUPPORTED") else() if(DRACO_POINT_CLOUD_COMPRESSION) draco_enable_feature(FEATURE "DRACO_POINT_CLOUD_COMPRESSION_SUPPORTED") From 884aab3ba2f2ab3cf34869f956dee3120410dba1 Mon Sep 17 00:00:00 2001 From: camnewnham Date: Wed, 4 Aug 2021 10:46:12 +1000 Subject: [PATCH 34/71] Allow DracoMesh to be point cloud (zero faces) --- src/draco/unity/draco_unity_plugin.cc | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/src/draco/unity/draco_unity_plugin.cc b/src/draco/unity/draco_unity_plugin.cc index 02fd0085..65727f6d 100644 --- a/src/draco/unity/draco_unity_plugin.cc +++ b/src/draco/unity/draco_unity_plugin.cc @@ -270,7 +270,7 @@ int EXPORT_API DecodeDracoMeshStep1( return -2; } const draco::EncodedGeometryType geom_type = type_statusor.value(); - if (geom_type != draco::TRIANGULAR_MESH) { + if (geom_type != draco::TRIANGULAR_MESH && geom_type != draco::POINT_CLOUD) { return -3; } @@ -281,14 +281,22 @@ int EXPORT_API DecodeDracoMeshStep1( return -4; } - std::unique_ptr in_mesh = std::move(statusor).value(); - - DracoMesh *const unity_mesh = *mesh; - unity_mesh->num_faces = in_mesh->num_faces(); - unity_mesh->num_vertices = in_mesh->num_points(); - unity_mesh->num_attributes = in_mesh->num_attributes(); - unity_mesh->private_mesh = static_cast(in_mesh.release()); + if (geom_type == draco::TRIANGULAR_MESH) { + std::unique_ptr in_mesh = std::move(statusor).value(); + DracoMesh *const unity_mesh = *mesh; + unity_mesh->num_faces = in_mesh->num_faces(); + unity_mesh->num_vertices = in_mesh->num_points(); + unity_mesh->num_attributes = in_mesh->num_attributes(); + unity_mesh->private_mesh = static_cast(in_mesh.release()); + } else if (geom_type == draco::POINT_CLOUD) { + std::unique_ptr in_cloud = std::move(statusor).value(); + DracoMesh *const unity_mesh = *mesh; + unity_mesh->num_faces = 0; + unity_mesh->num_vertices = in_cloud->num_points(); + unity_mesh->num_attributes = in_cloud->num_attributes(); + unity_mesh->private_mesh = static_cast(in_cloud.release()); + } return 0; } From cd74db547a88a10894811ef528b28bd4fccbfb90 Mon Sep 17 00:00:00 2001 From: camnewnham Date: Wed, 4 Aug 2021 12:51:21 +1000 Subject: [PATCH 35/71] decode correct type --- src/draco/unity/draco_unity_plugin.cc | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/draco/unity/draco_unity_plugin.cc b/src/draco/unity/draco_unity_plugin.cc index 65727f6d..52332e22 100644 --- a/src/draco/unity/draco_unity_plugin.cc +++ b/src/draco/unity/draco_unity_plugin.cc @@ -276,12 +276,13 @@ int EXPORT_API DecodeDracoMeshStep1( *mesh = new DracoMesh(); *decoder = new draco::Decoder(); - auto statusor = (*decoder)->DecodeMeshFromBufferStep1(*buffer); - if (!statusor.ok()) { - return -4; - } if (geom_type == draco::TRIANGULAR_MESH) { + auto statusor = (*decoder)->DecodeMeshFromBufferStep1(*buffer); + if (!statusor.ok()) { + return -4; + } + std::unique_ptr in_mesh = std::move(statusor).value(); DracoMesh *const unity_mesh = *mesh; unity_mesh->num_faces = in_mesh->num_faces(); @@ -290,6 +291,11 @@ int EXPORT_API DecodeDracoMeshStep1( unity_mesh->private_mesh = static_cast(in_mesh.release()); } else if (geom_type == draco::POINT_CLOUD) { + auto statusor = (*decoder)->DecodePointCloudFromBuffer(*buffer); + if (!statusor.ok()) { + return -4; + } + std::unique_ptr in_cloud = std::move(statusor).value(); DracoMesh *const unity_mesh = *mesh; unity_mesh->num_faces = 0; From 7a59a3e0ec91c72a9c0c6632e848226ea296cd9e Mon Sep 17 00:00:00 2001 From: camnewnham Date: Wed, 4 Aug 2021 16:20:05 +1000 Subject: [PATCH 36/71] Add is_point_cloud --- src/draco/unity/draco_unity_plugin.cc | 11 ++++++++++- src/draco/unity/draco_unity_plugin.h | 2 ++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/draco/unity/draco_unity_plugin.cc b/src/draco/unity/draco_unity_plugin.cc index 52332e22..4d3acb4c 100644 --- a/src/draco/unity/draco_unity_plugin.cc +++ b/src/draco/unity/draco_unity_plugin.cc @@ -288,6 +288,7 @@ int EXPORT_API DecodeDracoMeshStep1( unity_mesh->num_faces = in_mesh->num_faces(); unity_mesh->num_vertices = in_mesh->num_points(); unity_mesh->num_attributes = in_mesh->num_attributes(); + unity_mesh->is_point_cloud = false; unity_mesh->private_mesh = static_cast(in_mesh.release()); } else if (geom_type == draco::POINT_CLOUD) { @@ -301,12 +302,20 @@ int EXPORT_API DecodeDracoMeshStep1( unity_mesh->num_faces = 0; unity_mesh->num_vertices = in_cloud->num_points(); unity_mesh->num_attributes = in_cloud->num_attributes(); + unity_mesh->is_point_cloud = true; unity_mesh->private_mesh = static_cast(in_cloud.release()); } return 0; } int EXPORT_API DecodeDracoMeshStep2(DracoMesh **mesh,draco::Decoder* decoder, draco::DecoderBuffer* buffer) { + DracoMesh *const unity_mesh = *mesh; + if (unity_mesh->is_point_cloud) { + delete decoder; + delete buffer; + return 0; + } + auto status = decoder->DecodeMeshFromBufferStep2(); delete decoder; delete buffer; @@ -362,7 +371,7 @@ bool EXPORT_API GetAttributeByUniqueId(const DracoMesh *mesh, int unique_id, } bool EXPORT_API GetMeshIndices(const DracoMesh *mesh, DataType dataType, void* indices, uint32_t indicesCount, bool flip) { - if (mesh == nullptr || indices == nullptr) { + if (mesh == nullptr || indices == nullptr || mesh->is_point_cloud) { return false; } diff --git a/src/draco/unity/draco_unity_plugin.h b/src/draco/unity/draco_unity_plugin.h index 6e82112b..d661988b 100644 --- a/src/draco/unity/draco_unity_plugin.h +++ b/src/draco/unity/draco_unity_plugin.h @@ -64,11 +64,13 @@ struct EXPORT_API DracoMesh { : num_faces(0), num_vertices(0), num_attributes(0), + is_point_cloud(false), private_mesh(nullptr) {} int num_faces; int num_vertices; int num_attributes; + bool is_point_cloud; void *private_mesh; }; From 181d832db850fa029b3bcd7bf6d8c1e2f293db53 Mon Sep 17 00:00:00 2001 From: cam Date: Fri, 29 Apr 2022 16:58:13 +1000 Subject: [PATCH 37/71] default to edgebreaker encoding --- src/draco/unity/draco_unity_enc_plugin.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/draco/unity/draco_unity_enc_plugin.cc b/src/draco/unity/draco_unity_enc_plugin.cc index d4c282d3..b0b8b4a2 100644 --- a/src/draco/unity/draco_unity_enc_plugin.cc +++ b/src/draco/unity/draco_unity_enc_plugin.cc @@ -60,6 +60,8 @@ namespace draco { if (preserveTriangleOrder) { dracoEncoder.SetEncodingMethod(draco::MESH_SEQUENTIAL_ENCODING); + } else { + dracoEncoder.SetEncodingMethod(draco::MESH_EDGEBREAKER_ENCODING); } auto encoderStatus = dracoEncoder.EncodeMeshToBuffer(encoder->mesh, &encoder->encoderBuffer); From ce78fca78b342445d4643557ee6b1641121f0b52 Mon Sep 17 00:00:00 2001 From: cam Date: Tue, 3 May 2022 12:13:23 +1000 Subject: [PATCH 38/71] add support for point cloud encoding --- src/draco/unity/draco_unity_enc_plugin.cc | 120 +++++++++++++++++----- src/draco/unity/draco_unity_enc_plugin.h | 34 ++++-- 2 files changed, 119 insertions(+), 35 deletions(-) diff --git a/src/draco/unity/draco_unity_enc_plugin.cc b/src/draco/unity/draco_unity_enc_plugin.cc index b0b8b4a2..aaeec20b 100644 --- a/src/draco/unity/draco_unity_enc_plugin.cc +++ b/src/draco/unity/draco_unity_enc_plugin.cc @@ -21,11 +21,19 @@ namespace draco { - DracoEncoder * dracoEncoderCreate(uint32_t vertexCount) + DracoEncoder *dracoEncoderCreate(uint32_t vertexCount) { - DracoEncoder *encoder = new DracoEncoder; - encoder->mesh.set_num_points(vertexCount); - return encoder; + DracoMeshEncoder *encoder = new DracoMeshEncoder; + encoder->is_point_cloud = false; + encoder->mesh.set_num_points(vertexCount); + return encoder; + } + + DracoEncoder *dracoEncoderCreatePointCloud(uint32_t vertexCount) { + DracoPointsEncoder *encoder = new DracoPointsEncoder; + encoder->is_point_cloud = true; + encoder->mesh.set_num_points(vertexCount); + return encoder; } void dracoEncoderRelease(DracoEncoder *encoder) @@ -47,31 +55,64 @@ namespace draco { encoder->quantization.generic = generic; } - bool dracoEncoderEncode(DracoEncoder *encoder, uint8_t preserveTriangleOrder) + bool dracoEncoderEncode(DracoEncoder *encoder, uint8_t sequentialEncode) { - draco::Encoder dracoEncoder; - dracoEncoder.SetSpeedOptions(encoder->encodingSpeed, encoder->decodingSpeed); - dracoEncoder.SetAttributeQuantization(draco::GeometryAttribute::POSITION, encoder->quantization.position); - dracoEncoder.SetAttributeQuantization(draco::GeometryAttribute::NORMAL, encoder->quantization.normal); - dracoEncoder.SetAttributeQuantization(draco::GeometryAttribute::TEX_COORD, encoder->quantization.uv); - dracoEncoder.SetAttributeQuantization(draco::GeometryAttribute::COLOR, encoder->quantization.color); - dracoEncoder.SetAttributeQuantization(draco::GeometryAttribute::GENERIC, encoder->quantization.generic); - dracoEncoder.SetTrackEncodedProperties(true); - - if (preserveTriangleOrder) { - dracoEncoder.SetEncodingMethod(draco::MESH_SEQUENTIAL_ENCODING); + if (encoder->is_point_cloud) { + return dracoEncode((DracoPointsEncoder *)encoder, sequentialEncode); + } else { + return dracoEncode((DracoMeshEncoder *)encoder, sequentialEncode); + } + } + + template + bool dracoEncode(T *encoderT, uint8_t sequentialEncode) { + auto encoder = (DracoEncoder *)encoderT; + draco::Encoder dracoEncoder; + dracoEncoder.SetSpeedOptions(encoder->encodingSpeed, + encoder->decodingSpeed); + dracoEncoder.SetAttributeQuantization(draco::GeometryAttribute::POSITION, + encoder->quantization.position); + dracoEncoder.SetAttributeQuantization(draco::GeometryAttribute::NORMAL, + encoder->quantization.normal); + dracoEncoder.SetAttributeQuantization(draco::GeometryAttribute::TEX_COORD, + encoder->quantization.uv); + dracoEncoder.SetAttributeQuantization(draco::GeometryAttribute::COLOR, + encoder->quantization.color); + dracoEncoder.SetAttributeQuantization(draco::GeometryAttribute::GENERIC, + encoder->quantization.generic); + dracoEncoder.SetTrackEncodedProperties(true); + + draco::Status encodeStatus; + + if (encoder->is_point_cloud) { + if (sequentialEncode) { + dracoEncoder.SetEncodingMethod(draco::POINT_CLOUD_SEQUENTIAL_ENCODING); } else { - dracoEncoder.SetEncodingMethod(draco::MESH_EDGEBREAKER_ENCODING); + dracoEncoder.SetEncodingMethod(draco::POINT_CLOUD_KD_TREE_ENCODING); } - - auto encoderStatus = dracoEncoder.EncodeMeshToBuffer(encoder->mesh, &encoder->encoderBuffer); - if (encoderStatus.ok()) { - encoder->encodedVertices = static_cast(dracoEncoder.num_encoded_points()); - encoder->encodedIndices = static_cast(dracoEncoder.num_encoded_faces() * 3); - return true; + + encodeStatus = dracoEncoder.EncodePointCloudToBuffer( + ((DracoPointsEncoder *)encoder)->mesh, &encoder->encoderBuffer); + } else { + if (sequentialEncode) { + dracoEncoder.SetEncodingMethod(draco::MESH_SEQUENTIAL_ENCODING); } else { - return false; + dracoEncoder.SetEncodingMethod(draco::MESH_EDGEBREAKER_ENCODING); } + + encodeStatus = dracoEncoder.EncodeMeshToBuffer( + ((DracoMeshEncoder *)encoder)->mesh, &encoder->encoderBuffer); + } + + if (encodeStatus.ok()) { + encoder->encodedVertices = + static_cast(dracoEncoder.num_encoded_points()); + encoder->encodedIndices = + static_cast(dracoEncoder.num_encoded_faces() * 3); + return true; + } else { + return false; + } } uint32_t dracoEncoderGetEncodedVertexCount(DracoEncoder *encoder) @@ -94,7 +135,7 @@ namespace draco { memcpy(data, encoder->encoderBuffer.data(), encoder->encoderBuffer.size()); } - bool dracoEncodeIndices(DracoEncoder *encoder, uint32_t indexCount, DataType indexType, void *indices) + bool dracoEncodeIndices(DracoMeshEncoder *encoder, uint32_t indexCount, DataType indexType, void *indices) { switch (indexType) { @@ -112,7 +153,7 @@ namespace draco { } template - void dracoEncodeIndices(DracoEncoder *encoder, uint32_t indexCount, T *indices) + void dracoEncodeIndices(DracoMeshEncoder *encoder, uint32_t indexCount, T *indices) { int face_count = indexCount / 3; encoder->mesh.SetNumFaces(static_cast(face_count)); @@ -129,7 +170,7 @@ namespace draco { } } - bool dracoEncoderSetIndices(DracoEncoder *encoder, DataType indexComponentType, uint32_t indexCount, void *indices) + bool dracoEncoderSetIndices(DracoMeshEncoder *encoder, DataType indexComponentType, uint32_t indexCount, void *indices) { switch (indexComponentType) { @@ -154,7 +195,30 @@ namespace draco { return true; } - uint32_t dracoEncoderSetAttribute(DracoEncoder *encoder, GeometryAttribute::Type attributeType, draco::DataType dracoDataType, int32_t componentCount, int32_t stride, void *data) + + uint32_t dracoEncoderSetAttribute(DracoEncoder *encoder, + GeometryAttribute::Type attributeType, + draco::DataType dracoDataType, + int32_t componentCount, int32_t stride, + void *data) { + if (encoder->is_point_cloud) { + return dracoSetAttribute( + (DracoPointsEncoder*)encoder, attributeType, dracoDataType, + componentCount, stride, data); + } else { + return dracoSetAttribute((DracoMeshEncoder *)encoder, attributeType, + dracoDataType, + componentCount, stride, data); + } + + } + + template + uint32_t dracoSetAttribute(T *encoder, + GeometryAttribute::Type attributeType, + draco::DataType dracoDataType, + int32_t componentCount, int32_t stride, + void *data) { auto buffer = std::unique_ptr( new draco::DataBuffer()); uint32_t count = encoder->mesh.num_points(); diff --git a/src/draco/unity/draco_unity_enc_plugin.h b/src/draco/unity/draco_unity_enc_plugin.h index 7c1072df..66571d48 100644 --- a/src/draco/unity/draco_unity_enc_plugin.h +++ b/src/draco/unity/draco_unity_enc_plugin.h @@ -36,7 +36,6 @@ namespace draco { struct DracoEncoder { - draco::Mesh mesh; uint32_t encodedVertices; uint32_t encodedIndices; std::vector> buffers; @@ -52,14 +51,34 @@ namespace draco { uint32_t color = 10; uint32_t generic = 12; } quantization; + bool is_point_cloud; + }; + + struct DracoMeshEncoder : DracoEncoder { + draco::Mesh mesh; + }; + + struct DracoPointsEncoder : DracoEncoder { + draco::PointCloud mesh; }; template - void dracoEncodeIndices(DracoEncoder *encoder, uint32_t indexCount, T *indices); + void dracoEncodeIndices(DracoMeshEncoder *encoder, uint32_t indexCount, + T *indices); + template + uint32_t dracoSetAttribute(T *encoder, GeometryAttribute::Type attributeType, + draco::DataType dracoDataType, + int32_t componentCount, int32_t stride, + void *data); + + template + bool dracoEncode(T *encoder, uint8_t sequentialEncode); + extern "C" { - EXPORT_API DracoEncoder * dracoEncoderCreate(uint32_t vertexCount); + EXPORT_API DracoEncoder *dracoEncoderCreate(uint32_t vertexCount); + EXPORT_API DracoEncoder *dracoEncoderCreatePointCloud(uint32_t pointCount); void EXPORT_API dracoEncoderRelease(DracoEncoder *encoder); void EXPORT_API dracoEncoderSetCompressionSpeed(DracoEncoder *encoder, uint32_t encodingSpeed, uint32_t decodingSpeed); void EXPORT_API dracoEncoderSetQuantizationBits(DracoEncoder *encoder, uint32_t position, uint32_t normal, uint32_t uv, uint32_t color, uint32_t generic); @@ -68,10 +87,11 @@ extern "C" { uint32_t EXPORT_API dracoEncoderGetEncodedIndexCount(DracoEncoder *encoder); uint64_t EXPORT_API dracoEncoderGetByteLength(DracoEncoder *encoder); void EXPORT_API dracoEncoderCopy(DracoEncoder *encoder, uint8_t *data); - bool EXPORT_API dracoEncoderSetIndices(DracoEncoder *encoder, DataType indexComponentType, uint32_t indexCount, void *indices); - uint32_t EXPORT_API dracoEncoderSetAttribute(DracoEncoder *encoder, GeometryAttribute::Type attributeType, draco::DataType dracoDataType, int32_t componentCount, int32_t stride, void *data); - -} // extern "C" + bool EXPORT_API dracoEncoderSetIndices(DracoMeshEncoder *encoder, + DataType indexComponentType, + uint32_t indexCount, void *indices); + uint32_t EXPORT_API dracoEncoderSetAttribute(DracoEncoder *encoder, GeometryAttribute::Type attributeType, draco::DataType dracoDataType, int32_t componentCount, int32_t stride, void *data); + } // extern "C" } // namespace draco From 1b565b6cbed8a8136962f492ed2b3b1afe270725 Mon Sep 17 00:00:00 2001 From: cam Date: Wed, 4 May 2022 12:05:33 +1000 Subject: [PATCH 39/71] add support for overriding component count (padding color attributes) --- src/draco/unity/draco_unity_plugin.cc | 45 +++++++++++++-------------- src/draco/unity/draco_unity_plugin.h | 2 +- 2 files changed, 22 insertions(+), 25 deletions(-) diff --git a/src/draco/unity/draco_unity_plugin.cc b/src/draco/unity/draco_unity_plugin.cc index 4d3acb4c..4378e8aa 100644 --- a/src/draco/unity/draco_unity_plugin.cc +++ b/src/draco/unity/draco_unity_plugin.cc @@ -31,29 +31,25 @@ draco::DracoAttribute *CreateDracoAttribute(const draco::PointAttribute *attr) { // Returns the attribute data in |attr| as an array of type T. template -T *CopyAttributeData(int num_points, const draco::PointAttribute *attr) { +T *CopyAttributeData(int num_points, const draco::PointAttribute *attr, int component_stride) { const int num_components = attr->num_components(); - T *const data = new T[num_points * num_components]; + T *const data = new T[num_points * component_stride]; for (draco::PointIndex i(0); i < num_points; ++i) { const draco::AttributeValueIndex val_index = attr->mapped_index(i); bool got_data = false; switch (num_components) { case 1: - got_data = attr->ConvertValue(val_index, - data + i.value() * num_components); + got_data = attr->ConvertValue(val_index, data + i.value() * component_stride); break; case 2: - got_data = attr->ConvertValue(val_index, - data + i.value() * num_components); + got_data = attr->ConvertValue(val_index, data + i.value() * component_stride); break; case 3: - got_data = attr->ConvertValue(val_index, - data + i.value() * num_components); + got_data = attr->ConvertValue(val_index, data + i.value() * component_stride); break; case 4: - got_data = attr->ConvertValue(val_index, - data + i.value() * num_components); + got_data = attr->ConvertValue(val_index, data + i.value() * component_stride); break; default: break; @@ -69,14 +65,14 @@ T *CopyAttributeData(int num_points, const draco::PointAttribute *attr) { // Returns the attribute data in |attr| as an array of type T. template -T *CopyAttributeDataFlipped(int num_points, const draco::PointAttribute *attr) { +T *CopyAttributeDataFlipped(int num_points, const draco::PointAttribute *attr, int component_stride) { const int num_components = attr->num_components(); - T *const data = new T[num_points * num_components]; + T *const data = new T[num_points * component_stride]; for (draco::PointIndex i(0); i < num_points; ++i) { const draco::AttributeValueIndex val_index = attr->mapped_index(i); bool got_data = false; - T* outPtr = data + i.value() * num_components; + T *outPtr = data + i.value() * component_stride; switch (num_components) { case 1: got_data = attr->ConvertValue(val_index,outPtr); @@ -110,22 +106,23 @@ T *CopyAttributeDataFlipped(int num_points, const draco::PointAttribute *attr) { } // Returns the attribute data in |attr| as an array of void*. -void *ConvertAttributeData(int num_points, const draco::PointAttribute *attr, bool flip) { +void *ConvertAttributeData(int num_points, const draco::PointAttribute *attr, + bool flip, int component_stride) { switch (attr->data_type()) { case draco::DataType::DT_INT8: - return static_cast(flip ? CopyAttributeDataFlipped(num_points, attr) : CopyAttributeData(num_points, attr)); + return static_cast(flip ? CopyAttributeDataFlipped(num_points, attr, component_stride) : CopyAttributeData(num_points, attr, component_stride)); case draco::DataType::DT_UINT8: - return static_cast(flip ? CopyAttributeDataFlipped(num_points, attr) : CopyAttributeData(num_points, attr)); + return static_cast(flip ? CopyAttributeDataFlipped(num_points, attr, component_stride) : CopyAttributeData(num_points, attr, component_stride)); case draco::DataType::DT_INT16: - return static_cast(flip ? CopyAttributeDataFlipped(num_points, attr) : CopyAttributeData(num_points, attr)); + return static_cast(flip ? CopyAttributeDataFlipped(num_points, attr, component_stride) : CopyAttributeData(num_points, attr, component_stride)); case draco::DataType::DT_UINT16: - return static_cast(flip ? CopyAttributeDataFlipped(num_points, attr) : CopyAttributeData(num_points, attr)); + return static_cast(flip ? CopyAttributeDataFlipped(num_points, attr, component_stride) : CopyAttributeData(num_points, attr, component_stride)); case draco::DataType::DT_INT32: - return static_cast(flip ? CopyAttributeDataFlipped(num_points, attr) : CopyAttributeData(num_points, attr)); + return static_cast(flip ? CopyAttributeDataFlipped(num_points, attr, component_stride) : CopyAttributeData(num_points, attr, component_stride)); case draco::DataType::DT_UINT32: - return static_cast(flip ? CopyAttributeDataFlipped(num_points, attr) : CopyAttributeData(num_points, attr)); + return static_cast(flip ? CopyAttributeDataFlipped(num_points, attr, component_stride) : CopyAttributeData(num_points, attr, component_stride)); case draco::DataType::DT_FLOAT32: - return static_cast(flip ? CopyAttributeDataFlipped(num_points, attr) : CopyAttributeData(num_points, attr)); + return static_cast(flip ? CopyAttributeDataFlipped(num_points, attr, component_stride) : CopyAttributeData(num_points, attr, component_stride)); default: return nullptr; } @@ -294,7 +291,7 @@ int EXPORT_API DecodeDracoMeshStep1( } else if (geom_type == draco::POINT_CLOUD) { auto statusor = (*decoder)->DecodePointCloudFromBuffer(*buffer); if (!statusor.ok()) { - return -4; + return -5; } std::unique_ptr in_cloud = std::move(statusor).value(); @@ -390,7 +387,7 @@ bool EXPORT_API GetMeshIndices(const DracoMesh *mesh, DataType dataType, void* i bool EXPORT_API GetAttributeData(const DracoMesh *mesh, const DracoAttribute *attribute, - DracoData **data, bool flip) { + DracoData **data, bool flip,int stride) { if (mesh == nullptr || data == nullptr || *data != nullptr) { return false; } @@ -398,7 +395,7 @@ bool EXPORT_API GetAttributeData(const DracoMesh *mesh, const PointAttribute *const attr = static_cast(attribute->private_attribute); - void *temp_data = ConvertAttributeData(m->num_points(), attr, flip); + void *temp_data = ConvertAttributeData(m->num_points(), attr, flip, stride); if (temp_data == nullptr) { return false; } diff --git a/src/draco/unity/draco_unity_plugin.h b/src/draco/unity/draco_unity_plugin.h index d661988b..55f6560e 100644 --- a/src/draco/unity/draco_unity_plugin.h +++ b/src/draco/unity/draco_unity_plugin.h @@ -113,7 +113,7 @@ bool EXPORT_API GetMeshIndices(const DracoMesh *mesh, DataType dataType, void* i // with ReleaseDracoData. bool EXPORT_API GetAttributeData(const DracoMesh *mesh, const DracoAttribute *attribute, - DracoData **data, bool flip); + DracoData **data, bool flip, int component_stride); // DracoToUnityMesh is deprecated. struct EXPORT_API DracoToUnityMesh { From 1a9465e441553f2f5b0b9cf293f7d9fcdb37da58 Mon Sep 17 00:00:00 2001 From: Andreas Atteneder Date: Wed, 25 Jan 2023 11:12:14 +0100 Subject: [PATCH 40/71] chore: Build parameter was renamed --- .github/workflows/unity.yml | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/unity.yml b/.github/workflows/unity.yml index e7de679f..1b56887e 100644 --- a/.github/workflows/unity.yml +++ b/.github/workflows/unity.yml @@ -42,7 +42,7 @@ jobs: -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" -DDRACO_UNITY_PLUGIN=ON - -DDRACO_GLTF=ON + -DDRACO_GLTF_BITSTREAM=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF - name: build_mac_dracodec_unity run: cmake --build build_mac --config MinSizeRel --target dracodec_unity @@ -57,7 +57,7 @@ jobs: -DCMAKE_OSX_ARCHITECTURES=armv7\;armv7s\;arm64 -DCMAKE_OSX_DEPLOYMENT_TARGET=10.0 -DDRACO_UNITY_PLUGIN=ON - -DDRACO_GLTF=ON + -DDRACO_GLTF_BITSTREAM=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF - name: build_ios run: cmake --build build_ios --config MinSizeRel --target dracodec_unity @@ -88,7 +88,7 @@ jobs: run: > cmake . -G "Visual Studio 16 2019" -A x64 -B build_win_64 -DDRACO_UNITY_PLUGIN=ON - -DDRACO_GLTF=ON + -DDRACO_GLTF_BITSTREAM=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF - name: build_win64_dracodec_unity run: > @@ -105,7 +105,7 @@ jobs: run: > cmake . -G "Visual Studio 16 2019" -A Win32 -B build_win_32 -DDRACO_UNITY_PLUGIN=ON - -DDRACO_GLTF=ON + -DDRACO_GLTF_BITSTREAM=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF - name: build_win32 run: cmake --build build_win_32 --config MinSizeRel --target dracodec_unity @@ -115,7 +115,7 @@ jobs: run: > cmake . -G "Visual Studio 16 2019" -A ARM -B build_uwp_arm -DDRACO_UNITY_PLUGIN=ON - -DDRACO_GLTF=ON + -DDRACO_GLTF_BITSTREAM=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF -DCMAKE_SYSTEM_NAME:String=WindowsStore -DCMAKE_SYSTEM_VERSION:String="10.0" @@ -129,7 +129,7 @@ jobs: run: > cmake . -G "Visual Studio 16 2019" -A ARM64 -B build_uwp_arm64 -DDRACO_UNITY_PLUGIN=ON - -DDRACO_GLTF=ON + -DDRACO_GLTF_BITSTREAM=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF -DCMAKE_SYSTEM_NAME:String=WindowsStore -DCMAKE_SYSTEM_VERSION:String="10.0" @@ -143,7 +143,7 @@ jobs: run: > cmake . -G "Visual Studio 16 2019" -A Win32 -B build_uwp_x86 -DDRACO_UNITY_PLUGIN=ON - -DDRACO_GLTF=ON + -DDRACO_GLTF_BITSTREAM=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF -DCMAKE_SYSTEM_NAME:String=WindowsStore -DCMAKE_SYSTEM_VERSION:String="10.0" @@ -157,7 +157,7 @@ jobs: run: > cmake . -G "Visual Studio 16 2019" -A x64 -B build_uwp_x64 -DDRACO_UNITY_PLUGIN=ON - -DDRACO_GLTF=ON + -DDRACO_GLTF_BITSTREAM=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF -DCMAKE_SYSTEM_NAME:String=WindowsStore -DCMAKE_SYSTEM_VERSION:String="10.0" @@ -218,7 +218,7 @@ jobs: -DANDROID_NDK=${{ steps.setup-ndk.outputs.ndk-path }} -DCMAKE_TOOLCHAIN_FILE="${{ steps.setup-ndk.outputs.ndk-path }}/build/cmake/android.toolchain.cmake" -DDRACO_UNITY_PLUGIN=ON - -DDRACO_GLTF=ON + -DDRACO_GLTF_BITSTREAM=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF - name: build_android_arm64-v8a run: cmake --build build_android_arm64-v8a --target dracodec_unity -j @@ -230,7 +230,7 @@ jobs: -DANDROID_NDK=${{ steps.setup-ndk.outputs.ndk-path }} -DCMAKE_TOOLCHAIN_FILE="${{ steps.setup-ndk.outputs.ndk-path }}/build/cmake/android.toolchain.cmake" -DDRACO_UNITY_PLUGIN=ON - -DDRACO_GLTF=ON + -DDRACO_GLTF_BITSTREAM=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF - name: build_android_armeabi-v7a run: cmake --build build_android_armeabi-v7a --target dracodec_unity -j @@ -243,7 +243,7 @@ jobs: -DANDROID_NDK=${{ steps.setup-ndk.outputs.ndk-path }} -DCMAKE_TOOLCHAIN_FILE="${{ steps.setup-ndk.outputs.ndk-path }}/build/cmake/android.toolchain.cmake" -DDRACO_UNITY_PLUGIN=ON - -DDRACO_GLTF=ON + -DDRACO_GLTF_BITSTREAM=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF - name: build_android_x86 run: cmake --build build_android_x86 --target dracodec_unity -j @@ -260,7 +260,7 @@ jobs: -DCMAKE_BUILD_TYPE=MinSizeRel -DDRACO_JS_GLUE=OFF -DDRACO_UNITY_PLUGIN=ON - -DDRACO_GLTF=ON + -DDRACO_GLTF_BITSTREAM=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF - name: build WebAssembly run: cmake --build build_web --target dracodec_unity -j @@ -308,7 +308,7 @@ jobs: cmake . -G Ninja -B build_linux_64 -DCMAKE_BUILD_TYPE=MinSizeRel -DDRACO_UNITY_PLUGIN=ON - -DDRACO_GLTF=ON + -DDRACO_GLTF_BITSTREAM=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF - name: build_linux64_dracodec_unity run: cmake --build build_linux_64 --target dracodec_unity -j @@ -328,7 +328,7 @@ jobs: -DEMSCRIPTEN_GENERATE_BITCODE_STATIC_LIBRARIES=1 -DDRACO_JS_GLUE=OFF -DDRACO_UNITY_PLUGIN=ON - -DDRACO_GLTF=ON + -DDRACO_GLTF_BITSTREAM=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF - name: build WebAssembly legacy run: cmake --build build_web_legacy --target dracodec_unity -j From eeaacc1c25109da80c33ffa301bed8848749880e Mon Sep 17 00:00:00 2001 From: Andreas Atteneder Date: Wed, 25 Jan 2023 11:20:36 +0100 Subject: [PATCH 41/71] feat: Another Emscripten build (version 3.1.8) fix: Explicit OS versions fix inadvertent upgrade issues fix: Using updated versions of actions to avoid warning about using deprecated Node 12 (see https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/) fix: Legacy Emscripten fastcomp build with an alternative emscripten action --- .github/workflows/unity.yml | 119 +++++++++++++++++++++++++----------- 1 file changed, 83 insertions(+), 36 deletions(-) diff --git a/.github/workflows/unity.yml b/.github/workflows/unity.yml index 1b56887e..6eabe43a 100644 --- a/.github/workflows/unity.yml +++ b/.github/workflows/unity.yml @@ -13,21 +13,24 @@ on: workflow_dispatch: env: - # Emscripten version that comes with Unity 2021.2 - EM_VERSION: 2.0.19 - EM_CACHE_FOLDER: 'emsdk-cache' + # Emscripten version for Unity 2022.2 or newer + EM_3_VERSION: 3.1.8 + EM_3_CACHE_FOLDER: 'emsdk-cache' + # Emscripten version for Unity 2021.2 and 2021.3 + EM_2_VERSION: 2.0.19 + EM_2_CACHE_FOLDER: 'emsdk-cache' # Emscripten version that comes with older Unity versions - EM_LEGACY_VERSION: 1.38.48-fastcomp - EM_LEGACY_CACHE_FOLDER: 'emsdk-legacy-cache' + EM_1_VERSION: 1.38.48-fastcomp + EM_1_CACHE_FOLDER: 'emsdk-legacy-cache' jobs: mac: - runs-on: macOS-latest + runs-on: macOS-11 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: maxim-lobanov/setup-xcode@v1 with: @@ -71,7 +74,7 @@ jobs: mkdir draco_apple/iOS mv build_ios/MinSizeRel-iphoneos/libdracodec_unity.a draco_apple/iOS - name: upload artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: draco_apple path: draco_apple @@ -79,10 +82,10 @@ jobs: windows: - runs-on: windows-latest + runs-on: windows-2019 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: configure_win64 run: > @@ -183,7 +186,7 @@ jobs: mv build_uwp_x86\MinSizeRel\dracodec_unity.dll draco_win/WSA/x86 mv build_uwp_x64\MinSizeRel\dracodec_unity.dll draco_win/WSA/x64 - name: upload artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: draco_win path: draco_win @@ -194,13 +197,13 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Setup cache id: cache-system-libraries - uses: actions/cache@v2 + uses: actions/cache@v3 with: - path: ${{env.EM_CACHE_FOLDER}} - key: ${{env.EM_VERSION}}-${{ runner.os }} + path: ${{env.EM_2_CACHE_FOLDER}} + key: ${{env.EM_2_VERSION}}-${{ runner.os }} - uses: seanmiddleditch/gha-setup-ninja@v3 # Android @@ -250,10 +253,10 @@ jobs: # Emscripten - name: setup Emscripten - uses: mymindstorm/setup-emsdk@v10 + uses: mymindstorm/setup-emsdk@v12 with: - version: ${{env.EM_VERSION}} - actions-cache-folder: ${{env.EM_CACHE_FOLDER}} + version: ${{env.EM_2_VERSION}} + actions-cache-folder: ${{env.EM_2_CACHE_FOLDER}} - name: configure WebAssembly run: > emcmake cmake -B build_web @@ -280,23 +283,66 @@ jobs: mv build_android_x86/libdracodec_unity.so \ draco_linux/Android/libs/x86 - name: upload artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: draco_linux path: draco_linux + + linux_emscripten_3: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Setup cache + id: cache-system-libraries + uses: actions/cache@v3 + with: + path: ${{env.EM_3_CACHE_FOLDER}} + key: ${{env.EM_3_VERSION}}-${{ runner.os }} + + # Emscripten 3 + - name: setup Emscripten + uses: mymindstorm/setup-emsdk@v12 + with: + version: ${{env.EM_3_VERSION}} + actions-cache-folder: ${{env.EM_3_CACHE_FOLDER}} + - name: configure WebAssembly + run: > + EMSCRIPTEN="$EMSDK/upstream/emscripten" emcmake cmake -B build_web + -DCMAKE_BUILD_TYPE=MinSizeRel + -DDRACO_JS_GLUE=OFF + -DDRACO_UNITY_PLUGIN=ON + -DDRACO_GLTF=ON + -DDRACO_BACKWARDS_COMPATIBILITY=OFF + - name: build WebAssembly + run: cmake --build build_web --target dracodec_unity -j + + # Artifacts + - name: package + run: | + mkdir -p draco_emscripten_3/WebGL + mv build_web/libdracodec_unity.a draco_emscripten_3/WebGL/libdracodec_unity_3.a + - name: upload artifact + uses: actions/upload-artifact@v3 + with: + name: draco_emscripten_3 + path: draco_emscripten_3 + + linux_legacy: runs-on: ubuntu-18.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Setup cache id: cache-system-libraries - uses: actions/cache@v2 + uses: actions/cache@v3 with: - path: ${{env.EM_LEGACY_CACHE_FOLDER}} - key: ${{env.EM_LEGACY_VERSION}}-${{ runner.os }} + path: ${{env.EM_1_CACHE_FOLDER}} + key: ${{env.EM_1_VERSION}}-${{ runner.os }} # CMake that comes with Ubuntu 18.04 is too old, so install a recent version here - name: Get latest CMake and ninja @@ -315,23 +361,22 @@ jobs: - name: build_linux64_dracoenc_unity run: cmake --build build_linux_64 --target dracoenc_unity -j - # Emscripten legacy - - name: setup Emscripten legacy - uses: mymindstorm/setup-emsdk@v10 + # Emscripten 1 + - name: setup Emscripten 1 + uses: numworks/setup-emscripten@latest with: - version: ${{env.EM_LEGACY_VERSION}} - actions-cache-folder: ${{env.EM_LEGACY_CACHE_FOLDER}} - - name: configure WebAssembly legacy + sdk: ${{env.EM_1_VERSION}} + - name: configure WebAssembly 1 run: > - emcmake cmake -B build_web_legacy + emcmake cmake -B build_web_1 -DCMAKE_BUILD_TYPE=MinSizeRel -DEMSCRIPTEN_GENERATE_BITCODE_STATIC_LIBRARIES=1 -DDRACO_JS_GLUE=OFF -DDRACO_UNITY_PLUGIN=ON -DDRACO_GLTF_BITSTREAM=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF - - name: build WebAssembly legacy - run: cmake --build build_web_legacy --target dracodec_unity -j + - name: build WebAssembly 1 + run: cmake --build build_web_1 --target dracodec_unity -j # Linux legacy artifacts - name: package Linux legacy @@ -340,9 +385,9 @@ jobs: mv build_linux_64/libdracodec_unity.so draco_linux_legacy/x86_64 mv build_linux_64/libdracoenc_unity.so draco_linux_legacy/x86_64 mkdir -p draco_linux_legacy/WebGL - mv build_web_legacy/libdracodec_unity.bc draco_linux_legacy/WebGL + mv build_web_1/libdracodec_unity.bc draco_linux_legacy/WebGL - name: upload artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: draco_linux_legacy path: draco_linux_legacy @@ -352,7 +397,7 @@ jobs: combine: name: combine artifacts runs-on: ubuntu-latest - needs: [mac, windows, linux, linux_legacy] + needs: [mac, windows, linux, linux_legacy, linux_emscripten_3] steps: - name: download artifacts uses: actions/download-artifact@v2 @@ -368,6 +413,7 @@ jobs: cp -r artifacts/draco_win/* draco cp -r artifacts/draco_linux/* draco cp -r artifacts/draco_linux_legacy/* draco + cp -r artifacts/draco_emscripten_3/* draco - name: zip run: zip -r draco.zip draco - name: upload release assets @@ -377,7 +423,7 @@ jobs: files: draco.zip repo-token: ${{ secrets.GITHUB_TOKEN }} - name: upload artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: draco path: draco @@ -389,3 +435,4 @@ jobs: draco_win draco_linux draco_linux_legacy + draco_emscripten_3 From fad779744b29e9cf4d5180ce861a06ddd7a41d41 Mon Sep 17 00:00:00 2001 From: camnewnham Date: Mon, 11 Jul 2022 13:33:10 +1000 Subject: [PATCH 42/71] Add builds for dracoenc_unity for all platforms --- .github/workflows/unity.yml | 67 +++++++++++++++++++++++++++---------- 1 file changed, 50 insertions(+), 17 deletions(-) diff --git a/.github/workflows/unity.yml b/.github/workflows/unity.yml index 6eabe43a..b3462a2d 100644 --- a/.github/workflows/unity.yml +++ b/.github/workflows/unity.yml @@ -62,9 +62,11 @@ jobs: -DDRACO_UNITY_PLUGIN=ON -DDRACO_GLTF_BITSTREAM=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF - - name: build_ios + - name: build_ios_dracodec_unity run: cmake --build build_ios --config MinSizeRel --target dracodec_unity - + - name: build_ios_dracoenc_unity + run: cmake --build build_ios --config MinSizeRel --target dracoenc_unity + - name: package Apple run: | mkdir draco_apple @@ -110,8 +112,10 @@ jobs: -DDRACO_UNITY_PLUGIN=ON -DDRACO_GLTF_BITSTREAM=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF - - name: build_win32 + - name: build_win32_dracodec_unity run: cmake --build build_win_32 --config MinSizeRel --target dracodec_unity + - name: build_win32_dracoenc_unity + run: cmake --build build_win_32 --config MinSizeRel --target dracoenc_unity # Universal Windows Platform - name: configure_uwp_arm @@ -122,12 +126,17 @@ jobs: -DDRACO_BACKWARDS_COMPATIBILITY=OFF -DCMAKE_SYSTEM_NAME:String=WindowsStore -DCMAKE_SYSTEM_VERSION:String="10.0" - - name: build_uwp_arm + - name: build_uwp_arm_dracodec_unity run: > cmake --build build_uwp_arm --config MinSizeRel --target dracodec_unity - + - name: build_uwp_arm_dracoenc_unity + run: > + cmake --build build_uwp_arm + --config MinSizeRel + --target dracoenc_unity + - name: configure_uwp_arm64 run: > cmake . -G "Visual Studio 16 2019" -A ARM64 -B build_uwp_arm64 @@ -136,11 +145,16 @@ jobs: -DDRACO_BACKWARDS_COMPATIBILITY=OFF -DCMAKE_SYSTEM_NAME:String=WindowsStore -DCMAKE_SYSTEM_VERSION:String="10.0" - - name: build_uwp_arm64 + - name: build_uwp_arm64_dracodec_unity run: > cmake --build build_uwp_arm64 --config MinSizeRel --target dracodec_unity + - name: build_uwp_arm64_dracoenc_unity + run: > + cmake --build build_uwp_arm64 + --config MinSizeRel + --target dracoenc_unity - name: configure_uwp_x86 run: > @@ -150,12 +164,17 @@ jobs: -DDRACO_BACKWARDS_COMPATIBILITY=OFF -DCMAKE_SYSTEM_NAME:String=WindowsStore -DCMAKE_SYSTEM_VERSION:String="10.0" - - name: build_uwp_x86 + - name: build_uwp_x86_dracodec_unity run: > cmake --build build_uwp_x86 --config MinSizeRel --target dracodec_unity - + - name: build_uwp_x86_dracoenc_unity + run: > + cmake --build build_uwp_x86 + --config MinSizeRel + --target dracoenc_unity + - name: configure_uwp_x64 run: > cmake . -G "Visual Studio 16 2019" -A x64 -B build_uwp_x64 @@ -164,12 +183,17 @@ jobs: -DDRACO_BACKWARDS_COMPATIBILITY=OFF -DCMAKE_SYSTEM_NAME:String=WindowsStore -DCMAKE_SYSTEM_VERSION:String="10.0" - - name: build_uwp_x64 + - name: build_uwp_x64_dracodec_unity run: > cmake --build build_uwp_x64 --config MinSizeRel --target dracodec_unity - + - name: build_uwp_x64_dracoenc_unity + run: > + cmake --build build_uwp_x64 + --config MinSizeRel + --target dracoenc_unity + - name: package Windows run: | mkdir draco_win/x86 @@ -223,9 +247,11 @@ jobs: -DDRACO_UNITY_PLUGIN=ON -DDRACO_GLTF_BITSTREAM=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF - - name: build_android_arm64-v8a + - name: build_android_arm64-v8a_dracodec_unity run: cmake --build build_android_arm64-v8a --target dracodec_unity -j - + - name: build_android_arm64-v8a_dracoenc_unity + run: cmake --build build_android_arm64-v8a --target dracoenc_unity -j + - name: configure_android_armeabi-v7a run: > cmake -B build_android_armeabi-v7a -DANDROID_ABI=armeabi-v7a @@ -235,8 +261,10 @@ jobs: -DDRACO_UNITY_PLUGIN=ON -DDRACO_GLTF_BITSTREAM=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF - - name: build_android_armeabi-v7a + - name: build_android_armeabi-v7a_dracodec_unity run: cmake --build build_android_armeabi-v7a --target dracodec_unity -j + - name: build_android_armeabi-v7a_dracoenc_unity + run: cmake --build build_android_armeabi-v7a --target dracoenc_unity -j - name: configure_android_x86 run: > @@ -248,8 +276,10 @@ jobs: -DDRACO_UNITY_PLUGIN=ON -DDRACO_GLTF_BITSTREAM=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF - - name: build_android_x86 + - name: build_android_x86_dracodec_unity run: cmake --build build_android_x86 --target dracodec_unity -j + - name: build_android_x86_dracoenc_unity + run: cmake --build build_android_x86 --target dracoenc_unity -j # Emscripten - name: setup Emscripten @@ -265,8 +295,10 @@ jobs: -DDRACO_UNITY_PLUGIN=ON -DDRACO_GLTF_BITSTREAM=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF - - name: build WebAssembly + - name: build_webassembly_dracodec_unity run: cmake --build build_web --target dracodec_unity -j + - name: build_webassembly_dracoenc_unity + run: cmake --build build_web --target dracoenc_unity -j # Linux artifacts - name: package Linux @@ -375,9 +407,10 @@ jobs: -DDRACO_UNITY_PLUGIN=ON -DDRACO_GLTF_BITSTREAM=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF - - name: build WebAssembly 1 + - name: build_webassembly_1_dracodec_unity run: cmake --build build_web_1 --target dracodec_unity -j - + - name: build_webassembly_1_dracoenc_unity + run: cmake --build build_web_1 --target dracoenc_unity -j # Linux legacy artifacts - name: package Linux legacy run: | From f8edba60bff6326225d228486f23719592d7ba07 Mon Sep 17 00:00:00 2001 From: camnewnham Date: Mon, 11 Jul 2022 13:46:22 +1000 Subject: [PATCH 43/71] Update unity.yml update windows builds to use vs2022 --- .github/workflows/unity.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/unity.yml b/.github/workflows/unity.yml index b3462a2d..7a782f80 100644 --- a/.github/workflows/unity.yml +++ b/.github/workflows/unity.yml @@ -91,7 +91,7 @@ jobs: - name: configure_win64 run: > - cmake . -G "Visual Studio 16 2019" -A x64 -B build_win_64 + cmake . -G "Visual Studio 17 2022" -A x64 -B build_win_64 -DDRACO_UNITY_PLUGIN=ON -DDRACO_GLTF_BITSTREAM=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF @@ -120,7 +120,7 @@ jobs: # Universal Windows Platform - name: configure_uwp_arm run: > - cmake . -G "Visual Studio 16 2019" -A ARM -B build_uwp_arm + cmake . -G "Visual Studio 17 2022" -A ARM -B build_uwp_arm -DDRACO_UNITY_PLUGIN=ON -DDRACO_GLTF_BITSTREAM=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF @@ -139,7 +139,7 @@ jobs: - name: configure_uwp_arm64 run: > - cmake . -G "Visual Studio 16 2019" -A ARM64 -B build_uwp_arm64 + cmake . -G "Visual Studio 17 2022" -A ARM64 -B build_uwp_arm64 -DDRACO_UNITY_PLUGIN=ON -DDRACO_GLTF_BITSTREAM=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF @@ -158,7 +158,7 @@ jobs: - name: configure_uwp_x86 run: > - cmake . -G "Visual Studio 16 2019" -A Win32 -B build_uwp_x86 + cmake . -G "Visual Studio 17 2022" -A Win32 -B build_uwp_x86 -DDRACO_UNITY_PLUGIN=ON -DDRACO_GLTF_BITSTREAM=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF @@ -177,7 +177,7 @@ jobs: - name: configure_uwp_x64 run: > - cmake . -G "Visual Studio 16 2019" -A x64 -B build_uwp_x64 + cmake . -G "Visual Studio 17 2022" -A x64 -B build_uwp_x64 -DDRACO_UNITY_PLUGIN=ON -DDRACO_GLTF_BITSTREAM=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF From a6fef050aab6b3984ac451fc5df7eabf12b65e36 Mon Sep 17 00:00:00 2001 From: camnewnham Date: Mon, 11 Jul 2022 13:50:31 +1000 Subject: [PATCH 44/71] Update unity.yml --- .github/workflows/unity.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unity.yml b/.github/workflows/unity.yml index 7a782f80..6532cf3a 100644 --- a/.github/workflows/unity.yml +++ b/.github/workflows/unity.yml @@ -108,7 +108,7 @@ jobs: - name: configure_win32 run: > - cmake . -G "Visual Studio 16 2019" -A Win32 -B build_win_32 + cmake . -G "Visual Studio 17 2022" -A Win32 -B build_win_32 -DDRACO_UNITY_PLUGIN=ON -DDRACO_GLTF_BITSTREAM=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF From 6e72149ba2a3e2435ab28f024e9d043ced791c10 Mon Sep 17 00:00:00 2001 From: camnewnham Date: Mon, 11 Jul 2022 14:08:09 +1000 Subject: [PATCH 45/71] Update unity.yml --- .github/workflows/unity.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/unity.yml b/.github/workflows/unity.yml index 6532cf3a..0a03793c 100644 --- a/.github/workflows/unity.yml +++ b/.github/workflows/unity.yml @@ -75,6 +75,7 @@ jobs: mv build_mac/dracoenc_unity.bundle draco_apple/x86_64 mkdir draco_apple/iOS mv build_ios/MinSizeRel-iphoneos/libdracodec_unity.a draco_apple/iOS + mv build_ios/MinSizeRel-iphoneos/libdracoenc_unity.a draco_apple/iOS - name: upload artifact uses: actions/upload-artifact@v3 with: @@ -203,12 +204,17 @@ jobs: mkdir draco_win/WSA/x86 mkdir draco_win/WSA/x64 mv build_win_32\MinSizeRel\dracodec_unity.dll draco_win/x86 + mv build_win_32\MinSizeRel\dracoenc_unity.dll draco_win/x86 mv build_win_64\MinSizeRel\dracodec_unity.dll draco_win/x86_64 mv build_win_64\MinSizeRel\dracoenc_unity.dll draco_win/x86_64 mv build_uwp_arm\MinSizeRel\dracodec_unity.dll draco_win/WSA/ARM + mv build_uwp_arm\MinSizeRel\dracoenc_unity.dll draco_win/WSA/ARM mv build_uwp_arm64\MinSizeRel\dracodec_unity.dll draco_win/WSA/ARM64 + mv build_uwp_arm64\MinSizeRel\dracoenc_unity.dll draco_win/WSA/ARM64 mv build_uwp_x86\MinSizeRel\dracodec_unity.dll draco_win/WSA/x86 + mv build_uwp_x86\MinSizeRel\dracoenc_unity.dll draco_win/WSA/x86 mv build_uwp_x64\MinSizeRel\dracodec_unity.dll draco_win/WSA/x64 + mv build_uwp_x64\MinSizeRel\dracoenc_unity.dll draco_win/WSA/x64 - name: upload artifact uses: actions/upload-artifact@v3 with: @@ -310,10 +316,16 @@ jobs: mkdir -p draco_linux/Android/libs/x86 mv build_android_arm64-v8a/libdracodec_unity.so \ draco_linux/Android/libs/arm64-v8a + mv build_android_arm64-v8a/libdracoenc_unity.so \ + draco_linux/Android/libs/arm64-v8a mv build_android_armeabi-v7a/libdracodec_unity.so \ draco_linux/Android/libs/armeabi-v7a + mv build_android_armeabi-v7a/libdracoenc_unity.so \ + draco_linux/Android/libs/armeabi-v7a mv build_android_x86/libdracodec_unity.so \ draco_linux/Android/libs/x86 + mv build_android_x86/libdracoenc_unity.so \ + draco_linux/Android/libs/x86 - name: upload artifact uses: actions/upload-artifact@v3 with: @@ -418,7 +430,8 @@ jobs: mv build_linux_64/libdracodec_unity.so draco_linux_legacy/x86_64 mv build_linux_64/libdracoenc_unity.so draco_linux_legacy/x86_64 mkdir -p draco_linux_legacy/WebGL - mv build_web_1/libdracodec_unity.bc draco_linux_legacy/WebGL + mv build_web_1/libdracodec_unity.bc draco_linux_1/WebGL + mv build_web_1/libdracoenc_unity.bc draco_linux_1/WebGL - name: upload artifact uses: actions/upload-artifact@v3 with: From 7da92f6c118b9453f1b07e8bbeb17922b3140186 Mon Sep 17 00:00:00 2001 From: camnewnham Date: Tue, 12 Jul 2022 10:18:48 +1000 Subject: [PATCH 46/71] Update unity.yml --- .github/workflows/unity.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/unity.yml b/.github/workflows/unity.yml index 0a03793c..785f4201 100644 --- a/.github/workflows/unity.yml +++ b/.github/workflows/unity.yml @@ -311,6 +311,7 @@ jobs: run: | mkdir -p draco_linux/WebGL mv build_web/libdracodec_unity.a draco_linux/WebGL + mv build_web/libdracoenc_unity.a draco_linux/WebGL mkdir -p draco_linux/Android/libs/arm64-v8a mkdir -p draco_linux/Android/libs/armeabi-v7a mkdir -p draco_linux/Android/libs/x86 From 792c81a0d60c01040c4a3a959136a471076947fc Mon Sep 17 00:00:00 2001 From: Andreas Atteneder Date: Wed, 25 Jan 2023 11:35:03 +0100 Subject: [PATCH 47/71] feat: Added Emscripten 3.1.8 encoder build fix: Corrected Emscripten v1 destination chore: Unified naming a bit --- .github/workflows/unity.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/unity.yml b/.github/workflows/unity.yml index 785f4201..838a53f2 100644 --- a/.github/workflows/unity.yml +++ b/.github/workflows/unity.yml @@ -361,14 +361,17 @@ jobs: -DDRACO_UNITY_PLUGIN=ON -DDRACO_GLTF=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF - - name: build WebAssembly + - name: build_webassembly_dracodec_unity run: cmake --build build_web --target dracodec_unity -j + - name: build_webassembly_dracoenc_unity + run: cmake --build build_web --target dracoenc_unity -j # Artifacts - name: package run: | mkdir -p draco_emscripten_3/WebGL mv build_web/libdracodec_unity.a draco_emscripten_3/WebGL/libdracodec_unity_3.a + mv build_web/libdracoenc_unity.a draco_emscripten_3/WebGL/libdracoenc_unity_3.a - name: upload artifact uses: actions/upload-artifact@v3 with: @@ -413,7 +416,7 @@ jobs: sdk: ${{env.EM_1_VERSION}} - name: configure WebAssembly 1 run: > - emcmake cmake -B build_web_1 + emcmake cmake -B build_web -DCMAKE_BUILD_TYPE=MinSizeRel -DEMSCRIPTEN_GENERATE_BITCODE_STATIC_LIBRARIES=1 -DDRACO_JS_GLUE=OFF @@ -421,9 +424,9 @@ jobs: -DDRACO_GLTF_BITSTREAM=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF - name: build_webassembly_1_dracodec_unity - run: cmake --build build_web_1 --target dracodec_unity -j + run: cmake --build build_web --target dracodec_unity -j - name: build_webassembly_1_dracoenc_unity - run: cmake --build build_web_1 --target dracoenc_unity -j + run: cmake --build build_web --target dracoenc_unity -j # Linux legacy artifacts - name: package Linux legacy run: | @@ -431,8 +434,8 @@ jobs: mv build_linux_64/libdracodec_unity.so draco_linux_legacy/x86_64 mv build_linux_64/libdracoenc_unity.so draco_linux_legacy/x86_64 mkdir -p draco_linux_legacy/WebGL - mv build_web_1/libdracodec_unity.bc draco_linux_1/WebGL - mv build_web_1/libdracoenc_unity.bc draco_linux_1/WebGL + mv build_web/libdracodec_unity.bc draco_linux_legacy/WebGL + mv build_web/libdracoenc_unity.bc draco_linux_legacy/WebGL - name: upload artifact uses: actions/upload-artifact@v3 with: From aa0ee9d39f042e61652cf7a716830d950d6d7399 Mon Sep 17 00:00:00 2001 From: Andreas Atteneder Date: Wed, 25 Jan 2023 11:40:13 +0100 Subject: [PATCH 48/71] fix: Upgrade to windows-2022 to use VS 17 --- .github/workflows/unity.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unity.yml b/.github/workflows/unity.yml index 838a53f2..7f4af51a 100644 --- a/.github/workflows/unity.yml +++ b/.github/workflows/unity.yml @@ -85,7 +85,7 @@ jobs: windows: - runs-on: windows-2019 + runs-on: windows-2022 steps: - uses: actions/checkout@v3 From d08d253b8f634403d348010d64921db851daf6ce Mon Sep 17 00:00:00 2001 From: Andreas Atteneder Date: Wed, 1 Feb 2023 14:24:41 +0100 Subject: [PATCH 49/71] fix: Limit action to releases on unity branch with unity prefixed tags only --- .github/workflows/unity.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/unity.yml b/.github/workflows/unity.yml index 7f4af51a..ac850760 100644 --- a/.github/workflows/unity.yml +++ b/.github/workflows/unity.yml @@ -10,6 +10,10 @@ on: release: types: - created + branches: + - unity + tags: + - unity* workflow_dispatch: env: From 97cace05da0ce330cd2253a31674120732684511 Mon Sep 17 00:00:00 2001 From: Andreas Atteneder Date: Sat, 1 Apr 2023 23:53:32 +0200 Subject: [PATCH 50/71] fix: Conflicting Emscripten cache folders chore: Updated geekyeggo/delete-artifact action --- .github/workflows/unity.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/unity.yml b/.github/workflows/unity.yml index ac850760..c57fc739 100644 --- a/.github/workflows/unity.yml +++ b/.github/workflows/unity.yml @@ -19,13 +19,13 @@ on: env: # Emscripten version for Unity 2022.2 or newer EM_3_VERSION: 3.1.8 - EM_3_CACHE_FOLDER: 'emsdk-cache' + EM_3_CACHE_FOLDER: 'emsdk-3-cache' # Emscripten version for Unity 2021.2 and 2021.3 EM_2_VERSION: 2.0.19 - EM_2_CACHE_FOLDER: 'emsdk-cache' + EM_2_CACHE_FOLDER: 'emsdk-2-cache' # Emscripten version that comes with older Unity versions EM_1_VERSION: 1.38.48-fastcomp - EM_1_CACHE_FOLDER: 'emsdk-legacy-cache' + EM_1_CACHE_FOLDER: 'emsdk-1-cache' jobs: @@ -482,7 +482,7 @@ jobs: name: draco path: draco - name: delete obsolete artifacts - uses: geekyeggo/delete-artifact@v1 + uses: geekyeggo/delete-artifact@v2 with: name: | draco_apple From 0ef74be163b689a4dbd6a6fc961bae83f15cee7f Mon Sep 17 00:00:00 2001 From: Andreas Atteneder Date: Sun, 2 Apr 2023 00:43:53 +0200 Subject: [PATCH 51/71] fix: typo --- .github/workflows/unity.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unity.yml b/.github/workflows/unity.yml index c57fc739..64e7b827 100644 --- a/.github/workflows/unity.yml +++ b/.github/workflows/unity.yml @@ -43,7 +43,7 @@ jobs: - uses: seanmiddleditch/gha-setup-ninja@v3 - name: configure_mac - # ARCHS_STANDARD explicitely enables Apple silicon on Xcode 12.2 + # ARCHS_STANDARD explicitly enables Apple silicon on Xcode 12.2 run: > cmake . -G Ninja -B build_mac -DCMAKE_BUILD_TYPE=MinSizeRel From c00ed7be592ff22061fee085a9ef1425c6ae8d65 Mon Sep 17 00:00:00 2001 From: Andreas Atteneder Date: Sun, 2 Apr 2023 00:44:28 +0200 Subject: [PATCH 52/71] feat: Easier WebGL binary structure --- .github/workflows/unity.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/unity.yml b/.github/workflows/unity.yml index 64e7b827..290e768d 100644 --- a/.github/workflows/unity.yml +++ b/.github/workflows/unity.yml @@ -313,9 +313,9 @@ jobs: # Linux artifacts - name: package Linux run: | - mkdir -p draco_linux/WebGL - mv build_web/libdracodec_unity.a draco_linux/WebGL - mv build_web/libdracoenc_unity.a draco_linux/WebGL + mkdir -p draco_linux/WebGL/2021 + mv build_web/libdracodec_unity.a draco_linux/WebGL/2021 + mv build_web/libdracoenc_unity.a draco_linux/WebGL/2021 mkdir -p draco_linux/Android/libs/arm64-v8a mkdir -p draco_linux/Android/libs/armeabi-v7a mkdir -p draco_linux/Android/libs/x86 @@ -373,9 +373,9 @@ jobs: # Artifacts - name: package run: | - mkdir -p draco_emscripten_3/WebGL - mv build_web/libdracodec_unity.a draco_emscripten_3/WebGL/libdracodec_unity_3.a - mv build_web/libdracoenc_unity.a draco_emscripten_3/WebGL/libdracoenc_unity_3.a + mkdir -p draco_emscripten_3/WebGL/2022 + mv build_web/libdracodec_unity.a draco_emscripten_3/WebGL/2022 + mv build_web/libdracoenc_unity.a draco_emscripten_3/WebGL/2022 - name: upload artifact uses: actions/upload-artifact@v3 with: @@ -437,9 +437,9 @@ jobs: mkdir -p draco_linux_legacy/x86_64 mv build_linux_64/libdracodec_unity.so draco_linux_legacy/x86_64 mv build_linux_64/libdracoenc_unity.so draco_linux_legacy/x86_64 - mkdir -p draco_linux_legacy/WebGL - mv build_web/libdracodec_unity.bc draco_linux_legacy/WebGL - mv build_web/libdracoenc_unity.bc draco_linux_legacy/WebGL + mkdir -p draco_linux_legacy/WebGL/2020 + mv build_web/libdracodec_unity.bc draco_linux_legacy/WebGL/2020 + mv build_web/libdracoenc_unity.bc draco_linux_legacy/WebGL/2020 - name: upload artifact uses: actions/upload-artifact@v3 with: From c00b8104d1944b8fb422496353639f2e7a1740b1 Mon Sep 17 00:00:00 2001 From: Andreas Atteneder Date: Sun, 2 Apr 2023 00:44:52 +0200 Subject: [PATCH 53/71] chore: Updated download-artifact action --- .github/workflows/unity.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unity.yml b/.github/workflows/unity.yml index 290e768d..aeffb646 100644 --- a/.github/workflows/unity.yml +++ b/.github/workflows/unity.yml @@ -454,7 +454,7 @@ jobs: needs: [mac, windows, linux, linux_legacy, linux_emscripten_3] steps: - name: download artifacts - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v3 with: path: artifacts - name: Display structure of downloaded files From 81afe07cbe2bd7b501d9c87a1e721fdc8fdbb07d Mon Sep 17 00:00:00 2001 From: Andreas Atteneder Date: Sun, 2 Apr 2023 00:45:13 +0200 Subject: [PATCH 54/71] chore: Updated Ubuntu image (18.04 is obsolete now) --- .github/workflows/unity.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/unity.yml b/.github/workflows/unity.yml index aeffb646..81f8ce2a 100644 --- a/.github/workflows/unity.yml +++ b/.github/workflows/unity.yml @@ -385,7 +385,7 @@ jobs: linux_legacy: - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v3 @@ -396,7 +396,6 @@ jobs: path: ${{env.EM_1_CACHE_FOLDER}} key: ${{env.EM_1_VERSION}}-${{ runner.os }} - # CMake that comes with Ubuntu 18.04 is too old, so install a recent version here - name: Get latest CMake and ninja uses: lukka/get-cmake@latest From 09cf3825a746e1ef45e9519319aa0b5ea8760a9a Mon Sep 17 00:00:00 2001 From: Andreas Atteneder Date: Wed, 26 Apr 2023 12:12:32 +0200 Subject: [PATCH 55/71] chore: Ignoring various files --- .gitignore | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.gitignore b/.gitignore index 522866ee..067659fe 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,6 @@ docs/_site + +/.vscode +/build* + +.DS_Store From 950dcf65be4e0f3626e14c69f6ace9cff5b6c98d Mon Sep 17 00:00:00 2001 From: Andreas Atteneder Date: Tue, 9 May 2023 01:51:23 +0200 Subject: [PATCH 56/71] feat: Support for flipping indices/attributes left-handed to right-handed coordinate system in Unity encoder wrappers. Useful for Unity glTF export purpose. --- src/draco/unity/draco_unity_enc_plugin.cc | 146 ++++++++++++++++++---- src/draco/unity/draco_unity_enc_plugin.h | 17 ++- 2 files changed, 137 insertions(+), 26 deletions(-) diff --git a/src/draco/unity/draco_unity_enc_plugin.cc b/src/draco/unity/draco_unity_enc_plugin.cc index aaeec20b..6a55593e 100644 --- a/src/draco/unity/draco_unity_enc_plugin.cc +++ b/src/draco/unity/draco_unity_enc_plugin.cc @@ -135,15 +135,15 @@ namespace draco { memcpy(data, encoder->encoderBuffer.data(), encoder->encoderBuffer.size()); } - bool dracoEncodeIndices(DracoMeshEncoder *encoder, uint32_t indexCount, DataType indexType, void *indices) + bool dracoEncodeIndices(DracoMeshEncoder *encoder, uint32_t indexCount, DataType indexType, bool flip, void *indices) { switch (indexType) { case DataType::DT_UINT16: - dracoEncodeIndices(encoder,indexCount,static_cast(indices)); + dracoEncodeIndices(encoder,indexCount,flip,static_cast(indices)); break; case DataType::DT_UINT32: - dracoEncodeIndices(encoder,indexCount,static_cast(indices)); + dracoEncodeIndices(encoder,indexCount,flip,static_cast(indices)); break; default: return false; @@ -153,41 +153,54 @@ namespace draco { } template - void dracoEncodeIndices(DracoMeshEncoder *encoder, uint32_t indexCount, T *indices) + void dracoEncodeIndices(DracoMeshEncoder *encoder, uint32_t indexCount, bool flip, T *indices) { int face_count = indexCount / 3; encoder->mesh.SetNumFaces(static_cast(face_count)); encoder->rawSize += indexCount * sizeof(T); - for (int i = 0; i < face_count; ++i) - { - draco::Mesh::Face face = { - draco::PointIndex(indices[3 * i + 0]), - draco::PointIndex(indices[3 * i + 1]), - draco::PointIndex(indices[3 * i + 2]) - }; - encoder->mesh.SetFace(draco::FaceIndex(static_cast(i)), face); + if(flip) { + for (int i = 0; i < face_count; ++i) + { + draco::Mesh::Face face = { + draco::PointIndex(indices[3 * i + 0]), + draco::PointIndex(indices[3 * i + 2]), + draco::PointIndex(indices[3 * i + 1]) + }; + encoder->mesh.SetFace(draco::FaceIndex(static_cast(i)), face); + } + } + else { + for (int i = 0; i < face_count; ++i) + { + draco::Mesh::Face face = { + draco::PointIndex(indices[3 * i + 0]), + draco::PointIndex(indices[3 * i + 1]), + draco::PointIndex(indices[3 * i + 2]) + }; + encoder->mesh.SetFace(draco::FaceIndex(static_cast(i)), face); + } } } - bool dracoEncoderSetIndices(DracoMeshEncoder *encoder, DataType indexComponentType, uint32_t indexCount, void *indices) + bool dracoEncoderSetIndices(DracoMeshEncoder *encoder, DataType indexComponentType, uint32_t indexCount, bool flip, void *indices) { switch (indexComponentType) { case DataType::DT_INT8: - dracoEncodeIndices(encoder, indexCount, reinterpret_cast(indices)); + dracoEncodeIndices(encoder, indexCount, flip, reinterpret_cast(indices)); break; case DataType::DT_UINT8: - dracoEncodeIndices(encoder, indexCount, reinterpret_cast(indices)); + dracoEncodeIndices(encoder, indexCount, flip, reinterpret_cast(indices)); break; case DataType::DT_INT16: - dracoEncodeIndices(encoder, indexCount, reinterpret_cast(indices)); + dracoEncodeIndices(encoder, indexCount, flip, reinterpret_cast(indices)); break; case DataType::DT_UINT16: - dracoEncodeIndices(encoder, indexCount, reinterpret_cast(indices)); + dracoEncodeIndices(encoder, indexCount, flip, reinterpret_cast(indices)); break; case DataType::DT_UINT32: - dracoEncodeIndices(encoder, indexCount, reinterpret_cast(indices)); + dracoEncodeIndices(encoder, indexCount, flip, reinterpret_cast(indices)); break; default: return false; @@ -200,24 +213,83 @@ namespace draco { GeometryAttribute::Type attributeType, draco::DataType dracoDataType, int32_t componentCount, int32_t stride, + bool flip, void *data) { if (encoder->is_point_cloud) { return dracoSetAttribute( (DracoPointsEncoder*)encoder, attributeType, dracoDataType, - componentCount, stride, data); + componentCount, stride, flip, data); } else { return dracoSetAttribute((DracoMeshEncoder *)encoder, attributeType, dracoDataType, - componentCount, stride, data); + componentCount, stride, flip, data); } } + template + void SetAttributeValuesFlipped(E *encoder, uint32_t id, uint32_t count, int32_t componentCount, int32_t stride, uint8_t * dataBytes) { + + switch (componentCount) { + case 2: + { + T tmp[componentCount]; + for (uint32_t i = 0; i < count; i++) + { + T* srcPtr = (T*) (dataBytes + i * stride); + // Texture coordinate left-handed lower left to right-handed top left conversion + tmp[0] = *srcPtr; + tmp[1] = ((T)1) - (*(srcPtr+1)); + encoder->mesh.attribute(id)->SetAttributeValue(draco::AttributeValueIndex(i), tmp); + } + break; + } + case 3: + { + T tmp[componentCount]; + for (uint32_t i = 0; i < count; i++) + { + T* srcPtr = (T*) (dataBytes + i * stride); + // Position/Normal left-hand to right-handed coordinate system switch: flip X axis + tmp[0] = -(*srcPtr); + tmp[1] = *(srcPtr+1); + tmp[2] = *(srcPtr+2); + encoder->mesh.attribute(id)->SetAttributeValue(draco::AttributeValueIndex(i), tmp); + } + break; + } + case 4: + { + T tmp[componentCount]; + for (uint32_t i = 0; i < count; i++) + { + T* srcPtr = (T*) (dataBytes + i * stride); + // Tangent left-hand to right-handed coordinate system switch: flip Y and Z axis + tmp[0] = *(srcPtr+0); + tmp[1] = -*(srcPtr+1); + tmp[2] = -*(srcPtr+2); + tmp[3] = *(srcPtr+3); + encoder->mesh.attribute(id)->SetAttributeValue(draco::AttributeValueIndex(i), tmp); + } + break; + } + default: + { + for (uint32_t i = 0; i < count; i++) + { + encoder->mesh.attribute(id)->SetAttributeValue(draco::AttributeValueIndex(i), dataBytes + i * stride); + } + break; + } + } + } + template uint32_t dracoSetAttribute(T *encoder, GeometryAttribute::Type attributeType, draco::DataType dracoDataType, int32_t componentCount, int32_t stride, + bool flip, void *data) { auto buffer = std::unique_ptr( new draco::DataBuffer()); @@ -229,9 +301,37 @@ namespace draco { auto id = static_cast(encoder->mesh.AddAttribute(attribute, true, count)); auto dataBytes = reinterpret_cast(data); - for (uint32_t i = 0; i < count; i++) - { - encoder->mesh.attribute(id)->SetAttributeValue(draco::AttributeValueIndex(i), dataBytes + i * stride); + if(flip) { + switch (dracoDataType) { + case draco::DataType::DT_INT8: + SetAttributeValuesFlipped(encoder, id, count, componentCount, stride, dataBytes); + break; + case draco::DataType::DT_UINT8: + SetAttributeValuesFlipped(encoder, id, count, componentCount, stride, dataBytes); + break; + case draco::DataType::DT_INT16: + SetAttributeValuesFlipped(encoder, id, count, componentCount, stride, dataBytes); + break; + case draco::DataType::DT_UINT16: + SetAttributeValuesFlipped(encoder, id, count, componentCount, stride, dataBytes); + break; + case draco::DataType::DT_INT32: + SetAttributeValuesFlipped(encoder, id, count, componentCount, stride, dataBytes); + break; + case draco::DataType::DT_UINT32: + SetAttributeValuesFlipped(encoder, id, count, componentCount, stride, dataBytes); + break; + case draco::DataType::DT_FLOAT32: + SetAttributeValuesFlipped(encoder, id, count, componentCount, stride, dataBytes); + break; + default: + break; + } + } else { + for (uint32_t i = 0; i < count; i++) + { + encoder->mesh.attribute(id)->SetAttributeValue(draco::AttributeValueIndex(i), dataBytes + i * stride); + } } encoder->buffers.emplace_back(std::move(buffer)); diff --git a/src/draco/unity/draco_unity_enc_plugin.h b/src/draco/unity/draco_unity_enc_plugin.h index 66571d48..c634da3e 100644 --- a/src/draco/unity/draco_unity_enc_plugin.h +++ b/src/draco/unity/draco_unity_enc_plugin.h @@ -64,11 +64,12 @@ namespace draco { template void dracoEncodeIndices(DracoMeshEncoder *encoder, uint32_t indexCount, - T *indices); + bool flip, T *indices); template uint32_t dracoSetAttribute(T *encoder, GeometryAttribute::Type attributeType, draco::DataType dracoDataType, int32_t componentCount, int32_t stride, + bool flip, void *data); template @@ -89,8 +90,18 @@ extern "C" { void EXPORT_API dracoEncoderCopy(DracoEncoder *encoder, uint8_t *data); bool EXPORT_API dracoEncoderSetIndices(DracoMeshEncoder *encoder, DataType indexComponentType, - uint32_t indexCount, void *indices); - uint32_t EXPORT_API dracoEncoderSetAttribute(DracoEncoder *encoder, GeometryAttribute::Type attributeType, draco::DataType dracoDataType, int32_t componentCount, int32_t stride, void *data); + uint32_t indexCount, + bool flip, + void *indices); + uint32_t EXPORT_API dracoEncoderSetAttribute( + DracoEncoder *encoder, + GeometryAttribute::Type attributeType, + draco::DataType dracoDataType, + int32_t componentCount, + int32_t stride, + bool flip, + void *data + ); } // extern "C" } // namespace draco From 6c2418294563e5413d683910db10588886431983 Mon Sep 17 00:00:00 2001 From: Andreas Atteneder Date: Tue, 9 May 2023 02:49:51 +0200 Subject: [PATCH 57/71] feat: `dracoEncoderGetEncodeBuffer` gives direct access to the encoded buffer --- src/draco/unity/draco_unity_enc_plugin.cc | 6 ++++++ src/draco/unity/draco_unity_enc_plugin.h | 1 + 2 files changed, 7 insertions(+) diff --git a/src/draco/unity/draco_unity_enc_plugin.cc b/src/draco/unity/draco_unity_enc_plugin.cc index 6a55593e..e725244e 100644 --- a/src/draco/unity/draco_unity_enc_plugin.cc +++ b/src/draco/unity/draco_unity_enc_plugin.cc @@ -135,6 +135,12 @@ namespace draco { memcpy(data, encoder->encoderBuffer.data(), encoder->encoderBuffer.size()); } + void dracoEncoderGetEncodeBuffer(DracoEncoder *encoder, void **data, uint64_t *size) + { + *data = (void*) encoder->encoderBuffer.data(); + *size = encoder->encoderBuffer.size(); + } + bool dracoEncodeIndices(DracoMeshEncoder *encoder, uint32_t indexCount, DataType indexType, bool flip, void *indices) { switch (indexType) diff --git a/src/draco/unity/draco_unity_enc_plugin.h b/src/draco/unity/draco_unity_enc_plugin.h index c634da3e..d177d22e 100644 --- a/src/draco/unity/draco_unity_enc_plugin.h +++ b/src/draco/unity/draco_unity_enc_plugin.h @@ -88,6 +88,7 @@ extern "C" { uint32_t EXPORT_API dracoEncoderGetEncodedIndexCount(DracoEncoder *encoder); uint64_t EXPORT_API dracoEncoderGetByteLength(DracoEncoder *encoder); void EXPORT_API dracoEncoderCopy(DracoEncoder *encoder, uint8_t *data); + void EXPORT_API dracoEncoderGetEncodeBuffer(DracoEncoder *encoder, void **data, uint64_t *size); bool EXPORT_API dracoEncoderSetIndices(DracoMeshEncoder *encoder, DataType indexComponentType, uint32_t indexCount, From a28e4f434aef3af60609209e9f9dec36832036af Mon Sep 17 00:00:00 2001 From: Andreas Atteneder Date: Mon, 15 May 2023 19:43:45 +0200 Subject: [PATCH 58/71] fix: Variable length arrays are not portable C++ (gave errors in MSVC) --- src/draco/unity/draco_unity_enc_plugin.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/draco/unity/draco_unity_enc_plugin.cc b/src/draco/unity/draco_unity_enc_plugin.cc index e725244e..7cb94a48 100644 --- a/src/draco/unity/draco_unity_enc_plugin.cc +++ b/src/draco/unity/draco_unity_enc_plugin.cc @@ -238,8 +238,8 @@ namespace draco { switch (componentCount) { case 2: - { - T tmp[componentCount]; + { + T tmp[2]; for (uint32_t i = 0; i < count; i++) { T* srcPtr = (T*) (dataBytes + i * stride); @@ -252,7 +252,7 @@ namespace draco { } case 3: { - T tmp[componentCount]; + T tmp[3]; for (uint32_t i = 0; i < count; i++) { T* srcPtr = (T*) (dataBytes + i * stride); @@ -266,7 +266,7 @@ namespace draco { } case 4: { - T tmp[componentCount]; + T tmp[4]; for (uint32_t i = 0; i < count; i++) { T* srcPtr = (T*) (dataBytes + i * stride); From 022589f4e40d3733b6fefd5763bca432a8d031a5 Mon Sep 17 00:00:00 2001 From: Andreas Atteneder Date: Wed, 17 May 2023 19:07:21 +0200 Subject: [PATCH 59/71] feat: Added iOS Simulator binaries --- .github/workflows/unity.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/unity.yml b/.github/workflows/unity.yml index 81f8ce2a..a83e0324 100644 --- a/.github/workflows/unity.yml +++ b/.github/workflows/unity.yml @@ -70,16 +70,22 @@ jobs: run: cmake --build build_ios --config MinSizeRel --target dracodec_unity - name: build_ios_dracoenc_unity run: cmake --build build_ios --config MinSizeRel --target dracoenc_unity - + - name: build_ios_simulator_dracodec_unity + run: cmake --build build_ios --config MinSizeRel --target dracodec_unity -- -sdk iphonesimulator + - name: build_ios_simulator_dracoenc_unity + run: cmake --build build_ios --config MinSizeRel --target dracoenc_unity -- -sdk iphonesimulator + - name: package Apple run: | mkdir draco_apple mkdir draco_apple/x86_64 mv build_mac/dracodec_unity.bundle draco_apple/x86_64 mv build_mac/dracoenc_unity.bundle draco_apple/x86_64 - mkdir draco_apple/iOS + mkdir -p draco_apple/iOS/simulator mv build_ios/MinSizeRel-iphoneos/libdracodec_unity.a draco_apple/iOS mv build_ios/MinSizeRel-iphoneos/libdracoenc_unity.a draco_apple/iOS + mv build_ios/MinSizeRel-iphonesimulator/libdracodec_unity.a draco_apple/iOS/simulator + mv build_ios/MinSizeRel-iphonesimulator/libdracoenc_unity.a draco_apple/iOS/simulator - name: upload artifact uses: actions/upload-artifact@v3 with: From 34e77288e5726b7843212054000a4baffab238d1 Mon Sep 17 00:00:00 2001 From: Andreas Atteneder Date: Wed, 17 May 2023 19:15:41 +0200 Subject: [PATCH 60/71] fix: Replace Ninja setup GitHub action that uses deprecated node.js version 12 --- .github/workflows/unity.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/unity.yml b/.github/workflows/unity.yml index a83e0324..e13445a1 100644 --- a/.github/workflows/unity.yml +++ b/.github/workflows/unity.yml @@ -40,7 +40,8 @@ jobs: with: xcode-version: latest-stable - - uses: seanmiddleditch/gha-setup-ninja@v3 + - name: Install Ninja + run: brew install ninja - name: configure_mac # ARCHS_STANDARD explicitly enables Apple silicon on Xcode 12.2 @@ -244,7 +245,9 @@ jobs: with: path: ${{env.EM_2_CACHE_FOLDER}} key: ${{env.EM_2_VERSION}}-${{ runner.os }} - - uses: seanmiddleditch/gha-setup-ninja@v3 + - name: Install Ninja + shell: bash + run: sudo apt-get install ninja-build # Android - name: install Android NDK From a4ee405d8beb9f147477de43e7c864307852839e Mon Sep 17 00:00:00 2001 From: Andreas Atteneder Date: Thu, 2 Nov 2023 13:53:20 +0100 Subject: [PATCH 61/71] Draco Unity native libs refactor (#2) * chore: Fixed CI runner image to avoid future surprises * ci: Refactored/simplified Unity build script * ci: Disabled Emscripten builds, as those moved into other CI jobs * ci: Fixed deprecated parameter * fix: Adressed linker errors due to duplicated symbols in `draco` and `dracodec_unity`. - Consolidated dracodec_unity and dracoenc_unity into a single target named draco_unity * chore: Renamed iOS simulator library name to avoid name conflict with device SDK variant. * fix: Attempt to create universal binary * fix: Attempt to create universal binary by providing architectures * feat: Apple tvOS and Apple visionOS support * chore: Raised iOS/tvOS target to 11.0, since this is the minimum version for Unity 2020 LTS * feat: Added Windows ARM64 support * fix: visionOS required dynamic libraries * Revert "chore: Raised iOS/tvOS target to 11.0, since this is the minimum version for Unity 2020 LTS" It broke the build This reverts commit 1eb874b7aab9b8e229da8a88b886489cb7e139c3. --------- Co-authored-by: Andreas Atteneder --- .github/workflows/unity.yml | 435 +++++++++++++++++------------------- CMakeLists.txt | 76 +++---- cmake/draco_install.cmake | 2 +- 3 files changed, 242 insertions(+), 271 deletions(-) diff --git a/.github/workflows/unity.yml b/.github/workflows/unity.yml index e13445a1..22aaba36 100644 --- a/.github/workflows/unity.yml +++ b/.github/workflows/unity.yml @@ -16,16 +16,16 @@ on: - unity* workflow_dispatch: -env: - # Emscripten version for Unity 2022.2 or newer - EM_3_VERSION: 3.1.8 - EM_3_CACHE_FOLDER: 'emsdk-3-cache' - # Emscripten version for Unity 2021.2 and 2021.3 - EM_2_VERSION: 2.0.19 - EM_2_CACHE_FOLDER: 'emsdk-2-cache' - # Emscripten version that comes with older Unity versions - EM_1_VERSION: 1.38.48-fastcomp - EM_1_CACHE_FOLDER: 'emsdk-1-cache' +# env: +# # Emscripten version for Unity 2022.2 or newer +# EM_3_VERSION: 3.1.8 +# EM_3_CACHE_FOLDER: 'emsdk-3-cache' +# # Emscripten version for Unity 2021.2 and 2021.3 +# EM_2_VERSION: 2.0.19 +# EM_2_CACHE_FOLDER: 'emsdk-2-cache' +# # Emscripten version that comes with older Unity versions +# EM_1_VERSION: 1.38.48-fastcomp +# EM_1_CACHE_FOLDER: 'emsdk-1-cache' jobs: @@ -52,12 +52,10 @@ jobs: -DDRACO_UNITY_PLUGIN=ON -DDRACO_GLTF_BITSTREAM=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF - - name: build_mac_dracodec_unity - run: cmake --build build_mac --config MinSizeRel --target dracodec_unity - - name: build_mac_dracoenc_unity - run: cmake --build build_mac --config MinSizeRel --target dracoenc_unity + - name: build_mac + run: cmake --build build_mac --config MinSizeRel --target draco_unity - - name: configure_ios + - name: configure iOS run: > cmake . -G Xcode -B build_ios -DCMAKE_BUILD_TYPE=MinSizeRel @@ -67,26 +65,54 @@ jobs: -DDRACO_UNITY_PLUGIN=ON -DDRACO_GLTF_BITSTREAM=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF - - name: build_ios_dracodec_unity - run: cmake --build build_ios --config MinSizeRel --target dracodec_unity - - name: build_ios_dracoenc_unity - run: cmake --build build_ios --config MinSizeRel --target dracoenc_unity - - name: build_ios_simulator_dracodec_unity - run: cmake --build build_ios --config MinSizeRel --target dracodec_unity -- -sdk iphonesimulator - - name: build_ios_simulator_dracoenc_unity - run: cmake --build build_ios --config MinSizeRel --target dracoenc_unity -- -sdk iphonesimulator + - name: build iOS + run: cmake --build build_ios --config MinSizeRel --target draco_unity + - name: build iOS Simulator + run: > + cmake + --build build_ios + --config MinSizeRel + --target draco_unity + -- + -sdk iphonesimulator + -arch "arm64" + -arch "x86_64" + EXECUTABLE_SUFFIX=-simulator.a + ONLY_ACTIVE_ARCH=NO + + - name: configure tvOS + run: > + cmake . -G Xcode -B build_tvos + -DCMAKE_BUILD_TYPE=MinSizeRel + -DCMAKE_SYSTEM_NAME=tvOS + -DCMAKE_OSX_DEPLOYMENT_TARGET=10.0 + -DDRACO_UNITY_PLUGIN=ON + -DDRACO_GLTF_BITSTREAM=ON + -DDRACO_BACKWARDS_COMPATIBILITY=OFF + - name: build tvOS + run: cmake --build build_tvos --config MinSizeRel --target draco_unity + - name: build tvOS Simulator + run: > + cmake + --build build_tvos + --config MinSizeRel + --target draco_unity + -- + -sdk appletvsimulator + EXECUTABLE_SUFFIX=-simulator.a + ONLY_ACTIVE_ARCH=NO - name: package Apple run: | mkdir draco_apple mkdir draco_apple/x86_64 - mv build_mac/dracodec_unity.bundle draco_apple/x86_64 - mv build_mac/dracoenc_unity.bundle draco_apple/x86_64 - mkdir -p draco_apple/iOS/simulator - mv build_ios/MinSizeRel-iphoneos/libdracodec_unity.a draco_apple/iOS - mv build_ios/MinSizeRel-iphoneos/libdracoenc_unity.a draco_apple/iOS - mv build_ios/MinSizeRel-iphonesimulator/libdracodec_unity.a draco_apple/iOS/simulator - mv build_ios/MinSizeRel-iphonesimulator/libdracoenc_unity.a draco_apple/iOS/simulator + mv build_mac/draco_unity.bundle draco_apple/x86_64 + mkdir -p draco_apple/iOS + mv build_ios/MinSizeRel-iphoneos/libdraco_unity.a draco_apple/iOS + mv build_ios/MinSizeRel-iphonesimulator/libdraco_unity-simulator.a draco_apple/iOS + mkdir -p draco_apple/tvOS + mv build_tvos/MinSizeRel-appletvos/libdraco_unity.a draco_apple/tvOS + mv build_tvos/MinSizeRel-appletvsimulator/libdraco_unity-simulator.a draco_apple/tvOS - name: upload artifact uses: actions/upload-artifact@v3 with: @@ -101,33 +127,32 @@ jobs: steps: - uses: actions/checkout@v3 - - name: configure_win64 + - name: configure Windows x64 run: > cmake . -G "Visual Studio 17 2022" -A x64 -B build_win_64 -DDRACO_UNITY_PLUGIN=ON -DDRACO_GLTF_BITSTREAM=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF - - name: build_win64_dracodec_unity - run: > - cmake --build build_win_64 - --config MinSizeRel - --target dracodec_unity - - name: build_win64_dracoenc_unity - run: > - cmake --build build_win_64 - --config MinSizeRel - --target dracoenc_unity + - name: build Windows x64 + run: cmake --build build_win_64 --config MinSizeRel --target draco_unity - - name: configure_win32 + - name: configure Windows Win32 run: > cmake . -G "Visual Studio 17 2022" -A Win32 -B build_win_32 -DDRACO_UNITY_PLUGIN=ON -DDRACO_GLTF_BITSTREAM=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF - - name: build_win32_dracodec_unity - run: cmake --build build_win_32 --config MinSizeRel --target dracodec_unity - - name: build_win32_dracoenc_unity - run: cmake --build build_win_32 --config MinSizeRel --target dracoenc_unity + - name: build Windows Win32 + run: cmake --build build_win_32 --config MinSizeRel --target draco_unity + + - name: configure Windows ARM64 + run: > + cmake . -G "Visual Studio 17 2022" -A ARM64 -B build_win_arm64 + -DDRACO_UNITY_PLUGIN=ON + -DDRACO_GLTF_BITSTREAM=ON + -DDRACO_BACKWARDS_COMPATIBILITY=OFF + - name: build Windows ARM64 + run: cmake --build build_win_arm64 --config MinSizeRel --target draco_unity # Universal Windows Platform - name: configure_uwp_arm @@ -138,16 +163,8 @@ jobs: -DDRACO_BACKWARDS_COMPATIBILITY=OFF -DCMAKE_SYSTEM_NAME:String=WindowsStore -DCMAKE_SYSTEM_VERSION:String="10.0" - - name: build_uwp_arm_dracodec_unity - run: > - cmake --build build_uwp_arm - --config MinSizeRel - --target dracodec_unity - - name: build_uwp_arm_dracoenc_unity - run: > - cmake --build build_uwp_arm - --config MinSizeRel - --target dracoenc_unity + - name: build_uwp_arm + run: cmake --build build_uwp_arm --config MinSizeRel --target draco_unity - name: configure_uwp_arm64 run: > @@ -157,16 +174,8 @@ jobs: -DDRACO_BACKWARDS_COMPATIBILITY=OFF -DCMAKE_SYSTEM_NAME:String=WindowsStore -DCMAKE_SYSTEM_VERSION:String="10.0" - - name: build_uwp_arm64_dracodec_unity - run: > - cmake --build build_uwp_arm64 - --config MinSizeRel - --target dracodec_unity - - name: build_uwp_arm64_dracoenc_unity - run: > - cmake --build build_uwp_arm64 - --config MinSizeRel - --target dracoenc_unity + - name: build_uwp_arm64 + run: cmake --build build_uwp_arm64 --config MinSizeRel --target draco_unity - name: configure_uwp_x86 run: > @@ -176,17 +185,9 @@ jobs: -DDRACO_BACKWARDS_COMPATIBILITY=OFF -DCMAKE_SYSTEM_NAME:String=WindowsStore -DCMAKE_SYSTEM_VERSION:String="10.0" - - name: build_uwp_x86_dracodec_unity - run: > - cmake --build build_uwp_x86 - --config MinSizeRel - --target dracodec_unity - - name: build_uwp_x86_dracoenc_unity - run: > - cmake --build build_uwp_x86 - --config MinSizeRel - --target dracoenc_unity - + - name: build_uwp_x86 + run: cmake --build build_uwp_x86 --config MinSizeRel --target draco_unity + - name: configure_uwp_x64 run: > cmake . -G "Visual Studio 17 2022" -A x64 -B build_uwp_x64 @@ -195,17 +196,9 @@ jobs: -DDRACO_BACKWARDS_COMPATIBILITY=OFF -DCMAKE_SYSTEM_NAME:String=WindowsStore -DCMAKE_SYSTEM_VERSION:String="10.0" - - name: build_uwp_x64_dracodec_unity - run: > - cmake --build build_uwp_x64 - --config MinSizeRel - --target dracodec_unity - - name: build_uwp_x64_dracoenc_unity - run: > - cmake --build build_uwp_x64 - --config MinSizeRel - --target dracoenc_unity - + - name: build_uwp_x64 + run: cmake --build build_uwp_x64 --config MinSizeRel --target draco_unity + - name: package Windows run: | mkdir draco_win/x86 @@ -214,18 +207,14 @@ jobs: mkdir draco_win/WSA/ARM64 mkdir draco_win/WSA/x86 mkdir draco_win/WSA/x64 - mv build_win_32\MinSizeRel\dracodec_unity.dll draco_win/x86 - mv build_win_32\MinSizeRel\dracoenc_unity.dll draco_win/x86 - mv build_win_64\MinSizeRel\dracodec_unity.dll draco_win/x86_64 - mv build_win_64\MinSizeRel\dracoenc_unity.dll draco_win/x86_64 - mv build_uwp_arm\MinSizeRel\dracodec_unity.dll draco_win/WSA/ARM - mv build_uwp_arm\MinSizeRel\dracoenc_unity.dll draco_win/WSA/ARM - mv build_uwp_arm64\MinSizeRel\dracodec_unity.dll draco_win/WSA/ARM64 - mv build_uwp_arm64\MinSizeRel\dracoenc_unity.dll draco_win/WSA/ARM64 - mv build_uwp_x86\MinSizeRel\dracodec_unity.dll draco_win/WSA/x86 - mv build_uwp_x86\MinSizeRel\dracoenc_unity.dll draco_win/WSA/x86 - mv build_uwp_x64\MinSizeRel\dracodec_unity.dll draco_win/WSA/x64 - mv build_uwp_x64\MinSizeRel\dracoenc_unity.dll draco_win/WSA/x64 + mkdir draco_win/Windows/ARM64 + mv build_win_32\MinSizeRel\draco_unity.dll draco_win/x86 + mv build_win_64\MinSizeRel\draco_unity.dll draco_win/x86_64 + mv build_uwp_arm\MinSizeRel\draco_unity.dll draco_win/WSA/ARM + mv build_uwp_arm64\MinSizeRel\draco_unity.dll draco_win/WSA/ARM64 + mv build_uwp_x86\MinSizeRel\draco_unity.dll draco_win/WSA/x86 + mv build_uwp_x64\MinSizeRel\draco_unity.dll draco_win/WSA/x64 + mv build_win_arm64\MinSizeRel\draco_unity.dll draco_win/Windows/ARM64 - name: upload artifact uses: actions/upload-artifact@v3 with: @@ -235,16 +224,16 @@ jobs: linux: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 - - name: Setup cache - id: cache-system-libraries - uses: actions/cache@v3 - with: - path: ${{env.EM_2_CACHE_FOLDER}} - key: ${{env.EM_2_VERSION}}-${{ runner.os }} + # - name: Setup cache + # id: cache-system-libraries + # uses: actions/cache@v3 + # with: + # path: ${{env.EM_2_CACHE_FOLDER}} + # key: ${{env.EM_2_VERSION}}-${{ runner.os }} - name: Install Ninja shell: bash run: sudo apt-get install ninja-build @@ -259,31 +248,29 @@ jobs: - name: configure_android_arm64-v8a run: > - cmake -B build_android_arm64-v8a -DANDROID_ABI=arm64-v8a + cmake -B build_android_arm64-v8a + -DANDROID_ABI=arm64-v8a -DCMAKE_BUILD_TYPE=MinSizeRel -DANDROID_NDK=${{ steps.setup-ndk.outputs.ndk-path }} -DCMAKE_TOOLCHAIN_FILE="${{ steps.setup-ndk.outputs.ndk-path }}/build/cmake/android.toolchain.cmake" -DDRACO_UNITY_PLUGIN=ON -DDRACO_GLTF_BITSTREAM=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF - - name: build_android_arm64-v8a_dracodec_unity - run: cmake --build build_android_arm64-v8a --target dracodec_unity -j - - name: build_android_arm64-v8a_dracoenc_unity - run: cmake --build build_android_arm64-v8a --target dracoenc_unity -j - + - name: build_android_arm64-v8a + run: cmake --build build_android_arm64-v8a --target draco_unity -j + - name: configure_android_armeabi-v7a run: > - cmake -B build_android_armeabi-v7a -DANDROID_ABI=armeabi-v7a + cmake -B build_android_armeabi-v7a + -DANDROID_ABI=armeabi-v7a -DCMAKE_BUILD_TYPE=MinSizeRel -DANDROID_NDK=${{ steps.setup-ndk.outputs.ndk-path }} -DCMAKE_TOOLCHAIN_FILE="${{ steps.setup-ndk.outputs.ndk-path }}/build/cmake/android.toolchain.cmake" -DDRACO_UNITY_PLUGIN=ON -DDRACO_GLTF_BITSTREAM=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF - - name: build_android_armeabi-v7a_dracodec_unity - run: cmake --build build_android_armeabi-v7a --target dracodec_unity -j - - name: build_android_armeabi-v7a_dracoenc_unity - run: cmake --build build_android_armeabi-v7a --target dracoenc_unity -j + - name: build_android_armeabi-v7a + run: cmake --build build_android_armeabi-v7a --target draco_unity -j - name: configure_android_x86 run: > @@ -296,49 +283,38 @@ jobs: -DDRACO_GLTF_BITSTREAM=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF - name: build_android_x86_dracodec_unity - run: cmake --build build_android_x86 --target dracodec_unity -j - - name: build_android_x86_dracoenc_unity - run: cmake --build build_android_x86 --target dracoenc_unity -j - - # Emscripten - - name: setup Emscripten - uses: mymindstorm/setup-emsdk@v12 - with: - version: ${{env.EM_2_VERSION}} - actions-cache-folder: ${{env.EM_2_CACHE_FOLDER}} - - name: configure WebAssembly - run: > - emcmake cmake -B build_web - -DCMAKE_BUILD_TYPE=MinSizeRel - -DDRACO_JS_GLUE=OFF - -DDRACO_UNITY_PLUGIN=ON - -DDRACO_GLTF_BITSTREAM=ON - -DDRACO_BACKWARDS_COMPATIBILITY=OFF - - name: build_webassembly_dracodec_unity - run: cmake --build build_web --target dracodec_unity -j - - name: build_webassembly_dracoenc_unity - run: cmake --build build_web --target dracoenc_unity -j + run: cmake --build build_android_x86 --target draco_unity -j + + # # Emscripten + # - name: setup Emscripten + # uses: mymindstorm/setup-emsdk@v12 + # with: + # version: ${{env.EM_2_VERSION}} + # actions-cache-folder: ${{env.EM_2_CACHE_FOLDER}} + # - name: configure WebAssembly + # run: > + # emcmake cmake -B build_web + # -DCMAKE_BUILD_TYPE=MinSizeRel + # -DDRACO_JS_GLUE=OFF + # -DDRACO_UNITY_PLUGIN=ON + # -DDRACO_GLTF_BITSTREAM=ON + # -DDRACO_BACKWARDS_COMPATIBILITY=OFF + # - name: build_webassembly_dracodec_unity + # run: cmake --build build_web --target draco_unity -j # Linux artifacts - name: package Linux run: | - mkdir -p draco_linux/WebGL/2021 - mv build_web/libdracodec_unity.a draco_linux/WebGL/2021 - mv build_web/libdracoenc_unity.a draco_linux/WebGL/2021 + # mkdir -p draco_linux/WebGL/2021 + # mv build_web/libdraco_unity.a draco_linux/WebGL/2021 mkdir -p draco_linux/Android/libs/arm64-v8a mkdir -p draco_linux/Android/libs/armeabi-v7a mkdir -p draco_linux/Android/libs/x86 - mv build_android_arm64-v8a/libdracodec_unity.so \ - draco_linux/Android/libs/arm64-v8a - mv build_android_arm64-v8a/libdracoenc_unity.so \ + mv build_android_arm64-v8a/libdraco_unity.so \ draco_linux/Android/libs/arm64-v8a - mv build_android_armeabi-v7a/libdracodec_unity.so \ - draco_linux/Android/libs/armeabi-v7a - mv build_android_armeabi-v7a/libdracoenc_unity.so \ + mv build_android_armeabi-v7a/libdraco_unity.so \ draco_linux/Android/libs/armeabi-v7a - mv build_android_x86/libdracodec_unity.so \ - draco_linux/Android/libs/x86 - mv build_android_x86/libdracoenc_unity.so \ + mv build_android_x86/libdraco_unity.so \ draco_linux/Android/libs/x86 - name: upload artifact uses: actions/upload-artifact@v3 @@ -347,49 +323,46 @@ jobs: path: draco_linux - linux_emscripten_3: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - name: Setup cache - id: cache-system-libraries - uses: actions/cache@v3 - with: - path: ${{env.EM_3_CACHE_FOLDER}} - key: ${{env.EM_3_VERSION}}-${{ runner.os }} - - # Emscripten 3 - - name: setup Emscripten - uses: mymindstorm/setup-emsdk@v12 - with: - version: ${{env.EM_3_VERSION}} - actions-cache-folder: ${{env.EM_3_CACHE_FOLDER}} - - name: configure WebAssembly - run: > - EMSCRIPTEN="$EMSDK/upstream/emscripten" emcmake cmake -B build_web - -DCMAKE_BUILD_TYPE=MinSizeRel - -DDRACO_JS_GLUE=OFF - -DDRACO_UNITY_PLUGIN=ON - -DDRACO_GLTF=ON - -DDRACO_BACKWARDS_COMPATIBILITY=OFF - - name: build_webassembly_dracodec_unity - run: cmake --build build_web --target dracodec_unity -j - - name: build_webassembly_dracoenc_unity - run: cmake --build build_web --target dracoenc_unity -j - - # Artifacts - - name: package - run: | - mkdir -p draco_emscripten_3/WebGL/2022 - mv build_web/libdracodec_unity.a draco_emscripten_3/WebGL/2022 - mv build_web/libdracoenc_unity.a draco_emscripten_3/WebGL/2022 - - name: upload artifact - uses: actions/upload-artifact@v3 - with: - name: draco_emscripten_3 - path: draco_emscripten_3 + # linux_emscripten_3: + + # runs-on: ubuntu-22.04 + + # steps: + # - uses: actions/checkout@v3 + # - name: Setup cache + # id: cache-system-libraries + # uses: actions/cache@v3 + # with: + # path: ${{env.EM_3_CACHE_FOLDER}} + # key: ${{env.EM_3_VERSION}}-${{ runner.os }} + + # # Emscripten 3 + # - name: setup Emscripten + # uses: mymindstorm/setup-emsdk@v12 + # with: + # version: ${{env.EM_3_VERSION}} + # actions-cache-folder: ${{env.EM_3_CACHE_FOLDER}} + # - name: configure WebAssembly + # run: > + # EMSCRIPTEN="$EMSDK/upstream/emscripten" emcmake cmake -B build_web + # -DCMAKE_BUILD_TYPE=MinSizeRel + # -DDRACO_JS_GLUE=OFF + # -DDRACO_UNITY_PLUGIN=ON + # -DDRACO_GLTF_BITSTREAM=ON \ + # -DDRACO_BACKWARDS_COMPATIBILITY=OFF + # - name: build_webassembly_dracodec_unity + # run: cmake --build build_web --target draco_unity -j + + # # Artifacts + # - name: package + # run: | + # mkdir -p draco_emscripten_3/WebGL/2022 + # mv build_web/libdraco_unity.a draco_emscripten_3/WebGL/2022 + # - name: upload artifact + # uses: actions/upload-artifact@v3 + # with: + # name: draco_emscripten_3 + # path: draco_emscripten_3 linux_legacy: @@ -398,12 +371,12 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Setup cache - id: cache-system-libraries - uses: actions/cache@v3 - with: - path: ${{env.EM_1_CACHE_FOLDER}} - key: ${{env.EM_1_VERSION}}-${{ runner.os }} + # - name: Setup cache + # id: cache-system-libraries + # uses: actions/cache@v3 + # with: + # path: ${{env.EM_1_CACHE_FOLDER}} + # key: ${{env.EM_1_VERSION}}-${{ runner.os }} - name: Get latest CMake and ninja uses: lukka/get-cmake@latest @@ -417,37 +390,32 @@ jobs: -DDRACO_GLTF_BITSTREAM=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF - name: build_linux64_dracodec_unity - run: cmake --build build_linux_64 --target dracodec_unity -j - - name: build_linux64_dracoenc_unity - run: cmake --build build_linux_64 --target dracoenc_unity -j + run: cmake --build build_linux_64 --target draco_unity -j + + # # Emscripten 1 + # - name: setup Emscripten 1 + # uses: numworks/setup-emscripten@latest + # with: + # sdk: ${{env.EM_1_VERSION}} + # - name: configure WebAssembly 1 + # run: > + # emcmake cmake -B build_web + # -DCMAKE_BUILD_TYPE=MinSizeRel + # -DEMSCRIPTEN_GENERATE_BITCODE_STATIC_LIBRARIES=1 + # -DDRACO_JS_GLUE=OFF + # -DDRACO_UNITY_PLUGIN=ON + # -DDRACO_GLTF_BITSTREAM=ON + # -DDRACO_BACKWARDS_COMPATIBILITY=OFF + # - name: build_webassembly_1_dracodec_unity + # run: cmake --build build_web --target draco_unity -j - # Emscripten 1 - - name: setup Emscripten 1 - uses: numworks/setup-emscripten@latest - with: - sdk: ${{env.EM_1_VERSION}} - - name: configure WebAssembly 1 - run: > - emcmake cmake -B build_web - -DCMAKE_BUILD_TYPE=MinSizeRel - -DEMSCRIPTEN_GENERATE_BITCODE_STATIC_LIBRARIES=1 - -DDRACO_JS_GLUE=OFF - -DDRACO_UNITY_PLUGIN=ON - -DDRACO_GLTF_BITSTREAM=ON - -DDRACO_BACKWARDS_COMPATIBILITY=OFF - - name: build_webassembly_1_dracodec_unity - run: cmake --build build_web --target dracodec_unity -j - - name: build_webassembly_1_dracoenc_unity - run: cmake --build build_web --target dracoenc_unity -j # Linux legacy artifacts - name: package Linux legacy run: | mkdir -p draco_linux_legacy/x86_64 - mv build_linux_64/libdracodec_unity.so draco_linux_legacy/x86_64 - mv build_linux_64/libdracoenc_unity.so draco_linux_legacy/x86_64 - mkdir -p draco_linux_legacy/WebGL/2020 - mv build_web/libdracodec_unity.bc draco_linux_legacy/WebGL/2020 - mv build_web/libdracoenc_unity.bc draco_linux_legacy/WebGL/2020 + mv build_linux_64/libdraco_unity.so draco_linux_legacy/x86_64 + # mkdir -p draco_linux_legacy/WebGL/2020 + # mv build_web/libdraco_unity.bc draco_linux_legacy/WebGL/2020 - name: upload artifact uses: actions/upload-artifact@v3 with: @@ -458,8 +426,13 @@ jobs: combine: name: combine artifacts - runs-on: ubuntu-latest - needs: [mac, windows, linux, linux_legacy, linux_emscripten_3] + runs-on: ubuntu-22.04 + needs: + - mac + - windows + - linux + - linux_legacy + # - linux_emscripten_3 steps: - name: download artifacts uses: actions/download-artifact@v3 @@ -475,7 +448,7 @@ jobs: cp -r artifacts/draco_win/* draco cp -r artifacts/draco_linux/* draco cp -r artifacts/draco_linux_legacy/* draco - cp -r artifacts/draco_emscripten_3/* draco + # cp -r artifacts/draco_emscripten_3/* draco - name: zip run: zip -r draco.zip draco - name: upload release assets @@ -497,4 +470,4 @@ jobs: draco_win draco_linux draco_linux_legacy - draco_emscripten_3 + # draco_emscripten_3 diff --git a/CMakeLists.txt b/CMakeLists.txt index 14a8921e..51bfe48e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,7 +12,7 @@ # License for the specific language governing permissions and limitations under # the License. -cmake_minimum_required(VERSION 3.12 FATAL_ERROR) +cmake_minimum_required(VERSION 3.15 FATAL_ERROR) project(draco C CXX) if(NOT CMAKE_BUILD_TYPE) @@ -1053,35 +1053,42 @@ else() endif() if(DRACO_UNITY_PLUGIN) - if(IOS OR EMSCRIPTEN) + if(IOS OR EMSCRIPTEN OR CMAKE_SYSTEM_NAME STREQUAL "tvOS") set(unity_decoder_lib_type STATIC) + elseif(CMAKE_SYSTEM_NAME STREQUAL "visionOS") + set(unity_decoder_lib_type SHARED) else() set(unity_decoder_lib_type MODULE) endif() - set(unity_lib_dependency ${draco_plugin_dependency}) set(unity_objlib_dependency draco_unity_plugin) - if(EMSCRIPTEN OR IOS) - unset(unity_lib_dependency) - list(APPEND unity_objlib_dependency - # Link selected object libs directly instead of ${draco_plugin_dependency} - # minimizes build size - # results in a single static lib file - draco_attributes - draco_compression_attributes_dec - draco_compression_bit_coders - draco_compression_decode - draco_compression_entropy - draco_compression_mesh_dec - draco_compression_point_cloud_dec - draco_core - draco_mesh - draco_metadata - draco_metadata_dec - draco_point_cloud - draco_points_dec - ) - endif() + + list(APPEND unity_objlib_dependency + # Link selected object libs directly instead of ${draco_plugin_dependency} + # minimizes build size by omitting animation/IO/transcoder related symbols + # results in a single static lib file (no dependency on target `draco`) + draco_attributes + draco_compression_attributes_dec + draco_compression_attributes_enc + draco_compression_attributes_pred_schemes_dec + draco_compression_attributes_pred_schemes_enc + draco_compression_bit_coders + draco_compression_decode + draco_compression_encode + draco_compression_entropy + draco_compression_mesh_dec + draco_compression_mesh_enc + draco_compression_point_cloud_dec + draco_compression_point_cloud_enc + draco_core + draco_mesh + draco_metadata + draco_metadata_dec + draco_metadata_enc + draco_point_cloud + draco_points_dec + draco_points_enc + ) draco_add_library( NAME draco_unity_plugin @@ -1090,14 +1097,6 @@ else() DEFINES ${draco_defines} INCLUDES ${draco_include_paths}) - draco_add_library( - NAME dracodec_unity - TYPE ${unity_decoder_lib_type} - DEFINES ${draco_defines} - INCLUDES ${draco_include_paths} - OBJLIB_DEPS ${unity_objlib_dependency} - LIB_DEPS ${unity_lib_dependency}) - draco_add_library( NAME draco_unity_enc_plugin TYPE OBJECT @@ -1106,17 +1105,16 @@ else() INCLUDES ${draco_include_paths}) draco_add_library( - NAME dracoenc_unity + NAME draco_unity TYPE ${unity_decoder_lib_type} DEFINES ${draco_defines} INCLUDES ${draco_include_paths} - OBJLIB_DEPS draco_unity_enc_plugin - LIB_DEPS ${draco_plugin_dependency}) + OBJLIB_DEPS ${unity_objlib_dependency} draco_unity_enc_plugin + ) - # For Mac, we need to build a .bundle for the unity plugin. - if(APPLE) - set_target_properties(dracodec_unity PROPERTIES BUNDLE true) - set_target_properties(dracoenc_unity PROPERTIES BUNDLE true) + # For macOS, we need to build a .bundle for the unity plugin. + if(APPLE AND CMAKE_SYSTEM_NAME STREQUAL "Darwin") + set_target_properties(draco_unity PROPERTIES BUNDLE true) endif() endif() diff --git a/cmake/draco_install.cmake b/cmake/draco_install.cmake index 3be1ba16..6d211142 100644 --- a/cmake/draco_install.cmake +++ b/cmake/draco_install.cmake @@ -81,7 +81,7 @@ macro(draco_setup_install_target) endif() if(DRACO_UNITY_PLUGIN) - install(TARGETS dracodec_unity DESTINATION "${libs_path}") + install(TARGETS draco_unity DESTINATION "${libs_path}") endif() if(DRACO_MAYA_PLUGIN) From 8870e2338e4186c3f0f9be9918d4a5234a0e01b5 Mon Sep 17 00:00:00 2001 From: Andreas Atteneder Date: Thu, 2 Nov 2023 17:08:05 +0100 Subject: [PATCH 62/71] Added Unity WebGL sub-packages (#3) * feat: Initial version of the WebGL packages * feat(ci): Yamato CI scripts * feat: Unit test that sanity checks the native library file sizes --- .yamato/environments.metafile | 44 ++++ .yamato/project.metafile | 31 +++ .yamato/upm-ci.yml | 166 +++++++++++++++ .../CHANGELOG.md | 8 + .../CHANGELOG.md.meta | 7 + .../Documentation~/api_index.md | 17 ++ .../Documentation~/index.md | 16 ++ .../Editor.meta | 8 + .../Editor/Scripts.meta | 8 + .../Scripts/Draco.Webgl-2020.Editor.asmdef | 16 ++ .../Draco.Webgl-2020.Editor.asmdef.meta | 7 + .../Editor/Scripts/SubPackageCleanup.cs | 41 ++++ .../Editor/Scripts/SubPackageCleanup.cs.meta | 11 + .../LICENSE.md | 190 ++++++++++++++++++ .../LICENSE.md.meta | 7 + .../README.md | 24 +++ .../README.md.meta | 7 + .../Runtime.meta | 8 + .../Runtime/Plugins.meta | 8 + .../Runtime/Plugins/WebGL.meta | 8 + .../Runtime/Plugins/WebGL/libdraco_unity.bc | 1 + .../Plugins/WebGL/libdraco_unity.bc.meta | 120 +++++++++++ .../Tests.meta | 8 + .../Tests/Editor.meta | 8 + .../Draco.Webgl-2020.Editor.Tests.asmdef | 24 +++ .../Draco.Webgl-2020.Editor.Tests.asmdef.meta | 7 + .../Tests/Editor/WebglEditorTests.cs | 30 +++ .../Tests/Editor/WebglEditorTests.cs.meta | 11 + .../Third Party Notices.md | 32 +++ .../Third Party Notices.md.meta | 7 + .../package.json | 7 + .../package.json.meta | 7 + .../CHANGELOG.md | 8 + .../CHANGELOG.md.meta | 7 + .../Documentation~/api_index.md | 17 ++ .../Documentation~/index.md | 16 ++ .../Editor.meta | 8 + .../Editor/Scripts.meta | 8 + .../Scripts/Draco.Webgl-2021.Editor.asmdef | 16 ++ .../Draco.Webgl-2021.Editor.asmdef.meta | 7 + .../Editor/Scripts/SubPackageCleanup.cs | 41 ++++ .../Editor/Scripts/SubPackageCleanup.cs.meta | 11 + .../LICENSE.md | 190 ++++++++++++++++++ .../LICENSE.md.meta | 7 + .../README.md | 24 +++ .../README.md.meta | 7 + .../Runtime.meta | 8 + .../Runtime/Plugins.meta | 8 + .../Runtime/Plugins/WebGL.meta | 8 + .../Runtime/Plugins/WebGL/libdraco_unity.a | 1 + .../Plugins/WebGL/libdraco_unity.a.meta | 120 +++++++++++ .../Tests.meta | 8 + .../Tests/Editor.meta | 8 + .../Draco.Webgl-2021.Editor.Tests.asmdef | 24 +++ .../Draco.Webgl-2021.Editor.Tests.asmdef.meta | 7 + .../Tests/Editor/WebglEditorTests.cs | 30 +++ .../Tests/Editor/WebglEditorTests.cs.meta | 11 + .../Third Party Notices.md | 32 +++ .../Third Party Notices.md.meta | 7 + .../package.json | 7 + .../package.json.meta | 7 + .../CHANGELOG.md | 8 + .../CHANGELOG.md.meta | 7 + .../Documentation~/api_index.md | 17 ++ .../Documentation~/index.md | 16 ++ .../Editor.meta | 8 + .../Editor/Scripts.meta | 8 + .../Scripts/Draco.Webgl-2022.Editor.asmdef | 16 ++ .../Draco.Webgl-2022.Editor.asmdef.meta | 7 + .../Editor/Scripts/SubPackageCleanup.cs | 41 ++++ .../Editor/Scripts/SubPackageCleanup.cs.meta | 11 + .../LICENSE.md | 190 ++++++++++++++++++ .../LICENSE.md.meta | 7 + .../README.md | 24 +++ .../README.md.meta | 7 + .../Runtime.meta | 8 + .../Runtime/Plugins.meta | 8 + .../Runtime/Plugins/WebGL.meta | 8 + .../Runtime/Plugins/WebGL/libdraco_unity.a | 1 + .../Plugins/WebGL/libdraco_unity.a.meta | 88 ++++++++ .../Tests.meta | 8 + .../Tests/Editor.meta | 8 + .../Draco.Webgl-2022.Editor.Tests.asmdef | 24 +++ .../Draco.Webgl-2022.Editor.Tests.asmdef.meta | 7 + .../Tests/Editor/WebglEditorTests.cs | 30 +++ .../Tests/Editor/WebglEditorTests.cs.meta | 11 + .../Third Party Notices.md | 32 +++ .../Third Party Notices.md.meta | 7 + .../package.json | 7 + .../package.json.meta | 7 + .../CHANGELOG.md | 8 + .../CHANGELOG.md.meta | 7 + .../Documentation~/api_index.md | 17 ++ .../Documentation~/index.md | 16 ++ .../Editor.meta | 8 + .../Editor/Scripts.meta | 8 + .../Scripts/Draco.Webgl-2023.Editor.asmdef | 16 ++ .../Draco.Webgl-2023.Editor.asmdef.meta | 7 + .../Editor/Scripts/SubPackageCleanup.cs | 41 ++++ .../Editor/Scripts/SubPackageCleanup.cs.meta | 11 + .../LICENSE.md | 190 ++++++++++++++++++ .../LICENSE.md.meta | 7 + .../README.md | 24 +++ .../README.md.meta | 7 + .../Runtime.meta | 8 + .../Runtime/Plugins.meta | 8 + .../Runtime/Plugins/WebGL.meta | 8 + .../Runtime/Plugins/WebGL/libdraco_unity.a | 1 + .../Plugins/WebGL/libdraco_unity.a.meta | 95 +++++++++ .../Tests.meta | 8 + .../Tests/Editor.meta | 8 + .../Draco.Webgl-2023.Editor.Tests.asmdef | 24 +++ .../Draco.Webgl-2023.Editor.Tests.asmdef.meta | 7 + .../Tests/Editor/WebglEditorTests.cs | 30 +++ .../Tests/Editor/WebglEditorTests.cs.meta | 11 + .../Third Party Notices.md | 32 +++ .../Third Party Notices.md.meta | 7 + .../package.json | 8 + .../package.json.meta | 7 + 119 files changed, 2797 insertions(+) create mode 100644 .yamato/environments.metafile create mode 100644 .yamato/project.metafile create mode 100644 .yamato/upm-ci.yml create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2020/CHANGELOG.md create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2020/CHANGELOG.md.meta create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2020/Documentation~/api_index.md create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2020/Documentation~/index.md create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2020/Editor.meta create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2020/Editor/Scripts.meta create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2020/Editor/Scripts/Draco.Webgl-2020.Editor.asmdef create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2020/Editor/Scripts/Draco.Webgl-2020.Editor.asmdef.meta create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2020/Editor/Scripts/SubPackageCleanup.cs create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2020/Editor/Scripts/SubPackageCleanup.cs.meta create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2020/LICENSE.md create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2020/LICENSE.md.meta create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2020/README.md create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2020/README.md.meta create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2020/Runtime.meta create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2020/Runtime/Plugins.meta create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2020/Runtime/Plugins/WebGL.meta create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2020/Runtime/Plugins/WebGL/libdraco_unity.bc create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2020/Runtime/Plugins/WebGL/libdraco_unity.bc.meta create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2020/Tests.meta create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2020/Tests/Editor.meta create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2020/Tests/Editor/Draco.Webgl-2020.Editor.Tests.asmdef create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2020/Tests/Editor/Draco.Webgl-2020.Editor.Tests.asmdef.meta create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2020/Tests/Editor/WebglEditorTests.cs create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2020/Tests/Editor/WebglEditorTests.cs.meta create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2020/Third Party Notices.md create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2020/Third Party Notices.md.meta create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2020/package.json create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2020/package.json.meta create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2021/CHANGELOG.md create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2021/CHANGELOG.md.meta create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2021/Documentation~/api_index.md create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2021/Documentation~/index.md create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2021/Editor.meta create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2021/Editor/Scripts.meta create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2021/Editor/Scripts/Draco.Webgl-2021.Editor.asmdef create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2021/Editor/Scripts/Draco.Webgl-2021.Editor.asmdef.meta create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2021/Editor/Scripts/SubPackageCleanup.cs create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2021/Editor/Scripts/SubPackageCleanup.cs.meta create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2021/LICENSE.md create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2021/LICENSE.md.meta create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2021/README.md create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2021/README.md.meta create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2021/Runtime.meta create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2021/Runtime/Plugins.meta create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2021/Runtime/Plugins/WebGL.meta create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2021/Runtime/Plugins/WebGL/libdraco_unity.a create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2021/Runtime/Plugins/WebGL/libdraco_unity.a.meta create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2021/Tests.meta create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2021/Tests/Editor.meta create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2021/Tests/Editor/Draco.Webgl-2021.Editor.Tests.asmdef create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2021/Tests/Editor/Draco.Webgl-2021.Editor.Tests.asmdef.meta create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2021/Tests/Editor/WebglEditorTests.cs create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2021/Tests/Editor/WebglEditorTests.cs.meta create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2021/Third Party Notices.md create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2021/Third Party Notices.md.meta create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2021/package.json create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2021/package.json.meta create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2022/CHANGELOG.md create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2022/CHANGELOG.md.meta create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2022/Documentation~/api_index.md create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2022/Documentation~/index.md create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2022/Editor.meta create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2022/Editor/Scripts.meta create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2022/Editor/Scripts/Draco.Webgl-2022.Editor.asmdef create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2022/Editor/Scripts/Draco.Webgl-2022.Editor.asmdef.meta create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2022/Editor/Scripts/SubPackageCleanup.cs create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2022/Editor/Scripts/SubPackageCleanup.cs.meta create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2022/LICENSE.md create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2022/LICENSE.md.meta create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2022/README.md create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2022/README.md.meta create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2022/Runtime.meta create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2022/Runtime/Plugins.meta create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2022/Runtime/Plugins/WebGL.meta create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2022/Runtime/Plugins/WebGL/libdraco_unity.a create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2022/Runtime/Plugins/WebGL/libdraco_unity.a.meta create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2022/Tests.meta create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2022/Tests/Editor.meta create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2022/Tests/Editor/Draco.Webgl-2022.Editor.Tests.asmdef create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2022/Tests/Editor/Draco.Webgl-2022.Editor.Tests.asmdef.meta create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2022/Tests/Editor/WebglEditorTests.cs create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2022/Tests/Editor/WebglEditorTests.cs.meta create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2022/Third Party Notices.md create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2022/Third Party Notices.md.meta create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2022/package.json create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2022/package.json.meta create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2023/CHANGELOG.md create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2023/CHANGELOG.md.meta create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2023/Documentation~/api_index.md create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2023/Documentation~/index.md create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2023/Editor.meta create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2023/Editor/Scripts.meta create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2023/Editor/Scripts/Draco.Webgl-2023.Editor.asmdef create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2023/Editor/Scripts/Draco.Webgl-2023.Editor.asmdef.meta create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2023/Editor/Scripts/SubPackageCleanup.cs create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2023/Editor/Scripts/SubPackageCleanup.cs.meta create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2023/LICENSE.md create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2023/LICENSE.md.meta create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2023/README.md create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2023/README.md.meta create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2023/Runtime.meta create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2023/Runtime/Plugins.meta create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2023/Runtime/Plugins/WebGL.meta create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2023/Runtime/Plugins/WebGL/libdraco_unity.a create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2023/Runtime/Plugins/WebGL/libdraco_unity.a.meta create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2023/Tests.meta create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2023/Tests/Editor.meta create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2023/Tests/Editor/Draco.Webgl-2023.Editor.Tests.asmdef create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2023/Tests/Editor/Draco.Webgl-2023.Editor.Tests.asmdef.meta create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2023/Tests/Editor/WebglEditorTests.cs create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2023/Tests/Editor/WebglEditorTests.cs.meta create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2023/Third Party Notices.md create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2023/Third Party Notices.md.meta create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2023/package.json create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2023/package.json.meta diff --git a/.yamato/environments.metafile b/.yamato/environments.metafile new file mode 100644 index 00000000..4f8aa63a --- /dev/null +++ b/.yamato/environments.metafile @@ -0,0 +1,44 @@ +log_path: "test_results~" + +artifactory_url: "https://artifactory.prd.cds.internal.unity3d.com/artifactory" +homebrew_url: "git@github.cds.internal.unity3d.com:unity/homebrew-unity.git" + +sonarqube_ci: + url: "https://sonarqube.internal.unity3d.com" + dependency: + name: "com.unity.ide.rider" + version: "3.0.13" + analysis: + - pr + - branch + +generic_project_path: .yamato/common/test_project~ +player_path: build/player + +npm_registry: "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates" +upm_ci_registry: "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm" + +ci: + win: + env_sonar_token: "!SONARQUBE_PROD_ACCESS_TOKEN!" + env_unity_path: "%UNITY_EDITOR_PATH%" + env_yamato_src_dir: "%YAMATO_SOURCE_DIR%" + tool_utr: "utr.bat" + android: + env_sonar_token: "!SONARQUBE_PROD_ACCESS_TOKEN!" + env_unity_path: "%UNITY_EDITOR_PATH%" + env_yamato_src_dir: "%YAMATO_SOURCE_DIR%" + tool_utr: "utr.bat" + mac: + env_sonar_token: "$SONARQUBE_PROD_ACCESS_TOKEN" + env_unity_path: "$UNITY_EDITOR_PATH" + env_yamato_src_dir: "$YAMATO_SOURCE_DIR" + tool_utr: "./utr" + +editor_component: + android: + args: "-c Android" + ios: + args: "-c iOS" + +build_and_run: [ build, run ] diff --git a/.yamato/project.metafile b/.yamato/project.metafile new file mode 100644 index 00000000..0843f511 --- /dev/null +++ b/.yamato/project.metafile @@ -0,0 +1,31 @@ +is_monorepo: !!bool true +enable_nightly: !!bool true +using_submodule: !!bool false +git_main_branch: main + +enable_codecov: !!bool false +enable_sonarqube: !!bool true + +upm_test_platforms: + - name: win + type: Unity::VM + flavor: b1.large + image: package-ci/win10:v4 + - name: mac + type: Unity::VM::osx + image: package-ci/macos-13:v4 + flavor: m1.mac + +web_packages: + - name: 2020 + emscripten_version: 1.38.48-fastcomp + unity_version: 2020.1 + - name: 2021 + emscripten_version: 2.0.19 + unity_version: 2021.2 + - name: 2022 + emscripten_version: 3.1.8 + unity_version: 2022.2 + - name: 2023 + emscripten_version: 3.1.38 + unity_version: 2023.2 diff --git a/.yamato/upm-ci.yml b/.yamato/upm-ci.yml new file mode 100644 index 00000000..92e6d759 --- /dev/null +++ b/.yamato/upm-ci.yml @@ -0,0 +1,166 @@ +{% metadata_file .yamato/environments.metafile %} +{% metadata_file .yamato/project.metafile %} +--- +{% for pkg in web_packages -%} +{% assign emscripten_version_suffix = pkg.emscripten_version | split: "-" | last %} +emscripten_{{pkg.name}}: + name: "Emscripten {{ pkg.name }}" + agent: + type: Unity::VM + image: package-ci/ubuntu-22.04:v4 + flavor: b1.small + commands: + +# TODO: Remove fastcomp support once 2020 is dropped +{% if emscripten_version_suffix == "fastcomp" %} + ## Fastcomp requires legacy version (tag 3.1.29 or sooner; Unity fork latest synced tag is 2.0.18) + - git clone -b 2.0.18 --single-branch https://github.com/Unity-Technologies/emsdk.git +{% else %} + # Clone Emscripten + - git clone -b 3.1.38-unity --single-branch https://github.com/Unity-Technologies/emsdk.git +{% endif %} + + # Install and activate correct Emscripten version + - | + pushd emsdk + ./emsdk install {{ pkg.emscripten_version }} + ./emsdk activate {{ pkg.emscripten_version }} + popd + + # Configure +{% if emscripten_version_suffix == "fastcomp" %} + - | + source ./emsdk/emsdk_env.sh + emcmake cmake . -B build_web -DEMSCRIPTEN_GENERATE_BITCODE_STATIC_LIBRARIES=1 -DCMAKE_BUILD_TYPE=MinSizeRel -DDRACO_JS_GLUE=OFF -DDRACO_UNITY_PLUGIN=ON -DDRACO_GLTF_BITSTREAM=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF +{% else %} + - | + source ./emsdk/emsdk_env.sh + EMSCRIPTEN="$EMSDK/upstream/emscripten" emcmake cmake . -B build_web -DCMAKE_BUILD_TYPE=MinSizeRel -DDRACO_JS_GLUE=OFF -DDRACO_UNITY_PLUGIN=ON -DDRACO_GLTF_BITSTREAM=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF +{% endif %} + + # Build + - | + source ./emsdk/emsdk_env.sh + cmake --build build_web --target draco_unity + + # Create and fill results folder + - | + mkdir -p wasm-binaries~/{{ pkg.name }} + mv build_web/libdraco_unity.* wasm-binaries~/{{ pkg.name }} + + artifacts: + wasm-binaries: + paths: + - "wasm-binaries~/**/*" +{% endfor -%} + +{% for pkg in web_packages -%} +upm_ci_pack_{{pkg.name}}: + name: "Pack {{ pkg.name }}" + agent: + type: Unity::VM + image: package-ci/ubuntu-22.04:v4 + flavor: b1.small + commands: + # Install upm-ci + - npm install upm-ci-utils@stable -g --registry {{upm_ci_registry}} + + # Move binaries into package + - mv wasm-binaries~/{{ pkg.name }}/lib*.* UnityPackages/com.unity.cloud.draco.webgl-{{ pkg.name }}/Runtime/Plugins/WebGL + + # Pack + - upm-ci package pack --package-path "UnityPackages/com.unity.cloud.draco.webgl-{{ pkg.name }}" + dependencies: + - .yamato/upm-ci.yml#emscripten_{{pkg.name}} + artifacts: + packages: + paths: + - "upm-ci~/packages/**/*" +{% endfor -%} + +{% for pkg in web_packages -%} +{% for platform in upm_test_platforms -%} +upm_ci_test_{{pkg.name}}_{{pkg.unity_version}}_{{platform.name}}: + name : "Test Editor {{pkg.name}} ({{ pkg.unity_version }}) on {{ platform.name }}" + agent: + type: {{platform.type}} + image: {{platform.image}} + flavor: {{platform.flavor}} + commands: + - npm install upm-ci-utils@stable -g --registry {{upm_ci_registry}} + - upm-ci package test --package-path "UnityPackages/com.unity.cloud.draco.webgl-{{ pkg.name }}" -u {{pkg.unity_version}} --type isolation-tests --enable-load-and-test-isolation + artifacts: + packages: + paths: + - "upm-ci~/packages/**/*" + logs: + paths: + - "upm-ci~/test-results/**/*" + dependencies: + - .yamato/upm-ci.yml#upm_ci_pack_{{pkg.name}} +{% endfor -%} +{% endfor -%} + +{% for pkg in web_packages -%} +upm_ci_publish_dry_run_{{pkg.name}}: + name: "Dry Run Publish {{ pkg.name }}" + agent: + type: Unity::VM + image: package-ci/win10:v4 + flavor: b1.small + commands: + - npm install upm-ci-utils@stable -g --registry {{ upm_ci_registry }} + # going for dry run until we're ready to do a real publish + - upm-ci package publish --package-path "UnityPackages/com.unity.cloud.draco.webgl-{{ pkg.name }}" --dry-run + dependencies: +{% for platform in upm_test_platforms -%} + - .yamato/upm-ci.yml#upm_ci_test_{{pkg.name}}_{{pkg.unity_version}}_{{platform.name}} +{% endfor -%} + artifacts: + logs_{{pkg.name}}: + paths: + - "{{ log_path }}/**/*" + package: + paths: + - "upm-ci~/packages/*.tgz" +{% endfor -%} + + +upm_ci_publish_dry_run: + name: "Dry Run Publish" + dependencies: +{% for pkg in web_packages -%} + - .yamato/upm-ci.yml#upm_ci_publish_dry_run_{{pkg.name}} +{% endfor -%} + + +{% for pkg in web_packages -%} +upm_ci_publish_{{pkg.name}}: + name: "Publish to Internal Registry {{ pkg.name }}" + agent: + type: Unity::VM + image: package-ci/win10:v4 + flavor: b1.small + commands: + - npm install upm-ci-utils@stable -g --registry {{ upm_ci_registry }} + # going for dry run until we're ready to do a real publish + - upm-ci package publish --package-path "UnityPackages/com.unity.cloud.draco.webgl-{{ pkg.name }}" + dependencies: +{% for platform in upm_test_platforms -%} + - .yamato/upm-ci.yml#upm_ci_test_{{pkg.name}}_{{pkg.unity_version}}_{{platform.name}} +{% endfor -%} + artifacts: + logs_{{pkg.name}}: + paths: + - "{{ log_path }}/**/*" + package: + paths: + - "upm-ci~/packages/*.tgz" +{% endfor -%} + +upm_ci_publish: + name: "Publish to Internal Registry" + dependencies: +{% for pkg in web_packages -%} + - .yamato/upm-ci.yml#upm_ci_publish_{{pkg.name}} +{% endfor -%} diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2020/CHANGELOG.md b/UnityPackages/com.unity.cloud.draco.webgl-2020/CHANGELOG.md new file mode 100644 index 00000000..6cbfec01 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2020/CHANGELOG.md @@ -0,0 +1,8 @@ +# Changelog +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [Unreleased] +Initial sub package publication diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2020/CHANGELOG.md.meta b/UnityPackages/com.unity.cloud.draco.webgl-2020/CHANGELOG.md.meta new file mode 100644 index 00000000..bd0c1721 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2020/CHANGELOG.md.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: c64fbbf7ad61f48138ee945a58fc837d +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2020/Documentation~/api_index.md b/UnityPackages/com.unity.cloud.draco.webgl-2020/Documentation~/api_index.md new file mode 100644 index 00000000..62116d29 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2020/Documentation~/api_index.md @@ -0,0 +1,17 @@ +--- +uid: api-index +--- + +# Draco for Unity WebGL Sub-Package API Documentation + +This package does not provide any public API. Instead please consult the documentation of its main package [Draco for Unity][DracoForUnity]. + +## Trademarks + +*Unity®* is a registered trademark of [Unity Technologies][Unity]. + +*Draco™* is a trademark of [*Google LLC*][GoogleLLC]. + +[DracoForUnity]: https://docs.unity3d.com/Packages/com.unity.cloud.draco@latest +[GoogleLLC]: https://about.google/ +[unity]: https://unity.com diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2020/Documentation~/index.md b/UnityPackages/com.unity.cloud.draco.webgl-2020/Documentation~/index.md new file mode 100644 index 00000000..58012a7e --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2020/Documentation~/index.md @@ -0,0 +1,16 @@ +# Draco for Unity WebGL Sub-Package Documentation + +This package contains a Unity® version specific WebGL native library of Draco™ (in the form of pre-compiled, binary [WebAssembly][wasm]). + +By itself it provides no functionality and should not get installed manually. It is a sub-package of its main package [Draco for Unity][DracoForUnity], which will install it automatically. If the main package is removed, this sub-package will remove itself automatically as well. + +## Trademarks + +*Unity®* is a registered trademark of [Unity Technologies][Unity]. + +*Draco™* is a trademark of [*Google LLC*][GoogleLLC]. + +[DracoForUnity]: https://docs.unity3d.com/Packages/com.unity.cloud.draco@latest +[GoogleLLC]: https://about.google/ +[unity]: https://unity.com +[wasm]: https://webassembly.org/ diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2020/Editor.meta b/UnityPackages/com.unity.cloud.draco.webgl-2020/Editor.meta new file mode 100644 index 00000000..e9271113 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2020/Editor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 3f80dedebc7bb4fbe902d6e26074c807 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2020/Editor/Scripts.meta b/UnityPackages/com.unity.cloud.draco.webgl-2020/Editor/Scripts.meta new file mode 100644 index 00000000..8c11f8db --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2020/Editor/Scripts.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 6a7f6146f61be4586b8fd6ee6c4d40ef +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2020/Editor/Scripts/Draco.Webgl-2020.Editor.asmdef b/UnityPackages/com.unity.cloud.draco.webgl-2020/Editor/Scripts/Draco.Webgl-2020.Editor.asmdef new file mode 100644 index 00000000..f242fe9d --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2020/Editor/Scripts/Draco.Webgl-2020.Editor.asmdef @@ -0,0 +1,16 @@ +{ + "name": "Draco.Webgl-2020.Editor", + "rootNamespace": "", + "references": [], + "includePlatforms": [ + "Editor" + ], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": true, + "defineConstraints": [], + "versionDefines": [], + "noEngineReferences": false +} \ No newline at end of file diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2020/Editor/Scripts/Draco.Webgl-2020.Editor.asmdef.meta b/UnityPackages/com.unity.cloud.draco.webgl-2020/Editor/Scripts/Draco.Webgl-2020.Editor.asmdef.meta new file mode 100644 index 00000000..e391fc5c --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2020/Editor/Scripts/Draco.Webgl-2020.Editor.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: a57b457131de14eecb45ae7aa1283957 +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2020/Editor/Scripts/SubPackageCleanup.cs b/UnityPackages/com.unity.cloud.draco.webgl-2020/Editor/Scripts/SubPackageCleanup.cs new file mode 100644 index 00000000..b37bf1df --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2020/Editor/Scripts/SubPackageCleanup.cs @@ -0,0 +1,41 @@ +using System.Threading.Tasks; +using UnityEditor; +using UnityEditor.PackageManager; +using UnityEngine; +using UnityEngine.Assertions; +using System.Linq; + +namespace SubPackage +{ + static class SubPackageCleanup + { + + const string k_Name = "com.unity.cloud.draco.webgl-2020"; + const string k_DisplayName = "Draco for Unity WebGL 2020"; + + static readonly string[] k_MainPackageNames = { + "com.unity.cloud.draco", + "com.atteneder.draco" + }; + +#if !DISABLE_SUB_PACKAGE_CHECK + [InitializeOnLoadMethod] +#endif + static async void InitializeOnLoad() + { + var request = Client.List(offlineMode: true, includeIndirectDependencies: false); + + while (!request.IsCompleted) + await Task.Yield(); + + Assert.AreEqual(StatusCode.Success, request.Status); + + var mainPackageInManifest = request.Result.Select(package => package.name).Intersect(k_MainPackageNames).Any(); + + if (!mainPackageInManifest) + { + Debug.LogWarning($"Package {k_DisplayName} ({k_Name}) is missing its main package Draco for Unity and should get removed."); + } + } + } +} diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2020/Editor/Scripts/SubPackageCleanup.cs.meta b/UnityPackages/com.unity.cloud.draco.webgl-2020/Editor/Scripts/SubPackageCleanup.cs.meta new file mode 100644 index 00000000..36f0060e --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2020/Editor/Scripts/SubPackageCleanup.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 1f2dafca8575b4ba28a3606a0d099668 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2020/LICENSE.md b/UnityPackages/com.unity.cloud.draco.webgl-2020/LICENSE.md new file mode 100644 index 00000000..8bef61a0 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2020/LICENSE.md @@ -0,0 +1,190 @@ +Draco for Unity WebGL 2020 copyright © 2023 Unity Technologies + +Licensed under the Apache License, Version 2.0 (the "License"); you may not +use this file except in compliance with the License. You may obtain a copy +of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +License for the specific language governing permissions and limitations +under the License. + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2020/LICENSE.md.meta b/UnityPackages/com.unity.cloud.draco.webgl-2020/LICENSE.md.meta new file mode 100644 index 00000000..e8b0bc70 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2020/LICENSE.md.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: a26b6bf724d744387907396fd3acf00c +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2020/README.md b/UnityPackages/com.unity.cloud.draco.webgl-2020/README.md new file mode 100644 index 00000000..7c3a8894 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2020/README.md @@ -0,0 +1,24 @@ +# Draco for Unity WebGL + +This package contains a Unity® version specific WebGL native library of Draco™ (in the form of pre-compiled, binary [WebAssembly][wasm]). + +By itself it provides no functionality. It is a sub-package of its main package [Draco for Unity][DracoForUnity]. + +## Documentation + +- [Package Documentation](Documentation~/index.md) + +## License + +- [License](LICENSE.md). + +## Trademarks + +*Unity®* is a registered trademark of [Unity Technologies][Unity]. + +*Draco™* is a trademark of [*Google LLC*][GoogleLLC]. + +[DracoForUnity]: https://docs.unity3d.com/Packages/com.unity.cloud.draco@latest +[GoogleLLC]: https://about.google/ +[unity]: https://unity.com +[wasm]: https://webassembly.org/ diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2020/README.md.meta b/UnityPackages/com.unity.cloud.draco.webgl-2020/README.md.meta new file mode 100644 index 00000000..2850453a --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2020/README.md.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: b6579a96d68c04f228541c77d3c5f9d5 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2020/Runtime.meta b/UnityPackages/com.unity.cloud.draco.webgl-2020/Runtime.meta new file mode 100644 index 00000000..2d55e345 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2020/Runtime.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d0c51af3fbe11462abb9bb1178eb2f1f +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2020/Runtime/Plugins.meta b/UnityPackages/com.unity.cloud.draco.webgl-2020/Runtime/Plugins.meta new file mode 100644 index 00000000..50ec821e --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2020/Runtime/Plugins.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 048800f5e23504c4c9752c50e5afcd4c +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2020/Runtime/Plugins/WebGL.meta b/UnityPackages/com.unity.cloud.draco.webgl-2020/Runtime/Plugins/WebGL.meta new file mode 100644 index 00000000..6609f053 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2020/Runtime/Plugins/WebGL.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4810bdff38bf748dcb8a511027328375 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2020/Runtime/Plugins/WebGL/libdraco_unity.bc b/UnityPackages/com.unity.cloud.draco.webgl-2020/Runtime/Plugins/WebGL/libdraco_unity.bc new file mode 100644 index 00000000..2e76cd11 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2020/Runtime/Plugins/WebGL/libdraco_unity.bc @@ -0,0 +1 @@ +This file is just a placeholder. Replace it with the actual binary library before packaging a release. diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2020/Runtime/Plugins/WebGL/libdraco_unity.bc.meta b/UnityPackages/com.unity.cloud.draco.webgl-2020/Runtime/Plugins/WebGL/libdraco_unity.bc.meta new file mode 100644 index 00000000..1613a496 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2020/Runtime/Plugins/WebGL/libdraco_unity.bc.meta @@ -0,0 +1,120 @@ +fileFormatVersion: 2 +guid: 692d6c209477c4cb1bc13b62f8de2477 +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 1 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + : Any + second: + enabled: 0 + settings: + Exclude Android: 1 + Exclude Editor: 1 + Exclude Linux: 1 + Exclude Linux64: 1 + Exclude LinuxUniversal: 1 + Exclude OSXUniversal: 1 + Exclude WebGL: 0 + Exclude Win: 1 + Exclude Win64: 1 + Exclude iOS: 1 + Exclude tvOS: 1 + - first: + Android: Android + second: + enabled: 0 + settings: + CPU: ARMv7 + - first: + Any: + second: + enabled: 0 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + CPU: AnyCPU + DefaultValueInitialized: true + OS: AnyOS + - first: + Facebook: WebGL + second: + enabled: 1 + settings: {} + - first: + Facebook: Win + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + Facebook: Win64 + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + Standalone: Linux + second: + enabled: 0 + settings: + CPU: x86 + - first: + Standalone: Linux64 + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + Standalone: OSXUniversal + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + Standalone: Win + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + Standalone: Win64 + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + WebGL: WebGL + second: + enabled: 1 + settings: {} + - first: + iPhone: iOS + second: + enabled: 0 + settings: + AddToEmbeddedBinaries: false + CPU: AnyCPU + CompileFlags: + FrameworkDependencies: + - first: + tvOS: tvOS + second: + enabled: 0 + settings: + CPU: AnyCPU + CompileFlags: + FrameworkDependencies: + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2020/Tests.meta b/UnityPackages/com.unity.cloud.draco.webgl-2020/Tests.meta new file mode 100644 index 00000000..42d9088a --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2020/Tests.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: fa64b979bff5d4d99949c13d66629961 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2020/Tests/Editor.meta b/UnityPackages/com.unity.cloud.draco.webgl-2020/Tests/Editor.meta new file mode 100644 index 00000000..6ff19f80 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2020/Tests/Editor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8f50a28e5c18e4f668ea0c95beca5f9e +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2020/Tests/Editor/Draco.Webgl-2020.Editor.Tests.asmdef b/UnityPackages/com.unity.cloud.draco.webgl-2020/Tests/Editor/Draco.Webgl-2020.Editor.Tests.asmdef new file mode 100644 index 00000000..91bd599c --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2020/Tests/Editor/Draco.Webgl-2020.Editor.Tests.asmdef @@ -0,0 +1,24 @@ +{ + "name": "Draco.Webgl-2020.Editor.Tests", + "rootNamespace": "", + "references": [ + "UnityEngine.TestRunner", + "UnityEditor.TestRunner", + "Unity.Mathematics" + ], + "includePlatforms": [ + "Editor" + ], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": true, + "precompiledReferences": [ + "nunit.framework.dll" + ], + "autoReferenced": false, + "defineConstraints": [ + "UNITY_INCLUDE_TESTS" + ], + "versionDefines": [], + "noEngineReferences": false +} \ No newline at end of file diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2020/Tests/Editor/Draco.Webgl-2020.Editor.Tests.asmdef.meta b/UnityPackages/com.unity.cloud.draco.webgl-2020/Tests/Editor/Draco.Webgl-2020.Editor.Tests.asmdef.meta new file mode 100644 index 00000000..fcf93abe --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2020/Tests/Editor/Draco.Webgl-2020.Editor.Tests.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: fe6036014c2d74ed5b4b69b6b0a6c38a +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2020/Tests/Editor/WebglEditorTests.cs b/UnityPackages/com.unity.cloud.draco.webgl-2020/Tests/Editor/WebglEditorTests.cs new file mode 100644 index 00000000..7f8f9bbc --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2020/Tests/Editor/WebglEditorTests.cs @@ -0,0 +1,30 @@ +using System.IO; +using NUnit.Framework; +using UnityEngine; +using File = UnityEngine.Windows.File; + +namespace KtxUnity.Webgl.Editor.Tests +{ + class WebglEditorTests + { + const string k_PackagePrefix = "Packages/com.unity.cloud.draco.webgl-2020/Runtime/Plugins/WebGL"; + + static readonly string[] k_WebglBinaries = { + $"{k_PackagePrefix}/libdracodec_unity.bc", + $"{k_PackagePrefix}/libdracoenc_unity.bc" + }; + + [Test] + public void CheckNativeLibSize() + { + foreach (var webglBinary in k_WebglBinaries) + { + Assert.IsTrue(File.Exists(webglBinary)); + var fi = new FileInfo(webglBinary); + // In source (GIT) the native WebGL library files are placeholders with a few bytes of text in them. + // The CI will replace them with actual binaries, all significantly bigger than 1024 bytes. + Assert.Greater(fi.Length, 1024); + } + } + } +} diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2020/Tests/Editor/WebglEditorTests.cs.meta b/UnityPackages/com.unity.cloud.draco.webgl-2020/Tests/Editor/WebglEditorTests.cs.meta new file mode 100644 index 00000000..489185bb --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2020/Tests/Editor/WebglEditorTests.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f5eb616797dda46bcb26e589af0f1060 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2020/Third Party Notices.md b/UnityPackages/com.unity.cloud.draco.webgl-2020/Third Party Notices.md new file mode 100644 index 00000000..9b8d40f3 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2020/Third Party Notices.md @@ -0,0 +1,32 @@ +# Third party notices + +This package contains third-party software components governed by the license(s) indicated below: + +## Draco + +Component Name: Draco™ 3D Data Compression + +License Type: Apache 2.0 + +Copyright © 2018 The Draco Authors + +[Draco][Draco] + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +## Trademarks + +*Draco™* is a trademark of [*Google LLC*][GoogleLLC]. + +[Draco]: https://github.com/google/draco +[GoogleLLC]: https://about.google/ diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2020/Third Party Notices.md.meta b/UnityPackages/com.unity.cloud.draco.webgl-2020/Third Party Notices.md.meta new file mode 100644 index 00000000..82de3c29 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2020/Third Party Notices.md.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 8246ead4c0f034134a737cce7030c13b +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2020/package.json b/UnityPackages/com.unity.cloud.draco.webgl-2020/package.json new file mode 100644 index 00000000..fb5c1ac9 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2020/package.json @@ -0,0 +1,7 @@ +{ + "name": "com.unity.cloud.draco.webgl-2020", + "version": "0.1.0", + "displayName": "Draco for Unity WebGL 2020", + "description": "Provides the Draco for Unity package with WebGL native libraries for Unity versions 2020.1 to 2021.1", + "unity": "2020.1" +} diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2020/package.json.meta b/UnityPackages/com.unity.cloud.draco.webgl-2020/package.json.meta new file mode 100644 index 00000000..d735128b --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2020/package.json.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 382cbd2d2416e499ba6711f5212b4e67 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2021/CHANGELOG.md b/UnityPackages/com.unity.cloud.draco.webgl-2021/CHANGELOG.md new file mode 100644 index 00000000..6cbfec01 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2021/CHANGELOG.md @@ -0,0 +1,8 @@ +# Changelog +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [Unreleased] +Initial sub package publication diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2021/CHANGELOG.md.meta b/UnityPackages/com.unity.cloud.draco.webgl-2021/CHANGELOG.md.meta new file mode 100644 index 00000000..7de43b33 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2021/CHANGELOG.md.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: ec935b784efe04171af1a0da9c416e32 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2021/Documentation~/api_index.md b/UnityPackages/com.unity.cloud.draco.webgl-2021/Documentation~/api_index.md new file mode 100644 index 00000000..62116d29 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2021/Documentation~/api_index.md @@ -0,0 +1,17 @@ +--- +uid: api-index +--- + +# Draco for Unity WebGL Sub-Package API Documentation + +This package does not provide any public API. Instead please consult the documentation of its main package [Draco for Unity][DracoForUnity]. + +## Trademarks + +*Unity®* is a registered trademark of [Unity Technologies][Unity]. + +*Draco™* is a trademark of [*Google LLC*][GoogleLLC]. + +[DracoForUnity]: https://docs.unity3d.com/Packages/com.unity.cloud.draco@latest +[GoogleLLC]: https://about.google/ +[unity]: https://unity.com diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2021/Documentation~/index.md b/UnityPackages/com.unity.cloud.draco.webgl-2021/Documentation~/index.md new file mode 100644 index 00000000..58012a7e --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2021/Documentation~/index.md @@ -0,0 +1,16 @@ +# Draco for Unity WebGL Sub-Package Documentation + +This package contains a Unity® version specific WebGL native library of Draco™ (in the form of pre-compiled, binary [WebAssembly][wasm]). + +By itself it provides no functionality and should not get installed manually. It is a sub-package of its main package [Draco for Unity][DracoForUnity], which will install it automatically. If the main package is removed, this sub-package will remove itself automatically as well. + +## Trademarks + +*Unity®* is a registered trademark of [Unity Technologies][Unity]. + +*Draco™* is a trademark of [*Google LLC*][GoogleLLC]. + +[DracoForUnity]: https://docs.unity3d.com/Packages/com.unity.cloud.draco@latest +[GoogleLLC]: https://about.google/ +[unity]: https://unity.com +[wasm]: https://webassembly.org/ diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2021/Editor.meta b/UnityPackages/com.unity.cloud.draco.webgl-2021/Editor.meta new file mode 100644 index 00000000..03a90673 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2021/Editor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 1c55d1aa684e34900bc58e74e395ecff +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2021/Editor/Scripts.meta b/UnityPackages/com.unity.cloud.draco.webgl-2021/Editor/Scripts.meta new file mode 100644 index 00000000..fdef8d09 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2021/Editor/Scripts.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 21d09c099fe9946e58b447a37c33a539 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2021/Editor/Scripts/Draco.Webgl-2021.Editor.asmdef b/UnityPackages/com.unity.cloud.draco.webgl-2021/Editor/Scripts/Draco.Webgl-2021.Editor.asmdef new file mode 100644 index 00000000..2fbb58be --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2021/Editor/Scripts/Draco.Webgl-2021.Editor.asmdef @@ -0,0 +1,16 @@ +{ + "name": "Draco.Webgl-2021.Editor", + "rootNamespace": "", + "references": [], + "includePlatforms": [ + "Editor" + ], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": true, + "defineConstraints": [], + "versionDefines": [], + "noEngineReferences": false +} \ No newline at end of file diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2021/Editor/Scripts/Draco.Webgl-2021.Editor.asmdef.meta b/UnityPackages/com.unity.cloud.draco.webgl-2021/Editor/Scripts/Draco.Webgl-2021.Editor.asmdef.meta new file mode 100644 index 00000000..f5ada19f --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2021/Editor/Scripts/Draco.Webgl-2021.Editor.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: bd6f034f2e1e44f42b4132fc11c13f1a +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2021/Editor/Scripts/SubPackageCleanup.cs b/UnityPackages/com.unity.cloud.draco.webgl-2021/Editor/Scripts/SubPackageCleanup.cs new file mode 100644 index 00000000..3d3dd4df --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2021/Editor/Scripts/SubPackageCleanup.cs @@ -0,0 +1,41 @@ +using System.Threading.Tasks; +using UnityEditor; +using UnityEditor.PackageManager; +using UnityEngine; +using UnityEngine.Assertions; +using System.Linq; + +namespace SubPackage +{ + static class SubPackageCleanup + { + + const string k_Name = "com.unity.cloud.draco.webgl-2021"; + const string k_DisplayName = "Draco for Unity WebGL 2021"; + + static readonly string[] k_MainPackageNames = { + "com.unity.cloud.draco", + "com.atteneder.draco" + }; + +#if !DISABLE_SUB_PACKAGE_CHECK + [InitializeOnLoadMethod] +#endif + static async void InitializeOnLoad() + { + var request = Client.List(offlineMode: true, includeIndirectDependencies: false); + + while (!request.IsCompleted) + await Task.Yield(); + + Assert.AreEqual(StatusCode.Success, request.Status); + + var mainPackageInManifest = request.Result.Select(package => package.name).Intersect(k_MainPackageNames).Any(); + + if (!mainPackageInManifest) + { + Debug.LogWarning($"Package {k_DisplayName} ({k_Name}) is missing its main package Draco for Unity and should get removed."); + } + } + } +} diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2021/Editor/Scripts/SubPackageCleanup.cs.meta b/UnityPackages/com.unity.cloud.draco.webgl-2021/Editor/Scripts/SubPackageCleanup.cs.meta new file mode 100644 index 00000000..75203e78 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2021/Editor/Scripts/SubPackageCleanup.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c09bfecf0894540cdbaad5ca8e01d15f +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2021/LICENSE.md b/UnityPackages/com.unity.cloud.draco.webgl-2021/LICENSE.md new file mode 100644 index 00000000..b5a74a6d --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2021/LICENSE.md @@ -0,0 +1,190 @@ +Draco for Unity WebGL 2021 copyright © 2023 Unity Technologies + +Licensed under the Apache License, Version 2.0 (the "License"); you may not +use this file except in compliance with the License. You may obtain a copy +of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +License for the specific language governing permissions and limitations +under the License. + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2021/LICENSE.md.meta b/UnityPackages/com.unity.cloud.draco.webgl-2021/LICENSE.md.meta new file mode 100644 index 00000000..177e4909 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2021/LICENSE.md.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 7867c8945535949ffa2a2b69d925d2a9 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2021/README.md b/UnityPackages/com.unity.cloud.draco.webgl-2021/README.md new file mode 100644 index 00000000..7c3a8894 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2021/README.md @@ -0,0 +1,24 @@ +# Draco for Unity WebGL + +This package contains a Unity® version specific WebGL native library of Draco™ (in the form of pre-compiled, binary [WebAssembly][wasm]). + +By itself it provides no functionality. It is a sub-package of its main package [Draco for Unity][DracoForUnity]. + +## Documentation + +- [Package Documentation](Documentation~/index.md) + +## License + +- [License](LICENSE.md). + +## Trademarks + +*Unity®* is a registered trademark of [Unity Technologies][Unity]. + +*Draco™* is a trademark of [*Google LLC*][GoogleLLC]. + +[DracoForUnity]: https://docs.unity3d.com/Packages/com.unity.cloud.draco@latest +[GoogleLLC]: https://about.google/ +[unity]: https://unity.com +[wasm]: https://webassembly.org/ diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2021/README.md.meta b/UnityPackages/com.unity.cloud.draco.webgl-2021/README.md.meta new file mode 100644 index 00000000..046ee817 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2021/README.md.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 4ba200b4fe6a14729aa882b5f3dc3a04 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2021/Runtime.meta b/UnityPackages/com.unity.cloud.draco.webgl-2021/Runtime.meta new file mode 100644 index 00000000..0b292695 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2021/Runtime.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 3bbfbfc4be76144e49c0d81db97f61f0 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2021/Runtime/Plugins.meta b/UnityPackages/com.unity.cloud.draco.webgl-2021/Runtime/Plugins.meta new file mode 100644 index 00000000..e03801dd --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2021/Runtime/Plugins.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ffe004ac2d8ee48ad8e8ff2cc115d892 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2021/Runtime/Plugins/WebGL.meta b/UnityPackages/com.unity.cloud.draco.webgl-2021/Runtime/Plugins/WebGL.meta new file mode 100644 index 00000000..eaf5e110 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2021/Runtime/Plugins/WebGL.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b6353ad8a4126467bbc242b6efa98e1b +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2021/Runtime/Plugins/WebGL/libdraco_unity.a b/UnityPackages/com.unity.cloud.draco.webgl-2021/Runtime/Plugins/WebGL/libdraco_unity.a new file mode 100644 index 00000000..2e76cd11 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2021/Runtime/Plugins/WebGL/libdraco_unity.a @@ -0,0 +1 @@ +This file is just a placeholder. Replace it with the actual binary library before packaging a release. diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2021/Runtime/Plugins/WebGL/libdraco_unity.a.meta b/UnityPackages/com.unity.cloud.draco.webgl-2021/Runtime/Plugins/WebGL/libdraco_unity.a.meta new file mode 100644 index 00000000..7c3c860e --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2021/Runtime/Plugins/WebGL/libdraco_unity.a.meta @@ -0,0 +1,120 @@ +fileFormatVersion: 2 +guid: 074a3850ab1b5464ab623ec133d00dd5 +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 1 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + : Any + second: + enabled: 0 + settings: + Exclude Android: 1 + Exclude Editor: 1 + Exclude Linux: 1 + Exclude Linux64: 1 + Exclude LinuxUniversal: 1 + Exclude OSXUniversal: 1 + Exclude WebGL: 0 + Exclude Win: 1 + Exclude Win64: 1 + Exclude iOS: 1 + Exclude tvOS: 1 + - first: + Android: Android + second: + enabled: 0 + settings: + CPU: ARMv7 + - first: + Any: + second: + enabled: 0 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + CPU: AnyCPU + DefaultValueInitialized: true + OS: AnyOS + - first: + Facebook: WebGL + second: + enabled: 1 + settings: {} + - first: + Facebook: Win + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + Facebook: Win64 + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + Standalone: Linux + second: + enabled: 0 + settings: + CPU: x86 + - first: + Standalone: Linux64 + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + Standalone: OSXUniversal + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + Standalone: Win + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + Standalone: Win64 + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + WebGL: WebGL + second: + enabled: 1 + settings: {} + - first: + iPhone: iOS + second: + enabled: 0 + settings: + AddToEmbeddedBinaries: false + CPU: AnyCPU + CompileFlags: + FrameworkDependencies: + - first: + tvOS: tvOS + second: + enabled: 0 + settings: + CPU: AnyCPU + CompileFlags: + FrameworkDependencies: + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2021/Tests.meta b/UnityPackages/com.unity.cloud.draco.webgl-2021/Tests.meta new file mode 100644 index 00000000..b04941ac --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2021/Tests.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b8a8c1a85d2134cb7a8b19dfd05fc131 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2021/Tests/Editor.meta b/UnityPackages/com.unity.cloud.draco.webgl-2021/Tests/Editor.meta new file mode 100644 index 00000000..3e3cdd8e --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2021/Tests/Editor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f3f82c16686da4e39ac4746535eb2509 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2021/Tests/Editor/Draco.Webgl-2021.Editor.Tests.asmdef b/UnityPackages/com.unity.cloud.draco.webgl-2021/Tests/Editor/Draco.Webgl-2021.Editor.Tests.asmdef new file mode 100644 index 00000000..a7803c17 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2021/Tests/Editor/Draco.Webgl-2021.Editor.Tests.asmdef @@ -0,0 +1,24 @@ +{ + "name": "Draco.Webgl-2021.Editor.Tests", + "rootNamespace": "", + "references": [ + "UnityEngine.TestRunner", + "UnityEditor.TestRunner", + "Unity.Mathematics" + ], + "includePlatforms": [ + "Editor" + ], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": true, + "precompiledReferences": [ + "nunit.framework.dll" + ], + "autoReferenced": false, + "defineConstraints": [ + "UNITY_INCLUDE_TESTS" + ], + "versionDefines": [], + "noEngineReferences": false +} \ No newline at end of file diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2021/Tests/Editor/Draco.Webgl-2021.Editor.Tests.asmdef.meta b/UnityPackages/com.unity.cloud.draco.webgl-2021/Tests/Editor/Draco.Webgl-2021.Editor.Tests.asmdef.meta new file mode 100644 index 00000000..27750281 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2021/Tests/Editor/Draco.Webgl-2021.Editor.Tests.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: b5d8b88ebb9e74348b10be4366c5bd2a +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2021/Tests/Editor/WebglEditorTests.cs b/UnityPackages/com.unity.cloud.draco.webgl-2021/Tests/Editor/WebglEditorTests.cs new file mode 100644 index 00000000..b7714abd --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2021/Tests/Editor/WebglEditorTests.cs @@ -0,0 +1,30 @@ +using System.IO; +using NUnit.Framework; +using UnityEngine; +using File = UnityEngine.Windows.File; + +namespace KtxUnity.Webgl.Editor.Tests +{ + class WebglEditorTests + { + const string k_PackagePrefix = "Packages/com.unity.cloud.draco.webgl-2021/Runtime/Plugins/WebGL"; + + static readonly string[] k_WebglBinaries = { + $"{k_PackagePrefix}/libdracodec_unity.a", + $"{k_PackagePrefix}/libdracoenc_unity.a" + }; + + [Test] + public void CheckNativeLibSize() + { + foreach (var webglBinary in k_WebglBinaries) + { + Assert.IsTrue(File.Exists(webglBinary)); + var fi = new FileInfo(webglBinary); + // In source (GIT) the native WebGL library files are placeholders with a few bytes of text in them. + // The CI will replace them with actual binaries, all significantly bigger than 1024 bytes. + Assert.Greater(fi.Length, 1024); + } + } + } +} diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2021/Tests/Editor/WebglEditorTests.cs.meta b/UnityPackages/com.unity.cloud.draco.webgl-2021/Tests/Editor/WebglEditorTests.cs.meta new file mode 100644 index 00000000..e9d5b3f9 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2021/Tests/Editor/WebglEditorTests.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 8a4ea1ec9340f449897f33640aa92ece +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2021/Third Party Notices.md b/UnityPackages/com.unity.cloud.draco.webgl-2021/Third Party Notices.md new file mode 100644 index 00000000..9b8d40f3 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2021/Third Party Notices.md @@ -0,0 +1,32 @@ +# Third party notices + +This package contains third-party software components governed by the license(s) indicated below: + +## Draco + +Component Name: Draco™ 3D Data Compression + +License Type: Apache 2.0 + +Copyright © 2018 The Draco Authors + +[Draco][Draco] + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +## Trademarks + +*Draco™* is a trademark of [*Google LLC*][GoogleLLC]. + +[Draco]: https://github.com/google/draco +[GoogleLLC]: https://about.google/ diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2021/Third Party Notices.md.meta b/UnityPackages/com.unity.cloud.draco.webgl-2021/Third Party Notices.md.meta new file mode 100644 index 00000000..dedbddda --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2021/Third Party Notices.md.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 3c0dcb86684f14d848d65f7eb07f39a9 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2021/package.json b/UnityPackages/com.unity.cloud.draco.webgl-2021/package.json new file mode 100644 index 00000000..2e6e5cea --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2021/package.json @@ -0,0 +1,7 @@ +{ + "name": "com.unity.cloud.draco.webgl-2021", + "version": "0.1.0", + "displayName": "Draco for Unity WebGL 2021", + "description": "Provides the Draco for Unity package with WebGL native libraries for Unity versions 2021.2 to 2022.1", + "unity": "2021.2" +} diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2021/package.json.meta b/UnityPackages/com.unity.cloud.draco.webgl-2021/package.json.meta new file mode 100644 index 00000000..8a771baa --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2021/package.json.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 351edd2b504e245759e5195b72edf612 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2022/CHANGELOG.md b/UnityPackages/com.unity.cloud.draco.webgl-2022/CHANGELOG.md new file mode 100644 index 00000000..6cbfec01 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2022/CHANGELOG.md @@ -0,0 +1,8 @@ +# Changelog +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [Unreleased] +Initial sub package publication diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2022/CHANGELOG.md.meta b/UnityPackages/com.unity.cloud.draco.webgl-2022/CHANGELOG.md.meta new file mode 100644 index 00000000..01b57b4f --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2022/CHANGELOG.md.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 18a072c52df7f4eec9c41d63e6d8277c +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2022/Documentation~/api_index.md b/UnityPackages/com.unity.cloud.draco.webgl-2022/Documentation~/api_index.md new file mode 100644 index 00000000..62116d29 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2022/Documentation~/api_index.md @@ -0,0 +1,17 @@ +--- +uid: api-index +--- + +# Draco for Unity WebGL Sub-Package API Documentation + +This package does not provide any public API. Instead please consult the documentation of its main package [Draco for Unity][DracoForUnity]. + +## Trademarks + +*Unity®* is a registered trademark of [Unity Technologies][Unity]. + +*Draco™* is a trademark of [*Google LLC*][GoogleLLC]. + +[DracoForUnity]: https://docs.unity3d.com/Packages/com.unity.cloud.draco@latest +[GoogleLLC]: https://about.google/ +[unity]: https://unity.com diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2022/Documentation~/index.md b/UnityPackages/com.unity.cloud.draco.webgl-2022/Documentation~/index.md new file mode 100644 index 00000000..58012a7e --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2022/Documentation~/index.md @@ -0,0 +1,16 @@ +# Draco for Unity WebGL Sub-Package Documentation + +This package contains a Unity® version specific WebGL native library of Draco™ (in the form of pre-compiled, binary [WebAssembly][wasm]). + +By itself it provides no functionality and should not get installed manually. It is a sub-package of its main package [Draco for Unity][DracoForUnity], which will install it automatically. If the main package is removed, this sub-package will remove itself automatically as well. + +## Trademarks + +*Unity®* is a registered trademark of [Unity Technologies][Unity]. + +*Draco™* is a trademark of [*Google LLC*][GoogleLLC]. + +[DracoForUnity]: https://docs.unity3d.com/Packages/com.unity.cloud.draco@latest +[GoogleLLC]: https://about.google/ +[unity]: https://unity.com +[wasm]: https://webassembly.org/ diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2022/Editor.meta b/UnityPackages/com.unity.cloud.draco.webgl-2022/Editor.meta new file mode 100644 index 00000000..5feb38d6 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2022/Editor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e84e6bdc08ae04891a66e0c94f9ca9c7 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2022/Editor/Scripts.meta b/UnityPackages/com.unity.cloud.draco.webgl-2022/Editor/Scripts.meta new file mode 100644 index 00000000..574932a5 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2022/Editor/Scripts.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e7ed3a37b5c1c49b9b6d0f8947f3c13a +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2022/Editor/Scripts/Draco.Webgl-2022.Editor.asmdef b/UnityPackages/com.unity.cloud.draco.webgl-2022/Editor/Scripts/Draco.Webgl-2022.Editor.asmdef new file mode 100644 index 00000000..d027a579 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2022/Editor/Scripts/Draco.Webgl-2022.Editor.asmdef @@ -0,0 +1,16 @@ +{ + "name": "Draco.Webgl-2022.Editor", + "rootNamespace": "", + "references": [], + "includePlatforms": [ + "Editor" + ], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": true, + "defineConstraints": [], + "versionDefines": [], + "noEngineReferences": false +} \ No newline at end of file diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2022/Editor/Scripts/Draco.Webgl-2022.Editor.asmdef.meta b/UnityPackages/com.unity.cloud.draco.webgl-2022/Editor/Scripts/Draco.Webgl-2022.Editor.asmdef.meta new file mode 100644 index 00000000..b4fb93b5 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2022/Editor/Scripts/Draco.Webgl-2022.Editor.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 0046984de76af46b188691c4c2c87244 +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2022/Editor/Scripts/SubPackageCleanup.cs b/UnityPackages/com.unity.cloud.draco.webgl-2022/Editor/Scripts/SubPackageCleanup.cs new file mode 100644 index 00000000..c4798c01 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2022/Editor/Scripts/SubPackageCleanup.cs @@ -0,0 +1,41 @@ +using System.Threading.Tasks; +using UnityEditor; +using UnityEditor.PackageManager; +using UnityEngine; +using UnityEngine.Assertions; +using System.Linq; + +namespace SubPackage +{ + static class SubPackageCleanup + { + + const string k_Name = "com.unity.cloud.draco.webgl-2022"; + const string k_DisplayName = "Draco for Unity WebGL 2022"; + + static readonly string[] k_MainPackageNames = { + "com.unity.cloud.draco", + "com.atteneder.draco" + }; + +#if !DISABLE_SUB_PACKAGE_CHECK + [InitializeOnLoadMethod] +#endif + static async void InitializeOnLoad() + { + var request = Client.List(offlineMode: true, includeIndirectDependencies: false); + + while (!request.IsCompleted) + await Task.Yield(); + + Assert.AreEqual(StatusCode.Success, request.Status); + + var mainPackageInManifest = request.Result.Select(package => package.name).Intersect(k_MainPackageNames).Any(); + + if (!mainPackageInManifest) + { + Debug.LogWarning($"Package {k_DisplayName} ({k_Name}) is missing its main package Draco for Unity and should get removed."); + } + } + } +} diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2022/Editor/Scripts/SubPackageCleanup.cs.meta b/UnityPackages/com.unity.cloud.draco.webgl-2022/Editor/Scripts/SubPackageCleanup.cs.meta new file mode 100644 index 00000000..8a18fc08 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2022/Editor/Scripts/SubPackageCleanup.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 728726a72bdfe442dab4f46c17fb5ce9 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2022/LICENSE.md b/UnityPackages/com.unity.cloud.draco.webgl-2022/LICENSE.md new file mode 100644 index 00000000..2598378a --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2022/LICENSE.md @@ -0,0 +1,190 @@ +Draco for Unity WebGL 2022 copyright © 2023 Unity Technologies + +Licensed under the Apache License, Version 2.0 (the "License"); you may not +use this file except in compliance with the License. You may obtain a copy +of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +License for the specific language governing permissions and limitations +under the License. + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2022/LICENSE.md.meta b/UnityPackages/com.unity.cloud.draco.webgl-2022/LICENSE.md.meta new file mode 100644 index 00000000..10ba7ccb --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2022/LICENSE.md.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: f9f4dc5f045614770ba8176b259e2c92 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2022/README.md b/UnityPackages/com.unity.cloud.draco.webgl-2022/README.md new file mode 100644 index 00000000..7c3a8894 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2022/README.md @@ -0,0 +1,24 @@ +# Draco for Unity WebGL + +This package contains a Unity® version specific WebGL native library of Draco™ (in the form of pre-compiled, binary [WebAssembly][wasm]). + +By itself it provides no functionality. It is a sub-package of its main package [Draco for Unity][DracoForUnity]. + +## Documentation + +- [Package Documentation](Documentation~/index.md) + +## License + +- [License](LICENSE.md). + +## Trademarks + +*Unity®* is a registered trademark of [Unity Technologies][Unity]. + +*Draco™* is a trademark of [*Google LLC*][GoogleLLC]. + +[DracoForUnity]: https://docs.unity3d.com/Packages/com.unity.cloud.draco@latest +[GoogleLLC]: https://about.google/ +[unity]: https://unity.com +[wasm]: https://webassembly.org/ diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2022/README.md.meta b/UnityPackages/com.unity.cloud.draco.webgl-2022/README.md.meta new file mode 100644 index 00000000..96cc6792 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2022/README.md.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 80fafea728f7446a7abb83eed6241982 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2022/Runtime.meta b/UnityPackages/com.unity.cloud.draco.webgl-2022/Runtime.meta new file mode 100644 index 00000000..725c4314 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2022/Runtime.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: bd9000a6c26f54904b82e3f3ee1cb060 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2022/Runtime/Plugins.meta b/UnityPackages/com.unity.cloud.draco.webgl-2022/Runtime/Plugins.meta new file mode 100644 index 00000000..3ad60b1a --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2022/Runtime/Plugins.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7a2de489330434900817b5905649e4da +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2022/Runtime/Plugins/WebGL.meta b/UnityPackages/com.unity.cloud.draco.webgl-2022/Runtime/Plugins/WebGL.meta new file mode 100644 index 00000000..285ab94c --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2022/Runtime/Plugins/WebGL.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f0587fdbd8edb47018f4491a91833351 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2022/Runtime/Plugins/WebGL/libdraco_unity.a b/UnityPackages/com.unity.cloud.draco.webgl-2022/Runtime/Plugins/WebGL/libdraco_unity.a new file mode 100644 index 00000000..2e76cd11 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2022/Runtime/Plugins/WebGL/libdraco_unity.a @@ -0,0 +1 @@ +This file is just a placeholder. Replace it with the actual binary library before packaging a release. diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2022/Runtime/Plugins/WebGL/libdraco_unity.a.meta b/UnityPackages/com.unity.cloud.draco.webgl-2022/Runtime/Plugins/WebGL/libdraco_unity.a.meta new file mode 100644 index 00000000..879a55f5 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2022/Runtime/Plugins/WebGL/libdraco_unity.a.meta @@ -0,0 +1,88 @@ +fileFormatVersion: 2 +guid: 06fc7fca094804c01ae9588a1501496e +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 1 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + : Any + second: + enabled: 0 + settings: + Exclude Editor: 1 + Exclude Linux64: 1 + Exclude OSXUniversal: 1 + Exclude WebGL: 0 + Exclude Win: 1 + Exclude Win64: 1 + Exclude iOS: 1 + Exclude tvOS: 1 + - first: + Any: + second: + enabled: 0 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + CPU: AnyCPU + DefaultValueInitialized: true + OS: AnyOS + - first: + Standalone: Linux64 + second: + enabled: 0 + settings: + CPU: None + - first: + Standalone: OSXUniversal + second: + enabled: 0 + settings: + CPU: None + - first: + Standalone: Win + second: + enabled: 0 + settings: + CPU: None + - first: + Standalone: Win64 + second: + enabled: 0 + settings: + CPU: None + - first: + WebGL: WebGL + second: + enabled: 1 + settings: {} + - first: + iPhone: iOS + second: + enabled: 0 + settings: + AddToEmbeddedBinaries: false + CPU: AnyCPU + CompileFlags: + FrameworkDependencies: + - first: + tvOS: tvOS + second: + enabled: 0 + settings: + CPU: AnyCPU + CompileFlags: + FrameworkDependencies: + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2022/Tests.meta b/UnityPackages/com.unity.cloud.draco.webgl-2022/Tests.meta new file mode 100644 index 00000000..f76f0c70 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2022/Tests.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f289c492ad2b64993b4fa2a76e211966 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2022/Tests/Editor.meta b/UnityPackages/com.unity.cloud.draco.webgl-2022/Tests/Editor.meta new file mode 100644 index 00000000..00d26790 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2022/Tests/Editor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a375453e35efc4a21b03228b1df14eee +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2022/Tests/Editor/Draco.Webgl-2022.Editor.Tests.asmdef b/UnityPackages/com.unity.cloud.draco.webgl-2022/Tests/Editor/Draco.Webgl-2022.Editor.Tests.asmdef new file mode 100644 index 00000000..77ab5049 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2022/Tests/Editor/Draco.Webgl-2022.Editor.Tests.asmdef @@ -0,0 +1,24 @@ +{ + "name": "Draco.Webgl-2022.Editor.Tests", + "rootNamespace": "", + "references": [ + "UnityEngine.TestRunner", + "UnityEditor.TestRunner", + "Unity.Mathematics" + ], + "includePlatforms": [ + "Editor" + ], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": true, + "precompiledReferences": [ + "nunit.framework.dll" + ], + "autoReferenced": false, + "defineConstraints": [ + "UNITY_INCLUDE_TESTS" + ], + "versionDefines": [], + "noEngineReferences": false +} \ No newline at end of file diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2022/Tests/Editor/Draco.Webgl-2022.Editor.Tests.asmdef.meta b/UnityPackages/com.unity.cloud.draco.webgl-2022/Tests/Editor/Draco.Webgl-2022.Editor.Tests.asmdef.meta new file mode 100644 index 00000000..9a574f50 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2022/Tests/Editor/Draco.Webgl-2022.Editor.Tests.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 13cf5a345d9ca40438bd0054e7132616 +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2022/Tests/Editor/WebglEditorTests.cs b/UnityPackages/com.unity.cloud.draco.webgl-2022/Tests/Editor/WebglEditorTests.cs new file mode 100644 index 00000000..0bde18bd --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2022/Tests/Editor/WebglEditorTests.cs @@ -0,0 +1,30 @@ +using System.IO; +using NUnit.Framework; +using UnityEngine; +using File = UnityEngine.Windows.File; + +namespace KtxUnity.Webgl.Editor.Tests +{ + class WebglEditorTests + { + const string k_PackagePrefix = "Packages/com.unity.cloud.draco.webgl-2022/Runtime/Plugins/WebGL"; + + static readonly string[] k_WebglBinaries = { + $"{k_PackagePrefix}/libdracodec_unity.a", + $"{k_PackagePrefix}/libdracoenc_unity.a" + }; + + [Test] + public void CheckNativeLibSize() + { + foreach (var webglBinary in k_WebglBinaries) + { + Assert.IsTrue(File.Exists(webglBinary)); + var fi = new FileInfo(webglBinary); + // In source (GIT) the native WebGL library files are placeholders with a few bytes of text in them. + // The CI will replace them with actual binaries, all significantly bigger than 1024 bytes. + Assert.Greater(fi.Length, 1024); + } + } + } +} diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2022/Tests/Editor/WebglEditorTests.cs.meta b/UnityPackages/com.unity.cloud.draco.webgl-2022/Tests/Editor/WebglEditorTests.cs.meta new file mode 100644 index 00000000..dc17a604 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2022/Tests/Editor/WebglEditorTests.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 2eaea761a65f44b25b162cde149b0108 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2022/Third Party Notices.md b/UnityPackages/com.unity.cloud.draco.webgl-2022/Third Party Notices.md new file mode 100644 index 00000000..9b8d40f3 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2022/Third Party Notices.md @@ -0,0 +1,32 @@ +# Third party notices + +This package contains third-party software components governed by the license(s) indicated below: + +## Draco + +Component Name: Draco™ 3D Data Compression + +License Type: Apache 2.0 + +Copyright © 2018 The Draco Authors + +[Draco][Draco] + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +## Trademarks + +*Draco™* is a trademark of [*Google LLC*][GoogleLLC]. + +[Draco]: https://github.com/google/draco +[GoogleLLC]: https://about.google/ diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2022/Third Party Notices.md.meta b/UnityPackages/com.unity.cloud.draco.webgl-2022/Third Party Notices.md.meta new file mode 100644 index 00000000..39216de1 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2022/Third Party Notices.md.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 8abb454b592e34cc1aeb8551fd256e8a +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2022/package.json b/UnityPackages/com.unity.cloud.draco.webgl-2022/package.json new file mode 100644 index 00000000..c3dbbdb6 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2022/package.json @@ -0,0 +1,7 @@ +{ + "name": "com.unity.cloud.draco.webgl-2022", + "version": "0.1.0", + "displayName": "Draco for Unity WebGL 2022", + "description": "Provides the Draco for Unity package with WebGL native libraries for Unity versions 2022.2 to 2023.1", + "unity": "2022.2" +} diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2022/package.json.meta b/UnityPackages/com.unity.cloud.draco.webgl-2022/package.json.meta new file mode 100644 index 00000000..bfeb3080 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2022/package.json.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: d769dd7a3016a44219fe8989992d7df2 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2023/CHANGELOG.md b/UnityPackages/com.unity.cloud.draco.webgl-2023/CHANGELOG.md new file mode 100644 index 00000000..6cbfec01 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2023/CHANGELOG.md @@ -0,0 +1,8 @@ +# Changelog +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [Unreleased] +Initial sub package publication diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2023/CHANGELOG.md.meta b/UnityPackages/com.unity.cloud.draco.webgl-2023/CHANGELOG.md.meta new file mode 100644 index 00000000..51b2fcba --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2023/CHANGELOG.md.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 2279e7034f7de431f9be7a1896576707 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2023/Documentation~/api_index.md b/UnityPackages/com.unity.cloud.draco.webgl-2023/Documentation~/api_index.md new file mode 100644 index 00000000..62116d29 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2023/Documentation~/api_index.md @@ -0,0 +1,17 @@ +--- +uid: api-index +--- + +# Draco for Unity WebGL Sub-Package API Documentation + +This package does not provide any public API. Instead please consult the documentation of its main package [Draco for Unity][DracoForUnity]. + +## Trademarks + +*Unity®* is a registered trademark of [Unity Technologies][Unity]. + +*Draco™* is a trademark of [*Google LLC*][GoogleLLC]. + +[DracoForUnity]: https://docs.unity3d.com/Packages/com.unity.cloud.draco@latest +[GoogleLLC]: https://about.google/ +[unity]: https://unity.com diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2023/Documentation~/index.md b/UnityPackages/com.unity.cloud.draco.webgl-2023/Documentation~/index.md new file mode 100644 index 00000000..58012a7e --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2023/Documentation~/index.md @@ -0,0 +1,16 @@ +# Draco for Unity WebGL Sub-Package Documentation + +This package contains a Unity® version specific WebGL native library of Draco™ (in the form of pre-compiled, binary [WebAssembly][wasm]). + +By itself it provides no functionality and should not get installed manually. It is a sub-package of its main package [Draco for Unity][DracoForUnity], which will install it automatically. If the main package is removed, this sub-package will remove itself automatically as well. + +## Trademarks + +*Unity®* is a registered trademark of [Unity Technologies][Unity]. + +*Draco™* is a trademark of [*Google LLC*][GoogleLLC]. + +[DracoForUnity]: https://docs.unity3d.com/Packages/com.unity.cloud.draco@latest +[GoogleLLC]: https://about.google/ +[unity]: https://unity.com +[wasm]: https://webassembly.org/ diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2023/Editor.meta b/UnityPackages/com.unity.cloud.draco.webgl-2023/Editor.meta new file mode 100644 index 00000000..ea8ca3fa --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2023/Editor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4dc22260ff39d482ba09e693a964a960 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2023/Editor/Scripts.meta b/UnityPackages/com.unity.cloud.draco.webgl-2023/Editor/Scripts.meta new file mode 100644 index 00000000..2220006f --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2023/Editor/Scripts.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f4aede89671404478a682b449201d24b +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2023/Editor/Scripts/Draco.Webgl-2023.Editor.asmdef b/UnityPackages/com.unity.cloud.draco.webgl-2023/Editor/Scripts/Draco.Webgl-2023.Editor.asmdef new file mode 100644 index 00000000..62eabb96 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2023/Editor/Scripts/Draco.Webgl-2023.Editor.asmdef @@ -0,0 +1,16 @@ +{ + "name": "Draco.Webgl-2023.Editor", + "rootNamespace": "", + "references": [], + "includePlatforms": [ + "Editor" + ], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": true, + "defineConstraints": [], + "versionDefines": [], + "noEngineReferences": false +} \ No newline at end of file diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2023/Editor/Scripts/Draco.Webgl-2023.Editor.asmdef.meta b/UnityPackages/com.unity.cloud.draco.webgl-2023/Editor/Scripts/Draco.Webgl-2023.Editor.asmdef.meta new file mode 100644 index 00000000..0cc7d6b5 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2023/Editor/Scripts/Draco.Webgl-2023.Editor.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 394154ffdc1f9462c993365ac7ba5cc8 +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2023/Editor/Scripts/SubPackageCleanup.cs b/UnityPackages/com.unity.cloud.draco.webgl-2023/Editor/Scripts/SubPackageCleanup.cs new file mode 100644 index 00000000..402c0dcf --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2023/Editor/Scripts/SubPackageCleanup.cs @@ -0,0 +1,41 @@ +using System.Threading.Tasks; +using UnityEditor; +using UnityEditor.PackageManager; +using UnityEngine; +using UnityEngine.Assertions; +using System.Linq; + +namespace SubPackage +{ + static class SubPackageCleanup + { + + const string k_Name = "com.unity.cloud.draco.webgl-2023"; + const string k_DisplayName = "Draco for Unity WebGL 2023"; + + static readonly string[] k_MainPackageNames = { + "com.unity.cloud.draco", + "com.atteneder.draco" + }; + +#if !DISABLE_SUB_PACKAGE_CHECK + [InitializeOnLoadMethod] +#endif + static async void InitializeOnLoad() + { + var request = Client.List(offlineMode: true, includeIndirectDependencies: false); + + while (!request.IsCompleted) + await Task.Yield(); + + Assert.AreEqual(StatusCode.Success, request.Status); + + var mainPackageInManifest = request.Result.Select(package => package.name).Intersect(k_MainPackageNames).Any(); + + if (!mainPackageInManifest) + { + Debug.LogWarning($"Package {k_DisplayName} ({k_Name}) is missing its main package Draco for Unity and should get removed."); + } + } + } +} diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2023/Editor/Scripts/SubPackageCleanup.cs.meta b/UnityPackages/com.unity.cloud.draco.webgl-2023/Editor/Scripts/SubPackageCleanup.cs.meta new file mode 100644 index 00000000..e0ef368f --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2023/Editor/Scripts/SubPackageCleanup.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 76f3dac9a90054df09945b72d2caad07 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2023/LICENSE.md b/UnityPackages/com.unity.cloud.draco.webgl-2023/LICENSE.md new file mode 100644 index 00000000..8f40ca6a --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2023/LICENSE.md @@ -0,0 +1,190 @@ +Draco for Unity WebGL 2023 copyright © 2023 Unity Technologies + +Licensed under the Apache License, Version 2.0 (the "License"); you may not +use this file except in compliance with the License. You may obtain a copy +of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +License for the specific language governing permissions and limitations +under the License. + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2023/LICENSE.md.meta b/UnityPackages/com.unity.cloud.draco.webgl-2023/LICENSE.md.meta new file mode 100644 index 00000000..67b0774e --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2023/LICENSE.md.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 613469ae9fbc44843b769f6a17fd2fe3 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2023/README.md b/UnityPackages/com.unity.cloud.draco.webgl-2023/README.md new file mode 100644 index 00000000..7c3a8894 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2023/README.md @@ -0,0 +1,24 @@ +# Draco for Unity WebGL + +This package contains a Unity® version specific WebGL native library of Draco™ (in the form of pre-compiled, binary [WebAssembly][wasm]). + +By itself it provides no functionality. It is a sub-package of its main package [Draco for Unity][DracoForUnity]. + +## Documentation + +- [Package Documentation](Documentation~/index.md) + +## License + +- [License](LICENSE.md). + +## Trademarks + +*Unity®* is a registered trademark of [Unity Technologies][Unity]. + +*Draco™* is a trademark of [*Google LLC*][GoogleLLC]. + +[DracoForUnity]: https://docs.unity3d.com/Packages/com.unity.cloud.draco@latest +[GoogleLLC]: https://about.google/ +[unity]: https://unity.com +[wasm]: https://webassembly.org/ diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2023/README.md.meta b/UnityPackages/com.unity.cloud.draco.webgl-2023/README.md.meta new file mode 100644 index 00000000..3200df02 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2023/README.md.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 5d42efab512ba4accb390c689f91313f +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2023/Runtime.meta b/UnityPackages/com.unity.cloud.draco.webgl-2023/Runtime.meta new file mode 100644 index 00000000..d7839047 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2023/Runtime.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 3b93db59d2f6a45029ddb49293d46ef3 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2023/Runtime/Plugins.meta b/UnityPackages/com.unity.cloud.draco.webgl-2023/Runtime/Plugins.meta new file mode 100644 index 00000000..62ddca86 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2023/Runtime/Plugins.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b4e16b0a42bb2437c91d13f947c5a290 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2023/Runtime/Plugins/WebGL.meta b/UnityPackages/com.unity.cloud.draco.webgl-2023/Runtime/Plugins/WebGL.meta new file mode 100644 index 00000000..b99adae7 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2023/Runtime/Plugins/WebGL.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e7138506b6a89408d95b1dcd80b9df07 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2023/Runtime/Plugins/WebGL/libdraco_unity.a b/UnityPackages/com.unity.cloud.draco.webgl-2023/Runtime/Plugins/WebGL/libdraco_unity.a new file mode 100644 index 00000000..2e76cd11 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2023/Runtime/Plugins/WebGL/libdraco_unity.a @@ -0,0 +1 @@ +This file is just a placeholder. Replace it with the actual binary library before packaging a release. diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2023/Runtime/Plugins/WebGL/libdraco_unity.a.meta b/UnityPackages/com.unity.cloud.draco.webgl-2023/Runtime/Plugins/WebGL/libdraco_unity.a.meta new file mode 100644 index 00000000..b9eb5dff --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2023/Runtime/Plugins/WebGL/libdraco_unity.a.meta @@ -0,0 +1,95 @@ +fileFormatVersion: 2 +guid: 22483904bc44e4eb8b65f46ea3cf16a9 +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 1 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + : Any + second: + enabled: 0 + settings: + Exclude Android: 1 + Exclude Editor: 1 + Exclude Linux64: 1 + Exclude OSXUniversal: 1 + Exclude WebGL: 0 + Exclude Win: 1 + Exclude Win64: 1 + Exclude iOS: 1 + Exclude tvOS: 1 + - first: + Android: Android + second: + enabled: 0 + settings: + CPU: ARMv7 + - first: + Any: + second: + enabled: 0 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + CPU: AnyCPU + DefaultValueInitialized: true + OS: AnyOS + - first: + Standalone: Linux64 + second: + enabled: 0 + settings: + CPU: None + - first: + Standalone: OSXUniversal + second: + enabled: 0 + settings: + CPU: None + - first: + Standalone: Win + second: + enabled: 0 + settings: + CPU: None + - first: + Standalone: Win64 + second: + enabled: 0 + settings: + CPU: None + - first: + WebGL: WebGL + second: + enabled: 1 + settings: {} + - first: + iPhone: iOS + second: + enabled: 0 + settings: + AddToEmbeddedBinaries: false + CPU: AnyCPU + CompileFlags: + FrameworkDependencies: + - first: + tvOS: tvOS + second: + enabled: 0 + settings: + CPU: AnyCPU + CompileFlags: + FrameworkDependencies: + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2023/Tests.meta b/UnityPackages/com.unity.cloud.draco.webgl-2023/Tests.meta new file mode 100644 index 00000000..62a70a92 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2023/Tests.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7377f5feff1624f84bf8c849de9ce952 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2023/Tests/Editor.meta b/UnityPackages/com.unity.cloud.draco.webgl-2023/Tests/Editor.meta new file mode 100644 index 00000000..c05e9054 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2023/Tests/Editor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7eec5cfa7e61344c39ef4b4b56c68d53 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2023/Tests/Editor/Draco.Webgl-2023.Editor.Tests.asmdef b/UnityPackages/com.unity.cloud.draco.webgl-2023/Tests/Editor/Draco.Webgl-2023.Editor.Tests.asmdef new file mode 100644 index 00000000..e544c04c --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2023/Tests/Editor/Draco.Webgl-2023.Editor.Tests.asmdef @@ -0,0 +1,24 @@ +{ + "name": "Draco.Webgl-2023.Editor.Tests", + "rootNamespace": "", + "references": [ + "UnityEngine.TestRunner", + "UnityEditor.TestRunner", + "Unity.Mathematics" + ], + "includePlatforms": [ + "Editor" + ], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": true, + "precompiledReferences": [ + "nunit.framework.dll" + ], + "autoReferenced": false, + "defineConstraints": [ + "UNITY_INCLUDE_TESTS" + ], + "versionDefines": [], + "noEngineReferences": false +} \ No newline at end of file diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2023/Tests/Editor/Draco.Webgl-2023.Editor.Tests.asmdef.meta b/UnityPackages/com.unity.cloud.draco.webgl-2023/Tests/Editor/Draco.Webgl-2023.Editor.Tests.asmdef.meta new file mode 100644 index 00000000..749a1a5f --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2023/Tests/Editor/Draco.Webgl-2023.Editor.Tests.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 5aef8aa16b1d842f4b5d5be1d5181f32 +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2023/Tests/Editor/WebglEditorTests.cs b/UnityPackages/com.unity.cloud.draco.webgl-2023/Tests/Editor/WebglEditorTests.cs new file mode 100644 index 00000000..fabc17bb --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2023/Tests/Editor/WebglEditorTests.cs @@ -0,0 +1,30 @@ +using System.IO; +using NUnit.Framework; +using UnityEngine; +using File = UnityEngine.Windows.File; + +namespace KtxUnity.Webgl.Editor.Tests +{ + class WebglEditorTests + { + const string k_PackagePrefix = "Packages/com.unity.cloud.draco.webgl-2023/Runtime/Plugins/WebGL"; + + static readonly string[] k_WebglBinaries = { + $"{k_PackagePrefix}/libdracodec_unity.a", + $"{k_PackagePrefix}/libdracoenc_unity.a" + }; + + [Test] + public void CheckNativeLibSize() + { + foreach (var webglBinary in k_WebglBinaries) + { + Assert.IsTrue(File.Exists(webglBinary)); + var fi = new FileInfo(webglBinary); + // In source (GIT) the native WebGL library files are placeholders with a few bytes of text in them. + // The CI will replace them with actual binaries, all significantly bigger than 1024 bytes. + Assert.Greater(fi.Length, 1024); + } + } + } +} diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2023/Tests/Editor/WebglEditorTests.cs.meta b/UnityPackages/com.unity.cloud.draco.webgl-2023/Tests/Editor/WebglEditorTests.cs.meta new file mode 100644 index 00000000..651dc5ff --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2023/Tests/Editor/WebglEditorTests.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ce74fd0ffa6554aea8b160212dd10f0a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2023/Third Party Notices.md b/UnityPackages/com.unity.cloud.draco.webgl-2023/Third Party Notices.md new file mode 100644 index 00000000..9b8d40f3 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2023/Third Party Notices.md @@ -0,0 +1,32 @@ +# Third party notices + +This package contains third-party software components governed by the license(s) indicated below: + +## Draco + +Component Name: Draco™ 3D Data Compression + +License Type: Apache 2.0 + +Copyright © 2018 The Draco Authors + +[Draco][Draco] + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +## Trademarks + +*Draco™* is a trademark of [*Google LLC*][GoogleLLC]. + +[Draco]: https://github.com/google/draco +[GoogleLLC]: https://about.google/ diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2023/Third Party Notices.md.meta b/UnityPackages/com.unity.cloud.draco.webgl-2023/Third Party Notices.md.meta new file mode 100644 index 00000000..218a54d7 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2023/Third Party Notices.md.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: e4bcf0cf33c8c428781ac253133f6b29 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2023/package.json b/UnityPackages/com.unity.cloud.draco.webgl-2023/package.json new file mode 100644 index 00000000..13efedd0 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2023/package.json @@ -0,0 +1,8 @@ +{ + "name": "com.unity.cloud.draco.webgl-2023", + "version": "0.1.0", + "displayName": "Draco for Unity WebGL 2023", + "description": "Provides the Draco for Unity package with WebGL native libraries for Unity versions 2023.2 and newer", + "unity": "2023.2", + "unityRelease": "0a17" +} diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2023/package.json.meta b/UnityPackages/com.unity.cloud.draco.webgl-2023/package.json.meta new file mode 100644 index 00000000..6b82af59 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2023/package.json.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 646d660dda8fa4b9ca5afcd9bcb0bfe7 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: From 402b2999109ecf93441168acec6c25642caae003 Mon Sep 17 00:00:00 2001 From: Andreas Atteneder Date: Mon, 6 Nov 2023 13:10:29 +0100 Subject: [PATCH 63/71] Unity Binaries 3.0.0 and Unity WebGL packages 1.0.0-pre.1 (#4) --- UnityPackages/com.unity.cloud.draco.webgl-2020/CHANGELOG.md | 4 +++- .../Tests/Editor/WebglEditorTests.cs | 3 +-- UnityPackages/com.unity.cloud.draco.webgl-2020/package.json | 2 +- UnityPackages/com.unity.cloud.draco.webgl-2021/CHANGELOG.md | 4 +++- .../Tests/Editor/WebglEditorTests.cs | 3 +-- UnityPackages/com.unity.cloud.draco.webgl-2021/package.json | 2 +- UnityPackages/com.unity.cloud.draco.webgl-2022/CHANGELOG.md | 4 +++- .../Tests/Editor/WebglEditorTests.cs | 3 +-- UnityPackages/com.unity.cloud.draco.webgl-2022/package.json | 2 +- UnityPackages/com.unity.cloud.draco.webgl-2023/CHANGELOG.md | 4 +++- .../Tests/Editor/WebglEditorTests.cs | 3 +-- UnityPackages/com.unity.cloud.draco.webgl-2023/package.json | 2 +- 12 files changed, 20 insertions(+), 16 deletions(-) diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2020/CHANGELOG.md b/UnityPackages/com.unity.cloud.draco.webgl-2020/CHANGELOG.md index 6cbfec01..266e2616 100644 --- a/UnityPackages/com.unity.cloud.draco.webgl-2020/CHANGELOG.md +++ b/UnityPackages/com.unity.cloud.draco.webgl-2020/CHANGELOG.md @@ -1,8 +1,10 @@ # Changelog + All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [Unreleased] +## [1.0.0-pre.1] - 2023-11-03 + Initial sub package publication diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2020/Tests/Editor/WebglEditorTests.cs b/UnityPackages/com.unity.cloud.draco.webgl-2020/Tests/Editor/WebglEditorTests.cs index 7f8f9bbc..ec67f078 100644 --- a/UnityPackages/com.unity.cloud.draco.webgl-2020/Tests/Editor/WebglEditorTests.cs +++ b/UnityPackages/com.unity.cloud.draco.webgl-2020/Tests/Editor/WebglEditorTests.cs @@ -10,8 +10,7 @@ class WebglEditorTests const string k_PackagePrefix = "Packages/com.unity.cloud.draco.webgl-2020/Runtime/Plugins/WebGL"; static readonly string[] k_WebglBinaries = { - $"{k_PackagePrefix}/libdracodec_unity.bc", - $"{k_PackagePrefix}/libdracoenc_unity.bc" + $"{k_PackagePrefix}/libdraco_unity.bc" }; [Test] diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2020/package.json b/UnityPackages/com.unity.cloud.draco.webgl-2020/package.json index fb5c1ac9..fc8ac920 100644 --- a/UnityPackages/com.unity.cloud.draco.webgl-2020/package.json +++ b/UnityPackages/com.unity.cloud.draco.webgl-2020/package.json @@ -1,6 +1,6 @@ { "name": "com.unity.cloud.draco.webgl-2020", - "version": "0.1.0", + "version": "1.0.0-pre.1", "displayName": "Draco for Unity WebGL 2020", "description": "Provides the Draco for Unity package with WebGL native libraries for Unity versions 2020.1 to 2021.1", "unity": "2020.1" diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2021/CHANGELOG.md b/UnityPackages/com.unity.cloud.draco.webgl-2021/CHANGELOG.md index 6cbfec01..266e2616 100644 --- a/UnityPackages/com.unity.cloud.draco.webgl-2021/CHANGELOG.md +++ b/UnityPackages/com.unity.cloud.draco.webgl-2021/CHANGELOG.md @@ -1,8 +1,10 @@ # Changelog + All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [Unreleased] +## [1.0.0-pre.1] - 2023-11-03 + Initial sub package publication diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2021/Tests/Editor/WebglEditorTests.cs b/UnityPackages/com.unity.cloud.draco.webgl-2021/Tests/Editor/WebglEditorTests.cs index b7714abd..15818f62 100644 --- a/UnityPackages/com.unity.cloud.draco.webgl-2021/Tests/Editor/WebglEditorTests.cs +++ b/UnityPackages/com.unity.cloud.draco.webgl-2021/Tests/Editor/WebglEditorTests.cs @@ -10,8 +10,7 @@ class WebglEditorTests const string k_PackagePrefix = "Packages/com.unity.cloud.draco.webgl-2021/Runtime/Plugins/WebGL"; static readonly string[] k_WebglBinaries = { - $"{k_PackagePrefix}/libdracodec_unity.a", - $"{k_PackagePrefix}/libdracoenc_unity.a" + $"{k_PackagePrefix}/libdraco_unity.a" }; [Test] diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2021/package.json b/UnityPackages/com.unity.cloud.draco.webgl-2021/package.json index 2e6e5cea..5576b681 100644 --- a/UnityPackages/com.unity.cloud.draco.webgl-2021/package.json +++ b/UnityPackages/com.unity.cloud.draco.webgl-2021/package.json @@ -1,6 +1,6 @@ { "name": "com.unity.cloud.draco.webgl-2021", - "version": "0.1.0", + "version": "1.0.0-pre.1", "displayName": "Draco for Unity WebGL 2021", "description": "Provides the Draco for Unity package with WebGL native libraries for Unity versions 2021.2 to 2022.1", "unity": "2021.2" diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2022/CHANGELOG.md b/UnityPackages/com.unity.cloud.draco.webgl-2022/CHANGELOG.md index 6cbfec01..266e2616 100644 --- a/UnityPackages/com.unity.cloud.draco.webgl-2022/CHANGELOG.md +++ b/UnityPackages/com.unity.cloud.draco.webgl-2022/CHANGELOG.md @@ -1,8 +1,10 @@ # Changelog + All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [Unreleased] +## [1.0.0-pre.1] - 2023-11-03 + Initial sub package publication diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2022/Tests/Editor/WebglEditorTests.cs b/UnityPackages/com.unity.cloud.draco.webgl-2022/Tests/Editor/WebglEditorTests.cs index 0bde18bd..4267a9e8 100644 --- a/UnityPackages/com.unity.cloud.draco.webgl-2022/Tests/Editor/WebglEditorTests.cs +++ b/UnityPackages/com.unity.cloud.draco.webgl-2022/Tests/Editor/WebglEditorTests.cs @@ -10,8 +10,7 @@ class WebglEditorTests const string k_PackagePrefix = "Packages/com.unity.cloud.draco.webgl-2022/Runtime/Plugins/WebGL"; static readonly string[] k_WebglBinaries = { - $"{k_PackagePrefix}/libdracodec_unity.a", - $"{k_PackagePrefix}/libdracoenc_unity.a" + $"{k_PackagePrefix}/libdraco_unity.a" }; [Test] diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2022/package.json b/UnityPackages/com.unity.cloud.draco.webgl-2022/package.json index c3dbbdb6..e4eabfb0 100644 --- a/UnityPackages/com.unity.cloud.draco.webgl-2022/package.json +++ b/UnityPackages/com.unity.cloud.draco.webgl-2022/package.json @@ -1,6 +1,6 @@ { "name": "com.unity.cloud.draco.webgl-2022", - "version": "0.1.0", + "version": "1.0.0-pre.1", "displayName": "Draco for Unity WebGL 2022", "description": "Provides the Draco for Unity package with WebGL native libraries for Unity versions 2022.2 to 2023.1", "unity": "2022.2" diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2023/CHANGELOG.md b/UnityPackages/com.unity.cloud.draco.webgl-2023/CHANGELOG.md index 6cbfec01..266e2616 100644 --- a/UnityPackages/com.unity.cloud.draco.webgl-2023/CHANGELOG.md +++ b/UnityPackages/com.unity.cloud.draco.webgl-2023/CHANGELOG.md @@ -1,8 +1,10 @@ # Changelog + All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [Unreleased] +## [1.0.0-pre.1] - 2023-11-03 + Initial sub package publication diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2023/Tests/Editor/WebglEditorTests.cs b/UnityPackages/com.unity.cloud.draco.webgl-2023/Tests/Editor/WebglEditorTests.cs index fabc17bb..21b3f923 100644 --- a/UnityPackages/com.unity.cloud.draco.webgl-2023/Tests/Editor/WebglEditorTests.cs +++ b/UnityPackages/com.unity.cloud.draco.webgl-2023/Tests/Editor/WebglEditorTests.cs @@ -10,8 +10,7 @@ class WebglEditorTests const string k_PackagePrefix = "Packages/com.unity.cloud.draco.webgl-2023/Runtime/Plugins/WebGL"; static readonly string[] k_WebglBinaries = { - $"{k_PackagePrefix}/libdracodec_unity.a", - $"{k_PackagePrefix}/libdracoenc_unity.a" + $"{k_PackagePrefix}/libdraco_unity.a" }; [Test] diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2023/package.json b/UnityPackages/com.unity.cloud.draco.webgl-2023/package.json index 13efedd0..b082acc8 100644 --- a/UnityPackages/com.unity.cloud.draco.webgl-2023/package.json +++ b/UnityPackages/com.unity.cloud.draco.webgl-2023/package.json @@ -1,6 +1,6 @@ { "name": "com.unity.cloud.draco.webgl-2023", - "version": "0.1.0", + "version": "1.0.0-pre.1", "displayName": "Draco for Unity WebGL 2023", "description": "Provides the Draco for Unity package with WebGL native libraries for Unity versions 2023.2 and newer", "unity": "2023.2", From afd6b4ee1a5cbcbc23dcdba7c154fb841598fcfe Mon Sep 17 00:00:00 2001 From: Andreas Atteneder Date: Mon, 6 Nov 2023 21:19:00 +0100 Subject: [PATCH 64/71] chore: Post-release (#5) --- UnityPackages/com.unity.cloud.draco.webgl-2020/CHANGELOG.md | 2 ++ UnityPackages/com.unity.cloud.draco.webgl-2021/CHANGELOG.md | 2 ++ UnityPackages/com.unity.cloud.draco.webgl-2022/CHANGELOG.md | 2 ++ UnityPackages/com.unity.cloud.draco.webgl-2023/CHANGELOG.md | 2 ++ 4 files changed, 8 insertions(+) diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2020/CHANGELOG.md b/UnityPackages/com.unity.cloud.draco.webgl-2020/CHANGELOG.md index 266e2616..c5e713e4 100644 --- a/UnityPackages/com.unity.cloud.draco.webgl-2020/CHANGELOG.md +++ b/UnityPackages/com.unity.cloud.draco.webgl-2020/CHANGELOG.md @@ -5,6 +5,8 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] + ## [1.0.0-pre.1] - 2023-11-03 Initial sub package publication diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2021/CHANGELOG.md b/UnityPackages/com.unity.cloud.draco.webgl-2021/CHANGELOG.md index 266e2616..c5e713e4 100644 --- a/UnityPackages/com.unity.cloud.draco.webgl-2021/CHANGELOG.md +++ b/UnityPackages/com.unity.cloud.draco.webgl-2021/CHANGELOG.md @@ -5,6 +5,8 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] + ## [1.0.0-pre.1] - 2023-11-03 Initial sub package publication diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2022/CHANGELOG.md b/UnityPackages/com.unity.cloud.draco.webgl-2022/CHANGELOG.md index 266e2616..c5e713e4 100644 --- a/UnityPackages/com.unity.cloud.draco.webgl-2022/CHANGELOG.md +++ b/UnityPackages/com.unity.cloud.draco.webgl-2022/CHANGELOG.md @@ -5,6 +5,8 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] + ## [1.0.0-pre.1] - 2023-11-03 Initial sub package publication diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2023/CHANGELOG.md b/UnityPackages/com.unity.cloud.draco.webgl-2023/CHANGELOG.md index 266e2616..c5e713e4 100644 --- a/UnityPackages/com.unity.cloud.draco.webgl-2023/CHANGELOG.md +++ b/UnityPackages/com.unity.cloud.draco.webgl-2023/CHANGELOG.md @@ -5,6 +5,8 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] + ## [1.0.0-pre.1] - 2023-11-03 Initial sub package publication From 7a4a3e26f76d88873e739955199a09c5579c6a90 Mon Sep 17 00:00:00 2001 From: Andreas Atteneder Date: Wed, 8 Nov 2023 12:46:54 +0100 Subject: [PATCH 65/71] fix: Removed warning about missing main package when it was installed as indirect dependency (#6) --- UnityPackages/com.unity.cloud.draco.webgl-2020/CHANGELOG.md | 4 ++++ .../Editor/Scripts/SubPackageCleanup.cs | 2 +- UnityPackages/com.unity.cloud.draco.webgl-2021/CHANGELOG.md | 4 ++++ .../Editor/Scripts/SubPackageCleanup.cs | 2 +- UnityPackages/com.unity.cloud.draco.webgl-2022/CHANGELOG.md | 4 ++++ .../Editor/Scripts/SubPackageCleanup.cs | 2 +- UnityPackages/com.unity.cloud.draco.webgl-2023/CHANGELOG.md | 4 ++++ .../Editor/Scripts/SubPackageCleanup.cs | 2 +- 8 files changed, 20 insertions(+), 4 deletions(-) diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2020/CHANGELOG.md b/UnityPackages/com.unity.cloud.draco.webgl-2020/CHANGELOG.md index c5e713e4..0bcdcfb0 100644 --- a/UnityPackages/com.unity.cloud.draco.webgl-2020/CHANGELOG.md +++ b/UnityPackages/com.unity.cloud.draco.webgl-2020/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixed + +- Removed warning about missing main package when it was installed as indirect dependency + ## [1.0.0-pre.1] - 2023-11-03 Initial sub package publication diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2020/Editor/Scripts/SubPackageCleanup.cs b/UnityPackages/com.unity.cloud.draco.webgl-2020/Editor/Scripts/SubPackageCleanup.cs index b37bf1df..bf168874 100644 --- a/UnityPackages/com.unity.cloud.draco.webgl-2020/Editor/Scripts/SubPackageCleanup.cs +++ b/UnityPackages/com.unity.cloud.draco.webgl-2020/Editor/Scripts/SubPackageCleanup.cs @@ -23,7 +23,7 @@ static class SubPackageCleanup #endif static async void InitializeOnLoad() { - var request = Client.List(offlineMode: true, includeIndirectDependencies: false); + var request = Client.List(offlineMode: true, includeIndirectDependencies: true); while (!request.IsCompleted) await Task.Yield(); diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2021/CHANGELOG.md b/UnityPackages/com.unity.cloud.draco.webgl-2021/CHANGELOG.md index c5e713e4..0bcdcfb0 100644 --- a/UnityPackages/com.unity.cloud.draco.webgl-2021/CHANGELOG.md +++ b/UnityPackages/com.unity.cloud.draco.webgl-2021/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixed + +- Removed warning about missing main package when it was installed as indirect dependency + ## [1.0.0-pre.1] - 2023-11-03 Initial sub package publication diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2021/Editor/Scripts/SubPackageCleanup.cs b/UnityPackages/com.unity.cloud.draco.webgl-2021/Editor/Scripts/SubPackageCleanup.cs index 3d3dd4df..140505e8 100644 --- a/UnityPackages/com.unity.cloud.draco.webgl-2021/Editor/Scripts/SubPackageCleanup.cs +++ b/UnityPackages/com.unity.cloud.draco.webgl-2021/Editor/Scripts/SubPackageCleanup.cs @@ -23,7 +23,7 @@ static class SubPackageCleanup #endif static async void InitializeOnLoad() { - var request = Client.List(offlineMode: true, includeIndirectDependencies: false); + var request = Client.List(offlineMode: true, includeIndirectDependencies: true); while (!request.IsCompleted) await Task.Yield(); diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2022/CHANGELOG.md b/UnityPackages/com.unity.cloud.draco.webgl-2022/CHANGELOG.md index c5e713e4..0bcdcfb0 100644 --- a/UnityPackages/com.unity.cloud.draco.webgl-2022/CHANGELOG.md +++ b/UnityPackages/com.unity.cloud.draco.webgl-2022/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixed + +- Removed warning about missing main package when it was installed as indirect dependency + ## [1.0.0-pre.1] - 2023-11-03 Initial sub package publication diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2022/Editor/Scripts/SubPackageCleanup.cs b/UnityPackages/com.unity.cloud.draco.webgl-2022/Editor/Scripts/SubPackageCleanup.cs index c4798c01..7470d51d 100644 --- a/UnityPackages/com.unity.cloud.draco.webgl-2022/Editor/Scripts/SubPackageCleanup.cs +++ b/UnityPackages/com.unity.cloud.draco.webgl-2022/Editor/Scripts/SubPackageCleanup.cs @@ -23,7 +23,7 @@ static class SubPackageCleanup #endif static async void InitializeOnLoad() { - var request = Client.List(offlineMode: true, includeIndirectDependencies: false); + var request = Client.List(offlineMode: true, includeIndirectDependencies: true); while (!request.IsCompleted) await Task.Yield(); diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2023/CHANGELOG.md b/UnityPackages/com.unity.cloud.draco.webgl-2023/CHANGELOG.md index c5e713e4..0bcdcfb0 100644 --- a/UnityPackages/com.unity.cloud.draco.webgl-2023/CHANGELOG.md +++ b/UnityPackages/com.unity.cloud.draco.webgl-2023/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixed + +- Removed warning about missing main package when it was installed as indirect dependency + ## [1.0.0-pre.1] - 2023-11-03 Initial sub package publication diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2023/Editor/Scripts/SubPackageCleanup.cs b/UnityPackages/com.unity.cloud.draco.webgl-2023/Editor/Scripts/SubPackageCleanup.cs index 402c0dcf..80b0497f 100644 --- a/UnityPackages/com.unity.cloud.draco.webgl-2023/Editor/Scripts/SubPackageCleanup.cs +++ b/UnityPackages/com.unity.cloud.draco.webgl-2023/Editor/Scripts/SubPackageCleanup.cs @@ -23,7 +23,7 @@ static class SubPackageCleanup #endif static async void InitializeOnLoad() { - var request = Client.List(offlineMode: true, includeIndirectDependencies: false); + var request = Client.List(offlineMode: true, includeIndirectDependencies: true); while (!request.IsCompleted) await Task.Yield(); From fe505f4dc7be7770089b9a6aee16e1265462d2ee Mon Sep 17 00:00:00 2001 From: Andreas Atteneder Date: Thu, 9 Nov 2023 18:17:10 +0100 Subject: [PATCH 66/71] chore: Consistent job names --- .github/workflows/unity.yml | 112 ++++++++++++++++++------------------ 1 file changed, 56 insertions(+), 56 deletions(-) diff --git a/.github/workflows/unity.yml b/.github/workflows/unity.yml index 22aaba36..d52bf448 100644 --- a/.github/workflows/unity.yml +++ b/.github/workflows/unity.yml @@ -43,7 +43,7 @@ jobs: - name: Install Ninja run: brew install ninja - - name: configure_mac + - name: Configure macOS # ARCHS_STANDARD explicitly enables Apple silicon on Xcode 12.2 run: > cmake . -G Ninja -B build_mac @@ -52,10 +52,10 @@ jobs: -DDRACO_UNITY_PLUGIN=ON -DDRACO_GLTF_BITSTREAM=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF - - name: build_mac + - name: Build macOS run: cmake --build build_mac --config MinSizeRel --target draco_unity - - name: configure iOS + - name: Configure iOS run: > cmake . -G Xcode -B build_ios -DCMAKE_BUILD_TYPE=MinSizeRel @@ -65,9 +65,9 @@ jobs: -DDRACO_UNITY_PLUGIN=ON -DDRACO_GLTF_BITSTREAM=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF - - name: build iOS + - name: Build iOS run: cmake --build build_ios --config MinSizeRel --target draco_unity - - name: build iOS Simulator + - name: Build iOS Simulator run: > cmake --build build_ios @@ -80,7 +80,7 @@ jobs: EXECUTABLE_SUFFIX=-simulator.a ONLY_ACTIVE_ARCH=NO - - name: configure tvOS + - name: Configure tvOS run: > cmake . -G Xcode -B build_tvos -DCMAKE_BUILD_TYPE=MinSizeRel @@ -89,9 +89,9 @@ jobs: -DDRACO_UNITY_PLUGIN=ON -DDRACO_GLTF_BITSTREAM=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF - - name: build tvOS + - name: Build tvOS run: cmake --build build_tvos --config MinSizeRel --target draco_unity - - name: build tvOS Simulator + - name: Build tvOS Simulator run: > cmake --build build_tvos @@ -102,7 +102,7 @@ jobs: EXECUTABLE_SUFFIX=-simulator.a ONLY_ACTIVE_ARCH=NO - - name: package Apple + - name: Package Apple run: | mkdir draco_apple mkdir draco_apple/x86_64 @@ -113,7 +113,7 @@ jobs: mkdir -p draco_apple/tvOS mv build_tvos/MinSizeRel-appletvos/libdraco_unity.a draco_apple/tvOS mv build_tvos/MinSizeRel-appletvsimulator/libdraco_unity-simulator.a draco_apple/tvOS - - name: upload artifact + - name: Upload artifact uses: actions/upload-artifact@v3 with: name: draco_apple @@ -127,35 +127,35 @@ jobs: steps: - uses: actions/checkout@v3 - - name: configure Windows x64 + - name: Configure Windows x64 run: > cmake . -G "Visual Studio 17 2022" -A x64 -B build_win_64 -DDRACO_UNITY_PLUGIN=ON -DDRACO_GLTF_BITSTREAM=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF - - name: build Windows x64 + - name: Build Windows x64 run: cmake --build build_win_64 --config MinSizeRel --target draco_unity - - name: configure Windows Win32 + - name: Configure Windows Win32 run: > cmake . -G "Visual Studio 17 2022" -A Win32 -B build_win_32 -DDRACO_UNITY_PLUGIN=ON -DDRACO_GLTF_BITSTREAM=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF - - name: build Windows Win32 + - name: Build Windows Win32 run: cmake --build build_win_32 --config MinSizeRel --target draco_unity - - name: configure Windows ARM64 + - name: Configure Windows ARM64 run: > cmake . -G "Visual Studio 17 2022" -A ARM64 -B build_win_arm64 -DDRACO_UNITY_PLUGIN=ON -DDRACO_GLTF_BITSTREAM=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF - - name: build Windows ARM64 + - name: Build Windows ARM64 run: cmake --build build_win_arm64 --config MinSizeRel --target draco_unity # Universal Windows Platform - - name: configure_uwp_arm + - name: Configure Universal Windows Platform ARM run: > cmake . -G "Visual Studio 17 2022" -A ARM -B build_uwp_arm -DDRACO_UNITY_PLUGIN=ON @@ -163,10 +163,10 @@ jobs: -DDRACO_BACKWARDS_COMPATIBILITY=OFF -DCMAKE_SYSTEM_NAME:String=WindowsStore -DCMAKE_SYSTEM_VERSION:String="10.0" - - name: build_uwp_arm + - name: Build Universal Windows Platform ARM run: cmake --build build_uwp_arm --config MinSizeRel --target draco_unity - - name: configure_uwp_arm64 + - name: Configure Universal Windows Platform ARM64 run: > cmake . -G "Visual Studio 17 2022" -A ARM64 -B build_uwp_arm64 -DDRACO_UNITY_PLUGIN=ON @@ -174,10 +174,10 @@ jobs: -DDRACO_BACKWARDS_COMPATIBILITY=OFF -DCMAKE_SYSTEM_NAME:String=WindowsStore -DCMAKE_SYSTEM_VERSION:String="10.0" - - name: build_uwp_arm64 + - name: Build Universal Windows Platform ARM64 run: cmake --build build_uwp_arm64 --config MinSizeRel --target draco_unity - - name: configure_uwp_x86 + - name: Configure Universal Windows Platform Win32 run: > cmake . -G "Visual Studio 17 2022" -A Win32 -B build_uwp_x86 -DDRACO_UNITY_PLUGIN=ON @@ -185,10 +185,10 @@ jobs: -DDRACO_BACKWARDS_COMPATIBILITY=OFF -DCMAKE_SYSTEM_NAME:String=WindowsStore -DCMAKE_SYSTEM_VERSION:String="10.0" - - name: build_uwp_x86 + - name: Build Universal Windows Platform Win32 run: cmake --build build_uwp_x86 --config MinSizeRel --target draco_unity - - name: configure_uwp_x64 + - name: Configure Universal Windows Platform x64 run: > cmake . -G "Visual Studio 17 2022" -A x64 -B build_uwp_x64 -DDRACO_UNITY_PLUGIN=ON @@ -196,10 +196,10 @@ jobs: -DDRACO_BACKWARDS_COMPATIBILITY=OFF -DCMAKE_SYSTEM_NAME:String=WindowsStore -DCMAKE_SYSTEM_VERSION:String="10.0" - - name: build_uwp_x64 + - name: Build Universal Windows Platform x64 run: cmake --build build_uwp_x64 --config MinSizeRel --target draco_unity - - name: package Windows + - name: Package Windows run: | mkdir draco_win/x86 mkdir draco_win/x86_64 @@ -215,7 +215,7 @@ jobs: mv build_uwp_x86\MinSizeRel\draco_unity.dll draco_win/WSA/x86 mv build_uwp_x64\MinSizeRel\draco_unity.dll draco_win/WSA/x64 mv build_win_arm64\MinSizeRel\draco_unity.dll draco_win/Windows/ARM64 - - name: upload artifact + - name: Upload artifact uses: actions/upload-artifact@v3 with: name: draco_win @@ -239,14 +239,14 @@ jobs: run: sudo apt-get install ninja-build # Android - - name: install Android NDK + - name: Install Android NDK uses: nttld/setup-ndk@v1 id: setup-ndk with: ndk-version: r21e add-to-path: false - - name: configure_android_arm64-v8a + - name: Configure Android arm64-v8a run: > cmake -B build_android_arm64-v8a -DANDROID_ABI=arm64-v8a @@ -256,10 +256,10 @@ jobs: -DDRACO_UNITY_PLUGIN=ON -DDRACO_GLTF_BITSTREAM=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF - - name: build_android_arm64-v8a + - name: Build Android arm64-v8a run: cmake --build build_android_arm64-v8a --target draco_unity -j - - name: configure_android_armeabi-v7a + - name: Configure Android armeabi-v7a run: > cmake -B build_android_armeabi-v7a -DANDROID_ABI=armeabi-v7a @@ -269,10 +269,10 @@ jobs: -DDRACO_UNITY_PLUGIN=ON -DDRACO_GLTF_BITSTREAM=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF - - name: build_android_armeabi-v7a + - name: Build Android armeabi-v7a run: cmake --build build_android_armeabi-v7a --target draco_unity -j - - name: configure_android_x86 + - name: Configure Android x86 run: > cmake -B build_android_x86 -DANDROID_ABI=x86 @@ -282,16 +282,16 @@ jobs: -DDRACO_UNITY_PLUGIN=ON -DDRACO_GLTF_BITSTREAM=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF - - name: build_android_x86_dracodec_unity + - name: Build Android x86 run: cmake --build build_android_x86 --target draco_unity -j # # Emscripten - # - name: setup Emscripten + # - name: Setup Emscripten # uses: mymindstorm/setup-emsdk@v12 # with: # version: ${{env.EM_2_VERSION}} # actions-cache-folder: ${{env.EM_2_CACHE_FOLDER}} - # - name: configure WebAssembly + # - name: Configure WebAssembly # run: > # emcmake cmake -B build_web # -DCMAKE_BUILD_TYPE=MinSizeRel @@ -299,11 +299,11 @@ jobs: # -DDRACO_UNITY_PLUGIN=ON # -DDRACO_GLTF_BITSTREAM=ON # -DDRACO_BACKWARDS_COMPATIBILITY=OFF - # - name: build_webassembly_dracodec_unity + # - name: Build WebAssembly # run: cmake --build build_web --target draco_unity -j # Linux artifacts - - name: package Linux + - name: Package Linux run: | # mkdir -p draco_linux/WebGL/2021 # mv build_web/libdraco_unity.a draco_linux/WebGL/2021 @@ -316,7 +316,7 @@ jobs: draco_linux/Android/libs/armeabi-v7a mv build_android_x86/libdraco_unity.so \ draco_linux/Android/libs/x86 - - name: upload artifact + - name: Upload artifact uses: actions/upload-artifact@v3 with: name: draco_linux @@ -337,12 +337,12 @@ jobs: # key: ${{env.EM_3_VERSION}}-${{ runner.os }} # # Emscripten 3 - # - name: setup Emscripten + # - name: Setup Emscripten # uses: mymindstorm/setup-emsdk@v12 # with: # version: ${{env.EM_3_VERSION}} # actions-cache-folder: ${{env.EM_3_CACHE_FOLDER}} - # - name: configure WebAssembly + # - name: Configure WebAssembly # run: > # EMSCRIPTEN="$EMSDK/upstream/emscripten" emcmake cmake -B build_web # -DCMAKE_BUILD_TYPE=MinSizeRel @@ -350,15 +350,15 @@ jobs: # -DDRACO_UNITY_PLUGIN=ON # -DDRACO_GLTF_BITSTREAM=ON \ # -DDRACO_BACKWARDS_COMPATIBILITY=OFF - # - name: build_webassembly_dracodec_unity + # - name: Build WebAssembly # run: cmake --build build_web --target draco_unity -j # # Artifacts - # - name: package + # - name: Package Linux Emscripten 3 # run: | # mkdir -p draco_emscripten_3/WebGL/2022 # mv build_web/libdraco_unity.a draco_emscripten_3/WebGL/2022 - # - name: upload artifact + # - name: Upload artifact # uses: actions/upload-artifact@v3 # with: # name: draco_emscripten_3 @@ -382,22 +382,22 @@ jobs: uses: lukka/get-cmake@latest # Linux 64 - - name: configure_linux64 + - name: Configure Linux 64 run: > cmake . -G Ninja -B build_linux_64 -DCMAKE_BUILD_TYPE=MinSizeRel -DDRACO_UNITY_PLUGIN=ON -DDRACO_GLTF_BITSTREAM=ON -DDRACO_BACKWARDS_COMPATIBILITY=OFF - - name: build_linux64_dracodec_unity + - name: Build Linux 64 run: cmake --build build_linux_64 --target draco_unity -j # # Emscripten 1 - # - name: setup Emscripten 1 + # - name: Setup Emscripten 1 # uses: numworks/setup-emscripten@latest # with: # sdk: ${{env.EM_1_VERSION}} - # - name: configure WebAssembly 1 + # - name: Configure WebAssembly 1 # run: > # emcmake cmake -B build_web # -DCMAKE_BUILD_TYPE=MinSizeRel @@ -406,17 +406,17 @@ jobs: # -DDRACO_UNITY_PLUGIN=ON # -DDRACO_GLTF_BITSTREAM=ON # -DDRACO_BACKWARDS_COMPATIBILITY=OFF - # - name: build_webassembly_1_dracodec_unity + # - name: Build WebAssembly 1 # run: cmake --build build_web --target draco_unity -j # Linux legacy artifacts - - name: package Linux legacy + - name: Package Linux Legacy run: | mkdir -p draco_linux_legacy/x86_64 mv build_linux_64/libdraco_unity.so draco_linux_legacy/x86_64 # mkdir -p draco_linux_legacy/WebGL/2020 # mv build_web/libdraco_unity.bc draco_linux_legacy/WebGL/2020 - - name: upload artifact + - name: Upload artifact uses: actions/upload-artifact@v3 with: name: draco_linux_legacy @@ -434,14 +434,14 @@ jobs: - linux_legacy # - linux_emscripten_3 steps: - - name: download artifacts + - name: Download artifacts uses: actions/download-artifact@v3 with: path: artifacts - name: Display structure of downloaded files run: ls -R working-directory: artifacts - - name: combine + - name: Combine run: | mkdir draco cp -r artifacts/draco_apple/* draco @@ -449,20 +449,20 @@ jobs: cp -r artifacts/draco_linux/* draco cp -r artifacts/draco_linux_legacy/* draco # cp -r artifacts/draco_emscripten_3/* draco - - name: zip + - name: Zip run: zip -r draco.zip draco - - name: upload release assets + - name: Upload release assets uses: AButler/upload-release-assets@v2.0 if: github.event_name == 'release' && github.event.action == 'created' with: files: draco.zip repo-token: ${{ secrets.GITHUB_TOKEN }} - - name: upload artifact + - name: Upload artifact uses: actions/upload-artifact@v3 with: name: draco path: draco - - name: delete obsolete artifacts + - name: Delete obsolete artifacts uses: geekyeggo/delete-artifact@v2 with: name: | From 2dbfc76301e3732a1438b303bf10b42f13d910f3 Mon Sep 17 00:00:00 2001 From: Andreas Atteneder Date: Thu, 9 Nov 2023 18:25:17 +0100 Subject: [PATCH 67/71] feat: Unity Android x86_64 binary (for Chrome OS) --- .github/workflows/unity.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/unity.yml b/.github/workflows/unity.yml index d52bf448..5041af98 100644 --- a/.github/workflows/unity.yml +++ b/.github/workflows/unity.yml @@ -285,6 +285,19 @@ jobs: - name: Build Android x86 run: cmake --build build_android_x86 --target draco_unity -j + - name: Configure Android x86_64 + run: > + cmake -B build_android_x86_64 + -DANDROID_ABI=x86_64 + -DCMAKE_BUILD_TYPE=MinSizeRel + -DANDROID_NDK=${{ steps.setup-ndk.outputs.ndk-path }} + -DCMAKE_TOOLCHAIN_FILE="${{ steps.setup-ndk.outputs.ndk-path }}/build/cmake/android.toolchain.cmake" + -DDRACO_UNITY_PLUGIN=ON + -DDRACO_GLTF_BITSTREAM=ON + -DDRACO_BACKWARDS_COMPATIBILITY=OFF + - name: Build Android x86_64 + run: cmake --build build_android_x86_64 --target draco_unity -j + # # Emscripten # - name: Setup Emscripten # uses: mymindstorm/setup-emsdk@v12 @@ -310,12 +323,15 @@ jobs: mkdir -p draco_linux/Android/libs/arm64-v8a mkdir -p draco_linux/Android/libs/armeabi-v7a mkdir -p draco_linux/Android/libs/x86 + mkdir -p draco_linux/Android/libs/x86_64 mv build_android_arm64-v8a/libdraco_unity.so \ draco_linux/Android/libs/arm64-v8a mv build_android_armeabi-v7a/libdraco_unity.so \ draco_linux/Android/libs/armeabi-v7a mv build_android_x86/libdraco_unity.so \ draco_linux/Android/libs/x86 + mv build_android_x86_64/libdraco_unity.so \ + draco_linux/Android/libs/x86_64 - name: Upload artifact uses: actions/upload-artifact@v3 with: From 5a8dd8b44f83df72e4dd53fd2448a0ca8f183148 Mon Sep 17 00:00:00 2001 From: Andreas Atteneder Date: Tue, 14 Nov 2023 17:03:59 +0100 Subject: [PATCH 68/71] Unity Binaries 3.1.0 and Unity WebGL packages 1.0.0-pre.2 * Unity WebGL packages 1.0.0-pre.2 * fix: Correct namespace for Editor tests * chore: Increased minimum required version to Unity 2020.3 * feat: Empty runtime tests --- .yamato/project.metafile | 2 +- .../CHANGELOG.md | 11 +++++++++- .../Tests/Editor/WebglEditorTests.cs | 2 +- .../Tests/Runtime.meta | 8 ++++++++ .../Runtime/Draco.Webgl-2020.Tests.asmdef | 20 +++++++++++++++++++ .../Draco.Webgl-2020.Tests.asmdef.meta | 7 +++++++ .../Tests/Runtime/DummyTest.cs | 14 +++++++++++++ .../Tests/Runtime/DummyTest.cs.meta | 11 ++++++++++ .../package.json | 4 ++-- .../CHANGELOG.md | 7 ++++++- .../Tests/Editor/WebglEditorTests.cs | 2 +- .../Tests/Runtime.meta | 8 ++++++++ .../Runtime/Draco.Webgl-2021.Tests.asmdef | 20 +++++++++++++++++++ .../Draco.Webgl-2021.Tests.asmdef.meta | 7 +++++++ .../Tests/Runtime/DummyTest.cs | 14 +++++++++++++ .../Tests/Runtime/DummyTest.cs.meta | 11 ++++++++++ .../package.json | 2 +- .../CHANGELOG.md | 7 ++++++- .../Tests/Editor/WebglEditorTests.cs | 2 +- .../Tests/Runtime.meta | 8 ++++++++ .../Runtime/Draco.Webgl-2022.Tests.asmdef | 20 +++++++++++++++++++ .../Draco.Webgl-2022.Tests.asmdef.meta | 7 +++++++ .../Tests/Runtime/DummyTest.cs | 14 +++++++++++++ .../Tests/Runtime/DummyTest.cs.meta | 11 ++++++++++ .../package.json | 2 +- .../CHANGELOG.md | 7 ++++++- .../Tests/Editor/WebglEditorTests.cs | 2 +- .../Tests/Runtime.meta | 8 ++++++++ .../Runtime/Draco.Webgl-2023.Tests.asmdef | 20 +++++++++++++++++++ .../Draco.Webgl-2023.Tests.asmdef.meta | 7 +++++++ .../Tests/Runtime/DummyTest.cs | 14 +++++++++++++ .../Tests/Runtime/DummyTest.cs.meta | 11 ++++++++++ .../package.json | 2 +- 33 files changed, 278 insertions(+), 14 deletions(-) create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2020/Tests/Runtime.meta create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2020/Tests/Runtime/Draco.Webgl-2020.Tests.asmdef create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2020/Tests/Runtime/Draco.Webgl-2020.Tests.asmdef.meta create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2020/Tests/Runtime/DummyTest.cs create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2020/Tests/Runtime/DummyTest.cs.meta create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2021/Tests/Runtime.meta create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2021/Tests/Runtime/Draco.Webgl-2021.Tests.asmdef create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2021/Tests/Runtime/Draco.Webgl-2021.Tests.asmdef.meta create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2021/Tests/Runtime/DummyTest.cs create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2021/Tests/Runtime/DummyTest.cs.meta create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2022/Tests/Runtime.meta create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2022/Tests/Runtime/Draco.Webgl-2022.Tests.asmdef create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2022/Tests/Runtime/Draco.Webgl-2022.Tests.asmdef.meta create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2022/Tests/Runtime/DummyTest.cs create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2022/Tests/Runtime/DummyTest.cs.meta create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2023/Tests/Runtime.meta create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2023/Tests/Runtime/Draco.Webgl-2023.Tests.asmdef create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2023/Tests/Runtime/Draco.Webgl-2023.Tests.asmdef.meta create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2023/Tests/Runtime/DummyTest.cs create mode 100644 UnityPackages/com.unity.cloud.draco.webgl-2023/Tests/Runtime/DummyTest.cs.meta diff --git a/.yamato/project.metafile b/.yamato/project.metafile index 0843f511..765279a3 100644 --- a/.yamato/project.metafile +++ b/.yamato/project.metafile @@ -19,7 +19,7 @@ upm_test_platforms: web_packages: - name: 2020 emscripten_version: 1.38.48-fastcomp - unity_version: 2020.1 + unity_version: 2020.3 - name: 2021 emscripten_version: 2.0.19 unity_version: 2021.2 diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2020/CHANGELOG.md b/UnityPackages/com.unity.cloud.draco.webgl-2020/CHANGELOG.md index 0bcdcfb0..aaface0e 100644 --- a/UnityPackages/com.unity.cloud.draco.webgl-2020/CHANGELOG.md +++ b/UnityPackages/com.unity.cloud.draco.webgl-2020/CHANGELOG.md @@ -5,11 +5,20 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [Unreleased] +## [1.0.0-pre.2] - 2023-11-13 + +### Added + +- Empty runtime tests + +### Changed + +- Increased minimum required version to Unity 2020.3 ### Fixed - Removed warning about missing main package when it was installed as indirect dependency +- Correct namespace for Editor tests ## [1.0.0-pre.1] - 2023-11-03 diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2020/Tests/Editor/WebglEditorTests.cs b/UnityPackages/com.unity.cloud.draco.webgl-2020/Tests/Editor/WebglEditorTests.cs index ec67f078..0c7d7f99 100644 --- a/UnityPackages/com.unity.cloud.draco.webgl-2020/Tests/Editor/WebglEditorTests.cs +++ b/UnityPackages/com.unity.cloud.draco.webgl-2020/Tests/Editor/WebglEditorTests.cs @@ -3,7 +3,7 @@ using UnityEngine; using File = UnityEngine.Windows.File; -namespace KtxUnity.Webgl.Editor.Tests +namespace Draco.Webgl.Editor.Tests { class WebglEditorTests { diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2020/Tests/Runtime.meta b/UnityPackages/com.unity.cloud.draco.webgl-2020/Tests/Runtime.meta new file mode 100644 index 00000000..ad766ae4 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2020/Tests/Runtime.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c6f0c13cebcc547d2b030d1cc9dc1dd6 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2020/Tests/Runtime/Draco.Webgl-2020.Tests.asmdef b/UnityPackages/com.unity.cloud.draco.webgl-2020/Tests/Runtime/Draco.Webgl-2020.Tests.asmdef new file mode 100644 index 00000000..e78d09d2 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2020/Tests/Runtime/Draco.Webgl-2020.Tests.asmdef @@ -0,0 +1,20 @@ +{ + "name": "Draco.Webgl-2020.Tests", + "rootNamespace": "Draco.Tests", + "references": [ + "UnityEngine.TestRunner" + ], + "includePlatforms": [], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": true, + "precompiledReferences": [ + "nunit.framework.dll" + ], + "autoReferenced": true, + "defineConstraints": [ + "UNITY_INCLUDE_TESTS" + ], + "versionDefines": [], + "noEngineReferences": false +} \ No newline at end of file diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2020/Tests/Runtime/Draco.Webgl-2020.Tests.asmdef.meta b/UnityPackages/com.unity.cloud.draco.webgl-2020/Tests/Runtime/Draco.Webgl-2020.Tests.asmdef.meta new file mode 100644 index 00000000..a92e8e8c --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2020/Tests/Runtime/Draco.Webgl-2020.Tests.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: cb9d3968bd2a0428e9fe608bf14cdc76 +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2020/Tests/Runtime/DummyTest.cs b/UnityPackages/com.unity.cloud.draco.webgl-2020/Tests/Runtime/DummyTest.cs new file mode 100644 index 00000000..32d67fb5 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2020/Tests/Runtime/DummyTest.cs @@ -0,0 +1,14 @@ +using UnityEngine; +using NUnit.Framework; + +namespace Draco.Tests +{ + class DummyTest + { + [Test] + public void Foo() + { + Assert.AreEqual(42,42); + } + } +} diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2020/Tests/Runtime/DummyTest.cs.meta b/UnityPackages/com.unity.cloud.draco.webgl-2020/Tests/Runtime/DummyTest.cs.meta new file mode 100644 index 00000000..0d7de45e --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2020/Tests/Runtime/DummyTest.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 29aea59c7d3c34b9cb5964e7c8e37b2a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2020/package.json b/UnityPackages/com.unity.cloud.draco.webgl-2020/package.json index fc8ac920..6af8418c 100644 --- a/UnityPackages/com.unity.cloud.draco.webgl-2020/package.json +++ b/UnityPackages/com.unity.cloud.draco.webgl-2020/package.json @@ -1,7 +1,7 @@ { "name": "com.unity.cloud.draco.webgl-2020", - "version": "1.0.0-pre.1", + "version": "1.0.0-pre.2", "displayName": "Draco for Unity WebGL 2020", "description": "Provides the Draco for Unity package with WebGL native libraries for Unity versions 2020.1 to 2021.1", - "unity": "2020.1" + "unity": "2020.3" } diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2021/CHANGELOG.md b/UnityPackages/com.unity.cloud.draco.webgl-2021/CHANGELOG.md index 0bcdcfb0..587ca57a 100644 --- a/UnityPackages/com.unity.cloud.draco.webgl-2021/CHANGELOG.md +++ b/UnityPackages/com.unity.cloud.draco.webgl-2021/CHANGELOG.md @@ -5,11 +5,16 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [Unreleased] +## [1.0.0-pre.2] - 2023-11-13 + +### Added + +- Empty runtime tests ### Fixed - Removed warning about missing main package when it was installed as indirect dependency +- Correct namespace for Editor tests ## [1.0.0-pre.1] - 2023-11-03 diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2021/Tests/Editor/WebglEditorTests.cs b/UnityPackages/com.unity.cloud.draco.webgl-2021/Tests/Editor/WebglEditorTests.cs index 15818f62..f70fdaea 100644 --- a/UnityPackages/com.unity.cloud.draco.webgl-2021/Tests/Editor/WebglEditorTests.cs +++ b/UnityPackages/com.unity.cloud.draco.webgl-2021/Tests/Editor/WebglEditorTests.cs @@ -3,7 +3,7 @@ using UnityEngine; using File = UnityEngine.Windows.File; -namespace KtxUnity.Webgl.Editor.Tests +namespace Draco.Webgl.Editor.Tests { class WebglEditorTests { diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2021/Tests/Runtime.meta b/UnityPackages/com.unity.cloud.draco.webgl-2021/Tests/Runtime.meta new file mode 100644 index 00000000..35d34eed --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2021/Tests/Runtime.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 891c353f53ce94994b7c575ed4316258 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2021/Tests/Runtime/Draco.Webgl-2021.Tests.asmdef b/UnityPackages/com.unity.cloud.draco.webgl-2021/Tests/Runtime/Draco.Webgl-2021.Tests.asmdef new file mode 100644 index 00000000..fef7ddc3 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2021/Tests/Runtime/Draco.Webgl-2021.Tests.asmdef @@ -0,0 +1,20 @@ +{ + "name": "Draco.Webgl-2021.Tests", + "rootNamespace": "Draco.Tests", + "references": [ + "UnityEngine.TestRunner" + ], + "includePlatforms": [], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": true, + "precompiledReferences": [ + "nunit.framework.dll" + ], + "autoReferenced": true, + "defineConstraints": [ + "UNITY_INCLUDE_TESTS" + ], + "versionDefines": [], + "noEngineReferences": false +} \ No newline at end of file diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2021/Tests/Runtime/Draco.Webgl-2021.Tests.asmdef.meta b/UnityPackages/com.unity.cloud.draco.webgl-2021/Tests/Runtime/Draco.Webgl-2021.Tests.asmdef.meta new file mode 100644 index 00000000..02d42ad1 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2021/Tests/Runtime/Draco.Webgl-2021.Tests.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 43f12e28b9b2b4471b6bef6cc0adf61a +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2021/Tests/Runtime/DummyTest.cs b/UnityPackages/com.unity.cloud.draco.webgl-2021/Tests/Runtime/DummyTest.cs new file mode 100644 index 00000000..32d67fb5 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2021/Tests/Runtime/DummyTest.cs @@ -0,0 +1,14 @@ +using UnityEngine; +using NUnit.Framework; + +namespace Draco.Tests +{ + class DummyTest + { + [Test] + public void Foo() + { + Assert.AreEqual(42,42); + } + } +} diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2021/Tests/Runtime/DummyTest.cs.meta b/UnityPackages/com.unity.cloud.draco.webgl-2021/Tests/Runtime/DummyTest.cs.meta new file mode 100644 index 00000000..f17cd959 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2021/Tests/Runtime/DummyTest.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 18b89859790664477b159f5a577c4cdc +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2021/package.json b/UnityPackages/com.unity.cloud.draco.webgl-2021/package.json index 5576b681..208633fa 100644 --- a/UnityPackages/com.unity.cloud.draco.webgl-2021/package.json +++ b/UnityPackages/com.unity.cloud.draco.webgl-2021/package.json @@ -1,6 +1,6 @@ { "name": "com.unity.cloud.draco.webgl-2021", - "version": "1.0.0-pre.1", + "version": "1.0.0-pre.2", "displayName": "Draco for Unity WebGL 2021", "description": "Provides the Draco for Unity package with WebGL native libraries for Unity versions 2021.2 to 2022.1", "unity": "2021.2" diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2022/CHANGELOG.md b/UnityPackages/com.unity.cloud.draco.webgl-2022/CHANGELOG.md index 0bcdcfb0..587ca57a 100644 --- a/UnityPackages/com.unity.cloud.draco.webgl-2022/CHANGELOG.md +++ b/UnityPackages/com.unity.cloud.draco.webgl-2022/CHANGELOG.md @@ -5,11 +5,16 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [Unreleased] +## [1.0.0-pre.2] - 2023-11-13 + +### Added + +- Empty runtime tests ### Fixed - Removed warning about missing main package when it was installed as indirect dependency +- Correct namespace for Editor tests ## [1.0.0-pre.1] - 2023-11-03 diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2022/Tests/Editor/WebglEditorTests.cs b/UnityPackages/com.unity.cloud.draco.webgl-2022/Tests/Editor/WebglEditorTests.cs index 4267a9e8..c8ca0137 100644 --- a/UnityPackages/com.unity.cloud.draco.webgl-2022/Tests/Editor/WebglEditorTests.cs +++ b/UnityPackages/com.unity.cloud.draco.webgl-2022/Tests/Editor/WebglEditorTests.cs @@ -3,7 +3,7 @@ using UnityEngine; using File = UnityEngine.Windows.File; -namespace KtxUnity.Webgl.Editor.Tests +namespace Draco.Webgl.Editor.Tests { class WebglEditorTests { diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2022/Tests/Runtime.meta b/UnityPackages/com.unity.cloud.draco.webgl-2022/Tests/Runtime.meta new file mode 100644 index 00000000..441c1098 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2022/Tests/Runtime.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b0676cb3ea36944e887c90ef6fc00f19 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2022/Tests/Runtime/Draco.Webgl-2022.Tests.asmdef b/UnityPackages/com.unity.cloud.draco.webgl-2022/Tests/Runtime/Draco.Webgl-2022.Tests.asmdef new file mode 100644 index 00000000..8207949f --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2022/Tests/Runtime/Draco.Webgl-2022.Tests.asmdef @@ -0,0 +1,20 @@ +{ + "name": "Draco.Webgl-2022.Tests", + "rootNamespace": "Draco.Tests", + "references": [ + "UnityEngine.TestRunner" + ], + "includePlatforms": [], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": true, + "precompiledReferences": [ + "nunit.framework.dll" + ], + "autoReferenced": true, + "defineConstraints": [ + "UNITY_INCLUDE_TESTS" + ], + "versionDefines": [], + "noEngineReferences": false +} \ No newline at end of file diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2022/Tests/Runtime/Draco.Webgl-2022.Tests.asmdef.meta b/UnityPackages/com.unity.cloud.draco.webgl-2022/Tests/Runtime/Draco.Webgl-2022.Tests.asmdef.meta new file mode 100644 index 00000000..ede76c17 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2022/Tests/Runtime/Draco.Webgl-2022.Tests.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 8df82da1f249a4c3291125b4ee55e4b1 +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2022/Tests/Runtime/DummyTest.cs b/UnityPackages/com.unity.cloud.draco.webgl-2022/Tests/Runtime/DummyTest.cs new file mode 100644 index 00000000..32d67fb5 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2022/Tests/Runtime/DummyTest.cs @@ -0,0 +1,14 @@ +using UnityEngine; +using NUnit.Framework; + +namespace Draco.Tests +{ + class DummyTest + { + [Test] + public void Foo() + { + Assert.AreEqual(42,42); + } + } +} diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2022/Tests/Runtime/DummyTest.cs.meta b/UnityPackages/com.unity.cloud.draco.webgl-2022/Tests/Runtime/DummyTest.cs.meta new file mode 100644 index 00000000..f96f4788 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2022/Tests/Runtime/DummyTest.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 882bd11ff5650471bab26cc00296877e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2022/package.json b/UnityPackages/com.unity.cloud.draco.webgl-2022/package.json index e4eabfb0..47e1559b 100644 --- a/UnityPackages/com.unity.cloud.draco.webgl-2022/package.json +++ b/UnityPackages/com.unity.cloud.draco.webgl-2022/package.json @@ -1,6 +1,6 @@ { "name": "com.unity.cloud.draco.webgl-2022", - "version": "1.0.0-pre.1", + "version": "1.0.0-pre.2", "displayName": "Draco for Unity WebGL 2022", "description": "Provides the Draco for Unity package with WebGL native libraries for Unity versions 2022.2 to 2023.1", "unity": "2022.2" diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2023/CHANGELOG.md b/UnityPackages/com.unity.cloud.draco.webgl-2023/CHANGELOG.md index 0bcdcfb0..587ca57a 100644 --- a/UnityPackages/com.unity.cloud.draco.webgl-2023/CHANGELOG.md +++ b/UnityPackages/com.unity.cloud.draco.webgl-2023/CHANGELOG.md @@ -5,11 +5,16 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [Unreleased] +## [1.0.0-pre.2] - 2023-11-13 + +### Added + +- Empty runtime tests ### Fixed - Removed warning about missing main package when it was installed as indirect dependency +- Correct namespace for Editor tests ## [1.0.0-pre.1] - 2023-11-03 diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2023/Tests/Editor/WebglEditorTests.cs b/UnityPackages/com.unity.cloud.draco.webgl-2023/Tests/Editor/WebglEditorTests.cs index 21b3f923..f5c18631 100644 --- a/UnityPackages/com.unity.cloud.draco.webgl-2023/Tests/Editor/WebglEditorTests.cs +++ b/UnityPackages/com.unity.cloud.draco.webgl-2023/Tests/Editor/WebglEditorTests.cs @@ -3,7 +3,7 @@ using UnityEngine; using File = UnityEngine.Windows.File; -namespace KtxUnity.Webgl.Editor.Tests +namespace Draco.Webgl.Editor.Tests { class WebglEditorTests { diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2023/Tests/Runtime.meta b/UnityPackages/com.unity.cloud.draco.webgl-2023/Tests/Runtime.meta new file mode 100644 index 00000000..e471f589 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2023/Tests/Runtime.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5bc95882d7343422480f093662e196e0 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2023/Tests/Runtime/Draco.Webgl-2023.Tests.asmdef b/UnityPackages/com.unity.cloud.draco.webgl-2023/Tests/Runtime/Draco.Webgl-2023.Tests.asmdef new file mode 100644 index 00000000..d110647f --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2023/Tests/Runtime/Draco.Webgl-2023.Tests.asmdef @@ -0,0 +1,20 @@ +{ + "name": "Draco.Webgl-2023.Tests", + "rootNamespace": "Draco.Tests", + "references": [ + "UnityEngine.TestRunner" + ], + "includePlatforms": [], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": true, + "precompiledReferences": [ + "nunit.framework.dll" + ], + "autoReferenced": true, + "defineConstraints": [ + "UNITY_INCLUDE_TESTS" + ], + "versionDefines": [], + "noEngineReferences": false +} \ No newline at end of file diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2023/Tests/Runtime/Draco.Webgl-2023.Tests.asmdef.meta b/UnityPackages/com.unity.cloud.draco.webgl-2023/Tests/Runtime/Draco.Webgl-2023.Tests.asmdef.meta new file mode 100644 index 00000000..8fd03fb2 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2023/Tests/Runtime/Draco.Webgl-2023.Tests.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 583be4ae3dcae4daeb5cd4b81bbf462e +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2023/Tests/Runtime/DummyTest.cs b/UnityPackages/com.unity.cloud.draco.webgl-2023/Tests/Runtime/DummyTest.cs new file mode 100644 index 00000000..32d67fb5 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2023/Tests/Runtime/DummyTest.cs @@ -0,0 +1,14 @@ +using UnityEngine; +using NUnit.Framework; + +namespace Draco.Tests +{ + class DummyTest + { + [Test] + public void Foo() + { + Assert.AreEqual(42,42); + } + } +} diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2023/Tests/Runtime/DummyTest.cs.meta b/UnityPackages/com.unity.cloud.draco.webgl-2023/Tests/Runtime/DummyTest.cs.meta new file mode 100644 index 00000000..d8a85964 --- /dev/null +++ b/UnityPackages/com.unity.cloud.draco.webgl-2023/Tests/Runtime/DummyTest.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: b322b8e169f6b4427997aabe529f1956 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2023/package.json b/UnityPackages/com.unity.cloud.draco.webgl-2023/package.json index b082acc8..e4c010a1 100644 --- a/UnityPackages/com.unity.cloud.draco.webgl-2023/package.json +++ b/UnityPackages/com.unity.cloud.draco.webgl-2023/package.json @@ -1,6 +1,6 @@ { "name": "com.unity.cloud.draco.webgl-2023", - "version": "1.0.0-pre.1", + "version": "1.0.0-pre.2", "displayName": "Draco for Unity WebGL 2023", "description": "Provides the Draco for Unity package with WebGL native libraries for Unity versions 2023.2 and newer", "unity": "2023.2", From 7dce9c53b8ca026801a4546fcfd3fc7aae64a717 Mon Sep 17 00:00:00 2001 From: Andreas Atteneder Date: Thu, 7 Dec 2023 14:24:41 +0100 Subject: [PATCH 69/71] chore: Post-release (#9) --- UnityPackages/com.unity.cloud.draco.webgl-2020/CHANGELOG.md | 2 ++ UnityPackages/com.unity.cloud.draco.webgl-2021/CHANGELOG.md | 2 ++ UnityPackages/com.unity.cloud.draco.webgl-2022/CHANGELOG.md | 2 ++ UnityPackages/com.unity.cloud.draco.webgl-2023/CHANGELOG.md | 2 ++ 4 files changed, 8 insertions(+) diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2020/CHANGELOG.md b/UnityPackages/com.unity.cloud.draco.webgl-2020/CHANGELOG.md index aaface0e..1340c93d 100644 --- a/UnityPackages/com.unity.cloud.draco.webgl-2020/CHANGELOG.md +++ b/UnityPackages/com.unity.cloud.draco.webgl-2020/CHANGELOG.md @@ -5,6 +5,8 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] + ## [1.0.0-pre.2] - 2023-11-13 ### Added diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2021/CHANGELOG.md b/UnityPackages/com.unity.cloud.draco.webgl-2021/CHANGELOG.md index 587ca57a..1a83e580 100644 --- a/UnityPackages/com.unity.cloud.draco.webgl-2021/CHANGELOG.md +++ b/UnityPackages/com.unity.cloud.draco.webgl-2021/CHANGELOG.md @@ -5,6 +5,8 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] + ## [1.0.0-pre.2] - 2023-11-13 ### Added diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2022/CHANGELOG.md b/UnityPackages/com.unity.cloud.draco.webgl-2022/CHANGELOG.md index 587ca57a..1a83e580 100644 --- a/UnityPackages/com.unity.cloud.draco.webgl-2022/CHANGELOG.md +++ b/UnityPackages/com.unity.cloud.draco.webgl-2022/CHANGELOG.md @@ -5,6 +5,8 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] + ## [1.0.0-pre.2] - 2023-11-13 ### Added diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2023/CHANGELOG.md b/UnityPackages/com.unity.cloud.draco.webgl-2023/CHANGELOG.md index 587ca57a..1a83e580 100644 --- a/UnityPackages/com.unity.cloud.draco.webgl-2023/CHANGELOG.md +++ b/UnityPackages/com.unity.cloud.draco.webgl-2023/CHANGELOG.md @@ -5,6 +5,8 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] + ## [1.0.0-pre.2] - 2023-11-13 ### Added From 6c066d8d9156f9c67ddd4fd6cebadc1a7fde9a87 Mon Sep 17 00:00:00 2001 From: Andreas Atteneder Date: Thu, 7 Dec 2023 14:43:15 +0100 Subject: [PATCH 70/71] fix: Adding full license to third party notices. (#10) --- .../CHANGELOG.md | 4 + .../Third Party Notices.md | 202 ++++++++++++++++++ .../CHANGELOG.md | 4 + .../Third Party Notices.md | 202 ++++++++++++++++++ .../CHANGELOG.md | 4 + .../Third Party Notices.md | 202 ++++++++++++++++++ .../CHANGELOG.md | 4 + .../Third Party Notices.md | 202 ++++++++++++++++++ 8 files changed, 824 insertions(+) diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2020/CHANGELOG.md b/UnityPackages/com.unity.cloud.draco.webgl-2020/CHANGELOG.md index 1340c93d..2ffc5049 100644 --- a/UnityPackages/com.unity.cloud.draco.webgl-2020/CHANGELOG.md +++ b/UnityPackages/com.unity.cloud.draco.webgl-2020/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixed + +- Added copy of license to `Third Party Notices.md` + ## [1.0.0-pre.2] - 2023-11-13 ### Added diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2020/Third Party Notices.md b/UnityPackages/com.unity.cloud.draco.webgl-2020/Third Party Notices.md index 9b8d40f3..1d5bcb3b 100644 --- a/UnityPackages/com.unity.cloud.draco.webgl-2020/Third Party Notices.md +++ b/UnityPackages/com.unity.cloud.draco.webgl-2020/Third Party Notices.md @@ -24,6 +24,208 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ## Trademarks *Draco™* is a trademark of [*Google LLC*][GoogleLLC]. diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2021/CHANGELOG.md b/UnityPackages/com.unity.cloud.draco.webgl-2021/CHANGELOG.md index 1a83e580..81de4d11 100644 --- a/UnityPackages/com.unity.cloud.draco.webgl-2021/CHANGELOG.md +++ b/UnityPackages/com.unity.cloud.draco.webgl-2021/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixed + +- Added copy of license to `Third Party Notices.md` + ## [1.0.0-pre.2] - 2023-11-13 ### Added diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2021/Third Party Notices.md b/UnityPackages/com.unity.cloud.draco.webgl-2021/Third Party Notices.md index 9b8d40f3..1d5bcb3b 100644 --- a/UnityPackages/com.unity.cloud.draco.webgl-2021/Third Party Notices.md +++ b/UnityPackages/com.unity.cloud.draco.webgl-2021/Third Party Notices.md @@ -24,6 +24,208 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ## Trademarks *Draco™* is a trademark of [*Google LLC*][GoogleLLC]. diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2022/CHANGELOG.md b/UnityPackages/com.unity.cloud.draco.webgl-2022/CHANGELOG.md index 1a83e580..81de4d11 100644 --- a/UnityPackages/com.unity.cloud.draco.webgl-2022/CHANGELOG.md +++ b/UnityPackages/com.unity.cloud.draco.webgl-2022/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixed + +- Added copy of license to `Third Party Notices.md` + ## [1.0.0-pre.2] - 2023-11-13 ### Added diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2022/Third Party Notices.md b/UnityPackages/com.unity.cloud.draco.webgl-2022/Third Party Notices.md index 9b8d40f3..1d5bcb3b 100644 --- a/UnityPackages/com.unity.cloud.draco.webgl-2022/Third Party Notices.md +++ b/UnityPackages/com.unity.cloud.draco.webgl-2022/Third Party Notices.md @@ -24,6 +24,208 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ## Trademarks *Draco™* is a trademark of [*Google LLC*][GoogleLLC]. diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2023/CHANGELOG.md b/UnityPackages/com.unity.cloud.draco.webgl-2023/CHANGELOG.md index 1a83e580..81de4d11 100644 --- a/UnityPackages/com.unity.cloud.draco.webgl-2023/CHANGELOG.md +++ b/UnityPackages/com.unity.cloud.draco.webgl-2023/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixed + +- Added copy of license to `Third Party Notices.md` + ## [1.0.0-pre.2] - 2023-11-13 ### Added diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2023/Third Party Notices.md b/UnityPackages/com.unity.cloud.draco.webgl-2023/Third Party Notices.md index 9b8d40f3..1d5bcb3b 100644 --- a/UnityPackages/com.unity.cloud.draco.webgl-2023/Third Party Notices.md +++ b/UnityPackages/com.unity.cloud.draco.webgl-2023/Third Party Notices.md @@ -24,6 +24,208 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ## Trademarks *Draco™* is a trademark of [*Google LLC*][GoogleLLC]. From 921a3997db1b3da3cb44bf8103dec5a8fc41a071 Mon Sep 17 00:00:00 2001 From: Andreas Atteneder Date: Fri, 15 Dec 2023 13:14:30 +0100 Subject: [PATCH 71/71] Unity WebGL packages 1.0.0 --- UnityPackages/com.unity.cloud.draco.webgl-2020/CHANGELOG.md | 2 +- UnityPackages/com.unity.cloud.draco.webgl-2020/package.json | 2 +- UnityPackages/com.unity.cloud.draco.webgl-2021/CHANGELOG.md | 2 +- UnityPackages/com.unity.cloud.draco.webgl-2021/package.json | 2 +- UnityPackages/com.unity.cloud.draco.webgl-2022/CHANGELOG.md | 2 +- UnityPackages/com.unity.cloud.draco.webgl-2022/package.json | 2 +- UnityPackages/com.unity.cloud.draco.webgl-2023/CHANGELOG.md | 2 +- UnityPackages/com.unity.cloud.draco.webgl-2023/package.json | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2020/CHANGELOG.md b/UnityPackages/com.unity.cloud.draco.webgl-2020/CHANGELOG.md index 2ffc5049..b9736716 100644 --- a/UnityPackages/com.unity.cloud.draco.webgl-2020/CHANGELOG.md +++ b/UnityPackages/com.unity.cloud.draco.webgl-2020/CHANGELOG.md @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [Unreleased] +## [1.0.0] - 2023-12-15 ### Fixed diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2020/package.json b/UnityPackages/com.unity.cloud.draco.webgl-2020/package.json index 6af8418c..8c244276 100644 --- a/UnityPackages/com.unity.cloud.draco.webgl-2020/package.json +++ b/UnityPackages/com.unity.cloud.draco.webgl-2020/package.json @@ -1,6 +1,6 @@ { "name": "com.unity.cloud.draco.webgl-2020", - "version": "1.0.0-pre.2", + "version": "1.0.0", "displayName": "Draco for Unity WebGL 2020", "description": "Provides the Draco for Unity package with WebGL native libraries for Unity versions 2020.1 to 2021.1", "unity": "2020.3" diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2021/CHANGELOG.md b/UnityPackages/com.unity.cloud.draco.webgl-2021/CHANGELOG.md index 81de4d11..debc102d 100644 --- a/UnityPackages/com.unity.cloud.draco.webgl-2021/CHANGELOG.md +++ b/UnityPackages/com.unity.cloud.draco.webgl-2021/CHANGELOG.md @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [Unreleased] +## [1.0.0] - 2023-12-15 ### Fixed diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2021/package.json b/UnityPackages/com.unity.cloud.draco.webgl-2021/package.json index 208633fa..58eb33dd 100644 --- a/UnityPackages/com.unity.cloud.draco.webgl-2021/package.json +++ b/UnityPackages/com.unity.cloud.draco.webgl-2021/package.json @@ -1,6 +1,6 @@ { "name": "com.unity.cloud.draco.webgl-2021", - "version": "1.0.0-pre.2", + "version": "1.0.0", "displayName": "Draco for Unity WebGL 2021", "description": "Provides the Draco for Unity package with WebGL native libraries for Unity versions 2021.2 to 2022.1", "unity": "2021.2" diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2022/CHANGELOG.md b/UnityPackages/com.unity.cloud.draco.webgl-2022/CHANGELOG.md index 81de4d11..debc102d 100644 --- a/UnityPackages/com.unity.cloud.draco.webgl-2022/CHANGELOG.md +++ b/UnityPackages/com.unity.cloud.draco.webgl-2022/CHANGELOG.md @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [Unreleased] +## [1.0.0] - 2023-12-15 ### Fixed diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2022/package.json b/UnityPackages/com.unity.cloud.draco.webgl-2022/package.json index 47e1559b..411bde2d 100644 --- a/UnityPackages/com.unity.cloud.draco.webgl-2022/package.json +++ b/UnityPackages/com.unity.cloud.draco.webgl-2022/package.json @@ -1,6 +1,6 @@ { "name": "com.unity.cloud.draco.webgl-2022", - "version": "1.0.0-pre.2", + "version": "1.0.0", "displayName": "Draco for Unity WebGL 2022", "description": "Provides the Draco for Unity package with WebGL native libraries for Unity versions 2022.2 to 2023.1", "unity": "2022.2" diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2023/CHANGELOG.md b/UnityPackages/com.unity.cloud.draco.webgl-2023/CHANGELOG.md index 81de4d11..debc102d 100644 --- a/UnityPackages/com.unity.cloud.draco.webgl-2023/CHANGELOG.md +++ b/UnityPackages/com.unity.cloud.draco.webgl-2023/CHANGELOG.md @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [Unreleased] +## [1.0.0] - 2023-12-15 ### Fixed diff --git a/UnityPackages/com.unity.cloud.draco.webgl-2023/package.json b/UnityPackages/com.unity.cloud.draco.webgl-2023/package.json index e4c010a1..7e50be86 100644 --- a/UnityPackages/com.unity.cloud.draco.webgl-2023/package.json +++ b/UnityPackages/com.unity.cloud.draco.webgl-2023/package.json @@ -1,6 +1,6 @@ { "name": "com.unity.cloud.draco.webgl-2023", - "version": "1.0.0-pre.2", + "version": "1.0.0", "displayName": "Draco for Unity WebGL 2023", "description": "Provides the Draco for Unity package with WebGL native libraries for Unity versions 2023.2 and newer", "unity": "2023.2",