1. Home
  2. Docs
  3. Obfuscator
  4. Help: Uncalled Method

Help: Uncalled Method

If some method don’t get called, it is mostly a GUI or Animation Event method. This happens because Unity stores the name of the methods, attached to gameobjects through the Inspector in the Unity Editor, and calls them via reflection. To fix this add an [OPS.Obfuscator.Attribute.DoNotRenameAttribute] attribute to the method.
For a more obfuscated approach you could assign for example button clicks programatically. For example, here the ButtonMethod can be obfuscated:

public Button mybutton;

public void Start()
{
mybutton.onClick.AddListener(ButtonMethod);
}

The same process works for all kind of methods.
But mostly if you check in the inspector window in “Window->Obfuscator Settings”: Find Gui Methods, and Find Animation Methods, it will find many to all!