I don't know if this is the same bug or a different situation. I have a controller that has a basic function named launch. After upgrading to build 309, if I look at the generated class I see the basic function and all the existing code. If I select launch in the Project Inspector or from the drop down at the top of the code editor, I get an empty editor, as if there is no code in the launch function. If I put a line of code in the editor, I now end up with two launch functions in the generated class.
I don't remember if I added the Basic Function. I'm guessing that is what I did. It shows up as a Basic Function in the Project Inspector now. I am reading about the 309 override functionality and I'm wondering if that has anything to do with the issue. Because technically I am overriding the launch function, correct?
First off, let me say that we know we have some work to do here.
Controllers have two "special" functions which do not show up in the inspector as a node. They are always there. These are init and launch. You can access them via the dropdown at the top left of the code view. You should be adding your custom launch code to this special function.
The 2 items on our side...
- We should be representing the "special" functions in the inspector somehow.
- We should prevent you from using the name of any "special" functions for a Basic Function
What you should do:
Copy all of your code out of the basic function that you've named launch. Delete this basic function. Paste all of this code in the "special" function.
Thanks. After reading your explanation, I think I know what happened. I don't think I created the Basic Function for launch, I think I put the original code in the launch that was created by default (from the drop down list). Then, I think the Basic Function showed up in the Project Inspector when I upgraded to 309. I can't say that for sure, but I am pretty sure I hadn't gotten to a point to create a Basic Function anywhere yet.
I followed your suggestion and got rid of the extra function.