- Home /
Figuring out status (sleep/awake in this example) of objects
Hi!
Quite straight forward example. I have a quite complex physics setup and would like to custom check my objects.
My current approach is a "onMouseButton" which gives a Debug.Log with the status, but I would love to be able to press the Pause button, select an object and ... well, use the inspector to inspect an object, not to see the setup it was once upon a time spawned with :)
In general, I'm not proficient with debugging in Unity, any links to good tutorials are appriciated as well!
Thanks!
Answer by fafase · Mar 15, 2014 at 08:37 PM
The values you see in the Inspector are the public one at the current time, but if you want to see the private ones, tick the little down arrow in the top right corner of the Inspector, nect to the lock and choose Debug. This will show all private members. Note static won't show ever as well as Dictionary, even public ones.
Now the best for debug and development would be to learn the Unity Unit Test.
http://blogs.unity3d.com/2013/12/18/unity-test-tools-released/
https://www.youtube.com/watch?v=PAhp_1uXLDM
It is free.
thanks! The unity-tests look really interesting, will have a look. Sadly, physics states are not user defined variables, they are inherent to the rigidbody2d in this case - to make them visible with the pulldown you described, I'd have to assign them to a variable manually - which is exactly what I want to avoid to lower the amount of bloat/debug code - although I thought it's easier to get access to those properties. :/
Your answer
Follow this Question
Related Questions
do rigidbodies fall asleep at the same time? 1 Answer
"Invalid AABB" error whenever rigidbody moves 7 Answers
Rigidbody not sleeping 1 Answer
Why does Debug.DrawLine offset sometimes? 1 Answer
Why are my Rigidbodies not sleeping? 0 Answers