CapersProject/Assets/AnimateUIMaterials-main
Nam Tae Gun d7010a279b 타이쿤 추가 업데이트 내용
+ 화면 밖에서 손님이 요구하는 중일 때, Indicator를 통해서 Ui 표시
+ Open, Closed Ui 추가 및 기능 연결
+ 테이블 찾는 로직 변경 (전부 랜덤) - 기존에는 항상 같은 순서로 자리를 채움
+ 통계용 데이터 CustomerVisitInfo 추가 (추후에 통계Ui 생길 때 연결)
+ 대화 조건 변경
+ 일부 가구들 상호작용 조건 변경

+ Outline shader Render Face(Front -> Both 변경 - Front면 x축 뒤집는 경우 안나옴)
+ GraphicMaterialOverride를 사용하는 경우, 에디터에서 전체화면 등 특정 상황에서 material이 사라지는 버그 수정
+ InteractionFuniture Open, Closed 공통 기능으로 병합
2024-07-22 09:42:29 +09:00
..
Asset Store Graphics Ui관련 패키지들 추가 2024-06-24 00:57:47 +09:00
images Ui관련 패키지들 추가 2024-06-24 00:57:47 +09:00
Unity 타이쿤 추가 업데이트 내용 2024-07-22 09:42:29 +09:00
.gitignore Ui관련 패키지들 추가 2024-06-24 00:57:47 +09:00
Asset Store Graphics.meta Ui관련 패키지들 추가 2024-06-24 00:57:47 +09:00
images.meta Ui관련 패키지들 추가 2024-06-24 00:57:47 +09:00
LICENSE Ui관련 패키지들 추가 2024-06-24 00:57:47 +09:00
LICENSE.meta Ui관련 패키지들 추가 2024-06-24 00:57:47 +09:00
Readme.md Ui관련 패키지들 추가 2024-06-24 00:57:47 +09:00
Readme.md.meta Ui관련 패키지들 추가 2024-06-24 00:57:47 +09:00
Releases.meta Ui관련 패키지들 추가 2024-06-24 00:57:47 +09:00
Unity.meta Ui관련 패키지들 추가 2024-06-24 00:57:47 +09:00

alt_text

Introduction

Animate UI Materials allows editing and animating materials for a single UI component.

alt_text

You can see such an example in the demo scene.

Setup

Download the package from the asset store or the Releases folder

Import the package into your project

Simply add the GraphicMaterialOverride component to an UI element, such as an Image with a custom Material

alt_text

When selecting the dropdown “Add Override”, you will be greeted with every possible property you can animate.

alt_text

You can ignore those you dont know, such as the _Stencil properties. They are internal to UI stencil rendering. Simply select “_Color” for example.

Two things will happen:

  1. A new modifier will be listed in the GraphicMaterialOverride component alt_text You can already edit the color value, and the change will only affect the Image component

  2. A new gameobject will be created, holding a GraphicPropertyOverride component alt_text alt_text The value displayed here is the exact same as in the GraphicMaterialComponent. However this value can also be animated.

Animation

To animate the property, add the usual Animator component to the image

alt_text

Create a new AnimationClip

alt_text

Click Add Property and select _Color Override, then Graphic Property Override Color, then Graphic Property Override Color.Property Value

alt_text

You can now animate the value like any other !

alt_text

Alternatively, hit the Record button, and simply modify the properties from the GraphicMaterialOverride inspector

alt_text

alt_text

Baking

To get the final modified material as a material asset, simply open the context menu of your GraphicMaterialOverride or Graphic and press "Bake Modified Material". A new material variant will be saved alongside the source material.

Next Steps

Emulate an actual MaterialEditor

I want to support custom materials drawers, and other possible combinations, which could be done with a "ghost" MaterialEditor, but would require dropping support before unity 2021.3

https://discussions.unity.com/t/edit-chosen-material-in-the-inspector-for-custom-editor/67530/3

This is required as MaterialEditor does a lot of closed-source heavy lifting to recover that attribute data, and because those attribute drawer require a reference to the MaterialEditor

End Notes

If you encounter a bug or need any help, please contact me at fleeting.being.official@gmail.com

Dont hesitate to look into the code if you want to know how things work !