Skip to content
This repository has been archived by the owner on Oct 2, 2022. It is now read-only.

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
connffuused authored Nov 25, 2021
1 parent c99e07a commit db83673
Show file tree
Hide file tree
Showing 3 changed files with 365 additions and 21 deletions.
203 changes: 203 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,203 @@
## 0.4.2 (2021-11-25)

### Fix

- Local Stylesheets in 2021.2
- comment out wip function
- transition in 2021.2

## 0.4.1 (2021-11-24)

### Fix

- Apply the missing localization string correctly

## 0.4.0 (2021-11-24)

### Fix

- compile error
- typo CleanCachedIndicies > CleanCachedIndices
- setting inspector
- rename configuration wizard and remove unnecessary things
- sequential transition
- change subdirectory structures

### Perf

- localized text update event delegate
- SettingProvider with UI Toolkit

### Refactor

- Localize -> L
- clean up directory

### Feat

- Localization 파일 수정 감지
- configuration wizard

## 0.3.3 (2021-11-17)

### Fix

- feature button for dev
- remove create asset menu of myTreeAsset
- display asset path at tooltip instead of button

## upm/0.3.2 (2021-11-08)

## 0.3.2 (2021-11-05)

### Fix

- compile error 2019.4
- compile error 2020.3
- compile error 2021.1f

## 0.3.1 (2021-11-03)

### Fix

- allow unity editor delete asset without notify in baking
- handle asset manage in unity baking
- trace object in scene view
- sync with ugui version
- uielements scheme
- hide unnecessary menu item
- convert localizable string

## 0.3.0 (2021-11-02)

### Fix

- convert test assembly definition asset as editor assembly

### Feat

- add assemblyinfo to internalsvisibleto tests
- add buttons in inspector gui drawer

## 0.2.6 (2021-10-31)

### Fix

- clear invalid files
- rename and link assembly definition assets
- **reference-window**: nullReferenceException in rvw because of broken ref data

### Feat

- handle logic for unmanaged resources with fake path

## 0.2.5 (2021-10-15)

- Check whether it is initialized or not only once.
- Setting Inspector

## 0.2.4 (2021-10-07)

- bug fix : exclude directories and not exist files on first initialization.

## 0.2.3 (2021-09-28)

- missing object management wip
- bug fix : removing directory causes exception because of missing filtering in OnWillDeleteAsset callback.
- dialog localization about deleting asset.
- dirty cache update way

## 0.2.2 (2021-09-26)

- exclude scene asset

## 0.2.1 (2021-09-24)

- fixed an issue about empty path
- regular expression for addressable assets

## 0.2.0 (2021-09-23)

- Rename Package name to `Asset Lens` from `Reference`
- Change registry

## 0.1.6 (2021-09-23)

- Dialog Localization

## 0.1.5 (2021-09-17)
- support 2019.4

## 0.1.4 (2021-09-17)

- support custom packages.

## 0.1.3 (2021-09-16)

- fixed an issue that cache directory exception in library folder

## 0.1.2 (2021-09-16)

- fixed an issue that unity editor throws null reference exception drawing default asset
- refactored directory
- try-catch to catch unhandled exception in dev mode

## 0.1.1 (2021-09-16)

- fixed an issue that unity editor throws null reference exception with material sub editor drawing unity default resource.

## 0.1.0 (2021-09-16)

- change indexing convention to manage version
- localization
- setting menu

## 0.0.11 (2021-09-16)

- add an option about using UnityEditor.EditorUtility.CollectDependencies.
- fix an issue that unity editor throws null reference exception with an object has missing script.

## 0.0.10 (2021-09-14)

- add an option whether to collect dependencies in playmode or not.
- add an option whether to collect scene object or not.

## 0.0.9 (2021-09-11)

- store setting in setting object instead editor prefs

## 0.0.8 (2021-09-08)

- check empty path

## 0.0.7 (2021-09-04)

- do not create ref file if its directory

## 0.0.6 (2021-09-03)

- explicit search tool (sr4dev)
- run safer (try-catch)

## 0.0.5 (2021-09-02)

- lock
- scroll view

## 0.0.4 (2021-09-02)

- object context menu
- draw count in inspector

## 0.0.3 (2021-09-02)

- bug fix
- initialize help box

## 0.0.2 (2021-09-02)

- reference viewer
-
## 0.0.1 (2021-09-01)

- basic features
42 changes: 21 additions & 21 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
MIT License

Copyright (c) 2021 seonghwan-dev

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
MIT License
Copyright (c) 2021 seonghwan-dev
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
141 changes: 141 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
# Asset Lens

## About **Asset Lens**
**Asset Lens** is a dependency tracking plugin for UnityEditor that provides additional information such as the number of usage.

[<p align="center"><img src="https://discordapp.com/api/guilds/889046470655893574/widget.png?style=banner2"></p>](https://discord.gg/h9WPFRNFBY)

This plugin is based on pre-cached complementary guid map to trace which asset has dependencies to specific asset.
The pain point that mainly considered with Unity is that when we delete an asset, we don't know which asset is using it.

## Requirements
- All assets must be serialized as force-text option in ProjectSetting/Editor

### Compatibility


<a href="unityhub://2019.4.32f1/"><img src="https://img.shields.io/badge/unity-2019.4f_LTS-blue.svg?logo=unity"/></a>
<a href="unityhub://2020.3.21f1/"><img src="https://img.shields.io/badge/unity-2020.3f_LTS-blue.svg?logo=unity"/></a>
<a href="unityhub://2021.1.27f1/"><img src="https://img.shields.io/badge/unity-2021.1f_LTS-blue.svg?logo=unity"/></a>
<a href="unityhub://2021.2.0f1/"><img src="https://img.shields.io/badge/unity-2021.2f-brightgreen.svg?logo=unity"/></a>
<a href="unityhub://2022.1.0a13/"><img src="https://img.shields.io/badge/unity-2022.1 alpha-red.svg?logo=unity"/></a>

<a href="https://codecov.io/gh/seonghwan-dev/AssetLens">
<img src="https://codecov.io/gh/seonghwan-dev/AssetLens/branch/main/graph/badge.svg?token=7ODSTUTX1G"/>
</a>
<a href="https://openupm.com/packages/com.calci.assetlens/">
<img src="https://img.shields.io/npm/v/com.calci.assetlens?label=openupm&registry_uri=https://package.openupm.com"/>
</a>
<a href="https://badge.fury.io/js/com.calci.assetlens">
<img src="https://badge.fury.io/js/com.calci.assetlens.svg" alt="npm version"/>
</a>

## Installation
### Unity Package Manager (NPM)
[![NPM](https://nodei.co/npm/com.calci.assetlens.png?compact=true)](https://npmjs.org/package/com.calci.assetlens)

Replace stable version at version definition in json `x.x.x`
example) `"com.calci.assetlens": "0.4.2"`
```json
{
"dependencies": {
"com.calci.assetlens": "x.x.x"
}
}
```

```json
{
"scopedRegistries": [
{
"name": "npm",
"url": "https://registry.npmjs.org",
"scopes": [
"com.calci"
]
}
]
}
```

### OpenUPM
[![openupm](https://img.shields.io/npm/v/com.calci.assetlens?label=openupm&registry_uri=https://package.openupm.com)](https://openupm.com/packages/com.calci.assetlens/)
```bash
openupm add com.calci.assetlens
```

## QuickStart
- Open Asset Lens Setting in `Edit/Project Settings...`
- Hit the button `Initialize` to index all assets in project.
- Configure the settings for convenience.
- Select an asset you want to know which asset references it and run `Find References In Project` context menu.

## Fundamentals
- Create a cache file per a asset file, see also [RefData.cs]
- Detect asset changes from `AssetPostprocessor`, see also [AssetLensPostprocessor.cs]
- Detect an attempt to delete an asset from `AssetModificationProcessor`, see also [AssetLensModification.cs]

## Features
- Display asset usage count in inspector.
- Find References In Project

### Reference Viewer Window

|before initialize|after initialize|
|:---:|:---:|
|<img src="https://user-images.githubusercontent.com/79823287/134523257-28173dc7-4fd5-406e-8ac9-56b148debedb.png" width="460">|<img src="https://user-images.githubusercontent.com/79823287/134523437-166bf30b-ccdd-42ea-90ae-3084e0f013f6.png" width="460">|
|not available|available to trace dependencies|

### Inspector Indicator
Displays the number of other resources using the selected asset.

<p align="center">
<img src="https://user-images.githubusercontent.com/79823287/139777116-25ed937e-2f69-421a-91a8-4ae426a311e4.png" width="460">
</p>

- Details : Open Reference Viewer as EditorWindow instantly.
- Refresh : Reserialized cached reference data asset.
- GUID : Displays the guid of selected asset. onClick events will copy guid to your clipboard.


## Roadmap
Not stable yet, but under development.

### Reference Viewer
- Multi Column Viewer (Sortable)
- Scene Object Reference Graph

### Safe Delete
- Alert before the asset that is used by other asset will be deleted.
- Replace reference during delete asset. (Reference Replacer)

### Inspector Lens
- Display how many assets are related to selected asset at the top of the inspector.

### Build Lens
- Find the assets will be included in build
- Asset bundle, Addressable, Linked assets with scenes in build setting, resources.

## Contributes
- Current Editor Version : `2021.2.0f1`
- Fork and clone repository.
- Edit sources and commit with conventional commits (prefer Commitizen)
- Add unit test codes for new feature (Optional)
- Create PR.

### Developer mode
Select menu in `Help/Asset Lens/Enter Debug Mode` or Add an scripting define symbol `DEBUG_ASSETLENS` at ProjectSettings/Player.

### Edit Languages
- Run `Tools/Asset Lens_DEV/Add New Language` to create a new localization profile.
- Run `Tools/Asset Lens_DEV/Update Language profiles` to add field after edit `Localize` class.

### Requirements
- commitizen - conventional commit log to generate changelog

### Tests
must be passed test in 2019.4, 2020.3, 2021.1, 2021.2

[RefData.cs]: https://github.com/seonghwan-dev/AssetLens/blob/main/Packages/com.calci.assetlens/Editor/Reference/Model/RefData.cs
[AssetLensPostprocessor.cs]: https://github.com/seonghwan-dev/AssetLens/blob/main/Packages/com.calci.assetlens/Editor/Reference/Callback/ReferencePostprocessor.cs
[AssetLensModification.cs]: https://github.com/seonghwan-dev/AssetLens/blob/main/Packages/com.calci.assetlens/Editor/Reference/Callback/ReferenceModification.cs

0 comments on commit db83673

Please # to comment.