using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using BepInEx; using UnityEngine; using UnityEngine.SceneManagement; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("ClassLibrary5")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("ClassLibrary5")] [assembly: AssemblyCopyright("Copyright © 2026")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("4091b9c4-88c3-4b06-bcf3-5e54a0e1304e")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] [assembly: AssemblyVersion("1.0.0.0")] namespace Gemini.Foddy.CombinedSuite; [BepInPlugin("com.user.goi.ghostchaserpro.editor", "Runtime Workspace Editor", "4.5.0")] [BepInProcess("GettingOverIt.exe")] public class IntegratedWorkspacePlugin : BaseUnityPlugin { [Serializable] public class TransformSnapshot { public GameObject targetObject; public Vector3 position; public Vector3 rotation; public Vector3 scale; public bool hasColliderData; public Vector2 colliderOffset; public Vector2 colliderSize; public float circleRadius; public Vector2[] polyVertices; public TransformSnapshot(GameObject go) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) targetObject = go; position = go.transform.position; rotation = go.transform.localEulerAngles; scale = go.transform.localScale; Collider2D component = go.GetComponent(); if (!((Object)(object)component != (Object)null)) { return; } hasColliderData = true; colliderOffset = component.offset; BoxCollider2D val = (BoxCollider2D)(object)((component is BoxCollider2D) ? component : null); if (val != null) { colliderSize = val.size; return; } CapsuleCollider2D val2 = (CapsuleCollider2D)(object)((component is CapsuleCollider2D) ? component : null); if (val2 != null) { colliderSize = val2.size; return; } CircleCollider2D val3 = (CircleCollider2D)(object)((component is CircleCollider2D) ? component : null); if (val3 != null) { circleRadius = val3.radius; return; } PolygonCollider2D val4 = (PolygonCollider2D)(object)((component is PolygonCollider2D) ? component : null); if (val4 != null) { polyVertices = (Vector2[])val4.points.Clone(); } } public void Restore() { //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)targetObject == (Object)null) { return; } targetObject.transform.position = position; targetObject.transform.localEulerAngles = rotation; targetObject.transform.localScale = scale; if (!hasColliderData) { return; } Collider2D component = targetObject.GetComponent(); if (!((Object)(object)component != (Object)null)) { return; } component.offset = colliderOffset; BoxCollider2D val = (BoxCollider2D)(object)((component is BoxCollider2D) ? component : null); if (val != null) { val.size = colliderSize; return; } CapsuleCollider2D val2 = (CapsuleCollider2D)(object)((component is CapsuleCollider2D) ? component : null); if (val2 != null) { val2.size = colliderSize; return; } CircleCollider2D val3 = (CircleCollider2D)(object)((component is CircleCollider2D) ? component : null); if (val3 != null) { val3.radius = circleRadius; return; } PolygonCollider2D val4 = (PolygonCollider2D)(object)((component is PolygonCollider2D) ? component : null); if (val4 != null && polyVertices != null) { val4.points = (Vector2[])polyVertices.Clone(); } } } [Serializable] public class SerializedElementData { public string entityIdentifierName; public string fallbackPrefabReference; public Vector3 storedPosition; public Vector3 storedRotation; public Vector3 storedScale; } [Serializable] public class MasterMapSaveContainer { public List registeredElements = new List(); } [CompilerGenerated] private sealed class d__59 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public IntegratedWorkspacePlugin <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__59(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; break; case 1: <>1__state = -1; break; } if ((Object)(object)<>4__this.player == (Object)null) { <>4__this.player = GameObject.Find("Player") ?? GameObject.Find("Bennett"); <>2__current = null; <>1__state = 1; return true; } <>4__this.CacheOriginalCameraDefaults(); <>4__this.showMasterMenu = true; return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } private GameObject player; private GameObject selectedObject; private bool showMasterMenu = true; private bool isSimulationPausedManually = false; private Rect windowRect = new Rect(20f, 20f, 1150f, 780f); private Vector2 scrollHierarchy; private Vector2 scrollInspector; private Vector2 scrollRightPanel; private Vector2 scrollLoadMenu; private string mapSaveNameInput = "MyCustomMap"; private string renameString = ""; private string selectedFilePath = ""; private bool showNewGameModalPrompt = false; private bool viewingCustomMapsSubMenu = false; private bool loadCustomMapOnBoot = false; private string activeMapPathToLoad = ""; private List spawnablePrefabs = new List(); private List loadedMaterials = new List(); private List loadedMeshes = new List(); private Dictionary foldoutStates = new Dictionary(); private string componentSearchString = ""; private List allComponentTypes = new List(); private List filteredComponentTypes = new List(); private Vector2 componentSearchScroll; private string prefabSearchFilter = ""; private string materialSearchFilter = ""; private string meshSearchFilter = ""; private string[] rightPanelTabs = new string[3] { "Prefabs", "Materials", "Meshes" }; private int activeRightPanelTab = 0; private bool isRightPanelVisible = true; private bool isFreecamActive = false; private bool is3DModeActive = false; private Vector3 originalCamPos; private float originalCamSize; private Quaternion originalCamRot; private bool hasCachedOriginalCameraDefaults = false; private Transform cameraTransform; private Camera mainCam; private Material outlineMaterial; private Sprite whitePrimitivePixel; private float rotationX = 0f; private float rotationY = 0f; private float lookSensitivity = 3f; private bool isEditingColliderBounds = false; private int activeDraggingHandleIndex = -1; private Vector2 colliderDragStartOffset; private Vector2 colliderDragStartSize; private Vector3 mouseDragWorldStartPos; private Vector2 polyDragStartVertexValue; private Stack undoStack = new Stack(); private Stack redoStack = new Stack(); private bool isTrackingHistory = true; private string SavesFolder => Path.Combine(Application.persistentDataPath, "runtime_workspace_saves"); private void Awake() { if (!Directory.Exists(SavesFolder)) { Directory.CreateDirectory(SavesFolder); } SceneManager.sceneLoaded += OnSceneLoaded; CreateOutlineMaterial(); GeneratePrimitiveSpriteAsset(); CacheAllValidComponentTypes(); } private void OnSceneLoaded(Scene scene, LoadSceneMode mode) { selectedObject = null; isFreecamActive = false; is3DModeActive = false; isSimulationPausedManually = false; isEditingColliderBounds = false; activeDraggingHandleIndex = -1; hasCachedOriginalCameraDefaults = false; undoStack.Clear(); redoStack.Clear(); RefreshAllAssetCaches(); ((MonoBehaviour)this).StartCoroutine(WaitAndInitializeWorkspace()); if (loadCustomMapOnBoot && !string.IsNullOrEmpty(activeMapPathToLoad)) { InterceptSceneAndDeploySavedMap(activeMapPathToLoad); } } [IteratorStateMachine(typeof(d__59))] private IEnumerator WaitAndInitializeWorkspace() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__59(0) { <>4__this = this }; } private void CacheOriginalCameraDefaults() { //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) if (!hasCachedOriginalCameraDefaults) { mainCam = Camera.main; if ((Object)(object)mainCam != (Object)null) { cameraTransform = ((Component)mainCam).transform; originalCamPos = cameraTransform.position; originalCamRot = cameraTransform.rotation; originalCamSize = mainCam.orthographicSize; hasCachedOriginalCameraDefaults = true; } } } private void CacheAllValidComponentTypes() { allComponentTypes.Clear(); Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies(); foreach (Assembly assembly in assemblies) { try { Type[] types = assembly.GetTypes(); foreach (Type type in types) { if (typeof(Component).IsAssignableFrom(type) && !type.IsAbstract && !type.IsGenericTypeDefinition) { allComponentTypes.Add(type); } } } catch { } } } private void UpdateFilteredComponents(string filter) { filteredComponentTypes.Clear(); if (string.IsNullOrEmpty(filter)) { return; } string value = filter.ToLower(); foreach (Type allComponentType in allComponentTypes) { if (allComponentType.Name.ToLower().Contains(value)) { filteredComponentTypes.Add(allComponentType); if (filteredComponentTypes.Count >= 30) { break; } } } } private void Update() { //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_019d: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_0289: Unknown result type (might be due to invalid IL or missing references) //IL_028e: Unknown result type (might be due to invalid IL or missing references) //IL_02a1: Unknown result type (might be due to invalid IL or missing references) //IL_02a3: Unknown result type (might be due to invalid IL or missing references) //IL_02aa: Unknown result type (might be due to invalid IL or missing references) //IL_02af: Unknown result type (might be due to invalid IL or missing references) //IL_02b4: Unknown result type (might be due to invalid IL or missing references) //IL_02cb: Unknown result type (might be due to invalid IL or missing references) //IL_02cd: Unknown result type (might be due to invalid IL or missing references) //IL_02d4: Unknown result type (might be due to invalid IL or missing references) //IL_02d9: Unknown result type (might be due to invalid IL or missing references) //IL_02de: Unknown result type (might be due to invalid IL or missing references) //IL_02f5: Unknown result type (might be due to invalid IL or missing references) //IL_02f7: Unknown result type (might be due to invalid IL or missing references) //IL_02fe: Unknown result type (might be due to invalid IL or missing references) //IL_0303: Unknown result type (might be due to invalid IL or missing references) //IL_0308: Unknown result type (might be due to invalid IL or missing references) //IL_031f: Unknown result type (might be due to invalid IL or missing references) //IL_0321: Unknown result type (might be due to invalid IL or missing references) //IL_0328: Unknown result type (might be due to invalid IL or missing references) //IL_032d: Unknown result type (might be due to invalid IL or missing references) //IL_0332: Unknown result type (might be due to invalid IL or missing references) //IL_0392: Unknown result type (might be due to invalid IL or missing references) if (Input.GetKeyDown((KeyCode)283)) { showMasterMenu = !showMasterMenu; } HandleFreecamAnd3DMovement(); if (showNewGameModalPrompt) { Time.timeScale = 0f; } else { Time.timeScale = (isSimulationPausedManually ? 0f : 1f); } if (showMasterMenu && isEditingColliderBounds && (Object)(object)selectedObject != (Object)null) { ProcessColliderHandleDragLogic(); } if (showMasterMenu || showNewGameModalPrompt) { if (is3DModeActive && Input.GetMouseButton(1)) { Cursor.visible = false; Cursor.lockState = (CursorLockMode)1; } else { Cursor.visible = true; Cursor.lockState = (CursorLockMode)0; } } else if (!isFreecamActive) { Cursor.visible = false; Cursor.lockState = (CursorLockMode)1; } if ((Object)(object)player == (Object)null || showNewGameModalPrompt) { return; } if (showMasterMenu && Input.GetMouseButtonDown(0) && activeDraggingHandleIndex == -1) { Vector2 val = default(Vector2); ((Vector2)(ref val))..ctor(Input.mousePosition.x, (float)Screen.height - Input.mousePosition.y); if (!((Rect)(ref windowRect)).Contains(val) && (Object)(object)Camera.main != (Object)null) { Ray val2 = Camera.main.ScreenPointToRay(Input.mousePosition); RaycastHit2D rayIntersection = Physics2D.GetRayIntersection(val2); if ((Object)(object)((RaycastHit2D)(ref rayIntersection)).collider != (Object)null && (Object)(object)((Component)((RaycastHit2D)(ref rayIntersection)).collider).gameObject != (Object)(object)selectedObject) { selectedObject = ((Component)((RaycastHit2D)(ref rayIntersection)).collider).gameObject; isEditingColliderBounds = false; } } } if (!((Object)(object)selectedObject != (Object)null) || !showMasterMenu) { return; } if (Input.GetKey((KeyCode)306) || Input.GetKey((KeyCode)305)) { if (Input.GetKeyDown((KeyCode)122)) { ExecuteUndo(); } if (Input.GetKeyDown((KeyCode)121)) { ExecuteRedo(); } } float num = (Input.GetKey((KeyCode)304) ? 10f : 3f); float num2 = Time.unscaledDeltaTime * num; bool flag = false; Vector3 val3 = Vector3.zero; if (Input.GetKey((KeyCode)273)) { val3 += Vector3.up * num2; flag = true; } if (Input.GetKey((KeyCode)274)) { val3 += Vector3.down * num2; flag = true; } if (Input.GetKey((KeyCode)276)) { val3 += Vector3.left * num2; flag = true; } if (Input.GetKey((KeyCode)275)) { val3 += Vector3.right * num2; flag = true; } if (flag) { if (Input.GetKeyDown((KeyCode)273) || Input.GetKeyDown((KeyCode)274) || Input.GetKeyDown((KeyCode)276) || Input.GetKeyDown((KeyCode)275)) { RecordStateForUndo(selectedObject); } selectedObject.transform.Translate(val3, (Space)1); } if ((Input.GetKey((KeyCode)306) || Input.GetKey((KeyCode)305)) && Input.GetKeyDown((KeyCode)100)) { DuplicateSelected(); } if (Input.GetKeyDown((KeyCode)127)) { DeleteSelected(); } } private void OnPostRender() { if (showMasterMenu && !((Object)(object)selectedObject == (Object)null) && !((Object)(object)outlineMaterial == (Object)null)) { SpriteRenderer component = selectedObject.GetComponent(); if ((Object)(object)component != (Object)null && (Object)(object)component.sprite != (Object)null && !isEditingColliderBounds) { DrawSpriteWireframe(component); } } } private void RecordStateForUndo(GameObject go) { if (isTrackingHistory && !((Object)(object)go == (Object)null)) { undoStack.Push(new TransformSnapshot(go)); redoStack.Clear(); } } private void ExecuteUndo() { if (undoStack.Count != 0) { isTrackingHistory = false; TransformSnapshot transformSnapshot = undoStack.Pop(); redoStack.Push(new TransformSnapshot(transformSnapshot.targetObject)); transformSnapshot.Restore(); isTrackingHistory = true; } } private void ExecuteRedo() { if (redoStack.Count != 0) { isTrackingHistory = false; TransformSnapshot transformSnapshot = redoStack.Pop(); undoStack.Push(new TransformSnapshot(transformSnapshot.targetObject)); transformSnapshot.Restore(); isTrackingHistory = true; } } private void ToggleFreecam() { //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) mainCam = Camera.main; if ((Object)(object)mainCam == (Object)null) { return; } cameraTransform = ((Component)mainCam).transform; CacheOriginalCameraDefaults(); isFreecamActive = !isFreecamActive; MonoBehaviour component = ((Component)mainCam).GetComponent(); if (isFreecamActive) { if ((Object)(object)component != (Object)null) { ((Behaviour)component).enabled = false; } } else if (!is3DModeActive) { cameraTransform.position = originalCamPos; mainCam.orthographicSize = originalCamSize; cameraTransform.rotation = originalCamRot; if ((Object)(object)component != (Object)null) { ((Behaviour)component).enabled = true; } } else { Vector3 localEulerAngles = cameraTransform.localEulerAngles; rotationX = localEulerAngles.y; rotationY = 0f - localEulerAngles.x; } } private void Toggle3DMode() { //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) mainCam = Camera.main; if ((Object)(object)mainCam == (Object)null) { return; } cameraTransform = ((Component)mainCam).transform; CacheOriginalCameraDefaults(); is3DModeActive = !is3DModeActive; MonoBehaviour component = ((Component)mainCam).GetComponent(); if (is3DModeActive) { if ((Object)(object)component != (Object)null && isFreecamActive) { ((Behaviour)component).enabled = false; } mainCam.orthographic = false; mainCam.fieldOfView = 60f; cameraTransform.position = new Vector3(cameraTransform.position.x, cameraTransform.position.y, -15f); Vector3 localEulerAngles = cameraTransform.localEulerAngles; rotationX = localEulerAngles.y; rotationY = 0f - localEulerAngles.x; } else { cameraTransform.position = originalCamPos; cameraTransform.rotation = originalCamRot; mainCam.orthographicSize = originalCamSize; mainCam.orthographic = true; if ((Object)(object)component != (Object)null && !isFreecamActive) { ((Behaviour)component).enabled = true; } } } private void HandleFreecamAnd3DMovement() { //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_01d2: Unknown result type (might be due to invalid IL or missing references) //IL_01d7: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_01e5: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: Unknown result type (might be due to invalid IL or missing references) //IL_01eb: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_01fe: Unknown result type (might be due to invalid IL or missing references) //IL_01ff: Unknown result type (might be due to invalid IL or missing references) //IL_0204: Unknown result type (might be due to invalid IL or missing references) //IL_0209: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Unknown result type (might be due to invalid IL or missing references) //IL_0196: Unknown result type (might be due to invalid IL or missing references) //IL_019b: Unknown result type (might be due to invalid IL or missing references) //IL_0217: Unknown result type (might be due to invalid IL or missing references) //IL_0218: Unknown result type (might be due to invalid IL or missing references) //IL_021d: Unknown result type (might be due to invalid IL or missing references) //IL_0222: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_022b: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Unknown result type (might be due to invalid IL or missing references) //IL_0232: Unknown result type (might be due to invalid IL or missing references) //IL_0237: Unknown result type (might be due to invalid IL or missing references) //IL_02a5: Unknown result type (might be due to invalid IL or missing references) //IL_02b0: Unknown result type (might be due to invalid IL or missing references) //IL_02b6: Unknown result type (might be due to invalid IL or missing references) //IL_02c0: Unknown result type (might be due to invalid IL or missing references) //IL_02c5: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)mainCam == (Object)null) { mainCam = Camera.main; } if ((Object)(object)mainCam == (Object)null) { return; } cameraTransform = ((Component)mainCam).transform; if (showNewGameModalPrompt) { return; } if (is3DModeActive && Input.GetMouseButton(1)) { rotationX += Input.GetAxis("Mouse X") * lookSensitivity; rotationY += Input.GetAxis("Mouse Y") * lookSensitivity; rotationY = Mathf.Clamp(rotationY, -85f, 85f); cameraTransform.localRotation = Quaternion.Euler(0f - rotationY, rotationX, 0f); } if (!isFreecamActive) { return; } float num = (Input.GetKey((KeyCode)304) ? 25f : 10f); float num2 = Time.unscaledDeltaTime * num; Vector3 val = Vector3.zero; if (is3DModeActive) { if (Input.GetKey((KeyCode)119)) { val += cameraTransform.forward; } if (Input.GetKey((KeyCode)115)) { val += -cameraTransform.forward; } if (Input.GetKey((KeyCode)97)) { val += -cameraTransform.right; } if (Input.GetKey((KeyCode)100)) { val += cameraTransform.right; } } else { if (Input.GetKey((KeyCode)119)) { val += Vector3.up; } if (Input.GetKey((KeyCode)115)) { val += Vector3.down; } if (Input.GetKey((KeyCode)97)) { val += Vector3.left; } if (Input.GetKey((KeyCode)100)) { val += Vector3.right; } } Transform obj = cameraTransform; obj.position += val * num2; float axis = Input.GetAxis("Mouse ScrollWheel"); if (axis != 0f) { if (mainCam.orthographic) { mainCam.orthographicSize = Mathf.Max(1f, mainCam.orthographicSize - axis * 5f); return; } Transform obj2 = cameraTransform; obj2.position += cameraTransform.forward * axis * 15f; } } private void DuplicateSelected() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)selectedObject == (Object)null)) { GameObject val = Object.Instantiate(selectedObject, selectedObject.transform.position + new Vector3(0.5f, 0.5f, 0f), selectedObject.transform.rotation); ((Object)val).name = ((Object)selectedObject).name.Replace("_Spawned", "") + "_Spawned"; selectedObject = val; isEditingColliderBounds = false; } } private void DeleteSelected() { if (!((Object)(object)selectedObject == (Object)null)) { Object.Destroy((Object)(object)selectedObject); selectedObject = null; isEditingColliderBounds = false; } } private Vector3 GetSpawnLocationNearPlayer() { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)player != (Object)null) { return player.transform.position + new Vector3(2f, 1.5f, 0f); } Vector3 result = (((Object)(object)Camera.main != (Object)null) ? ((Component)Camera.main).transform.position : Vector3.zero); result.z = 0f; return result; } private void WriteCurrentLayoutToDisk(string saveName) { //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) if (string.IsNullOrEmpty(saveName.Trim())) { return; } try { MasterMapSaveContainer masterMapSaveContainer = new MasterMapSaveContainer(); GameObject[] array = Object.FindObjectsOfType(); foreach (GameObject val in array) { if (((Object)val).name.Contains("_Spawned") || ((Object)val).name.Contains("SpawnedMesh_") || ((Object)val).name.Contains("2D_")) { SerializedElementData item = new SerializedElementData { entityIdentifierName = ((Object)val).name, fallbackPrefabReference = ((Object)val).name.Replace("_Spawned", "").Replace("SpawnedMesh_", "").Trim(), storedPosition = val.transform.position, storedRotation = val.transform.localEulerAngles, storedScale = val.transform.localScale }; masterMapSaveContainer.registeredElements.Add(item); } } string path = Path.Combine(SavesFolder, saveName.Trim() + "_map.json"); File.WriteAllText(path, JsonUtility.ToJson((object)masterMapSaveContainer, true)); } catch (Exception ex) { Debug.LogError((object)("Error saving map: " + ex.Message)); } } private void InterceptSceneAndDeploySavedMap(string fullPath) { //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Expected O, but got Unknown //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) if (!File.Exists(fullPath)) { return; } try { MasterMapSaveContainer masterMapSaveContainer = JsonUtility.FromJson(File.ReadAllText(fullPath)); foreach (SerializedElementData node in masterMapSaveContainer.registeredElements) { GameObject val = null; GameObject val2 = spawnablePrefabs.Find((GameObject x) => (Object)(object)x != (Object)null && ((Object)x).name.Equals(node.fallbackPrefabReference, StringComparison.OrdinalIgnoreCase)); if ((Object)(object)val2 != (Object)null) { val = Object.Instantiate(val2); } else { val = new GameObject(); SpriteRenderer val3 = val.AddComponent(); val3.sprite = whitePrimitivePixel; } if ((Object)(object)val != (Object)null) { ((Object)val).name = node.entityIdentifierName; val.transform.position = node.storedPosition; val.transform.localEulerAngles = node.storedRotation; val.transform.localScale = node.storedScale; } } } catch (Exception ex) { Debug.LogError((object)("Error deploying override map: " + ex.Message)); } } private void OnGUI() { //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Expected O, but got Unknown //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Expected O, but got Unknown //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) if (showMasterMenu && isEditingColliderBounds && (Object)(object)selectedObject != (Object)null) { DrawUnityColliderOnScreenGuiOverlay(selectedObject); } if (showMasterMenu || showNewGameModalPrompt) { GUI.backgroundColor = new Color(0.15f, 0.15f, 0.15f, 1f); if (showNewGameModalPrompt) { Rect val = default(Rect); ((Rect)(ref val))..ctor((float)(Screen.width / 2 - 250), (float)(Screen.height / 2 - 200), 500f, 400f); GUI.Window(2, val, new WindowFunction(DrawIsolatedNewGameModalPrompt), "\ud83c\udd95 NEW GAME CONFIGURATOR (SIMULATION PAUSED)"); } else if (showMasterMenu) { ((Rect)(ref windowRect)).width = (isRightPanelVisible ? 1150f : 790f); windowRect = GUI.Window(0, windowRect, new WindowFunction(DrawMainEditorInterface), "PRO MASTER SYSTEM DECK (F2 to open/close)"); } } } private void DrawMainEditorInterface(int windowID) { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Unknown result type (might be due to invalid IL or missing references) //IL_02ac: Unknown result type (might be due to invalid IL or missing references) //IL_02e1: Unknown result type (might be due to invalid IL or missing references) //IL_0350: Unknown result type (might be due to invalid IL or missing references) //IL_038b: Unknown result type (might be due to invalid IL or missing references) //IL_03ef: Unknown result type (might be due to invalid IL or missing references) //IL_03f9: Unknown result type (might be due to invalid IL or missing references) //IL_03fe: Unknown result type (might be due to invalid IL or missing references) //IL_0409: Unknown result type (might be due to invalid IL or missing references) //IL_040e: Unknown result type (might be due to invalid IL or missing references) //IL_04b8: Unknown result type (might be due to invalid IL or missing references) //IL_04c2: Unknown result type (might be due to invalid IL or missing references) //IL_04c7: Unknown result type (might be due to invalid IL or missing references) //IL_05a8: Unknown result type (might be due to invalid IL or missing references) //IL_05b2: Unknown result type (might be due to invalid IL or missing references) //IL_05b7: Unknown result type (might be due to invalid IL or missing references) //IL_06c5: Unknown result type (might be due to invalid IL or missing references) //IL_06cf: Unknown result type (might be due to invalid IL or missing references) //IL_06d4: Unknown result type (might be due to invalid IL or missing references) //IL_07f7: Unknown result type (might be due to invalid IL or missing references) //IL_0801: Unknown result type (might be due to invalid IL or missing references) //IL_0806: Unknown result type (might be due to invalid IL or missing references) //IL_063d: Unknown result type (might be due to invalid IL or missing references) //IL_0642: Unknown result type (might be due to invalid IL or missing references) //IL_08fc: Unknown result type (might be due to invalid IL or missing references) //IL_0903: Expected O, but got Unknown //IL_090b: Unknown result type (might be due to invalid IL or missing references) //IL_0962: Unknown result type (might be due to invalid IL or missing references) GUI.DragWindow(new Rect(0f, 0f, ((Rect)(ref windowRect)).width, 20f)); GUI.backgroundColor = Color.white; GUILayout.BeginHorizontal(GUI.skin.box, Array.Empty()); GUI.backgroundColor = (isFreecamActive ? Color.green : Color.white); if (GUILayout.Button(isFreecamActive ? "Disable Freecam" : "Enable Freecam", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(115f) })) { ToggleFreecam(); } GUI.backgroundColor = (is3DModeActive ? Color.green : Color.white); if (GUILayout.Button(is3DModeActive ? "Perspective: 3D" : "Orthographic: 2D", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(130f) })) { Toggle3DMode(); } GUI.backgroundColor = Color.white; if (GUILayout.Button(isRightPanelVisible ? "\ud83d\udc41 Hide Assets" : "\ud83d\udc41 Show Assets", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(110f) })) { isRightPanelVisible = !isRightPanelVisible; } GUILayout.Space(5f); GUI.backgroundColor = (isSimulationPausedManually ? Color.yellow : Color.white); if (GUILayout.Button(isSimulationPausedManually ? "▶ Resume Game" : "⏸ Pause Game", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(110f) })) { isSimulationPausedManually = !isSimulationPausedManually; } GUI.backgroundColor = Color.white; GUILayout.Space(5f); GUI.backgroundColor = Color.cyan; if (GUILayout.Button("\ud83c\udd95 New Game", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(100f) })) { showNewGameModalPrompt = true; viewingCustomMapsSubMenu = false; selectedFilePath = ""; } GUI.backgroundColor = Color.white; GUILayout.Space(5f); GUI.enabled = undoStack.Count > 0; if (GUILayout.Button("↶ Undo", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(65f) })) { ExecuteUndo(); } GUI.enabled = redoStack.Count > 0; if (GUILayout.Button("↷ Redo", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(65f) })) { ExecuteRedo(); } GUI.enabled = true; GUILayout.FlexibleSpace(); GUI.enabled = (Object)(object)selectedObject != (Object)null; GUI.backgroundColor = Color.cyan; if (GUILayout.Button("\ud83d\udc6f Quick Duplicate Selection", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(190f) })) { DuplicateSelected(); } GUI.backgroundColor = Color.white; GUI.enabled = true; GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(GUI.skin.box, Array.Empty()); GUILayout.Label("Save File Name:", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(110f) }); mapSaveNameInput = GUILayout.TextField(mapSaveNameInput, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(180f) }); GUI.backgroundColor = Color.green; if (GUILayout.Button("\ud83d\udcbe Save Map JSON", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(125f) })) { WriteCurrentLayoutToDisk(mapSaveNameInput); } GUI.backgroundColor = Color.white; GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.BeginVertical(GUI.skin.box, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.Width(240f), GUILayout.ExpandHeight(true) }); GUILayout.Label("Scene Tree Matrix", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) }); scrollHierarchy = GUILayout.BeginScrollView(scrollHierarchy, Array.Empty()); List list = new List(); Scene activeScene = SceneManager.GetActiveScene(); if (((Scene)(ref activeScene)).isLoaded) { ((Scene)(ref activeScene)).GetRootGameObjects(list); foreach (GameObject item in list) { DrawHierarchyNode(item.transform, 0); } } GUILayout.EndScrollView(); GUILayout.EndVertical(); GUILayout.BeginVertical(GUI.skin.box, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.Width(500f), GUILayout.ExpandHeight(true) }); GUILayout.Label("Object Inspector", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) }); scrollInspector = GUILayout.BeginScrollView(scrollInspector, Array.Empty()); if ((Object)(object)selectedObject != (Object)null) { DrawInspector(selectedObject); } else { GUILayout.Label("Select an active item inside the level world frame to display properties.", Array.Empty()); } GUILayout.EndScrollView(); GUILayout.EndVertical(); if (isRightPanelVisible) { GUILayout.BeginVertical(GUI.skin.box, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.Width(360f), GUILayout.ExpandHeight(true) }); activeRightPanelTab = GUILayout.Toolbar(activeRightPanelTab, rightPanelTabs, Array.Empty()); if (GUILayout.Button("Scan & Refresh Native Game Resources Caches", Array.Empty())) { RefreshAllAssetCaches(); } if (activeRightPanelTab == 0) { prefabSearchFilter = GUILayout.TextField(prefabSearchFilter, Array.Empty()); scrollRightPanel = GUILayout.BeginScrollView(scrollRightPanel, Array.Empty()); foreach (GameObject spawnablePrefab in spawnablePrefabs) { if (!((Object)(object)spawnablePrefab == (Object)null) && (string.IsNullOrEmpty(prefabSearchFilter) || ((Object)spawnablePrefab).name.IndexOf(prefabSearchFilter, StringComparison.OrdinalIgnoreCase) >= 0) && GUILayout.Button(((Object)spawnablePrefab).name, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(22f) })) { GameObject val = Object.Instantiate(spawnablePrefab, GetSpawnLocationNearPlayer(), Quaternion.identity); ((Object)val).name = ((Object)spawnablePrefab).name + "_Spawned"; selectedObject = val; } } GUILayout.EndScrollView(); } else if (activeRightPanelTab == 1) { materialSearchFilter = GUILayout.TextField(materialSearchFilter, Array.Empty()); scrollRightPanel = GUILayout.BeginScrollView(scrollRightPanel, Array.Empty()); foreach (Material loadedMaterial in loadedMaterials) { if (!((Object)(object)loadedMaterial == (Object)null) && (string.IsNullOrEmpty(materialSearchFilter) || ((Object)loadedMaterial).name.IndexOf(materialSearchFilter, StringComparison.OrdinalIgnoreCase) >= 0) && GUILayout.Button(((Object)loadedMaterial).name, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(24f) }) && (Object)(object)selectedObject != (Object)null && (Object)(object)selectedObject.GetComponent() != (Object)null) { RecordStateForUndo(selectedObject); selectedObject.GetComponent().material = loadedMaterial; } } GUILayout.EndScrollView(); } else if (activeRightPanelTab == 2) { meshSearchFilter = GUILayout.TextField(meshSearchFilter, Array.Empty()); scrollRightPanel = GUILayout.BeginScrollView(scrollRightPanel, Array.Empty()); foreach (Mesh loadedMesh in loadedMeshes) { if ((Object)(object)loadedMesh == (Object)null) { continue; } string mName = (string.IsNullOrEmpty(((Object)loadedMesh).name) ? $"[Mesh_{((Object)loadedMesh).GetInstanceID()}]" : ((Object)loadedMesh).name); if ((string.IsNullOrEmpty(meshSearchFilter) || mName.IndexOf(meshSearchFilter, StringComparison.OrdinalIgnoreCase) >= 0) && GUILayout.Button($"{mName} ({loadedMesh.vertexCount} Verts)", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(24f) })) { GameObject val2 = new GameObject("SpawnedMesh_" + mName + "_Spawned"); val2.transform.position = GetSpawnLocationNearPlayer(); MeshFilter val3 = val2.AddComponent(); val3.sharedMesh = loadedMesh; MeshRenderer val4 = val2.AddComponent(); Material val5 = loadedMaterials.Find((Material m) => (Object)(object)m != (Object)null && ((Object)m).name.Equals(mName, StringComparison.OrdinalIgnoreCase)); ((Renderer)val4).material = (Material)(((Object)(object)val5 != (Object)null) ? ((object)val5) : ((object)new Material(Shader.Find("Sprites/Default")))); val2.AddComponent(); selectedObject = val2; } } GUILayout.EndScrollView(); } GUILayout.EndVertical(); } GUILayout.EndHorizontal(); } private void DrawIsolatedNewGameModalPrompt(int windowID) { //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_0321: Unknown result type (might be due to invalid IL or missing references) //IL_035a: Unknown result type (might be due to invalid IL or missing references) //IL_03b6: Unknown result type (might be due to invalid IL or missing references) //IL_039c: Unknown result type (might be due to invalid IL or missing references) //IL_03a1: Unknown result type (might be due to invalid IL or missing references) Scene activeScene; if (!viewingCustomMapsSubMenu) { GUILayout.Space(20f); GUILayout.Label("Select your deployment configuration strategy below. Starting a fresh execution sequence will reset your active workspace structures cleanly.", GUI.skin.label, Array.Empty()); GUILayout.Space(40f); if (GUILayout.Button("\ud83d\uddfa DEFAULT MAP OVERLAY RUN", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(45f) })) { loadCustomMapOnBoot = false; activeMapPathToLoad = ""; showNewGameModalPrompt = false; showMasterMenu = false; activeScene = SceneManager.GetActiveScene(); SceneManager.LoadScene(((Scene)(ref activeScene)).buildIndex); } GUILayout.Space(25f); if (GUILayout.Button("\ud83d\udcc2 CUSTOM MAP REPOSITORIES INDEX", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(45f) })) { viewingCustomMapsSubMenu = true; } GUILayout.FlexibleSpace(); if (GUILayout.Button("❌ CANCEL", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(30f) })) { showNewGameModalPrompt = false; } return; } GUILayout.Label("Stored Custom Map Files:", Array.Empty()); string[] files = Directory.GetFiles(SavesFolder, "*_map.json"); scrollLoadMenu = GUILayout.BeginScrollView(scrollLoadMenu, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(160f) }); if (files.Length == 0) { GUILayout.Label("No saved maps found in directory pool.", Array.Empty()); } foreach (string text in files) { string text2 = Path.GetFileNameWithoutExtension(text).Replace("_map", ""); string text3 = ((selectedFilePath == text) ? (">> " + text2.ToUpper() + " <<") : text2); if (GUILayout.Button(text3, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(26f) })) { selectedFilePath = text; renameString = text2; } } GUILayout.EndScrollView(); if (!string.IsNullOrEmpty(selectedFilePath) && File.Exists(selectedFilePath)) { GUILayout.BeginVertical(GUI.skin.box, Array.Empty()); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label("Rename:", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(60f) }); renameString = GUILayout.TextField(renameString, Array.Empty()); if (GUILayout.Button("Apply", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(70f) }) && !string.IsNullOrEmpty(renameString.Trim())) { string text4 = Path.Combine(SavesFolder, renameString.Trim() + "_map.json"); if (!File.Exists(text4)) { File.Move(selectedFilePath, text4); selectedFilePath = text4; } } GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(Array.Empty()); GUI.backgroundColor = Color.red; if (GUILayout.Button("\ud83d\uddd1 DELETE FILE", Array.Empty())) { File.Delete(selectedFilePath); selectedFilePath = ""; } GUI.backgroundColor = Color.green; if (GUILayout.Button("\ud83d\ude80 BOOT THIS CUSTOM RUN", Array.Empty())) { loadCustomMapOnBoot = true; activeMapPathToLoad = selectedFilePath; showNewGameModalPrompt = false; showMasterMenu = false; activeScene = SceneManager.GetActiveScene(); SceneManager.LoadScene(((Scene)(ref activeScene)).buildIndex); } GUILayout.EndHorizontal(); GUI.backgroundColor = Color.white; GUILayout.EndVertical(); } GUILayout.FlexibleSpace(); if (GUILayout.Button("◁ BACK", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(30f) })) { viewingCustomMapsSubMenu = false; selectedFilePath = ""; } } private void DrawHierarchyNode(Transform t, int indent) { //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Expected O, but got Unknown //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)t == (Object)null) { return; } GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Space((float)(indent * 12)); string key = ((Object)((Component)t).gameObject).GetInstanceID().ToString(); if (!foldoutStates.ContainsKey(key)) { foldoutStates[key] = false; } if (t.childCount > 0) { string text = (foldoutStates[key] ? "▼ " : "► "); if (GUILayout.Button(text, GUI.skin.label, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(15f) })) { foldoutStates[key] = !foldoutStates[key]; } } else { GUILayout.Space(15f); } GUIStyle val = new GUIStyle(GUI.skin.label) { alignment = (TextAnchor)3 }; val.normal.textColor = (((Object)(object)selectedObject == (Object)(object)((Component)t).gameObject) ? Color.cyan : Color.white); if (GUILayout.Button(((Object)t).name, val, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) })) { selectedObject = ((Component)t).gameObject; isEditingColliderBounds = false; } GUILayout.EndHorizontal(); if (t.childCount > 0 && foldoutStates[key]) { for (int i = 0; i < t.childCount; i++) { DrawHierarchyNode(t.GetChild(i), indent + 1); } } } private void DrawInspector(GameObject go) { //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Unknown result type (might be due to invalid IL or missing references) //IL_01e1: Unknown result type (might be due to invalid IL or missing references) //IL_01ed: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_01fe: Unknown result type (might be due to invalid IL or missing references) //IL_0203: Unknown result type (might be due to invalid IL or missing references) //IL_0418: Unknown result type (might be due to invalid IL or missing references) //IL_0419: Unknown result type (might be due to invalid IL or missing references) //IL_041b: Unknown result type (might be due to invalid IL or missing references) //IL_041c: Unknown result type (might be due to invalid IL or missing references) //IL_041e: Unknown result type (might be due to invalid IL or missing references) //IL_0420: Unknown result type (might be due to invalid IL or missing references) //IL_045a: Unknown result type (might be due to invalid IL or missing references) //IL_045c: Unknown result type (might be due to invalid IL or missing references) //IL_0cc2: Unknown result type (might be due to invalid IL or missing references) //IL_0ce3: Unknown result type (might be due to invalid IL or missing references) //IL_0ce8: Unknown result type (might be due to invalid IL or missing references) //IL_0a50: Unknown result type (might be due to invalid IL or missing references) //IL_04a4: Unknown result type (might be due to invalid IL or missing references) //IL_04a6: Unknown result type (might be due to invalid IL or missing references) //IL_0ab0: Unknown result type (might be due to invalid IL or missing references) //IL_04ee: Unknown result type (might be due to invalid IL or missing references) //IL_04f0: Unknown result type (might be due to invalid IL or missing references) //IL_0522: Unknown result type (might be due to invalid IL or missing references) //IL_0535: Unknown result type (might be due to invalid IL or missing references) //IL_0548: Unknown result type (might be due to invalid IL or missing references) //IL_05d0: Unknown result type (might be due to invalid IL or missing references) //IL_05c9: Unknown result type (might be due to invalid IL or missing references) //IL_0625: Unknown result type (might be due to invalid IL or missing references) //IL_0638: Unknown result type (might be due to invalid IL or missing references) //IL_063d: Unknown result type (might be due to invalid IL or missing references) //IL_06cc: Unknown result type (might be due to invalid IL or missing references) //IL_06d0: Unknown result type (might be due to invalid IL or missing references) //IL_06f0: Unknown result type (might be due to invalid IL or missing references) //IL_0713: Unknown result type (might be due to invalid IL or missing references) //IL_0718: Unknown result type (might be due to invalid IL or missing references) //IL_07a7: Unknown result type (might be due to invalid IL or missing references) //IL_07ab: Unknown result type (might be due to invalid IL or missing references) //IL_07cb: Unknown result type (might be due to invalid IL or missing references) //IL_0884: Unknown result type (might be due to invalid IL or missing references) //IL_0889: Unknown result type (might be due to invalid IL or missing references) //IL_0918: Unknown result type (might be due to invalid IL or missing references) //IL_091c: Unknown result type (might be due to invalid IL or missing references) //IL_093c: Unknown result type (might be due to invalid IL or missing references) GUILayout.BeginHorizontal(Array.Empty()); ((Object)go).name = GUILayout.TextField(((Object)go).name, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) }); GUI.backgroundColor = Color.cyan; if (GUILayout.Button("\ud83d\udccb Duplicate", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(95f) })) { DuplicateSelected(); } GUI.backgroundColor = Color.white; GUILayout.EndHorizontal(); bool flag = GUILayout.Toggle(go.activeSelf, " Is Enabled", Array.Empty()); if (flag != go.activeSelf) { go.SetActive(flag); } GUILayout.BeginHorizontal(Array.Empty()); GUI.enabled = (Object)(object)go.transform.parent != (Object)null; if (GUILayout.Button("\ud83d\udd3a Go to Parent", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(22f) })) { selectedObject = ((Component)go.transform.parent).gameObject; isEditingColliderBounds = false; } GUI.enabled = go.transform.childCount > 0; if (GUILayout.Button("\ud83d\udd3b Go to First Child", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(22f) })) { selectedObject = ((Component)go.transform.GetChild(0)).gameObject; isEditingColliderBounds = false; } GUI.enabled = true; GUILayout.EndHorizontal(); GUILayout.Space(10f); GUILayout.Label("Transform Configuration", GUI.skin.box, Array.Empty()); Vector3 position = go.transform.position; Vector3 localEulerAngles = go.transform.localEulerAngles; Vector3 localScale = go.transform.localScale; bool flag2 = false; GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label("Pos", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(40f) }); string s = GUILayout.TextField(position.x.ToString("F3"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(100f) }); string s2 = GUILayout.TextField(position.y.ToString("F3"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(100f) }); string s3 = GUILayout.TextField(position.z.ToString("F3"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(100f) }); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label("Rot", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(40f) }); string s4 = GUILayout.TextField(localEulerAngles.x.ToString("F3"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(100f) }); string s5 = GUILayout.TextField(localEulerAngles.y.ToString("F3"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(100f) }); string s6 = GUILayout.TextField(localEulerAngles.z.ToString("F3"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(100f) }); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label("Scale", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(40f) }); string s7 = GUILayout.TextField(localScale.x.ToString("F3"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(100f) }); string s8 = GUILayout.TextField(localScale.y.ToString("F3"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(100f) }); string s9 = GUILayout.TextField(localScale.z.ToString("F3"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(100f) }); GUILayout.EndHorizontal(); Vector3 val = position; Vector3 val2 = localEulerAngles; Vector3 val3 = localScale; if (float.TryParse(s, out val.x) && float.TryParse(s2, out val.y) && float.TryParse(s3, out val.z) && val != position) { flag2 = true; } if (float.TryParse(s4, out val2.x) && float.TryParse(s5, out val2.y) && float.TryParse(s6, out val2.z) && val2 != localEulerAngles) { flag2 = true; } if (float.TryParse(s7, out val3.x) && float.TryParse(s8, out val3.y) && float.TryParse(s9, out val3.z) && val3 != localScale) { flag2 = true; } if (flag2) { RecordStateForUndo(go); go.transform.position = val; go.transform.localEulerAngles = val2; go.transform.localScale = val3; } Collider2D component = go.GetComponent(); if ((Object)(object)component != (Object)null) { GUILayout.Space(10f); GUILayout.BeginVertical(GUI.skin.box, Array.Empty()); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label("Interactive Collider Matrix: (" + ((object)component).GetType().Name + ")", Array.Empty()); GUI.backgroundColor = (isEditingColliderBounds ? Color.green : Color.gray); if (GUILayout.Button(isEditingColliderBounds ? "Stop Edit" : "Edit Collider Bounds", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(140f) })) { isEditingColliderBounds = !isEditingColliderBounds; activeDraggingHandleIndex = -1; } GUI.backgroundColor = Color.white; GUILayout.EndHorizontal(); Vector2 offset = component.offset; GUILayout.Label("Offset Bounds (X / Y):", Array.Empty()); GUILayout.BeginHorizontal(Array.Empty()); float.TryParse(GUILayout.TextField(offset.x.ToString("F3"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(120f) }), out offset.x); float.TryParse(GUILayout.TextField(offset.y.ToString("F3"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(120f) }), out offset.y); GUILayout.EndHorizontal(); if (offset != component.offset) { RecordStateForUndo(go); component.offset = offset; } BoxCollider2D val4 = (BoxCollider2D)(object)((component is BoxCollider2D) ? component : null); if (val4 != null) { Vector2 size = val4.size; GUILayout.Label("Box Shape Size Vector (Width / Height):", Array.Empty()); GUILayout.BeginHorizontal(Array.Empty()); float.TryParse(GUILayout.TextField(size.x.ToString("F3"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(120f) }), out size.x); float.TryParse(GUILayout.TextField(size.y.ToString("F3"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(120f) }), out size.y); GUILayout.EndHorizontal(); if (size != val4.size) { RecordStateForUndo(go); val4.size = size; } } else { CircleCollider2D val5 = (CircleCollider2D)(object)((component is CircleCollider2D) ? component : null); if (val5 != null) { float result = val5.radius; GUILayout.Label("Circle Radius Dimension:", Array.Empty()); float.TryParse(GUILayout.TextField(result.ToString("F3"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(120f) }), out result); if (!Mathf.Approximately(result, val5.radius)) { RecordStateForUndo(go); val5.radius = result; } } else { CapsuleCollider2D val6 = (CapsuleCollider2D)(object)((component is CapsuleCollider2D) ? component : null); if (val6 != null) { Vector2 size2 = val6.size; GUILayout.Label("Capsule Scale Envelope Matrix:", Array.Empty()); GUILayout.BeginHorizontal(Array.Empty()); float.TryParse(GUILayout.TextField(size2.x.ToString("F3"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(120f) }), out size2.x); float.TryParse(GUILayout.TextField(size2.y.ToString("F3"), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(120f) }), out size2.y); GUILayout.EndHorizontal(); if (size2 != val6.size) { RecordStateForUndo(go); val6.size = size2; } } else { PolygonCollider2D val7 = (PolygonCollider2D)(object)((component is PolygonCollider2D) ? component : null); if (val7 != null) { GUILayout.Label($"Polygon Vertices Side Count: {val7.points.Length} points", Array.Empty()); GUILayout.Label("Use 'Edit Collider Bounds' to shape corners smoothly in the scene.", Array.Empty()); } } } } GUILayout.EndVertical(); } Component[] components = go.GetComponents(); Component[] array = components; foreach (Component comp in array) { if ((Object)(object)comp == (Object)null || comp is Transform) { continue; } GUILayout.Space(5f); GUILayout.BeginVertical(GUI.skin.box, Array.Empty()); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label("Component: " + ((object)comp).GetType().Name + "", Array.Empty()); GUI.backgroundColor = Color.red; if (GUILayout.Button("✕ Destroy Module", (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(120f) })) { RecordStateForUndo(go); Object.DestroyImmediate((Object)(object)comp); GUILayout.EndHorizontal(); GUILayout.EndVertical(); break; } GUI.backgroundColor = Color.white; GUILayout.EndHorizontal(); PropertyInfo[] properties = ((object)comp).GetType().GetProperties(BindingFlags.Instance | BindingFlags.Public); PropertyInfo[] array2 = properties; foreach (PropertyInfo p in array2) { if (!p.CanRead || !p.CanWrite || p.GetIndexParameters().Length != 0 || p.Name == "name" || p.Name == "tag" || p.Name == "material" || p.Name == "materials") { continue; } object obj = null; try { obj = p.GetValue(comp, null); } catch { continue; } if (obj != null) { DrawReflectedField(p.Name, p.PropertyType, obj, delegate(object newVal) { RecordStateForUndo(go); p.SetValue(comp, newVal, null); }); } } GUILayout.EndVertical(); } GUILayout.Space(15f); GUILayout.BeginVertical(GUI.skin.box, Array.Empty()); GUILayout.Label("\ud83d\udce6 Add Level Component Module", Array.Empty()); string text = componentSearchString; componentSearchString = GUILayout.TextField(componentSearchString, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) }); if (componentSearchString != text) { UpdateFilteredComponents(componentSearchString); } if (filteredComponentTypes.Count > 0) { componentSearchScroll = GUILayout.BeginScrollView(componentSearchScroll, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.Height(110f), GUILayout.ExpandWidth(true) }); foreach (Type filteredComponentType in filteredComponentTypes) { if (GUILayout.Button(" Add " + filteredComponentType.Name + " (" + filteredComponentType.Namespace + ")", GUI.skin.button, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(22f) })) { RecordStateForUndo(go); go.AddComponent(filteredComponentType); componentSearchString = ""; filteredComponentTypes.Clear(); GUIUtility.keyboardControl = 0; break; } } GUILayout.EndScrollView(); } else if (!string.IsNullOrEmpty(componentSearchString)) { GUILayout.Label("No matching classes found within application scope assembly bins...", Array.Empty()); } GUILayout.EndVertical(); } private void DrawReflectedField(string name, Type type, object value, Action onValueUpdated) { GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label(name, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(140f) }); if (type == typeof(float)) { if (float.TryParse(GUILayout.TextField(value.ToString(), (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(120f) }), out var result)) { onValueUpdated(result); } } else if (type == typeof(bool)) { bool flag = GUILayout.Toggle((bool)value, "", Array.Empty()); if (flag != (bool)value) { onValueUpdated(flag); } } else if (type == typeof(string)) { string text = GUILayout.TextField((string)value, Array.Empty()); if (text != (string)value) { onValueUpdated(text); } } GUILayout.EndHorizontal(); } private void CreateOutlineMaterial() { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Expected O, but got Unknown Shader val = Shader.Find("Hidden/Internal-Colored"); if ((Object)(object)val != (Object)null) { outlineMaterial = new Material(val) { hideFlags = (HideFlags)61 }; outlineMaterial.SetInt("_SrcBlend", 5); outlineMaterial.SetInt("_DstBlend", 10); outlineMaterial.SetInt("_Cull", 0); outlineMaterial.SetInt("_ZWrite", 0); } } private void GeneratePrimitiveSpriteAsset() { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Expected O, but got Unknown //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) Texture2D val = new Texture2D(2, 2); for (int i = 0; i < 2; i++) { for (int j = 0; j < 2; j++) { val.SetPixel(j, i, Color.white); } } val.Apply(); whitePrimitivePixel = Sprite.Create(val, new Rect(0f, 0f, 2f, 2f), new Vector2(0.5f, 0.5f), 1f); } private void DrawSpriteWireframe(SpriteRenderer sr) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)outlineMaterial == (Object)null)) { outlineMaterial.SetPass(0); Bounds bounds = ((Renderer)sr).bounds; GL.PushMatrix(); GL.Begin(1); GL.Color(Color.cyan); Vector3 min = ((Bounds)(ref bounds)).min; Vector3 max = ((Bounds)(ref bounds)).max; GL.Vertex3(min.x, min.y, 0f); GL.Vertex3(max.x, min.y, 0f); GL.Vertex3(max.x, min.y, 0f); GL.Vertex3(max.x, max.y, 0f); GL.Vertex3(max.x, max.y, 0f); GL.Vertex3(min.x, max.y, 0f); GL.Vertex3(min.x, max.y, 0f); GL.Vertex3(min.x, min.y, 0f); GL.End(); GL.PopMatrix(); } } private void DrawUnityColliderOnScreenGuiOverlay(GameObject go) { //IL_020a: Unknown result type (might be due to invalid IL or missing references) //IL_020f: Unknown result type (might be due to invalid IL or missing references) //IL_0211: Unknown result type (might be due to invalid IL or missing references) //IL_0216: Unknown result type (might be due to invalid IL or missing references) //IL_022d: Unknown result type (might be due to invalid IL or missing references) //IL_0232: Unknown result type (might be due to invalid IL or missing references) //IL_024b: Unknown result type (might be due to invalid IL or missing references) //IL_0250: Unknown result type (might be due to invalid IL or missing references) //IL_0290: Unknown result type (might be due to invalid IL or missing references) //IL_0297: Unknown result type (might be due to invalid IL or missing references) //IL_02a5: Unknown result type (might be due to invalid IL or missing references) //IL_02ac: Unknown result type (might be due to invalid IL or missing references) //IL_02bf: Unknown result type (might be due to invalid IL or missing references) //IL_02c4: Unknown result type (might be due to invalid IL or missing references) //IL_02cb: Unknown result type (might be due to invalid IL or missing references) //IL_02d2: Unknown result type (might be due to invalid IL or missing references) //IL_02e0: Unknown result type (might be due to invalid IL or missing references) //IL_02e7: Unknown result type (might be due to invalid IL or missing references) //IL_02fa: Unknown result type (might be due to invalid IL or missing references) //IL_02ff: Unknown result type (might be due to invalid IL or missing references) //IL_0306: Unknown result type (might be due to invalid IL or missing references) //IL_030d: Unknown result type (might be due to invalid IL or missing references) //IL_031b: Unknown result type (might be due to invalid IL or missing references) //IL_0322: Unknown result type (might be due to invalid IL or missing references) //IL_0335: Unknown result type (might be due to invalid IL or missing references) //IL_033a: Unknown result type (might be due to invalid IL or missing references) //IL_0341: Unknown result type (might be due to invalid IL or missing references) //IL_0348: Unknown result type (might be due to invalid IL or missing references) //IL_0356: Unknown result type (might be due to invalid IL or missing references) //IL_035d: Unknown result type (might be due to invalid IL or missing references) //IL_0370: Unknown result type (might be due to invalid IL or missing references) //IL_0375: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_0579: Unknown result type (might be due to invalid IL or missing references) //IL_0394: Unknown result type (might be due to invalid IL or missing references) //IL_0399: Unknown result type (might be due to invalid IL or missing references) //IL_039e: Unknown result type (might be due to invalid IL or missing references) //IL_03a5: Unknown result type (might be due to invalid IL or missing references) //IL_03a7: Unknown result type (might be due to invalid IL or missing references) //IL_03ac: Unknown result type (might be due to invalid IL or missing references) //IL_03b2: Unknown result type (might be due to invalid IL or missing references) //IL_03bf: Unknown result type (might be due to invalid IL or missing references) //IL_03c7: Unknown result type (might be due to invalid IL or missing references) //IL_03cc: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01b9: Unknown result type (might be due to invalid IL or missing references) //IL_01d6: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_03ee: Unknown result type (might be due to invalid IL or missing references) //IL_03fb: Unknown result type (might be due to invalid IL or missing references) //IL_0400: Unknown result type (might be due to invalid IL or missing references) //IL_0426: Unknown result type (might be due to invalid IL or missing references) //IL_042d: Unknown result type (might be due to invalid IL or missing references) //IL_0434: Unknown result type (might be due to invalid IL or missing references) //IL_0447: Unknown result type (might be due to invalid IL or missing references) //IL_044c: Unknown result type (might be due to invalid IL or missing references) //IL_0453: Unknown result type (might be due to invalid IL or missing references) //IL_045a: Unknown result type (might be due to invalid IL or missing references) //IL_0468: Unknown result type (might be due to invalid IL or missing references) //IL_0474: Unknown result type (might be due to invalid IL or missing references) //IL_0479: Unknown result type (might be due to invalid IL or missing references) //IL_0480: Unknown result type (might be due to invalid IL or missing references) //IL_0487: Unknown result type (might be due to invalid IL or missing references) //IL_048e: Unknown result type (might be due to invalid IL or missing references) //IL_04a1: Unknown result type (might be due to invalid IL or missing references) //IL_04a6: Unknown result type (might be due to invalid IL or missing references) //IL_04ad: Unknown result type (might be due to invalid IL or missing references) //IL_04b4: Unknown result type (might be due to invalid IL or missing references) //IL_04c2: Unknown result type (might be due to invalid IL or missing references) //IL_04ce: Unknown result type (might be due to invalid IL or missing references) //IL_04d3: Unknown result type (might be due to invalid IL or missing references) //IL_04ed: Unknown result type (might be due to invalid IL or missing references) //IL_04f2: Unknown result type (might be due to invalid IL or missing references) //IL_04f7: Unknown result type (might be due to invalid IL or missing references) //IL_04fe: Unknown result type (might be due to invalid IL or missing references) //IL_0500: Unknown result type (might be due to invalid IL or missing references) //IL_0505: Unknown result type (might be due to invalid IL or missing references) //IL_0507: Unknown result type (might be due to invalid IL or missing references) //IL_051f: Unknown result type (might be due to invalid IL or missing references) //IL_0532: Unknown result type (might be due to invalid IL or missing references) //IL_054f: Unknown result type (might be due to invalid IL or missing references) //IL_0556: Unknown result type (might be due to invalid IL or missing references) Collider2D component = go.GetComponent(); if ((Object)(object)component == (Object)null || (Object)(object)Camera.main == (Object)null) { return; } Color val = default(Color); ((Color)(ref val))..ctor(0f, 1f, 0f, 0.95f); PolygonCollider2D val2 = (PolygonCollider2D)(object)((component is PolygonCollider2D) ? component : null); if (val2 != null) { Vector2[] points = val2.points; Vector3 val3 = default(Vector3); Vector3 val6 = default(Vector3); Rect val9 = default(Rect); for (int i = 0; i < points.Length; i++) { ((Vector3)(ref val3))..ctor(points[i].x + ((Collider2D)val2).offset.x, points[i].y + ((Collider2D)val2).offset.y, 0f); Vector3 val4 = go.transform.TransformPoint(val3); Vector3 val5 = Camera.main.WorldToScreenPoint(val4); if (!(val5.z < 0f)) { ((Vector3)(ref val6))..ctor(points[(i + 1) % points.Length].x + ((Collider2D)val2).offset.x, points[(i + 1) % points.Length].y + ((Collider2D)val2).offset.y, 0f); Vector3 val7 = go.transform.TransformPoint(val6); Vector3 val8 = Camera.main.WorldToScreenPoint(val7); if (val8.z >= 0f) { DrawOnScreenGuiLine(new Vector2(val5.x, (float)Screen.height - val5.y), new Vector2(val8.x, (float)Screen.height - val8.y), val, 2f); } ((Rect)(ref val9))..ctor(val5.x - 4f, (float)Screen.height - val5.y - 4f, 8f, 8f); GUI.backgroundColor = val; GUI.Box(val9, ""); } } } else { Vector2 offset = component.offset; Vector2 val10 = Vector2.one; BoxCollider2D val11 = (BoxCollider2D)(object)((component is BoxCollider2D) ? component : null); if (val11 != null) { val10 = val11.size; } else { CapsuleCollider2D val12 = (CapsuleCollider2D)(object)((component is CapsuleCollider2D) ? component : null); if (val12 != null) { val10 = val12.size; } else { CircleCollider2D val13 = (CircleCollider2D)(object)((component is CircleCollider2D) ? component : null); if (val13 != null) { ((Vector2)(ref val10))..ctor(val13.radius * 2f, val13.radius * 2f); } } } Vector3[] array = (Vector3[])(object)new Vector3[4] { new Vector3(offset.x - val10.x / 2f, offset.y - val10.y / 2f, 0f), new Vector3(offset.x + val10.x / 2f, offset.y - val10.y / 2f, 0f), new Vector3(offset.x + val10.x / 2f, offset.y + val10.y / 2f, 0f), new Vector3(offset.x - val10.x / 2f, offset.y + val10.y / 2f, 0f) }; Vector2[] array2 = (Vector2[])(object)new Vector2[4]; for (int j = 0; j < 4; j++) { Vector3 val14 = go.transform.TransformPoint(array[j]); Vector3 val15 = Camera.main.WorldToScreenPoint(val14); array2[j] = new Vector2(val15.x, (float)Screen.height - val15.y); } for (int k = 0; k < 4; k++) { DrawOnScreenGuiLine(array2[k], array2[(k + 1) % 4], val, 2f); } Vector3[] array3 = (Vector3[])(object)new Vector3[4] { new Vector3(offset.x, offset.y + val10.y / 2f, 0f), new Vector3(offset.x + val10.x / 2f, offset.y, 0f), new Vector3(offset.x, offset.y - val10.y / 2f, 0f), new Vector3(offset.x - val10.x / 2f, offset.y, 0f) }; Rect val18 = default(Rect); for (int l = 0; l < 4; l++) { Vector3 val16 = go.transform.TransformPoint(array3[l]); Vector3 val17 = Camera.main.WorldToScreenPoint(val16); if (!(val17.z < 0f)) { ((Rect)(ref val18))..ctor(val17.x - 4f, (float)Screen.height - val17.y - 4f, 8f, 8f); GUI.backgroundColor = val; GUI.Box(val18, ""); } } } GUI.backgroundColor = Color.white; } private void DrawOnScreenGuiLine(Vector2 p1, Vector2 p2, Color color, float width) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) Texture2D whiteTexture = Texture2D.whiteTexture; Vector2 val = p2 - p1; float num = Mathf.Atan2(val.y, val.x) * 57.29578f; GUIUtility.RotateAroundPivot(num, p1); GUI.color = color; GUI.DrawTexture(new Rect(p1.x, p1.y, ((Vector2)(ref val)).magnitude, width), (Texture)(object)whiteTexture); GUIUtility.RotateAroundPivot(0f - num, p1); GUI.color = Color.white; } private void ProcessColliderHandleDragLogic() { //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01c9: Unknown result type (might be due to invalid IL or missing references) //IL_01cb: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: Unknown result type (might be due to invalid IL or missing references) //IL_03b1: Unknown result type (might be due to invalid IL or missing references) //IL_03b3: Unknown result type (might be due to invalid IL or missing references) //IL_03b8: Unknown result type (might be due to invalid IL or missing references) //IL_03bd: Unknown result type (might be due to invalid IL or missing references) //IL_03ca: Unknown result type (might be due to invalid IL or missing references) //IL_03cc: Unknown result type (might be due to invalid IL or missing references) //IL_03d1: Unknown result type (might be due to invalid IL or missing references) //IL_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_01ec: Unknown result type (might be due to invalid IL or missing references) //IL_0441: Unknown result type (might be due to invalid IL or missing references) //IL_0446: Unknown result type (might be due to invalid IL or missing references) //IL_0449: Unknown result type (might be due to invalid IL or missing references) //IL_044e: Unknown result type (might be due to invalid IL or missing references) //IL_0205: Unknown result type (might be due to invalid IL or missing references) //IL_020a: Unknown result type (might be due to invalid IL or missing references) //IL_024a: Unknown result type (might be due to invalid IL or missing references) //IL_0251: Unknown result type (might be due to invalid IL or missing references) //IL_0258: Unknown result type (might be due to invalid IL or missing references) //IL_026b: Unknown result type (might be due to invalid IL or missing references) //IL_0270: Unknown result type (might be due to invalid IL or missing references) //IL_0277: Unknown result type (might be due to invalid IL or missing references) //IL_027e: Unknown result type (might be due to invalid IL or missing references) //IL_028c: Unknown result type (might be due to invalid IL or missing references) //IL_0298: Unknown result type (might be due to invalid IL or missing references) //IL_029d: Unknown result type (might be due to invalid IL or missing references) //IL_02a4: Unknown result type (might be due to invalid IL or missing references) //IL_02ab: Unknown result type (might be due to invalid IL or missing references) //IL_02b2: Unknown result type (might be due to invalid IL or missing references) //IL_02c5: Unknown result type (might be due to invalid IL or missing references) //IL_02ca: Unknown result type (might be due to invalid IL or missing references) //IL_02d1: Unknown result type (might be due to invalid IL or missing references) //IL_02d8: Unknown result type (might be due to invalid IL or missing references) //IL_02e6: Unknown result type (might be due to invalid IL or missing references) //IL_02f2: Unknown result type (might be due to invalid IL or missing references) //IL_02f7: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_048a: Unknown result type (might be due to invalid IL or missing references) //IL_04a9: Unknown result type (might be due to invalid IL or missing references) //IL_04df: Unknown result type (might be due to invalid IL or missing references) //IL_04fe: Unknown result type (might be due to invalid IL or missing references) //IL_0534: Unknown result type (might be due to invalid IL or missing references) //IL_0553: Unknown result type (might be due to invalid IL or missing references) //IL_0586: Unknown result type (might be due to invalid IL or missing references) //IL_05a5: Unknown result type (might be due to invalid IL or missing references) //IL_040c: Unknown result type (might be due to invalid IL or missing references) //IL_0411: Unknown result type (might be due to invalid IL or missing references) //IL_0418: Unknown result type (might be due to invalid IL or missing references) //IL_041f: Unknown result type (might be due to invalid IL or missing references) //IL_0424: Unknown result type (might be due to invalid IL or missing references) //IL_0429: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Unknown result type (might be due to invalid IL or missing references) //IL_05c7: Unknown result type (might be due to invalid IL or missing references) //IL_0313: Unknown result type (might be due to invalid IL or missing references) //IL_0318: Unknown result type (might be due to invalid IL or missing references) //IL_031d: Unknown result type (might be due to invalid IL or missing references) //IL_031f: Unknown result type (might be due to invalid IL or missing references) //IL_0320: Unknown result type (might be due to invalid IL or missing references) //IL_0325: Unknown result type (might be due to invalid IL or missing references) //IL_0327: Unknown result type (might be due to invalid IL or missing references) //IL_05e4: Unknown result type (might be due to invalid IL or missing references) //IL_0356: Unknown result type (might be due to invalid IL or missing references) //IL_035b: Unknown result type (might be due to invalid IL or missing references) //IL_0361: Unknown result type (might be due to invalid IL or missing references) //IL_0363: Unknown result type (might be due to invalid IL or missing references) //IL_0369: Unknown result type (might be due to invalid IL or missing references) //IL_036a: Unknown result type (might be due to invalid IL or missing references) //IL_0603: Unknown result type (might be due to invalid IL or missing references) //IL_0627: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)selectedObject == (Object)null || (Object)(object)Camera.main == (Object)null) { return; } Collider2D component = selectedObject.GetComponent(); if ((Object)(object)component == (Object)null) { return; } Vector3 mousePosition = Input.mousePosition; Vector3 val = Camera.main.ScreenToWorldPoint(new Vector3(mousePosition.x, mousePosition.y, Mathf.Abs(((Component)Camera.main).transform.position.z))); if (Input.GetMouseButtonDown(0)) { if (((Rect)(ref windowRect)).Contains(new Vector2(mousePosition.x, (float)Screen.height - mousePosition.y))) { return; } float num = 0.4f * (Camera.main.orthographicSize / 5f); PolygonCollider2D val2 = (PolygonCollider2D)(object)((component is PolygonCollider2D) ? component : null); if (val2 != null) { Vector2[] points = val2.points; Vector3 val3 = default(Vector3); for (int i = 0; i < points.Length; i++) { ((Vector3)(ref val3))..ctor(points[i].x + ((Collider2D)val2).offset.x, points[i].y + ((Collider2D)val2).offset.y, 0f); Vector3 val4 = selectedObject.transform.TransformPoint(val3); if (Vector2.Distance(Vector2.op_Implicit(val), Vector2.op_Implicit(val4)) <= num) { RecordStateForUndo(selectedObject); activeDraggingHandleIndex = i; polyDragStartVertexValue = points[i]; mouseDragWorldStartPos = val; break; } } return; } Vector2 offset = component.offset; Vector2 val5 = Vector2.one; BoxCollider2D val6 = (BoxCollider2D)(object)((component is BoxCollider2D) ? component : null); if (val6 != null) { val5 = val6.size; } else { CapsuleCollider2D val7 = (CapsuleCollider2D)(object)((component is CapsuleCollider2D) ? component : null); if (val7 != null) { val5 = val7.size; } else { CircleCollider2D val8 = (CircleCollider2D)(object)((component is CircleCollider2D) ? component : null); if (val8 != null) { ((Vector2)(ref val5))..ctor(val8.radius * 2f, val8.radius * 2f); } } } Vector3[] array = (Vector3[])(object)new Vector3[4] { new Vector3(offset.x, offset.y + val5.y / 2f, 0f), new Vector3(offset.x + val5.x / 2f, offset.y, 0f), new Vector3(offset.x, offset.y - val5.y / 2f, 0f), new Vector3(offset.x - val5.x / 2f, offset.y, 0f) }; for (int j = 0; j < 4; j++) { Vector3 val9 = selectedObject.transform.TransformPoint(array[j]); if (Vector2.Distance(Vector2.op_Implicit(val), Vector2.op_Implicit(val9)) <= num) { RecordStateForUndo(selectedObject); activeDraggingHandleIndex = j; colliderDragStartOffset = component.offset; colliderDragStartSize = val5; mouseDragWorldStartPos = val; break; } } } else if (Input.GetMouseButton(0) && activeDraggingHandleIndex != -1) { Vector3 val10 = val - mouseDragWorldStartPos; Vector3 val11 = selectedObject.transform.InverseTransformDirection(val10); PolygonCollider2D val12 = (PolygonCollider2D)(object)((component is PolygonCollider2D) ? component : null); if (val12 != null) { Vector2[] points2 = val12.points; if (activeDraggingHandleIndex < points2.Length) { points2[activeDraggingHandleIndex] = polyDragStartVertexValue + new Vector2(val11.x, val11.y); val12.points = points2; } return; } Vector2 offset2 = colliderDragStartOffset; Vector2 val13 = colliderDragStartSize; switch (activeDraggingHandleIndex) { case 0: val13.y = Mathf.Max(0.05f, colliderDragStartSize.y + val11.y); offset2.y = colliderDragStartOffset.y + (val13.y - colliderDragStartSize.y) / 2f; break; case 1: val13.x = Mathf.Max(0.05f, colliderDragStartSize.x + val11.x); offset2.x = colliderDragStartOffset.x + (val13.x - colliderDragStartSize.x) / 2f; break; case 2: val13.y = Mathf.Max(0.05f, colliderDragStartSize.y - val11.y); offset2.y = colliderDragStartOffset.y - (val13.y - colliderDragStartSize.y) / 2f; break; case 3: val13.x = Mathf.Max(0.05f, colliderDragStartSize.x - val11.x); offset2.x = colliderDragStartOffset.x + (val13.x - colliderDragStartSize.x) / 2f; break; } component.offset = offset2; BoxCollider2D val14 = (BoxCollider2D)(object)((component is BoxCollider2D) ? component : null); if (val14 != null) { val14.size = val13; return; } CapsuleCollider2D val15 = (CapsuleCollider2D)(object)((component is CapsuleCollider2D) ? component : null); if (val15 != null) { val15.size = val13; return; } CircleCollider2D val16 = (CircleCollider2D)(object)((component is CircleCollider2D) ? component : null); if (val16 != null) { val16.radius = Mathf.Max(0.02f, val13.x / 2f); } } else if (Input.GetMouseButtonUp(0)) { activeDraggingHandleIndex = -1; } } private void RefreshAllAssetCaches() { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) spawnablePrefabs.Clear(); GameObject[] array = Resources.FindObjectsOfTypeAll(); foreach (GameObject val in array) { Scene scene = val.scene; if (!((Scene)(ref scene)).IsValid() && !spawnablePrefabs.Contains(val)) { spawnablePrefabs.Add(val); } } loadedMaterials.Clear(); Material[] array2 = Resources.FindObjectsOfTypeAll(); foreach (Material val2 in array2) { if (!string.IsNullOrEmpty(((Object)val2).name) && !loadedMaterials.Contains(val2)) { loadedMaterials.Add(val2); } } loadedMeshes.Clear(); Mesh[] array3 = Resources.FindObjectsOfTypeAll(); foreach (Mesh item in array3) { if (!loadedMeshes.Contains(item)) { loadedMeshes.Add(item); } } } }