Skip to content

Commit 1ee7c38

Browse files
committed
initial commit
0 parents  commit 1ee7c38

File tree

17 files changed

+1516
-0
lines changed

17 files changed

+1516
-0
lines changed

.devcontainer/devcontainer.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"image": "ghcr.io/gblikas/unity-desktop-lite/unity-2022/2022.3.11f1:latest",
3+
"features": {
4+
"./local-features/unity-license-activate": {
5+
"unity_password": "${localEnv:UNITY_PASSWORD}",
6+
"unity_username": "${localEnv:UNITY_USERNAME}",
7+
"unity_serial": "${localEnv:UNITY_SERIAL}",
8+
"vnc_password": "${localEnv:VNC_PASSWORD}"
9+
}
10+
},
11+
"forwardPorts": [6080, 5901],
12+
"customizations": {
13+
"vscode": {
14+
"extensions": ["ms-azuretools.vscode-docker", "GitHub.copilot"]
15+
}
16+
},
17+
"hostRequirements": {
18+
"cpus": 8
19+
}
20+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Local Features
2+
3+
This directory contains local features needed for using the unity-desktop-lite images.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"id": "unity-license-activate",
3+
"name": "unity-license-activate",
4+
"version": "0.0.0",
5+
"options": {
6+
"unity_username": {
7+
"type": "string",
8+
"default": ""
9+
},
10+
"unity_password": {
11+
"type": "string",
12+
"default": ""
13+
},
14+
"unity_serial": {
15+
"type": "string",
16+
"default": ""
17+
},
18+
"unity_install_dir": {
19+
"type": "string",
20+
"default": "/opt/unity"
21+
},
22+
"vnc_password": {
23+
"type": "string",
24+
"default": "vscode"
25+
}
26+
}
27+
}
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
#!/bin/bash
2+
3+
USERNAME="${USERNAME:-"${_REMOTE_USER:-"automatic"}"}"
4+
if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then
5+
USERNAME=""
6+
POSSIBLE_USERS=("vscode" "node" "codespace" "$(awk -v val=1000 -F ":" '$3==val{print $1}' /etc/passwd)")
7+
for CURRENT_USER in "${POSSIBLE_USERS[@]}"; do
8+
if id -u ${CURRENT_USER} > /dev/null 2>&1; then
9+
USERNAME=${CURRENT_USER}
10+
break
11+
fi
12+
done
13+
if [ "${USERNAME}" = "" ]; then
14+
USERNAME=root
15+
fi
16+
elif [ "${USERNAME}" = "none" ] || ! id -u ${USERNAME} > /dev/null 2>&1; then
17+
USERNAME=root
18+
fi
19+
20+
if [ -z "${VNC_PASSWORD}" ]; then
21+
echo "VNC_PASSWORD is not set"
22+
exit 1
23+
fi
24+
25+
echo "${VNC_PASSWORD}" | vncpasswd -f > /usr/local/etc/vscode-dev-containers/vnc-passwd
26+
27+
if [ -z "${UNITY_USERNAME}" ]; then
28+
echo "UNITY_USERNAME is not set"
29+
exit 1
30+
fi
31+
32+
if [ -z "${UNITY_PASSWORD}" ]; then
33+
echo "UNITY_PASSWORD is not set"
34+
exit 1
35+
fi
36+
37+
if [ -z "${UNITY_SERIAL}" ]; then
38+
echo "UNITY_SERIAL is not set"
39+
exit 1
40+
fi
41+
42+
if [ -z "${UNITY_INSTALL_DIR}" ]; then
43+
echo "UNITY_INSTALL_DIR is not set"
44+
exit 1
45+
fi
46+
47+
set -x
48+
49+
# remove all licenses
50+
sudo -u ${USERNAME} ${UNITY_INSTALL_DIR}/Editor/Unity \
51+
-quit \
52+
-batchmode \
53+
-returnlicense \
54+
-username ${UNITY_USERNAME} \
55+
-password ${UNITY_PASSWORD} \
56+
-logFile -
57+
58+
sudo -u ${USERNAME} ${UNITY_INSTALL_DIR}/Editor/Unity \
59+
-quit \
60+
-batchmode \
61+
-nographics \
62+
-serial ${UNITY_SERIAL} \
63+
-username ${UNITY_USERNAME} \
64+
-password ${UNITY_PASSWORD} \
65+
-logFile -

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**
24+
If applicable, add screenshots to help explain your problem.
25+
26+
**Desktop (please complete the following information):**
27+
- OS: [e.g. iOS]
28+
- Browser [e.g. chrome, safari]
29+
- Version [e.g. 22]
30+
31+
**Smartphone (please complete the following information):**
32+
- Device: [e.g. iPhone6]
33+
- OS: [e.g. iOS8.1]
34+
- Browser [e.g. stock browser, safari]
35+
- Version [e.g. 22]
36+
37+
**Additional context**
38+
Add any other context about the problem here.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: devcontainer build and push release
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
branches:
7+
- "main"
8+
- "staging"
9+
push:
10+
tags:
11+
- "v*.*.*"
12+
branches:
13+
- "main"
14+
- "staging"
15+
16+
17+
jobs:
18+
build-and-push:
19+
runs-on: ubuntu-latest
20+
strategy:
21+
matrix:
22+
directory: ['unity-2022/2022.3.11f1']
23+
24+
steps:
25+
- name: checkout
26+
id: checkout
27+
uses: actions/checkout@v4
28+
with:
29+
fetch-depth: 2
30+
- name: login ghcr
31+
id: login_ghcr
32+
uses: docker/login-action@v3
33+
with:
34+
registry: ghcr.io
35+
username: ${{ github.actor }}
36+
password: ${{ secrets.GITHUB_TOKEN }}
37+
- name: ${{ matrix.directory }} - check diff changes
38+
id: check_diff_changes
39+
run: |
40+
if git diff --quiet HEAD^ HEAD -- ${{ matrix.directory }}; then
41+
echo "[${{ matrix.directory }}] didn't find changes"
42+
echo "::set-output name=changed::false"
43+
else
44+
echo "[${{ matrix.directory }}] found changes"
45+
echo "::set-output name=subfolder::${{ matrix.directory }}"
46+
echo "::set-output name=changed::true"
47+
fi
48+
- name: ${{ matrix.directory }} - prebuild unity
49+
id: prebuild_unity
50+
uses: devcontainers/ci@v0.3
51+
if: steps.check_diff_changes.outputs.changed == 'true'
52+
with:
53+
subfolder: ${{ steps.check_diff_changes.outputs.subfolder }}
54+
imageName: ghcr.io/${{ github.repository }}/${{ steps.check_diff_changes.outputs.subfolder }}
55+
cacheFrom: ghcr.io/${{ github.repository }}/${{ steps.check_diff_changes.outputs.subfolder }}
56+
refFilterForPush: "refs/heads/main"
57+
push: filter

.gitignore

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# This .gitignore file should be placed at the root of your Unity project directory
2+
#
3+
# Get latest from https://github.com/github/gitignore/blob/main/Unity.gitignore
4+
#
5+
/[Ll]ibrary/
6+
/[Tt]emp/
7+
/[Oo]bj/
8+
/[Bb]uild/
9+
/[Bb]uilds/
10+
/[Ll]ogs/
11+
/[Uu]ser[Ss]ettings/
12+
13+
# MemoryCaptures can get excessive in size.
14+
# They also could contain extremely sensitive data
15+
/[Mm]emoryCaptures/
16+
17+
# Recordings can get excessive in size
18+
/[Rr]ecordings/
19+
20+
# Uncomment this line if you wish to ignore the asset store tools plugin
21+
# /[Aa]ssets/AssetStoreTools*
22+
23+
# Autogenerated Jetbrains Rider plugin
24+
/[Aa]ssets/Plugins/Editor/JetBrains*
25+
26+
# Visual Studio cache directory
27+
.vs/
28+
29+
# Gradle cache directory
30+
.gradle/
31+
32+
# Autogenerated VS/MD/Consulo solution and project files
33+
ExportedObj/
34+
.consulo/
35+
*.csproj
36+
*.unityproj
37+
*.sln
38+
*.suo
39+
*.tmp
40+
*.user
41+
*.userprefs
42+
*.pidb
43+
*.booproj
44+
*.svd
45+
*.pdb
46+
*.mdb
47+
*.opendb
48+
*.VC.db
49+
50+
# Unity3D generated meta files
51+
*.pidb.meta
52+
*.pdb.meta
53+
*.mdb.meta
54+
55+
# Unity3D generated file on crash reports
56+
sysinfo.txt
57+
58+
# Builds
59+
*.apk
60+
*.aab
61+
*.unitypackage
62+
*.app
63+
64+
# Crashlytics generated file
65+
crashlytics-build.properties
66+
67+
# Packed Addressables
68+
/[Aa]ssets/[Aa]ddressable[Aa]ssets[Dd]ata/*/*.bin*
69+
70+
# Temporary auto-generated Android Assets
71+
/[Aa]ssets/[Ss]treamingAssets/aa.meta
72+
/[Aa]ssets/[Ss]treamingAssets/aa/*

0 commit comments

Comments
 (0)