https://youtu.be/q4epArkvVnE?si=oMpLtlkRiJSdxxp_&t=1508

 

시작하기


Tools -> vInspector 메뉴를 열어 기능을 활성화하세요.

 

 

궁금한 점이나 피드백이 있다면 언제든지 연락해 주세요!

 

또한, 리뷰를 남겨주시면 감사하겠습니다 😊

 

 

기능 소개

네비게이션 바  (Navigation bar)

선택 기록을 앞뒤로 이동하거나 북마크를 생성할 수 있습니다.  

GameObject나 에셋을 드래그 앤 드롭하여 북마크할 수 있습니다.  

 

vHierarchy 2를 사용하면 북마크한 객체에 아이콘을 설정할 수 있습니다.

 

컴포넌트 복사/붙여넣기  (Copy/paste components)

컴포넌트를 복사할 수 있는 버튼이 추가됩니다.  

여러 개의 컴포넌트를 복사하여 새로 붙여넣을 수 있습니다.  

 

또는 기존 컴포넌트의 값만 붙여넣을 수도 있습니다.  

 

시각적 요소를 최소화하기 위해 도움말 버튼 숨기기 및 프리셋 버튼 숨기기 기능을 함께 사용하는 것을 추천합니다.

플레이 모드에서 저장하기  (Save in play mode)

플레이 모드 중에도 컴포넌트를 저장할 수 있는 버튼이 추가됩니다.

 

컴포넌트 창  (Component windows)

Alt 키를 누른 상태로 드래그하여 개별 컴포넌트 창을 생성할 수 있습니다.

 

컴포넌트 애니메이션  (Component animations)

컴포넌트의 확장 및 축소 시 애니메이션 효과가 적용됩니다.

미니멀 모드  (Minimal mode)

불필요한 요소를 숨겨 보다 깔끔한 UI를 제공합니다.  

미니멀 모드 OFF → 기본 보기                                                       미니멀 모드 ON → 간결한 보기

 

 

리셋 가능한 변수  (Resettable variables)

스크립트에서 정의된 기본값으로 변수를 초기화할 수 있는 리셋 버튼이 추가됩니다.  

 

프리팹 인스턴스의 경우 원본 프리팹의 값이 기본값으로 간주됩니다.

스크립트 필드 숨기기  (Hide script field)

회색으로 표시된 스크립트 필드를 숨기고, 대신 스크립트 아이콘을 클릭하여 스크립트를 열거나 찾을 수 있습니다.  

스크립트 필드 숨기기 OFF → 기본 표시    스크립트 필드 숨기기 ON → 간결한 표시

 

 

딕셔너리  (Dictionaries)

SerializedDictionary를 사용하여 딕셔너리를 편집하고 직렬화할 수 있습니다.

public SerializedDictionary<string, Color> colorDictionary;

 

일반적인 딕셔너리 클래스를 상속하므로 기존 딕셔너리처럼 사용할 수 있습니다.

 


단축키

 

모든 컴포넌트 축소/확장

인스펙터 위에 마우스를 올리고 Ctrl-Shift-E를 누릅니다.

 

컴포넌트 고립

컴포넌트 헤더 위에 마우스를 올리고 Shift-E 또는 Shift-클릭을 합니다.

 

컴포넌트 삭제

컴포넌트 헤더 위에 마우스를 올리고 X를 누릅니다.

 

컴포넌트 활성/비활성 전환

컴포넌트 헤더 위에 마우스를 올리고 A를 누릅니다.

 

 


 

속성 (Attributes)

 

속성을 사용하면 몇 줄의 코드로 스크립트 인스펙터에서 UI 요소를 생성하고 그룹화할 수 있습니다.

속성을 사용하려면 스크립트에 다음 코드를 추가하세요:

using VInspector;

 

버튼 (Buttons)

함수 앞에 [Button] 속성을 추가하면 버튼이 생성됩니다.

[Button]
public void SayHelloWorld()
{
    Debug.Log("Hello World!");
}

 

버튼 이름, 크기, 색상을 커스터마이즈할 수 있습니다.

[Button("Custom name")]
public void RenamedButton() { }

[Button(size = 50, color = "red")]
public void BigRedButton() { }

 

 

폴드아웃 (Foldouts)

변수 앞에 [Foldout]을 추가하면 변수들을 그룹화할 수 있습니다.

[Foldout("Floats")]
public float float1;
public float float2;
public float float3;

[Foldout("Ints")]
public int int1;
public int int2;
public int int3;

[Foldout("Strings")]
public string string1;
public string string2;
public string string3;

 

폴드아웃 섹션을 끝내려면 [EndFoldout]을 사용하세요.

[Foldout("Floats")]
public float float1;
public float float2;
public float float3;

[Foldout("Ints")]
public int int1;
public int int2;
public int int3;

[Foldout("Strings")]
public string string1;
public string string2;
public string string3;
[EndFoldout]

public string string4;
public string string5;

 

폴드아웃은 중첩이 가능하며,

[Foldout("Floats/Subfoldout 1")]
public float float1;

[Foldout("Floats/Subfoldout 2")]
public float float2;

[Foldout("Floats/Subfoldout 3")]
public float float3;

 

 버튼도 포함할 수 있습니다.

[Foldout("Floats")]
[Button]
public void FloatsButton() { }

 

탭 (Tabs)

[Tab] 속성을 사용하면 탭을 생성할 수 있습니다.

[Tab("Floats")]
public float float1;
public float float2;
public float float3;
public float float4;

[Tab("Ints")]
public int int1;
public int int2;
public int int3;

[Tab("Strings")]
public string string1;
public string string2;
public string string3;

 

탭 섹션을 끝내려면 [EndTab]을 사용합니다. 탭도 중첩이 가능하며 버튼을 포함할 수 있습니다.

 

숨겨진 변수 표시 (Show Hidden Variables)

[ShowInInspector]를 사용하면 비공개(private) 변수도 인스펙터에 표시할 수 있습니다.

[ShowInInspector]
private float privateFloat;

[ShowInInspector]
static float staticFloat;

[ShowInInspector]
private float propertyFloat { get; }

 

 

변수 숨기기 및 비활성화 (Hide and Disable Variables)

[HideIf]와 [ShowIf]를 사용하면 조건에 따라 변수를 숨길 수 있습니다.

public bool isBossLevel;

[HideIf("isBossLevel")]
public int waveCount;
public int enemyCount;
public int enemyStrength;

[ShowIf("isBossLevel")]
public float bossStrength;
public float bossStamina;
public float bossSpeed;
public float bossRegen;

 

[DisableIf]와 [EnableIf]를 사용하면 변수를 비활성화할 수 있습니다.

public bool isBossLevel;

[DisableIf("isBossLevel")]
public int waveCount;
public int enemyCount;
public int enemyStrength;

[EnableIf("isBossLevel")]
public float bossStrength;
public float bossStamina;
public float bossSpeed;
public float bossRegen;

 

[EndIf]로 조건 섹션을 종료할 수 있습니다.

public bool isBossLevel;
    
[DisableIf("isBossLevel")]
public int waveCount;
public int enemyCount;
public int enemyStrength;

[EnableIf("isBossLevel")]
public float bossStrength;
public float bossStamina;
public float bossSpeed;
public float bossRegen;
[EndIf]

public float foo;
public float bar;

 

불린(bool) 외의 변수도 조건으로 사용할 수 있습니다.

public enum LevelType { Normal, Boss }

public LevelType levelType;
    
[DisableIf("levelType", LevelType.Boss)]
public int waveCount;
public int enemyCount;
public int enemyStrength;

 

범위 슬라이더 (Range Sliders)

[MinMaxSlider]를 사용하면 Vector2 또는 Vector2Int에 범위 슬라이더를 추가할 수 있습니다.

[MinMaxSlider(0, 2)]
public Vector2 widthRange;

[MinMaxSlider(0, 2)]
public Vector2 heightRange;

[MinMaxSlider(-180, 180)]
public Vector2 rotationRange;

 

버전 선택기 (Variants)

[Variants]를 사용하면 선택 가능한 옵션 목록을 만들 수 있습니다.

[Variants(512, 1024, 2048)]
public int resolution;

[Variants("png", "jpg", "raw")]
public string extension;

 

값 변경 시 콜백 (Callback on Change)

[OnValueChanged]를 사용하면 변수 값이 변경될 때 함수를 호출할 수 있습니다.

public int level;

[OnValueChanged("level")]
public void OnLevelChanged() { }

 

여러 변수를 동시에 구독할 수 있습니다.

public int level_player1;
public int level_player2;
public int level_player3;

[OnValueChanged("level_player1", "level_player2", "level_player3")]
public void OnLevelChanged() { }

 

 

읽기 전용 변수 (Read-Only Variables)

[ReadOnly]를 사용하면 변수를 읽기 전용으로 설정할 수 있습니다.

public int level;

[ReadOnly]
public int score;

[ReadOnly]
public int enemyCount;

 

정적 인스펙터 (Static Inspector)

[ShowInInspector]가 있는 정적 변수와 [Button] 속성이 있는 정적 함수도 스크립트 에셋에 표시됩니다.

[ShowInInspector]
static float staticFloat1;

[ShowInInspector]
static float staticFloat2;

[Button]
static void StaticButton() { }

+ Recent posts