public Item(ThingInMemory thingInMemory, Group group) { _thingInMemory = thingInMemory; _group = group; }
private void DrawValueFor(FieldDescription field, BytesAndOffset bytesAndOffset) { var typeDescription = _unpackedCrawl.typeDescriptions[field.typeIndex]; switch (typeDescription.name) { case "System.Int32": GUILayout.Label(_primitiveValueReader.ReadInt32(bytesAndOffset).ToString()); break; case "System.Int64": GUILayout.Label(_primitiveValueReader.ReadInt64(bytesAndOffset).ToString()); break; case "System.UInt32": GUILayout.Label(_primitiveValueReader.ReadUInt32(bytesAndOffset).ToString()); break; case "System.UInt64": GUILayout.Label(_primitiveValueReader.ReadUInt64(bytesAndOffset).ToString()); break; case "System.Int16": GUILayout.Label(_primitiveValueReader.ReadInt16(bytesAndOffset).ToString()); break; case "System.UInt16": GUILayout.Label(_primitiveValueReader.ReadUInt16(bytesAndOffset).ToString()); break; case "System.Byte": GUILayout.Label(_primitiveValueReader.ReadByte(bytesAndOffset).ToString()); break; case "System.SByte": GUILayout.Label(_primitiveValueReader.ReadSByte(bytesAndOffset).ToString()); break; case "System.Char": GUILayout.Label(_primitiveValueReader.ReadChar(bytesAndOffset).ToString()); break; case "System.Boolean": GUILayout.Label(_primitiveValueReader.ReadBool(bytesAndOffset).ToString()); break; case "System.Single": GUILayout.Label(_primitiveValueReader.ReadSingle(bytesAndOffset).ToString()); break; case "System.Double": GUILayout.Label(_primitiveValueReader.ReadDouble(bytesAndOffset).ToString()); break; case "System.IntPtr": GUILayout.Label(_primitiveValueReader.ReadPointer(bytesAndOffset).ToString("X")); break; default: if (!typeDescription.isValueType) { ThingInMemory item = GetThingAt(bytesAndOffset.ReadPointer()); if (item == null) { EditorGUI.BeginDisabledGroup(true); GUILayout.Button("Null"); EditorGUI.EndDisabledGroup(); } else { DrawLinks(new ThingInMemory[] { item }, 0); } } else { DrawFields(typeDescription, bytesAndOffset); } break; } }