gpt4 book ai didi

c# - 覆盖 Unity3D 内置的 CharacterController

转载 作者:太空宇宙 更新时间:2023-11-03 22:35:43 25 4
gpt4 key购买 nike

如果我创建一个名为 CharacterController 的新 C# 脚本,Unity 将显示此警告:

Script 'CharacterController' has the same name as built-in Unity component. AddComponent and GetComponent will not work with this script.

我能以某种方式覆盖它吗(这样 AddComponentGetComponent 就可以工作了)? Unity 似乎并不关心这个命名空间。

最佳答案

Unity 已经声明他们 won't fix this .

This particular case has been investigated thoroughly and we have decided, in the interests of protecting the stability and features of Unity for users that rely upon the affected versions, to not address this issue.

所以解决方案是使用不同的脚本名称。

关于c# - 覆盖 Unity3D 内置的 CharacterController,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55229766/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com