Answer by daviddickball
How about you check if object is visible by any camera? http://docs.unity3d.com/ScriptReference/Renderer-isVisible.html
View ArticleAnswer by daviddickball
Add a flag, so on keypress change isPlaying = true; so that other times you press up it won't reset the animation.
View ArticleAnswer by daviddickball
Just an update, gameObject.SetActive(false) DOES work, but my problem was that I hadn't referenced the gameController script correctly and the script was bombing before it even got to this line
View ArticleAnswer by daviddickball
You might be using a mesh collider for the trigger. Use a cube collider if this is only a trigger.
View ArticleAnswer by daviddickball
I'VE SOLVED IT! I experimented disabling scripts, doing lots of weird things to figure this out. I noticed it always happened when my player collided with a certain place on the level mesh. So I played...
View ArticleAnswer by daviddickball
Oh wait, I could just disable the gameObject instead of the component. No idea why I didn't think of that. I'm an idiot.
View ArticleAnswer by daviddickball
How about you check if object is visible by any camera? http://docs.unity3d.com/ScriptReference/Renderer-isVisible.html
View ArticleAnswer by daviddickball
Add a flag, so on keypress change isPlaying = true; so that other times you press up it won't reset the animation.
View ArticleAnswer by daviddickball
Just an update, gameObject.SetActive(false) DOES work, but my problem was that I hadn't referenced the gameController script correctly and the script was bombing before it even got to this line
View ArticleAnswer by daviddickball
You might be using a mesh collider for the trigger. Use a cube collider if this is only a trigger.
View ArticleAnswer by daviddickball
I'VE SOLVED IT! I experimented disabling scripts, doing lots of weird things to figure this out. I noticed it always happened when my player collided with a certain place on the level mesh. So I played...
View ArticleAnswer by daviddickball
Oh wait, I could just disable the gameObject instead of the component. No idea why I didn't think of that. I'm an idiot.
View ArticleAnswer by daviddickball
Or if you want to do this in just one line: if(GameObject.FindGameObjectsWithTag("Enemy").Length > 20) { // Do something }
View ArticleAnswer by daviddickball
Apparently we can't do this, and there's a technical reason why not. Apparently "internally this uses a delegate where call order is not defined" - there's more info and discussion about this here:...
View Article
More Pages to Explore .....