InitFromOutline() public method

public InitFromOutline ( float detail, float alphaTolerance, bool holeDetection, float tessellation, string undoName ) : void
detail float
alphaTolerance float
holeDetection bool
tessellation float
undoName string
return void
Beispiel #1
0
        protected override void DoWindow(int windowId)
        {
            EditorGUIUtility.labelWidth = 85f;
            EditorGUIUtility.fieldWidth = 32f;

            detail       = EditorGUILayout.Slider("Outline detail", detail, 0f, 1f);
            alpha        = EditorGUILayout.Slider("Alpha cutout", alpha, 0f, 1f);
            tessellation = EditorGUILayout.Slider("Tessellation", tessellation, 0f, 1f);
            holes        = EditorGUILayout.Toggle("Detect holes", holes);

            EditorGUILayout.BeginHorizontal();

            GUILayout.FlexibleSpace();

            if (GUILayout.Button("Apply", GUILayout.Width(70f)))
            {
                if (spriteMeshCache)
                {
                    spriteMeshCache.InitFromOutline(detail, alpha, holes, tessellation, "set outline");
                }
            }

            GUILayout.FlexibleSpace();

            EditorGUILayout.EndHorizontal();
        }