告诉我如何访问游戏对象中的脚本

问题描述 投票:0回答:0

Global Light 2D对象中有一个Light 2D脚本。您需要在另一个脚本中更改 Intensity 变量。由于某种原因,我无法访问它。

尝试通过

.GetComponent
但它不起作用。

c# unity3d
© www.soinside.com 2019 - 2024. All rights reserved.