unity 人物换装素材
时间: 2023-10-01 10:12:04 浏览: 170
在Unity中实现人物换装的素材可以通过添加组件Sprite Resolver来实现。首先需要为每个身体部位创建对应的Sprite Renderer组件,并将其分配到对应的Category中。然后,可以在需要换装的时候通过改变人物状态类(PlayerAttribute)中的字段来触发事件,进而调用SetBody方法来改变人物的图集。通过这种方式,可以实现通过改变不同身体部位的Sprite Renderer来实现人物的换装效果。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [零代码实现Unity2D角色Sprite批量换装](https://blog.csdn.net/Katrina419/article/details/131964034)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *2* *3* [Unity2D:简单人物纸娃娃换装实现(一) 服装的变换](https://blog.csdn.net/qq_21958271/article/details/87448614)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文