error CS0117: `UnityEngine.Object' does not contain a definition for `Destory'

[Unity&缺少引用]error CS0117'Destory''Debug'没有定义


添加using System.Debug试试

把using System.Collections;注释掉


UnityEngine.Destroy(gameObject);

UnityEngine.Debug.Log("message");

试试


试试从正常 的脚本 里面 的 Destroy(gameObject);   复制粘贴 到 错误 的地方。


参考资料:

1.

error CS0117: `Debug' does not contain a definition for `Log'

2.

3.


相关文章:

  • 2022-12-23
  • 2021-12-13
  • 2022-12-23
  • 2021-09-08
  • 2022-12-23
  • 2021-12-29
  • 2021-12-01
  • 2021-06-26
猜你喜欢
  • 2022-12-23
  • 2022-01-19
  • 2022-12-23
  • 2021-04-24
  • 2021-07-18
  • 2021-04-11
  • 2022-12-23
相关资源
相似解决方案