Skip to content

Commit 126b146

Browse files
Merge pull request #13 from Unity-Technologies/release/0.7.0
release/0.7.0
2 parents 550fc10 + 3fae009 commit 126b146

File tree

10 files changed

+374
-69
lines changed

10 files changed

+374
-69
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,15 @@ All notable changes to this package will be documented in this file.
55
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
66
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
77

8+
## [0.7.0] - 2025-08-26
9+
10+
### Added
11+
- Added app information specific to the CLI tool for analytics purposes.
12+
- Added support for VCS Mapping when used in private cloud setting.
13+
14+
### Changed
15+
- Automatic transformations (preview generation) are now enabled. Asset are now freezed once those transformation are completed.
16+
817
## [0.6.0] - 2025-05-28
918

1019
### Added

bulk_upload_cli/README.md

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ For more related resources and support services, see [Help & Support](https://cl
2020
- [Creating a CSV from a Unity Cloud project](#creating-a-csv-from-a-unity-cloud-project)
2121
- [Edit metadata in the CSV file](#edit-metadata-in-the-csv-file)
2222
- [Use an existing configuration file](#use-an-existing-configuration-file)
23+
- [Index assets from VCS](#index-assets-from-vcs)
2324
- [Optimize asset creation and upload](#optimize-asset-creation-and-upload)
2425
- [Use keybindings](#use-keybindings)
2526
- [Replicate the folder structure with collections](#replicate-the-folder-structure-with-collections)
@@ -72,6 +73,7 @@ Select one of the following actions:
7273

7374
- **Upload local assets**: Upload assets from your local machine to the cloud. See [Select the input method](#select-the-input-method) section for more information.
7475
- **Update assets' metadata**: Update the metadata of existing assets in the cloud. See [Creating a csv from a Unity Cloud project](#creating-a-csv-from-a-unity-cloud-project) section for more information.
76+
- **Index assets from VCS**: Select this option to index assets from a version control system (VCS) to the cloud. See the [Index assets from VCS](#index-assets-from-vcs) section for more information.
7577
### Select the input method
7678

7779
Select one of the following strategies as the input method for bulk asset creation:
@@ -139,6 +141,27 @@ To use an existing configuration file, follow these steps:
139141
3. On the next run with the `--create` flag, you can add the `--config` flag followed by the name of the configuration file you created. All your answers from the first run will be loaded from the configuration file.
140142
4. Alternatively, you can use the `--config-select` flag to select from a list of existing configuration files.
141143

144+
### Index assets from VCS
145+
146+
To index assets from a version control system (VCS) to the cloud, follow these steps:
147+
1. Run the CLI tool with the `--create` flag.
148+
2. When prompted to choose an action, select `Index assets from VCS`.
149+
3. You will be prompted to select an existing VCS integration or create a new one.
150+
- To create a new VCS integration, you will need to provide the following information:
151+
- The VCS provider (for the moment only `plasticSCM` is supported).
152+
- The server URL.
153+
- Your authentication token.
154+
4. You will be prompted to select a repository from the VCS integration. Select the repository you want to index.
155+
5. You will be prompted to select a branch from the repository. Select the branch you want to index.
156+
6. You will be prompted to select a folder from the branch. Select the folder you want to index. Use the '. (select this directory)' when you're in the folder you want to index; select '.. (go back)' to go back to the parent folder.
157+
7. You will be prompted to select the grouping strategy for the assets:
158+
- group files by name: Select this option if your assets are following a naming convention, for example, blueasset.fbx, blueasset.png.
159+
- group files by folder: Select this option if your assets are organized by folder, that is, all relevant files are in distinct folders.
160+
- one file = one asset: Select this option if no grouping is necessary. Each file in the asset folder and its subfolders is created as an asset.
161+
8. Answer the next questions normally.
162+
163+
At the end of the process, the CLI tool will create assets with files from the VCS mapped in a new dataset called `VCS Dataset`.
164+
142165
### Optimize asset creation and upload
143166

144167
Depending on your network, the number of assets, and the size of the assets, you can adjust the following settings in the `app_settings.json` file to optimize asset creation and upload:
@@ -179,9 +202,9 @@ Here's an example of how to set the environment variables in the `app_settings.j
179202
```json
180203
{
181204
"environmentVariables": {
182-
"UNITY_CLOUD_SERVICES_FQDN": "https://your-private-cloud-url.com",
205+
"UNITY_CLOUD_SERVICES_FQDN": "your-private-cloud-fqdn.com",
183206
"UNITY_CLOUD_SERVICES_FQDN_PATH_PREFIX": "/backend",
184-
"UNITY_CLOUD_SERVICES_OPENID_CONFIGURATION_URL": "https://your-private-cloud-url.com/auth/realms/unity/.well-known/openid-configuration"
207+
"UNITY_CLOUD_SERVICES_OPENID_CONFIGURATION_URL": "https://your-private-cloud-fqdn.com/auth/realms/unity/.well-known/openid-configuration"
185208
}
186209
}
187210
```

bulk_upload_cli/app_settings.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"parallelAssetUpload": 5,
44
"parallelFileUploadPerAsset": 5,
55
"environmentVariables": {
6-
},
7-
"featureFlags":[],
8-
"httpTimeout": 300
6+
},
7+
"featureFlags": [],
8+
"httpTimeout": 300
99
}

bulk_upload_cli/bulk_upload/asset_mappers.py

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def map_assets(self, config: ProjectUploaderConfig) -> [AssetInfo]:
4848
file = get_file_info(PurePath(f), config.assets_path)
4949
assets[file_name].files.append(file)
5050

51-
if meta_file_exists(file.path):
51+
if meta_file_exists(file.path, files):
5252
meta_file = get_meta_file(file.path, config.assets_path)
5353
assets[file_name].files.append(meta_file)
5454
dependencies = []
@@ -86,6 +86,7 @@ def map_assets(self, config: ProjectUploaderConfig) -> [AssetInfo]:
8686
for f in files:
8787
if is_directory_path(f):
8888
continue
89+
8990
if f.name.endswith(".meta"): # meta file should not be considered as an asset alone
9091
continue
9192

@@ -98,15 +99,11 @@ def map_assets(self, config: ProjectUploaderConfig) -> [AssetInfo]:
9899

99100
file = get_file_info(PurePath(f), config.assets_path)
100101
assets[base_name].files.append(file)
101-
if meta_file_exists(file.path):
102-
assets[base_name].files.append(get_meta_file(file.path, config.assets_path))
103102

104103
for common_file in config.files_common_to_every_assets:
105104
common_file = PurePath(common_file)
106105
for asset in assets.values():
107106
asset.files.append(get_file_info(common_file, config.assets_path))
108-
if meta_file_exists(common_file):
109-
asset.files.append(get_meta_file(common_file, config.assets_path))
110107

111108
return list(assets.values())
112109

@@ -121,8 +118,8 @@ def __init__(self, file_explorer: FileExplorer):
121118

122119
def map_assets(self, config: ProjectUploaderConfig) -> [AssetInfo]:
123120

124-
abs_path = os.path.abspath(config.assets_path)
125-
folders = self.file_explorer.get_folders_at_hierarchy_level(abs_path, config.hierarchical_level)
121+
abs_path = os.path.abspath(config.assets_path) if config.vcs_integration is None else config.assets_path
122+
folders = self.file_explorer.get_folders_at_hierarchy_level(abs_path, int(config.hierarchical_level))
126123

127124
if len(folders) == 0:
128125
print(f"No folders found in the assets path. Only the root folder will be considered as an asset")
@@ -409,9 +406,9 @@ def get_meta_file(file: PurePath, root_folder: str) -> FileInfo:
409406
return get_file_info(PurePath(f"{file}.meta"), root_folder)
410407

411408

412-
def meta_file_exists(file: PurePath) -> bool:
413-
return os.path.exists(f"{file}.meta")
414-
409+
def meta_file_exists(file: PurePath, files) -> bool:
410+
meta_file_path = PurePath(f"{file}.meta")
411+
return meta_file_path in files
415412

416413
def get_dependencies_from_file(file) -> []:
417414
try:

0 commit comments

Comments
 (0)