1. Home
  2. Docs
  3. Obfuscator
  4. Faq
  5. What to do with methods not called?

What to do with methods not called?

If a method is not called, it is usually a GUI or Animation event method. This happens because Unity stores the name of the methods that are attached to game objects via the inspector in the Unity editor and calls them via reflection. To fix this, add an attribute [OPS.Obfuscator.Attribute.DoNotRenameAttribute] to the method.
For a more obfuscated approach, you could, instead, assign button clicks programmatically. Here, for example, the ButtonMethod can be obfuscated:

The same process works for all kinds of methods.
But mostly if you check in the inspector window in ‘OPS->Obfuscator->Settings”: The activation of ‘Find Gui Methods’, and ‘Find Animation Methods’, will find many to all!