- Home /
Find variables based on value in debug mode
There is an object created dynamically in unity.
This object is being moved by an unknown source.
I have tried to leave a breakpoint to all possible sources and find the one that affects the transform of this dynamic object but no success.
I wonder if there is a way to search through the variables that contain this object as their value in debug mode.
Answer by GDGames0302 · Feb 13, 2021 at 07:40 AM
Hi. I can give you some suggestions: your object can move by physics(it collided with something) or by script. In VisualStudio in the left side you can search a word in all your scripts at once. Try searching for GameObject or for Transform to see these words in all your scripts. Of course, if you have a lot of GameObjects or Transforms it will be hard to find out where your script moves the object, but I hope you can at least find what script is moving your object. Don't hesitate to ask further questions. Hope it helps!
Your answer
![](https://koobas.hobune.stream/wayback/20220613025105im_/https://answers.unity.com/themes/thub/images/avi.jpg)