# UnityEditor.AssetDatabase: Failed to load resource at path 'Packages/com.example.custompackage/Resources/MyAsset.asset'. Resource not found.

- **ID:** `unity/assetdatabase-package-resource-not-found`
- **Domain:** unity
- **Category:** resource_error
- **Verification:** ai_generated
- **Fix Rate:** 85%

## Root Cause

The specified path inside a package does not exist, often because the resource was not placed in a 'Resources' folder within the package, or the package is not properly imported.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| Unity 2022.3.8f1 | active | — | — |
| Unity 2023.1.1f1 | active | — | — |

## Workarounds

1. **Ensure the resource is inside a 'Resources' folder within the package. For example, create the folder structure: `Packages/com.example.custompackage/Resources/MyAsset.asset`. Then use `AssetDatabase.LoadAssetAtPath<ScriptableObject>("Packages/com.example.custompackage/Resources/MyAsset.asset")`.** (90% success)
   ```
   Ensure the resource is inside a 'Resources' folder within the package. For example, create the folder structure: `Packages/com.example.custompackage/Resources/MyAsset.asset`. Then use `AssetDatabase.LoadAssetAtPath<ScriptableObject>("Packages/com.example.custompackage/Resources/MyAsset.asset")`.
   ```
2. **If the package is local, use `AssetDatabase.LoadAssetAtPath` with a relative path from the project root, e.g., `Assets/MyResources/MyAsset.asset`, instead of a package path.** (85% success)
   ```
   If the package is local, use `AssetDatabase.LoadAssetAtPath` with a relative path from the project root, e.g., `Assets/MyResources/MyAsset.asset`, instead of a package path.
   ```
3. **Verify the package is properly installed and visible in the Project window under Packages. If not, reinstall the package via the Package Manager.** (75% success)
   ```
   Verify the package is properly installed and visible in the Project window under Packages. If not, reinstall the package via the Package Manager.
   ```

## Dead Ends

- **** — Moving the resource to a different folder within the package without using a 'Resources' folder will still fail because AssetDatabase.LoadResourceAtPath only searches 'Resources' folders. (80% fail)
- **** — Reimporting the package does not help if the resource path is incorrect or the folder structure is wrong. (90% fail)
