Skip to content
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

Add CreateActuators API, obsolete old method. #4899

Merged
merged 5 commits into from
Feb 2, 2021

Conversation

surfnerd
Copy link
Contributor

@surfnerd surfnerd commented Feb 1, 2021

Proposed change(s)

Add CreateActuators API to ActuatorComponent, obsolete CreateActuator, and have the base implementation wrap a call to the original in an Array and return it.

Useful links (Github issues, JIRA tickets, ML-Agents forum threads etc.)

Types of change(s)

  • Bug fix
  • New feature
  • Code refactor
  • Breaking change
  • Documentation update
  • Other (please describe)

Checklist

  • Added tests that prove my fix is effective or that my feature works
  • Updated the changelog (if applicable)
  • Updated the documentation (if applicable)
  • Updated the migration guide (if applicable)

Other comments

… the original method. The original method will be removed in the future.
@@ -12,8 +13,21 @@ public abstract class ActuatorComponent : MonoBehaviour
/// Create the IActuator. This is called by the Agent when it is initialized.
/// </summary>
/// <returns>Created IActuator object.</returns>
[Obsolete("Use CreateActuators instead.")]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since this is abstract people will still need to override it until we remove it. The migration doc tells them how to disable the warnings.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ugh, this is annoying but I'm not sure if not marking it obsolete is worse.

Copy link
Contributor Author

@surfnerd surfnerd Feb 1, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, i went through the same thought process and ended up here.

docs/Migrating.md Outdated Show resolved Hide resolved
Co-authored-by: Vincent-Pierre BERGES <vincentpierre@unity3d.com>
@surfnerd surfnerd merged commit 729b4cf into master Feb 2, 2021
@delete-merged-branch delete-merged-branch bot deleted the develop-return-multiple-actuators branch February 2, 2021 17:02
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants