HOW DO I DEBUG UNITY??

that's why i want to debug

how would you suggest i learn from the references? i'm new to this whole developing thing i will appreciate some begginer s tips and what about debugging given projects? i know i can add some logs to my code but how can i debug other's projects..? thanks a lot!!! :)
 

adiel666

New member
Currently

The only way to "debug" scripts is to Log stuff to the built-in debugger. use Debug.Log(<<some reference type with a populated ToString() function or just some String>>); Unity 3.0 which will be out later this year, will give you the option to really debug code using Break-Points inside MonoDevelop. This is one of the main features of the new upcoming release.​
 

adiel666

New member
easiest way

is to create a material in the project tab first. change the main color of the material, in the inspector tab. then create a script and define a material object like this: public var mat:Material; (should be declared outside a function) then in the event(like OnMouseDown(){//code here}) that you would want to change the material of the GameObject write renderer.material = mat; Place the script on the GameObject that you would like to have this kind of behaviour drag the Material from the project tab onto the Empty Material called "Mat" which is now in the script component of the GameObject you've placed it on earlier it should now reference the material that you have pre-created. Run the game. when the event you've chosen is called, the GameObject that has this script component will change its material from the default it had, to the one you have pre-created.​
 
למעלה