DreamFXLang
诊断码

DFX7xxx — 溯源、漂移与 lint

DFX7xxx 段的全部诊断码,每条带严重级别、逐字消息、成因与修法。

本族共 9 条(4 错误 / 5 警告)。消息是编译器持有的格式串:%s%d%c 在运行时被替换掉。

DFX7001

错误抛出位置Generation/DreamFXGenerator.cpp:3568Generation/DreamFXModuleGenerator.cpp:734

Asset '%s' carries no DreamFX provenance stamp: it was never generated from this source, or it was created by hand.

原因. 资产上没有溯源戳:它从来不是这份源码生成的,或者是手工建出来的。

修复. 跑一次构建。如果这个资产是手建的、而且应该保持手建,就不要让任何 .dfs 指向它的路径 —— 一次构建就会盖掉它。

DFX7002

错误抛出位置Generation/DreamFXGenerator.cpp:3575Generation/DreamFXModuleGenerator.cpp:741

Asset '%s' is stale: it was generated from a different revision of this source. Run the DreamFX build.

原因. 资产是照这份源码的另一个版本生成的。这就是那个没人会自己发现的情况:有人改了 .dfs、 没重建、把两个都提交了。单跑 build 会通过,因为 build 会把它修好。

修复. 跑一次 DreamFX 构建,把资产和源码一起提交。

DFX7003

警告抛出位置Generation/DreamFXGenerator.cpp:3582

Asset '%s' was generated by DreamFX %s; the current generator is %s. A rebuild is recommended.

原因. 资产是旧版生成器建的。同一份文本在生成器变更之后可能降成不同的资产,所以戳里记着版本。

修复. 重建。

DFX7004

错误抛出位置Generation/DreamFXModuleGenerator.cpp:1067

Asset '%s' does not exist: this source has never been built.

原因. -Verify 根本没找到这份源码对应的资产。

修复. 跑一次构建。

DFX7005

错误抛出位置Generation/DreamFXGenerator.cpp:3619Generation/DreamFXGenerator.cpp:3624

(built at runtime)

原因. R7 漂移。源码没变,资产也没变,但它们共同依赖的某个模块现在暴露出不同的版本 —— 也就是说,这个资产是照另一批模块建出来的,而不是这次构建会用的那批。源码和资产本身都不会说这件事, 这正是戳里要记模块版本的原因。

修复. 重建以采纳新版本;或者用 @<version> 固定模块,让不匹配在调用点被报出来。默认是警告, 因为一次引擎升级会同时打到所有源码,而重建就能解决;-StrictVersions 把它升成错误,用于发布门。

DFX7101

警告抛出位置Lint/DreamFXLint.cpp:132

Emitter '%s' simulates on the GPU but declares no FixedBounds. GPU emitters cannot compute their own bounds, so it will use a default box and may be culled unexpectedly.

原因. GPU emitter 读不回自己的粒子位置去算 bounds,所以没有固定包围盒的话它会拿到一个默认盒子, 镜头从某个角度看过去的瞬间它就消失了。

修复. 在 emitter 或系统上设 FixedBounds = box(...)

DFX7102

警告抛出位置Lint/DreamFXLint.cpp:144

Emitter '%s' spawns by rate ('%s') with no upper bound. Set AllocationMode = Fixed and PreAllocationCount to cap the particle count.

原因. 按速率生成自己没有上限:一个长命 emitter 配自动分配估计会不断重新分配,而一个跑飞的速率没有东西拦得住它。

修复.AllocationMode = Fixed;PreAllocationCount 给粒子数封顶。

DFX7103

警告抛出位置Lint/DreamFXLint.cpp:156

Emitter '%s' uses randomness ('%s') but does not set Determinism = true, so it will look different on every play. Add Determinism and RandomSeed to its Settings if reproducibility matters.

原因. 没有固定种子的随机意味着每次播放都不一样。做环境氛围没问题,但对任何要被过场动画或测试拿去比对的东西都是错的。

修复. 在意可复现性就加上 Determinism = true; 和一个 RandomSeed

DFX7104

警告抛出位置Generation/DreamFXGenerator.cpp:2968

This renderer has no Material and DreamFX knows no default for its type, so it will not draw. Set 'Material = \"...\";'.

原因. 这个 renderer 没有材质,而 DreamFX 也不知道它这个类型的引擎默认值,所以它什么都不画。

修复.Material = "...";

本页目录