0.1.6 • Published 3 years ago

kr.seonghwan.reference v0.1.6

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Reference

About Reference

Reference is a dependency tracking plugin for UnityEditor that provides additional information such as the number of usage.

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

    Indexed in 0.0.x version caches are not compatible with above 0.1.x.
    You must generate indices again if you update plugin from 0.0.x to above 0.1.x.
    From 0.1.x, plugin will update automatically in future.

Tested in

  • Unity 2019.4 LTS Windows
  • Unity 2020.3 LTS Windows
  • Unity 2021.1f Windows
  • Unity 2021.2b Windows
  • Unity 2022.1a Windows

Installation

Unity Package Manager

{
    "dependencies": {
        "kr.seonghwan.reference": "0.1.5"
    }
}
{
    "scopedRegistries": [
        {
            "name": "npm-seonghwan",
            "url": "https://registry.npmjs.org",
            "scopes": [
                "kr.seonghwan"
            ]
        }
    ]
}

FileSystem

  • Move to ProjectRoot\Packages
  • Run command in terminal.
git clone https://github.com/seonghwan-dev/Reference

QuickStart

  • Execute Tools/Reference/Index All Assets in MenuItem and wait until complete.
  • Configure Reference settings in Edit/Project Settings... in MenuItem.
  • Select an asset you want to know which asset references it and run Find References In Project context menu.

Fundamentals

Features

  • Display asset usage count in inspector.
  • Find References In Project

Roadmap

  • Safer Asset Delete (#8)
  • Reference replacement wizard (#9)
  • Reference dependency map visualizer
  • Detect references indexed in Addressable

Contributes

  • Fork and clone at ProjectName\Packages
  • Add an Scripting Define Symbol DEBUG_REFERENCE at ProjectSettings/Player.
  • Run Tools/Reference_DEV/Add New Language to create a new localization profile.
  • Run Tools/Reference_DEV/Update Language profiles to add field after edit Localize class.
  • Create PR.

image
image
image

한국어 가이드

레퍼런스 하고 있는 에셋과, 이 에셋을 레퍼런스 하고 있는 에셋을 상호 저장함으로써 레퍼런스 링크를 생성합니다. 파일시스템을 기반으로 바이너리로 각 guid 별로 쪼개어 저장합니다.

0.0.x 버전으로 인덱싱 된 경우 0.1.x 버전에서 다시 인덱싱을 진행해야합니다.
이후 버전에서는 버전을 통해 자동으로 업데이트 됩니다.

사용법

  • Tools/Reference/Index All Assets 메뉴로 현재 에셋들을 모두 인덱싱합니다. (프로젝트 크기에 따라 시간 소요)
  • 인스펙터에 선택한 에셋을 사용중인 다른 에셋의 수가 표기됩니다. (씬, 프리팹 포함)
  • ctrl + alt + R 키를 눌러 콘솔창에 연결된 에셋을 프린트 할 수 있습니다. (누르면 선택됨)
  • Window/Reference View 윈도우를 열어 선택된 오브젝트와 연결된 에셋을 확인할 수 있습니다.
  • 에디터에서 파일을 삭제할 때, 연결된 에셋이 있으면 삭제여부를 확인하는 창이 나타납니다.

작동 원리

  • Library/ReferenceCache 경로에 파일당 하나의 파일로서 저장됩니다.
  • 바이너리 방식으로 저장합니다.

Disclaimer

  • 불안정한 작동으로 모든 레퍼런스 카운트를 확인하지 않을 수도 있습니다.
  • 씬 오브젝트에 대해서는 정확히 작동하지 않습니다.
  • Library/PackageCache에 저장되는 읽기전용 패키지는 ReferencedBy만 카운트됩니다.
0.1.6

3 years ago

0.1.4

3 years ago

0.1.5

3 years ago

0.0.11

3 years ago

0.1.0

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.3

3 years ago

0.0.10

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago