# Asset Processor Workflow Tests:
Testing in this area focuses on the functionality of:
* **Asset Processor**
* Asset Processor Batch
* Asset Processor GUI
* **Job Analysis**
* XML Schema System
* Copy Jobs
* Process Jobs
* Dependencies
* Source Dependencies
* Product Dependencies
* Job Dependencies
* **Source Control**
* Perforce Integration
* **Asset Cache Server**
* **Asset Relocation Tool**
* **Missing Dependency Scanner**
* **Intermediate Assets**
* **Virtual File System**
## Common Issues to Watch For:
Test guidance will sometimes note specific issues to watch for. The common issues below should be watched for through all testing, even if unrelated to the current workflow being tested.
1. Console log errors/warnings/spam
2. Asserts
3. Improperly rendered scenes
### Common Terms:
###### Base Resources:
* [Asset Pipeline O3DE Resources](https://www.o3de.org/docs/user-guide/assets/pipeline/)
* [Asset Pipeline Concepts and Terms](https://www.o3de.org/docs/user-guide/packaging/asset-bundler/concepts/)
* [O3DE Editor](https://www.o3de.org/docs/user-guide/editor/)
* [Console](https://www.o3de.org/docs/user-guide/editor/console/)
* [Asset Processor](https://www.o3de.org/docs/user-guide/assets/asset-processor/)
* [Asset Cache](https://www.o3de.org/docs/user-guide/assets/pipeline/asset-cache/)
###### Asset Processor:
* [Asset Processor Batch](https://www.o3de.org/docs/user-guide/assets/asset-processor/asset-processor-batch/)
* [Asset Processor GUI](https://www.o3de.org/docs/user-guide/assets/asset-processor/interface/)
* [Asset Cache Server](https://www.o3de.org/docs/user-guide/assets/asset-processor/asset-cache-server/)
* [Asset Relocation Tool](https://www.o3de.org/docs/user-guide/assets/asset-processor/move-assets/)
* [Missing Dependency Scanner](https://www.o3de.org/docs/user-guide/packaging/asset-bundler/assets-resolving/)
* [Virtual File System](https://www.o3de.org/docs/user-guide/)
###### Job Analysis:
* [Copy Jobs](https://www.o3de.org/docs/user-guide/assets/asset-types/#copy-jobs)
* [Process Jobs](https://www.o3de.org/docs/user-guide/assets/asset-types/)
* [XML Schema System](https://www.o3de.org/docs/user-guide/)
* [Job Logs](https://www.o3de.org/docs/user-guide/assets/asset-processor/debugging/#view-asset-processor-logs)
###### Asset Types:
* [Source Assets](https://www.o3de.org/docs/user-guide/assets/pipeline/source-assets/)
* [Produce Assets](https://www.o3de.org/docs/user-guide/assets/pipeline/asset-processing/)
* [Intermediate Assets](https://www.o3de.org/docs/user-guide/assets/pipeline/intermediate-assets/)
###### Dependencies:
* [Source Dependencies](https://www.o3de.org/docs/user-guide/assets/pipeline/asset-dependencies-and-identifiers/#source-dependencies)
* [Product Dependencies](https://www.o3de.org/docs/user-guide/assets/pipeline/asset-dependencies-and-identifiers/#product-dependencies)
* [Job Dependencies](https://www.o3de.org/docs/user-guide/assets/pipeline/asset-dependencies-and-identifiers/#job-dependencies)
###### Source Control:
* [Perforce Integration](https://www.o3de.org/docs/user-guide/)
###### Asset Processor Configuration:
* [Scan Directories](https://www.o3de.org/docs/user-guide/assets/pipeline/scan-directories/)
* [File Tagging System](https://www.o3de.org/docs/user-guide/packaging/asset-bundler/file-tagging/)
---
## Feature: Asset Processor
**Description:** Testing in this area will focus on Asset Processor and Asset Processor Batch usage.
**Project Requirements:** Any project with available source files can be used.
**Resources:**
[Asset Processor Interface](https://www.o3de.org/docs/user-guide/assets/asset-processor/interface/)
[Asset Processor Configuration](https://www.o3de.org/docs/user-guide/assets/asset-processor/configuration/)
### Area: Asset Ingestion | Job and Product Validation
**Product:** Successfully processed assets are in cache and visible in the Asset Browser.
**Suggested Time Box:** 20 Minutes
| Workflow | Requests | Things to Watch For |
|----------|-----------|---------------------|
| **Launch Asset Processor** |
- Source assets already exist within a project scan directory.
| - There should be no excessive job analysis scanning.
- There should be no excessive processing time for files.
- Asset Processor errors should be descriptive and actionable.
- Asset Processor should successfully process source files into the cache as product files.
|
| **Add new assets to the project** | - Create and place new assets within a project scan directory:
- Supported source assets.
- Unsupported Source assets.
| - Asset Processor should successfully process supported source assets and generate product assets in the cache.
- AP should not process unsupported source assets.
|
| **Open new asset Job Log from Jobs tab right-click context menu** | - Opens the log file up in filesystem default program for .log files.
| - Should have no asserts when opening the log file.
- Job log file should not have unnecessary/unhelpful log spam.
- Job log file should not be empty on a job with warnings or errors.
|
| **Open new asset in Asset Browser from Jobs tab right-click context menu** | - Open up Asset Browser.
| - Processed assets should be discoverable and interactable within the Asset Browser.
|
### Area: Source and Product Asset GUI Navigation
**Product:** Source Asset and Product Asset are discoverable.
**Suggested Time Box:** 10 Minutes
| Workflow | Requests | Things to Watch For |
|----------|----------|---------------------|
| **From Jobs tab jump to source asset from right-click context menu** | - Source Assets tab is opened to the the selected source asset.
| - Source asset should be found within the tab.
|
| **Jump to a product asset from selected asset's right-click context menu** | - Product Assets tab is opened to the the selected source asset.
| - Product asset should be found within the tab.
|
| **Jump back to Source Asset from selected asset's info panel "Source Asset" button** | - Source Assets tab is opened to the the selected source asset.
| - Source asset should be found within the tab.
|
| **Reprocess asset from selected Source Asset's right-click context menu** | - Asset processor performs job analysis on file.
- Asset is reprocessed.
- Asset is product cache.
| - There should be no excessive job analysis scanning.
- There should be no excessive processing time for files.
- Asset Processor errors should be descriptive and actionable.
- Asset Processor should successfully process source files into the cache as product files.
- New Job Logs and Product files should be output.
|
| **Open file in Explorer from selected asset's right-click context menu** | - File Explorer is opened to the source file's location.
| - Wrong folder is opened.
- Folder fails to open.
|
### Area: Asset Processor Batch basic actions
**Project Requirements**
* AssetProcessorBatch present in the build folder. If it is not it can be built using `cmake --build build/ --target AssetProcessorBatch --config profile` command from the root engine folder.
**Product:** Files modified via Asset Processor Batch.
**Suggested Time Box:** 10 Minutes
| Workflow | Requests | Things to Watch For |
|----------|----------|---------------------|
| **Prepare Command Line to execute Asset Processor Batch commands** | - Open Command line in the engine build folder (for example `C:\o3de-install\bin\Windows\profile\Default\`) and confirm AssetProcessorBatch can be executed for a chosen project (for example `AssetProcessorBatch.exe --project-path=C:\Users\\O3DE\Projects\`).
| - Executing AssetProcessorBatch for a chosen project processes assets without any asserts.
|
| **Delete an asset** | - Delete an existing asset via Asset Processor Batch (for example `AssetProcessorBatch.exe --project-path=C:\Users\\O3DE\Projects\ --delete=C:\Users\\O3DE\Projects\\test.txt --confirm`).
| - Deleted asset should be removed from disk.
|
| **Rename an asset** | - Rename an existing asset via Asset Processor Batch (for example `AssetProcessorBatch.exe --project-path=C:\Users\\O3DE\Projects\ --move=C:\Users\\O3DE\Projects\\test.txt,C:\Users\\O3DE\Projects\\test1.txt --updateReferences --confirm`).
| - Asset's name should be changed (and updated in Editor if `--updateReferences` argument is used).
|
| **Move an asset** | - Move an existing asset via Asset Processor Batch (for example `AssetProcessorBatch.exe --project-path=C:\Users\\O3DE\Projects\ --move=C:\Users\\O3DE\Projects\\test1.txt,C:\Users\\O3DE\Projects\\Assets\test1.txt --updateReferences --confirm`).
| - Asset should be moved to the chosen path (and updated in Editor if `--updateReferences` argument is used).
|
---
## Feature: Job Analysis
**Description:** Testing in this area will focus on XMLSchema as well as Source, Product and Job Dependencies scanning.
### Area: XMLSchema Dependencies Scan
**Project Requirements:**
* XMLSchema asset with dependent files setup. For example the existing `Font.xmlschema` along with `Engine/Fonts/` (on Pre-built SDK engine their paths are `o3de-install/Assets/Engine/Schema/Font.xmlschema` and `o3de-install/Assets/Fonts/` respectively) assets could be used.
**Platforms:**
* Windows
* Linux
**Product:** An XMLSchema file scanned for missing dependencies.
**Suggested Time Box:** 20 Minutes
| Workflow | Requests | Things to Watch For |
|----------|----------|---------------------|
| **Perform scan for missing dependencies with none missing** | - In the *Asset Processor* navigate to the *Assets* > *Product Assets* tab and find your `.xmlschema` file (for example `pc/schema/font.xmlschema`).
- In the *Missing Product Dependencies* section to the right, click the *Scan file* button.
- In the CLI navigate to your engine build location (for example `C:\o3de-install\bin\Windows\profile\Default\`) and run the AssetProcessorBatch command to scan for the missing dependencies for the fonts (for example `AssetProcessorBatch --project-path=C:\Users\\O3DE\Projects\ --zeroAnalysisMode --dsp=%fonts%.xml`).
| - The `.xmlschema` asset can be found in the *Asset Processor*.
- *Missing Product Dependencies* log returns `No missing dependencies found` after clicking the *Scan file* button.
- There are no `Missing dependency:` lines under each `Scanning for missing dependencies:` line in the CLI.
|
| **Perform scan for missing dependencies with some missing** | - Move your `.xmlschema` file out of it's original path (for example `o3de-install/Assets/Engine/Schema/Font.xmlschema`).
- In the *Asset Processor* navigate to the *Assets* > *Product Assets* tab and find an `.xml` asset that was dependent on the removed `.xmlschema` asset (for example `pc/font/vera-italic.xml`).
- In the *Missing Product Dependencies* section to the right, click the *Scan file* button.
- In the CLI navigate to your engine build location (for example `C:\o3de-install\bin\Windows\profile\Default\`) and run the AssetProcessorBatch command to scan for the missing dependencies for the fonts (for example `AssetProcessorBatch --project-path=C:\Users\\O3DE\Projects\ --zeroAnalysisMode --dsp=%fonts%.xml`).
- Remember to return the `.xmlschema` file back to it's original path for any further use.
| - An `.xml` asset can be found in the *Asset Processor*.
- *Missing Product Dependencies* log returns the name of missing dependency after clicking the *Scan file* button (`Vera-italic.ttf` in the case of `vera-italic.xml`).
- There are `Missing dependency:` lines under each `Scanning for missing dependencies:` line in the CLI.
|
### Area: Source, Product and Job Dependencies
**Project Requirements:**
* Any project with at least one asset in each *Asset Processor* > *Assets* category: *Source Assets*, *Intermediate Assets* and *Product Assets* with one or more of *Incoming Dependencies* (*Dependencies - In*) or *Outgoing Dependencies* (*Dependencies - Out*).
**Platforms:**
* Windows
* Linux
**Product:** Scanned project cache and assets with dependencies verified to be displayed in the *Asset Processor*.
**Suggested Time Box:** 20 Minutes
| Workflow | Requests | Things to Watch For |
|----------|----------|---------------------|
| **Perform an Asset Processor Scan** | - In the *Asset Processor* navigate to the *Assets* > *Settings* tab and in the *Full Scan* section click the *Start Scan* button.
| - Assets are fully scanned with no notable errors occuring.
|
| **Verify the Job Dependencies** | - In the *Asset Processor* navigate to the *Assets* > *Source Assets* tab and verify that assets display Dependencies in the pane to the right (for example `engine.json`).
- In the *Asset Processor* navigate to the *Assets* > *Intermediate Assets* tab and verify that assets display Dependencies in the pane to the right (for example `materials/reflectionprobe/reflectionprobevisualization_generated.materialtype`).
- In the *Asset Processor* navigate to the *Assets* > *Product Assets* tab and verify that assets display Dependencies in the pane to the right (for example `pc/fonts/vera-italic.font`).
| - *Source Assets* contain assets that display Dependnecies (either *In* or *Out* or both).
- *Intermediate Assets* contain assets that display Dependnecies (either *In* or *Out* or both).
- *Product Assets* contain assets that display Dependnecies (either *In* or *Out* or both).
|
---
## Feature: AP Source Control Integration
**Description:** Testing in this Area will focus on connecting and working with Perforce (p4) as a source control tool.
**Project Requirements:**
* Perforce installed on the machine.
* O3DE added to the p4 depot (without cache folders).
**Platforms:**
* Windows
**Product:** Assets that are shared on p4 server.
**Suggested Time Box:** 60 Minutes
| Workflow | Requests | Things to Watch For |
|----------|----------|---------------------|
| **Enable Source Control plugin** | - Open the O3DE Editor.
- Close the Welcome to O3DE window or load any level.
- Click LMB on the Perforce plugin icon.
- Enable the connection.
| - Perforce plugin is present in the bottom bar of the O3DE Editor.
- Clicking on the p4 plugin shows Status switch and Settings.
- Settings are grayed out when p4 connection is set to disabled.
- Perforce plugin is green while enabled, and gray while disabled.
- Enabling and disabling p4 connection prints appropriate message in the Editor's console.
|
| **Configure connection settings** | - Click LMB on the Perforce plugin icon.
- Enable the p4 connection.
- Open Settings in the Perforce plugin.
- Provide correct values for each setting:
- Server, User and Workspace should be filled with information from p4v. Those are the same information that user needs to log into p4 applications.
- Charset should be set to "none".
- Press OK.
| - User is able to povide the information necessary for p4 connection.
- Filing Settings with invalid information results in p4 plugin color change to orange and message in Editor's console about invalid Perforce configuration.
- User is able to disconnect from Perforce changing the Work Online switch.
|
| **Add asset to depot** | - Import any asset to the project you are working on.
- Find in Asset Browser newly imported asset.
- Click RMB on it.
- From the context menu select "Add to Source Control".
- Open p4v application and log to it
- Submit changes.
| - Imported asset shows in Asset Browser.
- When Perforce connection is enabled, source control options are present in the context menu.
- Adding asset to source control prints appropriate messages in the Editor's console.
- Asset is marked as "Add" in the perfoce application and changes can be submitted.
- Asset Processor process asset without issues.
|
| **Check Out asset** | - In the Asset Browser, find any asset that is already added to the source control.
- Click RMB on it.
- From the context menu select "Check Out".
- Open p4v application and log into it
- Submit changes.
| - When Perforce connection is enabled, source control options are present in the context menu.
- Checking Out assets prints appropriate messages in the Editor's console.
- Asset is marked as "Checked Out" in the perfoce application and changes can be submitted.
- Asset Processor process asset without issues.
|
| **Reverting changes** | - Chceck Out an asset.
- Verify that asset is Checked Out in the Perforce application and change can be submitted.
In Asset Browser inside the O3DE, click RMB on the asset.- From the context menu select "Undo Check Out".
- In the Perforce application, verify that Chceked Out asset dissapeard from changelist.
| - When Perforce connection is enabled, source control options are present in the context menu.
- Checking Out assets prints appropriate messages in the Editor's console.
- Asset is marked as "Checked Out" in the perfoce application.
- Check Out assets can be reverted.
- Reverting Check Out prints appropriate messages in the Editor's console.
- After reverting Check Out, changes are removed from p4v changelist.
- Asset Processor process asset without issues.
|
| **Getting last version** | - In the Asset Browser find an asset that was changed by other user.
- Click RMB on it.
- From the context menu select "Get Latest Version".
| - When Perforce connection is enabled, source control options are present in the context menu.
- Getting latest version of asset from source control prints appropriate messages in the Editor's console.
- Changes to the asset are visible without need of restarting the Editor.
- Editor remains stable.
- Asset Processor process asset without issues.
|
---
## Feature: Asset Cache Server
**Description:** Testing in this area should focus on the Asset Cache Server and Client side.
### General Docs
* [Asset Cache Server](https://www.o3de.org/docs/user-guide/assets/asset-processor/asset-cache-server/)
### Common Issues to Watch For
Test guidance will sometimes note specific issues to watch for. The common issues below should be watched for through all testing, even if unrelated to the current workflow being tested.
- Server side generating Cache
- Path to the Cache location
- Ability of the client to connect to the server side
- Ability of Client side to retrieve file from the server side
## Workflows
### Area: Create the transfer directory
**Project Requirements**
* None
**Editor Platforms:**
* Windows
* Linux
**Docs:**
* [Asset Cache Server](https://www.o3de.org/docs/user-guide/assets/asset-processor/asset-cache-server/)
**Product:** a shared directory that all the team members can access over the network.
**Suggested Time Box:** 10 minutes per platform.
| Workflow | Requests | Things to Watch For |
|----------|----------|---------------------|
| **Creating a shared folder that will store Cache and be accessible over the network** | - Create a folder.
- Share the folder over the network.
| - Asset Processor has permission to write to the folder.
- Folder is accessible over the network.
|
### Area: Using the Shared Cache Tab
**Project Requirements**
* None
**Editor Platforms:**
* Windows
* Linux
**Product:** Working Asset Cache Server (Shared Cache)
**Suggested Time Box:** 15 minutes per platform.
| Workflow | Requests | Things to Watch For |
|----------|----------|---------------------|
| **Set shared cache mode** | - Change Shared Cache Mode.
| - Default mode in inactive.
- Server - The Asset Processor will archive product assets on a remote folder.
- Client - The Asset Processor will attempt to retrieve archive product assets from a remote folder.
|
| **Select the transfer directory via *Select a remote folder*** | - Input path to the server cache directory.
| - Path is saved.
- When the “Save Changes” button is clicked, the system will detect the validity of the transfer directory.
|
| **Manage shared cache patterns** | - Create a new pattern.
| - Pattern can be created.
- Pattern can be named.
- Pattern type can be changed.
- Pattern attribute can be changed.
- Pattern can be removed using the Trash icon.
|
| **Save Changes** | - Save the made changes.
| - The Save Changes and Discard buttons become enabled when a change to the settings has been detected.
- The Save Changes commits the changes to a settings file. The Discard button reverts the panel’s values.
- Changes are saved if Asset Processor is reopened.
- The settings file is written to the `{project_folder}/Registry/asset_cache_server_settings.setreg` file.
- If the Remote Folder is set to an invalid folder location, then an error dialog will show up and no settings will be written.
|
### Area: Running Asset Processor in Server Mode
**Project Requirements**
* None
**Editor Platforms:**
* Windows
* Linux
**Docs:**
* [Asset Cache Server](https://www.o3de.org/docs/user-guide/assets/asset-processor/asset-cache-server/)
* [RegEx](https://en.wikipedia.org/wiki/Regular_expression)
**Game Launcher Supported Platforms:**
* Windows
* Linux
**Product:** Asset Processor archiving product assets to a remote folder
**Suggested Time Box:** 30 minutes per platform.
| Workflow | Requests | Things to Watch For |
|----------|----------|---------------------|
| **Set shared cache mode to Server** | - Change Shared Cache Mode to Server.
| |
| **Select the transfer directory via *Select a remote folder*** | - Input path to the server cache directory.
| - Path is saved.
- Path is detected as valid by the system.
|
| **Add a Wildcard Pattern** | - Add a new Pattern.
- Name the pattern.
- Set Pattern Type to Wildcard.
- Set Pattern to "*.fbx" or any other file type.
| - Pattern is saved.
- Pattern's name and Pattern is valid.
- Pattern is Enabled.
|
| **Add a RegEx Pattern** | - Add a new Pattern.
- Name the pattern.
- Set Pattern Type to RegEx.
- Set Pattern to a RegEx expression.
| - Pattern is saved.
- Pattern's name and RegEx expression is valid.
- Pattern is Enabled.
|
| **Save Changes** | - Save the made changes.
| - Save button can be pressed.
- System detects validity of the transfer directory.
- Asset Processor starts archiving product assets to a remote folder according to the Patterns.
|
### Area: Running Asset Processor in Client Mode
**Project Requirements**
* None
**Editor Platforms:**
* Windows
* Linux
**Docs:**
* [Asset Cache Server](https://www.o3de.org/docs/user-guide/assets/asset-processor/asset-cache-server/)
* [RegEx](https://en.wikipedia.org/wiki/Regular_expression)
**Product:** Asset Processor retrieving archive product assets from a remote folder.
**Suggested Time Box:** 30 minutes per platform.
| Workflow | Requests | Things to Watch For |
|----------|----------|---------------------|
| **Set shared cache mode to Client** | - Change Shared Cache Mode to Client.
| |
| **Select the transfer directory via *Select a remote folder*** | - Input path to the server cache directory.
| - Path is saved.
- Path is detected as valid by the system.
|
| **Add a Wildcard Pattern** | - Add a new Pattern.
- Name the pattern.
- Set Pattern Type to Wildcard.
- Set Pattern to **.fbx* or any other file type.
| - Pattern is saved.
- Pattern's name and Pattern is valid.
- Pattern is Enabled.
|
| **Add a RegEx Pattern** | - Add a new Pattern.
- Name the pattern.
- Set Pattern Type to RegEx.
- Set Pattern to a RegEx expression.
| - Pattern is saved.
- Pattern's name and RegEx expression is valid.
- Pattern is Enabled.
|
| **Save Changes** | - Save the made changes
| - Save button can be pressed.
- System detects validity of the transfer directory.
- Asset Processor starts retrieving archive product assets from a remote folder.
|
---
## Feature: Missing Dependency Scanner
**Description:** Testing in this area should focus on finding presence of missing dependencies.
### General Docs
* [Resolving Missing Assets](https://www.o3de.org/docs/user-guide/packaging/asset-bundler/assets-resolving/)
### Common Issues to Watch For
Test guidance will sometimes note specific issues to watch for. The common issues below should be watched for through all testing, even if unrelated to the current workflow being tested.
- Dependency scanner not working
- Dependency scanner not finding missing dependencies
### Workflows
### Area: Running Dependency Scanner
**Project Requirements**
* AssetProcessorBatch present in the build folder. If it is not it can be built using `cmake --build build/ --target AssetProcessorBatch --config profile` command from the root engine folder.
* [testReferenceFile.xml](asset-processor-attachments/testReferenceFile.xml) downloaded.
**Editor Platforms:**
* Windows
* Linux
**Product:** Finding presence of missing dependencies
**Suggested Time Box:** 15 minutes per platform.
| Workflow | Requests | Things to Watch For |
|----------|----------|---------------------|
| **Add test file** | - Place *testReferenceFile.xml* to Asset folder of the Project folder.
- Launch Asset Processor for the project.
- Wait for all Assets to be processed.
- Shut down Asset Processor.
| - Asset errors.
- Runtime errors of Asset Processor.
|
| **Run Missing Dependency Scanner** | - Run `AssetProcessorBatch --project-path = %project-path% --zeroAnalysisMode` command.
| - Missing Dependency Scanner startup errors.
- Missing Dependency Scanner runntime errors.
- `-dsp` flag is functional.
- `-dsp` flag is filtering Assets as expected.
- Dependency Scanner shows missing dependencies.
|
| **Delete Asset with missing Dependency** | - Remove the `testReferenceFile.xml` file from Assets.
- Re-run Asset processor.
- Shut down Asset Processor.
- Run Dependency Scanner again.
| - Dependency Scanner does not output errors concerning the deleted file.
|
### Area: Finding a false positive in the missing dependency scanner
**Project Requirements**
* AssetProcessorBatch present in the build folder. If it is not it can be built using `cmake --build build/ --target AssetProcessorBatch --config profile` command from the root engine folder.
**Editor Platforms:**
* Windows
* Linux
**Product:** Verified a presence of false possitive missing dependency.
**Suggested Time Box:** 15 minutes per platform.
| Workflow | Requests | Things to Watch For |
|----------|----------|---------------------|
| **Identify a false positive missing dependenct asset** | - Go to *Tools* > *Asset Editor* in the Editor.
- Open the `exclude.filetag` asset.
- Verify that it contains a *File Tag Map* with `editoronly` *File Tag* included (for example `*.slice`)
- Open *Asset Processor* and navigate to *Assets* > *Product Assets*.
- Find a `*.slice` asset (for example `pc/engineassets/slices/defaultlevelsetup.slice`) using search bar and select it.
- In the right pane click the *Scan file* button.
| - *Asset Editor* can be opened.
- `exclude.filetag` asset can be opened.
- EditorOnly tag asset can be located.
- `File matches EditorOnly or Shader tag, ignoring for missing dependencies search` is printed to the log under the *Scan file* button.
|
---
## Feature: Virtual File System
Testing in this area should focus on the functionality of running the Android application in assets by Virtual File System (VFS) packaging mode.
### Common Issues to Watch For
Test guidance will sometimes note specific issues to watch for. The common issues below should be watched for through all testing, even if unrelated to the current workflow being tested.
- Be aware of network connection errors from the mobile device to Asset Processor running on PC
- Rendering artifacts when running the deployed level on the Android devices
- Asserts and errors that appear in the Android log while running the deployed level
- Immediate crashes when launching the app on the Android device
- Crashes that occur after some time leaving the app running
### Editor Platforms:
- Windows
### Game Launcher Supported Platforms:
- Android
### Documents and Common Terms
* [O3DE User Guide: Android Support for O3DE](https://www.o3de.org/docs/user-guide/platforms/android/)
### Area: Build Android in VFS packaging mode
### Project Requirements
* Create a new default project.
* Create `/Registry/AssetProcessor.setreg` file to generate android assets in the cache:
````
{
"Amazon": {
"AssetProcessor": {
"Settings": {
"Platforms": {
"android": "enabled"
}
}
}
}
}
````
* Make sure `/Platform/Android/android_project.json` exists and that it has android settings section in it. Example:
````
"android_settings": {
"package_name": "org.o3de.DefaultProject",
"version_number": 1,
"version_name": "1.0.0.0",
"orientation": "landscape"
},
````
* Build the default project.
* Open the Editor and create a default level.
* Create `/Registry/autoexec.game.setreg` file to set the starting level:
````
{
"O3DE": {
"Autoexec": {
"ConsoleCommands": {
"LoadLevel": "DefaultLevel"
}
}
}
}
````
* Create `/Registry/bootstrap.setreg` file to enable remote filesystem on Android:
````
{
"Amazon": {
"AzCore": {
"Bootstrap": {
"android_remote_filesystem": 1,
"android_connect_to_remote": 1,
"android_wait_for_connect": 1
}
}
}
}
````
* Run Asset Processor and wait until all assets have been processed.
**Product:** Android application running in VFS packaging mode.
**Suggested Time Box:** 3 hours for requirements + 1 hour for the workflow.
| Workflow | Requests | Things to Watch For |
|----------|----------|---------------------|
| **Assets by VFS (minimum assets in sdcard)** | - Uninstall the default project's app from device (if previously installed).
- Follow the steps from https://www.o3de.org/docs/user-guide/platforms/android/generating_android_project_windows/ to build and deploy with the following alterations:
- Use the default project created instead of `o3de-atom-sampleviewer`.
- Use `o3de-build/android_vfs` for `%O3DE_BUILD_ROOT%` instead of `o3de-build`.
- When running `generate_android_project.py` command use `VFS` for `%O3DE_ANDROID_ASSET_MODE%` and remove `--include-apk-assets`.
- When running `deploy_android.py` command use `BOTH` for `%O3DE_ANDROID_DEPLOY_TYPE%`.
- With the mobile device connected to PC run this command from the console: `adb reverse tcp:45643 tcp:45643`.
**IMPORTANT**: This command has to be run every time the adb connection is lost or killed, which is each time the cable is plugged, but also it can happen often without knowing. If when running the app it shows refuse-connections messages in the log, that's a signal that adb reverse command needs to be run again before running the app.
| - Binaries will be inside the android APK package. Unzip `O3DE_BUILD_ROOT/app/build/outputs/apk/profile/app-profile.apk` and verify `lib/arm64-v8a` folder contains `.so`.
- Minimum assets necessary to launch the app will be inside the device's sdcard (not in the APK package). Go to `/sdcard/Android/data/org.o3de.DefaultProject/files` to check they are there. Minimum assets are:
- `engine.json` file.
- Bootstrap `.setreg` files.
- Config files inside `config` folder.
- All the assets will be obtained via network connecting to the PC and read from `/Cache/android/`.
- After running the app, the execution's log and user folder will be generated in PC (`/user/`).
|
### Area: Run default level on Android device
### Project Requirements
* You've built Android in Assets by VFS packaging mode.
**Game Launcher Supported Platforms:**
* Android
**Product:** A default level is launched correctly on Android devices in Assets by VFS packaging mode.
**Suggested Time Box:** 10 minutes.
| Workflow | Requests | Things to Watch For |
|----------|----------|---------------------|
| **Run default level** | - Follow the build steps from the previous area in this document.
- Launch the default project's app in the android device.
- Use Android Studio (or any other method) to check the log output from the default project's app. Select the `O3DE_BUILD_ROOT` folder when opening Android Studio to open the project and after all the processing is done the Logcat tool window will be available and once the app is running on the device you can filter the output by app.|
- The level opens successfully.
- It doesn't crash after a while (for example a couple of minutes).
- The level is rendered correctly without artifacts.
- Framerate is 15fps or above. This depends on the device used, but the key thing to look for is that there are no spamming errors or warnings in the log indicating that something wrong is happening every frame.
|
---