|
What's the C# equivalent of the javascript @script ExecuteInEditMode() ?
(comments are locked)
|
|
Here is an example taken from one of my classes.
(comments are locked)
|
|
You simply put: [ExecuteInEditMode] At the top of your script. Nice job answering your own question :P
Mar 11 at 10:37 PM
DaBossTMR
@DaBossTMR: Nice job resurrecting a 3.5 years old question. JFYI: He was last seen on "Jan 2011". Furthermore his answer isn't correct because attributes always belong to the statement that follows them. It has to be placed right before the class declaration and not at the top of the script. That's how attributes works in general. In UnityScript they just needed a workaround since the class is auto-generated by Unity, so you can't place the "@ExecuteInEditMode" in front of the class. That's why they introduced "@script".
Mar 11 at 11:21 PM
Bunny83
(comments are locked)
|
