动画 patch 文件
#137
Replies: 2 comments
-
ant.serialize支持 |
Beta Was this translation helpful? Give feedback.
0 replies
-
@aimoonchen 如果这个 .patch 文件是编辑器生成的,最好把生成规则改过来。 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
https://github.com/ejoy/ant/blob/master/test/simple/pkg/ant.test.simple/resource/miner/miner.gltf.patch#L6
我记得这个 patch 文件是编辑器生成的?@aimoonchen 确认是这样吗?
我觉得这里生成一个绝对路径
/pkg/ant.test.simple/resource/miner/miner.anim
是有问题的,这会导致把这个资源目录复制到别的地方后,这里的引用就不对了。我知道 patch 本身只是对文本做了替换工作,这里的文本需要一个完整路径。那么,@actboy168 是不是应该考虑一下,.patch 文件中可以用某种宏替换支持相对路径。例如这里的 patch 是不是可以写:
work: $(PATH)/miner.anim
我能想到的几个常用宏有:
为了避免罕见情况下转义引起的歧义,可以定义这样的规则:
如果 $ 后没有紧跟 ( ,就不转义,保留 $ 符号;而 $() 也可以明确表示单个 $ 符号。
Beta Was this translation helpful? Give feedback.
All reactions