[Unity实战]unity2019.4.5f1 Run ML-Agents Error:PublicApiValidation.cs(88,25): error CS0649

190 阅读1分钟

unity2019.4.5f1 Run ML-Agents Error

1.已按照官方文档执行如下:

https://github.com/Unity-Technologies/ml-agents/blob/main/docs/Installation.md

在这里插入图片描述

2.问题:

在这里插入图片描述

D:\unity_project\ml-agents\com.unity.ml-agents\Tests\Editor\PublicAPI\PublicApiValidation.cs(88,25): error CS0649: Field 'PublicApiValidation.CustomDecisionRequester.KillswitchEnabled' is never assigned to, and will always have its default value false
	    // 文件来源: 
	    // Unity.MLAgentsExamples.PublicApiValidation.CustomDecisionRequester


	    /// <summary>
        /// Make sure we can inherit from DecisionRequester and override some logic.
        /// </summary>
        class CustomDecisionRequester : DecisionRequester
        {
            /// <summary>
            /// Example logic. If the killswitch flag is set, the Agent never requests a decision.
            /// </summary>
            public bool KillswitchEnabled;

            public CustomDecisionRequester()
            {
            }

            protected override bool ShouldRequestDecision(DecisionRequestContext context)
            {
                return !KillswitchEnabled && base.ShouldRequestDecision(context);
            }
        }

3.issue:

https://github.com/Unity-Technologies/ml-agents/issues/5510

4.resolve:

按照官方文档的要求:换成unity2019.4.25f1版本就自动好了