← 返回函数库

print

Misc Debug 已实现

CityEngine 官方语法

print(value)

参数说明

参数类型默认值说明
valueany要输出的值。可为数字、字符串、数组等。

描述

在控制台输出值。用于调试 CGA 规则,查看变量或表达式的当前值。

官方示例

输出调试信息:

Lot --> print("Hello CGA")

实现说明

CGA.js 中的 print 实现基于 CityEngine 2025.1 官方文档。

🎨 3D 预览 — 打印

@StartRule\nLot --> primitiveCube(2, 2, 2)\n        print("Debug message")\n        color(0.7, 0.7, 0.8)