-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BehaviorParameters being Internal breaks code and makes automation impossible #3580
Comments
Hi @MikeWise2718, Just a little background: we've been trying to reduce the surface area of our public API as we get ready to become a preview package. Once we hit that milestone, we have to follow strict semantic versioning on the API, and any breaking change (like renaming a variable or method) requires a major version increase. Unfortunately, there's no way to mark some parts of the API as "stable" and others "experimental", so we tend to be defensive and don't expose things we're not 100% sure about. That being said, I agree with you that we went too far on this by making
All of unit tests have access to internal classes/members due to the ml-agents/com.unity.ml-agents/Runtime/AssemblyInfo.cs Lines 3 to 4 in 2c2f930
I agree in general, but there are a few details that need more thought/work on our side:
I'm not saying the extra effort is a reason not to do it :) Just that it might take a few more days to get it fixed on master. I'm open to other suggestions on how to keep this user-friendly without letting you shoot yourself in the foot... |
Great, I look forward to running my example against it and seeing if I can get it to work again. Let me know if I can help test it in anyway. |
Hi @chriselion, I get your point, that it gets complicated with the setters after simulation started, but what about some kind of initialization method, that will only have effect before the Sensor component was created. Otherwise it would fire a warning. That way nothing will be changed during simulation, but preserve the freedom to configure everything from code. |
Hi @JohnBergago, |
Oops, didn't mean to close this. |
Finally got back to this (external events are intervening), and I got a lot further, but now it seems I need to add a "DecisionRequester" to my agent, and that is an internal type. So I am not quite able to automate my agent creation yet. Without that it just sits there... |
|
Sorry, I realized I never followed up on this. DecisionRequester was made public in #3716 |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Making the BehaviorParameters internal, and all its fields internal breaks my code, since I like to build agents with code. This means I add the components with script and set the parameters that way too. This feels to me like a more scalable and testable approach. Unless I am overseeing something (which is entirely possible), this means I now have to base everything on hand constructed prefabs.
Isn't this a pretty severe limitation? How do you write your own test cases against it?
I would think that anything exposed in a Unity Inspector should be public, since someone might want to modify it or inspect it programmatically. I think most everything in this inspector is now inaccessable:
The text was updated successfully, but these errors were encountered: