Open tmokmss opened 1 week ago
It would be a nice addition to the Docker images indeed. 🙏
Here is how we can add VisionPro Module Support to Docker Images:
Identifying Unity Versions with VisionPro Support
Unity’s official support for VisionPro is available starting from Unity version 2022.3.18f1 according to the "Official Support for visionOS Now Available" Thread. This release is compatible with visionOS 1.0 and Xcode 15.2.
Add VisionPro Module Support
We can add VisionPro module support to the Dockerfile like this:
diff --git a/images/ubuntu/editor/Dockerfile b/images/ubuntu/editor/Dockerfile
index 63b6977..a68e29f 100644
--- a/images/ubuntu/editor/Dockerfile
+++ b/images/ubuntu/editor/Dockerfile
@@ -32,6 +32,10 @@ RUN echo "$version-$module" | grep -q -vP '^(2021.2.(?![0-4](?![0-9]))|2021.[3-9
&& exit 0 \
|| unity-hub install-modules --version "$version" --module "windows-server" --childModules | tee /var/log/install-module-windows-server.log && grep 'Missing module' /var/log/install-module-windows-server.log | exit $(wc -l);
+RUN echo "$version-$module" | grep -q -vP '^(2022\.3\.(1[8-9]|[2-9][0-9])|202[3-9]|[6-9][0-9]{0,2})f.*visionos' \
+ && exit 0 \
+ || unity-hub install-modules --version "$version" --module "visionos" --childModules | tee /var/log/install-module-visionos.log && grep 'Missing module' /var/log/install-module-visionos.log | exit $(wc -l);
+
###########################
# Editor #
###########################
The above regex should correctly match these:
Note: I am not sure if the regex part is necessary. It might be possible to just add the visionos
module without checking the version.
Manually Build the Image
We can manually build the image like this (inspired by the OP's suggestion):
docker build --platform linux/amd64 --build-arg="version=2022.3.18f1" --build-arg="module=visionos" .
We should confirm that this works as expected, but I would assume it does, according to the issue description.
Automatic publishing of the images
This game-ci/docker
project is linked to game-ci/versioning-backend hosted on Firebase which triggers jobs when new versions are detected on Unity's archive page. Here is a brief overview of how this works:
We can find details about the scheduler here
Each CI build starts with the status started
and is updated as the build progresses. The final status is published
once the build is successfully completed. Completed CI jobs are reported to Discord.
Now the part I'm not sure about is how to ensure that the module
gets passed correctly by the backend. From what I understand, this is where the module
is received from the backend:
So we need to ensure that targetPlatform
is correctly set to visionos
in the backend.
Trigger the CI job Once the module support is added in the game-ci/docker project and the versioning backend, we can trigger the jobs to build the images. I think there's a way to trigger the CI jobs manually. If I remember well, there is also a scheduled job.
Test the new image It would be preferable to create a sample Unity project and test the new image (using the new targetPlatform) against it.
Contributions are welcomed 👍
Context
Hi, is there any plan to publish images with VisionPro module to Docker Hub? Currently we have to build and manage the image by ourselves.
Suggested solution
We can build a docker image with VisionPro module support by the following command:
Considered alternatives
If it is not published by gameci, we have to manage images by ourselves.
Additional details