Пример #1
0
    public override void OnInspectorGUI()
    {
        Limiter limits = target as Limiter;

        if (!limits.GetComponent <Aimer>())
        {
            EditorGUILayout.HelpBox("Warning: Requries Aimer Component", MessageType.Warning);
            if (GUILayout.Button("Press to add an Aimer component"))
            {
                limits.gameObject.AddComponent <Aimer>();
            }
        }

        m_minRange.Enabled = limits.m_limitRange;
        m_maxRange.Enabled = limits.m_limitRange;

        m_turnSpeed.Enabled = limits.m_limitTurnSpeed;

        StoreOriginalAngles(limits);

        m_editHelp.EditProperties(limits);

        LimitAngles(limits);
    }