public void SelectThing(ThingInMemory thing) { _selectedThing = thing; _shortestPath = _shortestPathToRootFinder.FindFor(thing); Instance.OnObjSelected(thing); //if (NetManager.Instance != null && NetManager.Instance.IsConnected) // requestStackDataInfo(); }
internal void SelectThing(ThingInMemory thing) { _selectedThing = thing; if (_backSelected.Count == 0 || _selectedThing != _backSelected.Peek()) { _backSelected.Push(_selectedThing); } _shortestPath = _shortestPathToRootFinder.FindFor(thing); }
public void SelectThing(ThingInMemory thing) { _selectedThing = thing; _shortestPath = _shortestPathToRootFinder.FindFor(thing); Instance.OnObjSelected(thing); if (_hostWindow.CurrentMode == TrackerMode.Editor && _shortestPath != null) { ThingInMemory rootThing = _shortestPath.Last(); var rootObject = rootThing as NativeUnityEngineObject; if (rootObject != null) { EditorGUIUtility.PingObject(rootObject.instanceID); //var currentlActive = Selection.activeGameObject; //Selection.activeGameObject = go; //SceneView.lastActiveSceneView.FrameSelected(); //Selection.activeGameObject = currentlActive; } } //if (NetManager.Instance != null && NetManager.Instance.IsConnected) // requestStackDataInfo(); }
public void SelectThing(ThingInMemory thing) { _selectedThing = thing; _shortestPath = _shortestPathToRootFinder.FindFor(thing); Instance.OnObjSelected(thing); }
public string DumpDetailInffo(ThingInMemory _selectedThing) { _shortestPath = _shortestPathToRootFinder.FindFor(_selectedThing); var str = new StringBuilder(); var nativeObject = _selectedThing as NativeUnityEngineObject; if (nativeObject != null) { str.AppendFormat("\t{0}\n", "NativeUnityEngineObject"); str.AppendFormat("\t\tName:{0}\n", nativeObject.name); str.AppendFormat("\t\tClassName:{0}\n", nativeObject.className); str.AppendFormat("\t\tClassID:{0}\n", nativeObject.classID.ToString()); str.AppendFormat("\t\tInstanceID:{0}\n", nativeObject.instanceID.ToString()); str.AppendFormat("\t\tIsDontDestroyOnLoad:{0}\n", nativeObject.isDontDestroyOnLoad.ToString()); str.AppendFormat("\t\tIsPersistent:{0}\n", nativeObject.isPersistent.ToString()); str.AppendFormat("\t\tIsManager:{0}\n", nativeObject.isManager.ToString()); str.AppendFormat("\t\tHideFlags:{0}\n", nativeObject.hideFlags.ToString()); str.AppendFormat("\t\tSize:{0}\n", nativeObject.size.ToString()); } var managedObject = _selectedThing as ManagedObject; if (managedObject != null) { str.AppendLine("\tManagedObject"); str.AppendFormat("\t\tType:{0}\n", managedObject.typeDescription.name); str.AppendFormat("\t\tAddress:{0}\n", managedObject.address.ToString("X")); str.AppendFormat("\t\tsize:{0}\n", managedObject.size.ToString()); if (managedObject.typeDescription.name == "System.String") { str.AppendFormat("\t\tvalue{0}\n", StringTools.ReadString(_unpackedCrawl.managedHeap.Find(managedObject.address, _unpackedCrawl.virtualMachineInformation), _unpackedCrawl.virtualMachineInformation)); } str.Append(DumpFields(managedObject)); //if (managedObject.typeDescription.isArray) //{ // DrawArray(managedObject); //} } if (_selectedThing is GCHandle) { str.AppendLine("\tGCHandle"); str.AppendFormat("\t\tsize{0}\n", _selectedThing.size.ToString()); } var staticFields = _selectedThing as StaticFields; if (staticFields != null) { str.AppendLine("\tStatic Fields"); str.AppendFormat("\t\tOf type: {0}\n", staticFields.typeDescription.name); str.AppendFormat("\t\tsize: {0}\n", staticFields.size); str.Append(DumpFields(staticFields.typeDescription, new BytesAndOffset() { bytes = staticFields.typeDescription.staticFieldBytes, offset = 0, pointerSize = _unpackedCrawl.virtualMachineInformation.pointerSize }, true)); } if (managedObject == null) { str.AppendLine("\t***References:"); str.Append(DumpLinks(_selectedThing.references)); } str.AppendLine("\t***Referenced by:"); str.Append(DumpLinks(_selectedThing.referencedBy)); GUILayout.Space(10); if (_shortestPath != null) { if (_shortestPath.Length > 1) { str.AppendLine("\t***ShortestPathToRoot"); str.Append(DumpLinks(_shortestPath)); } string reason; _shortestPathToRootFinder.IsRoot(_shortestPath.Last(), out reason); str.AppendLine("\tThis is a root because:" + reason); } else { str.AppendLine("\tNo root is keeping this object alive. It will be collected next UnloadUnusedAssets() or scene load"); } return(str.ToString()); }