gpt4 book ai didi

c# - (Unity3D)如何在脚本上添加注释或文档

转载 作者:行者123 更新时间:2023-12-01 03:16:17 30 4
gpt4 key购买 nike

:) 有没有办法让我们设置可以在自定义下的检查器 View 上显示的注释文档我们制作的脚本?

Please see the image for a sample.

最佳答案

这个答案不是我的,它来自 link that I found on google .

You have to implement a custom inspector for your class and when you want to show such a warning you can use EditorGUILayout.HelpBox inside OnInspectorGUI.

Something like that:

EditorGUILayout.HelpBox("Some warning text", MessageType.Warning);

MessageType EditorGUILayout.HelpBox 的参数有多个选项,其中之一是 Info,它似乎适合显示注释,而不是警告。

这是一个 second link这提供了更多信息。

关于c# - (Unity3D)如何在脚本上添加注释或文档,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45511174/

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