public void SetSelectedMethod(object sender, UnitorMethod method) { Application.Current.Dispatcher.Invoke(new Action(() => { TypeSearch.Text = ""; NamespaceSearch.Text = ""; Namespaces.SelectedItem = Namespaces.ItemsSource.Cast <string>().ToList().IndexOf(method.DeclaringType.Namespace); Types.SelectedIndex = Types.ItemsSource.Cast <UnitorType>().ToList().IndexOf(method.DeclaringType); if (!game.Model.CalledMethods.ContainsKey(method) && (IsCalledOnly.IsChecked ?? false)) { IsCalledOnly.IsChecked = false; } Methods.SelectedItem = Methods.ItemsSource.Cast <UnitorMethod>().ToList().IndexOf(method); })); }
public static string DissasembleMethod(UnitorMethod method, UnitorModel module) { if (method.IsEmpty) { return(""); } if (method.Il2CppMethod != null) { return(DissasembleIl2CppMethod(method.Il2CppMethod, module)); } else { return(DissasembleMonoMethod(method.MonoMethod)); } }
public static bool IsUnityMonobehaviourMessage(UnitorMethod m) { return(new List <string> { "Awake", "FixedUpdate", "LateUpdate", "OnAnimatorIK", "OnAnimatorMove", "OnApplicationFocus", "OnApplicationPause", "OnApplicationQuit", "OnAudioFilterRead", "OnBecameInvisible", "OnBecameVisible", "OnCollisionEnter", "OnCollisionEnter2D", "OnCollisionExit", "OnCollisionExit2D", "OnCollisionStay", "OnCollisionStay2D", "OnConnectedToServer", "OnControllerColliderHit", "OnDestroy", "OnDisable", "OnDisconnectedFromServer", "OnDrawGizmos", "OnDrawGizmosSelected", "OnEnable", "OnFailedToConnect", "OnFailedToConnectToMasterServer", "OnGUI", "OnJointBreak", "OnJointBreak2D", "OnMasterServerEvent", "OnMouseDown", "OnMouseDrag", "OnMouseEnter", "OnMouseExit", "OnMouseOver", "OnMouseUp", "OnMouseUpAsButton", "OnNetworkInstantiate", "OnParticleCollision", "OnParticleSystemStopped", "OnParticleTrigger", "OnParticleUpdateJobScheduled", "OnPlayerConnected", "OnPlayerDisconnected", "OnPostRender", "OnPreCull", "OnPreRender", "OnRenderImage", "OnRenderObject", "OnSerializeNetworkView", "OnServerInitialized", "OnTransformChildrenChanged", "OnTransformParentChanged", "OnTriggerEnter", "OnTriggerEnter2D", "OnTriggerExit", "OnTriggerExit2D", "OnTriggerStay", "OnTriggerStay2D", "OnValidate", "OnWillRenderObject", "Reset", "Start", "Update", "ctor" }.Contains(m.Name)); }
public ReferenceView(UnitorMethod method, EventHandler <UnitorMethod> referenceCallback) { InitializeComponent(); References.ItemsSource = method.References; Callback = referenceCallback; }