- Home /
Would OnMouseDown() and OnMouseUp() cause any problems with my game?
Like the title says, can I put both events into a script and have them load the same scene? I have been having issues where it doesnt seem to be detecting just one very well. I will end up clicking like 15 times before it loads the scene. Im guessing my game is just running at a very low FPS. Will having both coded in cause it to crash or try to load the scene twice?
Answer by Joshua · May 04, 2011 at 01:16 AM
Not that I know. It's quite common to use both. OnMouseDown for grabbing something and OnMouseUp for releasing it...
Thanks. Ive been trying it and testing it for a little while and it seems to be working alright. Do you have any basic tips for speeding up loading a level?
If you don't have pro all you can do is make your scenes as small as possible (less textures, etc) and make sure you do not instantialise everything in the awake/start function. Try to 'smear it out' a bit ;)
Your answer
Follow this Question
Related Questions
Illuminating a 3D object's edges OnMouseOver (script in c#)? 1 Answer
How to get AudioSource to play a Sound correctly? 1 Answer
Spawn menu on Level Load 3 Answers
How to teleport to different scenes? 2 Answers
need help with code 1 Answer