https://www.youtube.com/watch?app=desktop&v=BTi5ZJ_CZkQ
转载自油管PitiIT(已授权),链接在上
原标题:
Unity Tips: Set tile transform via inspector & script (offset, rotation, scale)
原简介:
When working on my Stardew Valley like building tutorial I encountered a problem - I needed to change the properties of my tiles but when I set them in the inspector it did not work when I placed tiles via script. In this short tutorial I am presenting a way to set the tiles offset, rotation and scale via script which works great for the runtime level building. I hope you enjoy it :)
在我的星露谷like的建筑教程中制作时,我遇到了一个问题 - 我需要更改我的瓦片的属性,但是当我在Inspector窗口中设置它们时,当我通过脚本放置瓦片时它不起作用。 在这个简短的教程中,我将介绍一种通过脚本设置瓦片偏移、旋转和缩放的方法,该方法非常适合运行关卡时的构建。 我希望你喜欢它 :)
If you would like to show me some support:
https://www.patreon.com/pitiit
If you are looking for a great community:
https://discord.gg/7fRBSsjGNW
00:00 The Challenge 挑战
00:35 Tile properties in the inspector Inspector窗口中的瓦片属性
01:30 Tile properties in the script 脚本中的瓦片属性