Skip to content

Conversation

@ReneB
Copy link
Contributor

@ReneB ReneB commented May 6, 2020

MonoBehaviour only calls methods that it knows of in advance. OnAwake is not expected to exist and is thus never called. Since there is no real IntelliSense or anything for these "magical" MonoBehaviour methods, it's easy to accidentally call the method OnAwake and have it never be called.

Proposed change(s)

Fix a slight error in the Migrating documentation that might catch developers off-guard otherwise.

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

`OnAwake` is not expected to exist and is thus never called
@CLAassistant
Copy link

CLAassistant commented May 6, 2020

CLA assistant check
All committers have signed the CLA.

@surfnerd
Copy link
Contributor

surfnerd commented May 6, 2020

Thanks for finding this.

@surfnerd surfnerd merged commit 0263d15 into Unity-Technologies:master May 6, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 14, 2021
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