コード例 #1
0
        private void DrawInspector(InspectorType inspectorType, IAttributeTable configuration, InspectorTypeTable inspectorTypeTable, IBlueprintManager blueprintManager)
        {
            foreach (var inspectorProperty in inspectorType.Properties)
            {
                // Get current value.
                object currentValue = configuration.GetValueOrDefault(inspectorProperty.Name, inspectorProperty.Default);
                object newValue     = EditorGUIUtils.LogicInspectorPropertyField(inspectorProperty, currentValue, inspectorTypeTable, blueprintManager);

                // Set new value if changed.
                if (!Equals(newValue, currentValue))
                {
                    configuration.SetValue(inspectorProperty.Name, newValue);
                }
            }
        }