Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add CustomMaterialOverride #90

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ZhangHuan0407
Copy link

当前主分支上的UnityArmatureComponent全局共用相同材质球实例,
这导致自定义shader任何属性修改,对相同龙骨资源的实例同时生效。

例如,我添加一个变灰的shader,场景里有10个小怪,其中一个小怪出现灰化的效果
修改材质球参数,10个小怪一起灰化。

(cherry picked from commit 0dba22b)
允许运行时修改当前UnityArmatureComponent使用的材质球
···
Material fxMaterial = Instantiate(material);
m_ArmatureComponent.SetMaterialOverride(material, fxMaterial);
···

(cherry picked from commit 0dba22b)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant