-
Notifications
You must be signed in to change notification settings - Fork 134
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 "Initialise Component in Start()" context action #356
Comments
would there be a option to choose, if it ends up in Start or Awake? |
👍 to option for General rule that seems to be roughly used: (OT: When I doodle in Unity now, I tend to have a setup in which I |
Yep, this sounds like a good idea - two menu items, add to Not sure what the difference is between "self-setup" and "observing", though - ownership? |
While in Start you know that everything has called it's Awake already and it's safe to Start interacting with other objects. Awake would be the best place for this feature since is what should be used to setup stuff internal to your object and create references. |
See also RIDER-15621 |
See also #608 |
Closed with #1259 |
Given a field that derives from
Component
in a Unity class, e.g.MonoBehaviour
, add a context action to initialise the value in theStart()
method, in a similar way that current Rider/ReSharper will add code to initialise in the constructor. E.g. GivenThen there should be a quick fix on
_rigidBody
that will generate:The text was updated successfully, but these errors were encountered: