#pragma strict
function Awake () {
if (Application.loadedLevelName = "menu") {
Rigidbody2D.AddForce(Vector2.up * 100);
}
}
I am currently making a 2d game which I am designing the menu for. For my background, I have dots floating around. To do this, I added colliders past the edges of the screen. However, this code block will not run. If anybody can find errors it would be greatly appreciated. Thank you
I did fix the = to == and now I am only getting error BCE0020. I want the dot(s) to to be propelled into motion when the menu loads up so that there are dots flying in random directions (opposed to a bland white background). Here is an image [24404-screen+shot+2014-03-27+at+7.46.17+pm.png|24404]
Sorry I just figured out the problem i used Rigidbody2D instead of rigidbody2D this and changing = to == runs the code Thank You