Search Issue Tracker
Fixed in 2019.3.X
Votes
11
Found in
2018.3.0b5
Issue ID
1090438
Regression
No
Edit Collider needs to be clicked every time after making any small change to the collider when editing in the Prefab mode
How to reproduce:
1. Open the attached project
2. Double click a prefab "Object" in the Project window to enter the Prefab mode
3. Go to Inspector window -> Polygon Collider 2D -> select Edit Collider
4. Edit collider in the Scene view
Expected: Edit Collider selection allows multiple changes to the collider
Actual: Edit Collider needs to be clicked every time after making any small change to the collider
Reproduced on: 2018.2.0x-Improved Prefabs, 2018.3.0b6, 2019.1.0a5
Note: Couldn't test on earlier versions because the feature was introduced in 2018.3
Comments (11)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- "Shader warning in 'Hidden/Light2D': implicit truncation of vector type" is thrown when building Universal 2D template
- AI Assistant breaks compilation of packages using System.Runtime.CompilerServices.Unsafe via auto-referencing
- Unity Hub checks the "Documentation" module by default on the 6.4 and 6.5 streams despite that it was unchecked with the previous installs
- Shortcut that toggles between Dopesheet and Curves Views in the Animation Window's Timeline is mislabed
- Property List Items Overlap onto the Property List's top edge when scrolling through a long Property List
NecroJack
Apr 02, 2019 13:10
I guess you do know the workaround, but anyways: editing an GameObject's collider in the scene, will not quit "Edit Collider" mode.
Also, I composed a plugin/Script for working in Prefab Editor, (works by hitting Shift+E on every change... xD .. better than nothing!), with some code I found in stack-overflow :
----------------------------------
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
public class MenuItems
{
[MenuItem("BugFixes/Edit Collider Mode #_e")] // This is Shift + e
private static void EditCollider()
{
var sel = Selection.activeGameObject; if(!sel) return;
var col = sel.GetComponent<Collider2D>(); if (!col) return;
if (UnityEditorInternal.EditMode.editMode == UnityEditorInternal.EditMode.SceneViewEditMode.Collider)
UnityEditorInternal.EditMode.ChangeEditMode(UnityEditorInternal.EditMode.SceneViewEditMode.None, new Bounds(), null);
else
{
System.Type colliderEditorBase = System.Type.GetType("UnityEditor.ColliderEditorBase,UnityEditor.dll");
Editor[] colliderEditors = Resources.FindObjectsOfTypeAll(colliderEditorBase) as Editor[];
if (colliderEditors == null || colliderEditors.Length <= 0) return;
UnityEditorInternal.EditMode.ChangeEditMode(UnityEditorInternal.EditMode.SceneViewEditMode.Collider, col.bounds, colliderEditors[0]);
}
Debug.Log("EditMode: " + UnityEditorInternal.EditMode.editMode);
}
}
----------------------------------
The link from which I found most of the code (ready) is this one:
https://forum.unity.com/threads/creating-a-hotkey-to-get-into-edit-collider-mode.474706/
So, most credits go to him.
P.S.: "Place in a folder called 'Editor' in order to work as a plugin", that's what I did, and it worked.