Files
gplan-2/design/engineering/engine-reference/godot/deprecated-apis.md
T
DKChan f406002766 docs(dev目录正名·engineering): design/dev 更名 design/engineering——名实对齐(目录实存=架构+五规约+引擎参考的工程知识域)
- git mv 15 件本体;13 个引用文件 34 处路径同步+熵增闸 DESIGN_SUBDIRS 白名单同批改判
- 白名单漏改时熵增闸当场真红(子目录越界拦截能力实录验证),同步后全绿
- game/tests 三件套注释按用户特别授权批后主区直改(不入本批);reports/research 暂存档按吸收即死原则不改
- 文档域闸全绿:gdd_lint/doc_link/doc_term/流水线闸/熵增闸
2026-10-20 05:33:34 +08:00

52 lines
4.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Godot Deprecated APIs(Don't use X → Use Y)
> **Last verified: 2026-09-12**
> 4.5–4.7 移除/更名/签名变化对照已补全(源 = 官方迁移指南,2026-09-12 逐条核实)。仍不含 4.8(dev 阶段)。**不要向本表添加未经验证的条目。**
## 4.7 release 页核实
- 4.7 release 页未列出新的 API 弃用;完整清单以其迁移指南为准(已逐条核实,见下节)
## 4.5–4.7 移除 / 更名 / 签名变化对照(源 = 官方迁移指南)
| Don't use | Use | Since | GDScript 影响 | 项目相关性 |
|---|---|---|---|---|
| `RenderingServer.instance_reset_physics_interpolation()` | (无替代——API 移除) | 4.5 | ❌ 移除 | ⚪ |
| `RenderingServer.instance_set_interpolated()` | (无替代——API 移除) | 4.5 | ❌ 移除 | ⚪ |
| `JSONRPC.set_scope()` | `set_method()` | 4.5 | ❌ 更名 | ⚪ |
| `Node.get_rpc_config()` | `get_node_rpc_config()` | 4.5 | ❌ 更名 | ⚪ |
| `Node.set_name(name: String)` | `set_name(name: StringName)` | 4.5 | 兼容(自动转换) | 🔵 |
| `TextServerExtension` 四个 draw 虚方法 | 签名新增 `oversampling` | 4.5 | ❌(虚方法覆盖不兼容) | ⚪ |
| RichTextLabel `size_in_percent` 参数 | `width_in_percent` + `height_in_percent` | 4.5 | 兼容(参数拆分) | 🔵(低) |
| `FileAccess.get_as_text(skip_cr)` | `get_as_text()`(**skip_cr 参数移除**) | 4.6 | ❌ 参数移除 | 🔵 |
| `EditorFileDialog.add_side_menu()` | (无替代;EditorFileDialog 17 方法/8 属性/4 信号并入 `FileDialog`) | 4.6 | ❌ 移除 | ⚪ |
| AnimationPlayer `assigned_animation` / `autoplay` / `current_animation`(String) | `StringName`(含 `get_queue()`、`current_animation_changed` 参数) | 4.6 | ❌ 类型不兼容 | 🔵(B5 期) |
| SpringBoneSimulator3D 三个枚举 | `SkeletonModifier3D.BoneDirection` / `.RotationAxis` | 4.6 | ❌ | ⚪ |
| `AudioEffectSpectrumAnalyzer.tap_back_pos` | (无替代——属性移除) | 4.7 | ❌ 移除 | ⚪(D4 期注意) |
| AnimationNodeBlendSpace1D/2D `sync: bool` 属性 | `sync_mode: SyncMode` 枚举 | 4.7 | ❌ 属性类型变化 | ⚪ |
| RichTextLabel `ImageUpdateMask.UPDATE_WIDTH_IN_PERCENT` | `UPDATE_WIDTH_UNIT`;`width/height_in_percent` 参数 → `width/height_unit`(bool → `ImageUnit`) | 4.7 | ❌ 常量/参数更名 | 🔵(低) |
| `Object.is_class("X")`(String 字面量) | `is_class(&"X")`(StringName) | 4.7 | 兼容 | 🔵 |
| `EditorVCSInterface._commit()` | 签名新增 `amend` | 4.7 | ❌(虚方法覆盖不兼容) | ⚪ |
| `PhysicsServer2DExtension._body_set_shape_as_one_way_collision()` | 签名新增必填 `direction` | 4.7 | ❌(虚方法覆盖不兼容) | ⚪ |
| C# `RenderingDevice.Features.Address` | `BufferDeviceAddress` | 4.5 | 仅 C# | ⚪ |
| GLTF Accessor/BufferView 十字段(int) | int64 / 强类型枚举 | 4.5 | 仅 C# | ⚪ |
## 训练数据内基线(≤4.4,高置信,本项目相关)
| Don't use | Use | Since | 备注 |
|---|---|---|---|
| `Tween` 节点 / `create_tween()` 以外的补间获取 | `create_tween()` / `tween_property()` | 4.0 | Tween 节点已移除 |
| 旧式 `connect("sig", instance, "method")` | `signal.connect(callable)` | 4.0 | Callable 语法 |
| `onready var` | `@onready var` | 4.0 | 注解体系 |
| `export var` | `@export var` | 4.0 | |
| `RandomNumberGenerator` 自建实例(玩法侧) | `RngService.open_stream(stream)` | 本项目 | D2 Rule 5(项目级禁令,非引擎弃用) |
| `randomize()`(玩法代码) | 禁止——种子归 `RngService.set_master_seed()`(C2 调用) | 本项目 | D2 Rule 5 |
| `yield` | `await` | 4.0 | 4.7 新增 `Tween.tween_await()`;但 B1 结算逻辑禁 await(设计约束) |
## Pending
- [x] 4.5 deprecated → replacement 对照(2026-09-12)
- [x] 4.6 deprecated → replacement 对照(2026-09-12)
- [x] 4.7 deprecated → replacement 对照(2026-09-12)
- [ ] 4.8 对照(dev 阶段;稳定版发布后 `/setup-engine refresh`)