Files
YachtDice/Assets/Plugins/AllIn13DShader/Editor/Drawers/GlobalPropertiesDrawer.cs
T
2026-02-23 22:01:07 +07:00

42 lines
1.1 KiB
C#

using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
namespace AllIn13DShader
{
public class GlobalPropertiesDrawer
{
private List<int> globalPropertiesIndices;
private AllIn13DShaderInspectorReferences references;
public GlobalPropertiesDrawer()
{
}
public void Draw(List<int> globalPropertiesIndices, AllIn13DShaderInspectorReferences references)
{
this.globalPropertiesIndices = globalPropertiesIndices;
this.references = references;
GUILayout.Label("Global Properties", references.bigLabelStyle);
EditorGUILayout.BeginVertical(references.propertiesStyle);
for (int i = 0; i < globalPropertiesIndices.Count; i++)
{
MaterialProperty matProperty = references.matProperties[globalPropertiesIndices[i]];
EffectPropertyDrawer.DrawProperty(
materialProperty: matProperty,
labelPrefix: string.Empty,
displayName: matProperty.displayName,
customValue: string.Empty,
allowReset: true,
isKeywordProperty: false,
propertyType: EffectProperty.PropertyType.BASIC,
references: references);
}
EditorGUILayout.EndVertical();
}
}
}