Exemple #1
0
        static void EnterEditModePivotPreservingUV(ShortcutArguments args)
        {
            //If editor is not there, then the selected GameObject does not contains a DecalProjector
            DecalProjector activeDecalProjector = Selection.activeGameObject?.GetComponent <DecalProjector>();

            if (activeDecalProjector == null || activeDecalProjector.Equals(null))
            {
                return;
            }

            ChangeEditMode(k_EditUVAndPivot, GetBoundsGetter(activeDecalProjector)(), FindEditorFromSelection());
        }
        static void ExitEditMode(ShortcutArguments args)
        {
            //If editor is not there, then the selected GameObject does not contains a DecalProjector
            DecalProjector activeDecalProjector = Selection.activeGameObject?.GetComponent <DecalProjector>();

            if (activeDecalProjector == null || activeDecalProjector.Equals(null))
            {
                return;
            }

            QuitEditMode();
        }