docs.unity.cn
    Show / Hide Table of Contents

    Class DefaultControl

    Represents the default implementation of a control.

    Inheritance
    Object
    Control
    DefaultControl
    GenericDefaultControl
    Inherited Members
    Control.name
    Control.ID
    Control.actionID
    Control.layoutData
    Control.hotLayoutData
    Control.GetControl(IGUIState)
    Control.BeginLayout(IGUIState)
    Control.Layout(IGUIState)
    Control.EndLayout(IGUIState)
    Control.Repaint(IGUIState)
    Control.OnEndLayout(IGUIState)
    Control.OnRepaint(IGUIState, Int32)
    Control.GetCount()
    Control.GetPosition(IGUIState, Int32)
    Control.GetForward(IGUIState, Int32)
    Control.GetUp(IGUIState, Int32)
    Control.GetRight(IGUIState, Int32)
    Control.GetDistance(IGUIState, Int32)
    Control.GetUserData(IGUIState, Int32)
    Namespace: UnityEditor.U2D.Path.GUIFramework
    Syntax
    public abstract class DefaultControl : Control

    Constructors

    DefaultControl(String)

    Initializes and returns an instance of DefaultControl

    Declaration
    public DefaultControl(string name)
    Parameters
    Type Name Description
    String name

    The name of the default control.

    Fields

    kPickDistance

    Default kPickDistance == 5.0f

    Declaration
    public static readonly float kPickDistance
    Field Value
    Type Description
    Single

    Methods

    OnBeginLayout(LayoutData, IGUIState)

    Overrides the Control.OnBeginLayout function.

    Declaration
    protected override LayoutData OnBeginLayout(LayoutData data, IGUIState guiState)
    Parameters
    Type Name Description
    LayoutData data

    The layout data.

    IGUIState guiState

    The current state of the custom editor.

    Returns
    Type Description
    LayoutData

    Returns the modified layout data.

    Overrides
    Control.OnBeginLayout(LayoutData, IGUIState)
    Remarks

    Sets the LayoutData.distance to DefaultControl.kPickDistance.

    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023