コード例 #1
0
    public override void OnInspectorGUI()
    {
        AudioAnalysis data = (AudioAnalysis)target;

        base.OnInspectorGUI();
        // Background

        if (RequiresConstantRepaint())
        {
            EditorGUILayout.Space();
            var rect = GUILayoutUtility.GetRect(128, 128);
            DrawRect(0, 0, 1, 1, rect, Styles.Background);
            for (int i = 0; i < 8; i++)
            {
                Color c = Color.Lerp(Styles.Green2, Styles.Red, data.audioBand[i]);
                DrawRect(i / 8.0f, 1 - data.audioBand[i], (i + 1) / 8.0f, 1, rect, c);
                c = Color.Lerp(Styles.Green2, Styles.Red, 1 - data.audioBand[i]);
                DrawRect(i / 8.0f, 1 - data.audioBandBuffer[i], (i + 1) / 8.0f, 1 - data.audioBandBuffer[i] + .05f, rect, c);
            }
        }

        // Property binders
        if (targets.Length == 1)
        {
            _propertyBinderEditor.ShowGUI();
        }
    }
    public override void OnInspectorGUI()
    {
        RealtimeVector3Sync data = (RealtimeVector3Sync)target;

        base.OnInspectorGUI();
        GUILayout.Label("Local Vector3 Value: " + data.localVector3Value);
        if (targets.Length == 1)
        {
            _vector3PropertyBinderEditor.ShowGUI();
        }
    }
コード例 #3
0
    public override void OnInspectorGUI()
    {
        RealtimeColorSync data = (RealtimeColorSync)target;

        base.OnInspectorGUI();
        GUILayout.Label("Color Value is: " + data.localColorValue);

        if (targets.Length == 1)
        {
            _propertyBinderEditor.ShowGUI();
        }
    }
コード例 #4
0
        public override void OnInspectorGUI()
        {
            serializedObject.Update();

            EditorGUILayout.PropertyField(_inputMin);
            EditorGUILayout.PropertyField(_inputMax);

            serializedObject.ApplyModifiedProperties();

            // Property binders
            if (targets.Length == 1)
            {
                _propertyBinderEditor.ShowGUI();
            }
        }