浏览代码

Add ref keyword (fix)

/main
Matt Dean 7 年前
当前提交
88372b5f
共有 17 个文件被更改,包括 24 次插入20 次删除
  1. 2
      com.unity.shadergraph/Editor/Data/Graphs/BooleanMaterialSlot.cs
  2. 2
      com.unity.shadergraph/Editor/Data/Graphs/ColorMaterialSlot.cs
  3. 2
      com.unity.shadergraph/Editor/Data/Graphs/ColorRGBMaterialSlot.cs
  4. 2
      com.unity.shadergraph/Editor/Data/Graphs/CubemapInputMaterialSlot.cs
  5. 2
      com.unity.shadergraph/Editor/Data/Graphs/DynamicValueMaterialSlot.cs
  6. 2
      com.unity.shadergraph/Editor/Data/Graphs/DynamicVectorMaterialSlot.cs
  7. 2
      com.unity.shadergraph/Editor/Data/Graphs/GradientInputMaterialSlot.cs
  8. 2
      com.unity.shadergraph/Editor/Data/Graphs/MaterialSlot.cs
  9. 2
      com.unity.shadergraph/Editor/Data/Graphs/Matrix2MaterialSlot.cs
  10. 2
      com.unity.shadergraph/Editor/Data/Graphs/Matrix3MaterialSlot.cs
  11. 2
      com.unity.shadergraph/Editor/Data/Graphs/Matrix4MaterialSlot.cs
  12. 2
      com.unity.shadergraph/Editor/Data/Graphs/Texture2DInputMaterialSlot.cs
  13. 2
      com.unity.shadergraph/Editor/Data/Graphs/Vector1MaterialSlot.cs
  14. 2
      com.unity.shadergraph/Editor/Data/Graphs/Vector2MaterialSlot.cs
  15. 2
      com.unity.shadergraph/Editor/Data/Graphs/Vector3MaterialSlot.cs
  16. 2
      com.unity.shadergraph/Editor/Data/Graphs/Vector4MaterialSlot.cs
  17. 12
      com.unity.shadergraph/Editor/Data/Nodes/AbstractMaterialNode.cs

2
com.unity.shadergraph/Editor/Data/Graphs/BooleanMaterialSlot.cs


public override SlotValueType valueType { get { return SlotValueType.Boolean; } }
public override ConcreteSlotValueType concreteValueType { get { return ConcreteSlotValueType.Boolean; } }
public override void GetPreviewProperties(List<PreviewProperty> properties, string name)
public override void GetPreviewProperties(ref List<PreviewProperty> properties, string name)
{
var pp = new PreviewProperty(PropertyType.Boolean)
{

2
com.unity.shadergraph/Editor/Data/Graphs/ColorMaterialSlot.cs


properties.AddShaderProperty(property);
}
public override void GetPreviewProperties(List<PreviewProperty> properties, string name)
public override void GetPreviewProperties(ref List<PreviewProperty> properties, string name)
{
var pp = new PreviewProperty(PropertyType.Color)
{

2
com.unity.shadergraph/Editor/Data/Graphs/ColorRGBMaterialSlot.cs


properties.AddShaderProperty(property);
}
public override void GetPreviewProperties(List<PreviewProperty> properties, string name)
public override void GetPreviewProperties(ref List<PreviewProperty> properties, string name)
{
var pp = new PreviewProperty(PropertyType.Color)
{

2
com.unity.shadergraph/Editor/Data/Graphs/CubemapInputMaterialSlot.cs


properties.AddShaderProperty(prop);
}
public override void GetPreviewProperties(List<PreviewProperty> properties, string name)
public override void GetPreviewProperties(ref List<PreviewProperty> properties, string name)
{
var pp = new PreviewProperty(PropertyType.Cubemap)
{

2
com.unity.shadergraph/Editor/Data/Graphs/DynamicValueMaterialSlot.cs


m_ConcreteValueType = valueType;
}
public override void GetPreviewProperties(List<PreviewProperty> properties, string name)
public override void GetPreviewProperties(ref List<PreviewProperty> properties, string name)
{
var propType = ConvertConcreteSlotValueTypeToPropertyType(concreteValueType);
var pp = new PreviewProperty(propType) { name = name };

2
com.unity.shadergraph/Editor/Data/Graphs/DynamicVectorMaterialSlot.cs


m_ConcreteValueType = valueType;
}
public virtual void GetPreviewProperties(List<PreviewProperty> properties, string name)
public override void GetPreviewProperties(ref List<PreviewProperty> properties, string name)
{
var propType = ConvertConcreteSlotValueTypeToPropertyType(concreteValueType);
var pp = new PreviewProperty(propType) { name = name };

2
com.unity.shadergraph/Editor/Data/Graphs/GradientInputMaterialSlot.cs


properties.AddShaderProperty(prop);
}
public override void GetPreviewProperties(List<PreviewProperty> properties, string name)
public override void GetPreviewProperties(ref List<PreviewProperty> properties, string name)
{
properties.Add(new PreviewProperty(PropertyType.Vector1)
{

2
com.unity.shadergraph/Editor/Data/Graphs/MaterialSlot.cs


}
}
public virtual void GetPreviewProperties(List<PreviewProperty> properties, string name)
public virtual void GetPreviewProperties(ref List<PreviewProperty> properties, string name)
{
properties.Add(default(PreviewProperty));
}

2
com.unity.shadergraph/Editor/Data/Graphs/Matrix2MaterialSlot.cs


properties.AddShaderProperty(property);
}
public override void GetPreviewProperties(List<PreviewProperty> properties, string name)
public override void GetPreviewProperties(ref List<PreviewProperty> properties, string name)
{
var pp = new PreviewProperty(PropertyType.Matrix2)
{

2
com.unity.shadergraph/Editor/Data/Graphs/Matrix3MaterialSlot.cs


properties.AddShaderProperty(property);
}
public override void GetPreviewProperties(List<PreviewProperty> properties, string name)
public override void GetPreviewProperties(ref List<PreviewProperty> properties, string name)
{
var pp = new PreviewProperty(PropertyType.Matrix3)
{

2
com.unity.shadergraph/Editor/Data/Graphs/Matrix4MaterialSlot.cs


properties.AddShaderProperty(property);
}
public override void GetPreviewProperties(List<PreviewProperty> properties, string name)
public override void GetPreviewProperties(ref List<PreviewProperty> properties, string name)
{
var pp = new PreviewProperty(PropertyType.Matrix4)
{

2
com.unity.shadergraph/Editor/Data/Graphs/Texture2DInputMaterialSlot.cs


properties.AddShaderProperty(prop);
}
public override void GetPreviewProperties(List<PreviewProperty> properties, string name)
public override void GetPreviewProperties(ref List<PreviewProperty> properties, string name)
{
var pp = new PreviewProperty(PropertyType.Texture)
{

2
com.unity.shadergraph/Editor/Data/Graphs/Vector1MaterialSlot.cs


public override SlotValueType valueType { get { return SlotValueType.Vector1; } }
public override ConcreteSlotValueType concreteValueType { get { return ConcreteSlotValueType.Vector1; } }
public override void GetPreviewProperties(List<PreviewProperty> properties, string name)
public override void GetPreviewProperties(ref List<PreviewProperty> properties, string name)
{
var pp = new PreviewProperty(PropertyType.Vector1)
{

2
com.unity.shadergraph/Editor/Data/Graphs/Vector2MaterialSlot.cs


properties.AddShaderProperty(property);
}
public override void GetPreviewProperties(List<PreviewProperty> properties, string name)
public override void GetPreviewProperties(ref List<PreviewProperty> properties, string name)
{
var pp = new PreviewProperty(PropertyType.Vector2)
{

2
com.unity.shadergraph/Editor/Data/Graphs/Vector3MaterialSlot.cs


properties.AddShaderProperty(property);
}
public override void GetPreviewProperties(List<PreviewProperty> properties, string name)
public override void GetPreviewProperties(ref List<PreviewProperty> properties, string name)
{
var pp = new PreviewProperty(PropertyType.Vector3)
{

2
com.unity.shadergraph/Editor/Data/Graphs/Vector4MaterialSlot.cs


properties.AddShaderProperty(property);
}
public override void GetPreviewProperties(List<PreviewProperty> properties, string name)
public override void GetPreviewProperties(ref List<PreviewProperty> properties, string name)
{
var pp = new PreviewProperty(PropertyType.Vector4)
{

12
com.unity.shadergraph/Editor/Data/Nodes/AbstractMaterialNode.cs


{
protected static List<MaterialSlot> s_TempSlots = new List<MaterialSlot>();
protected static List<IEdge> s_TempEdges = new List<IEdge>();
protected static List<PreviewProperty> s_TempPreviewProperties = new List<PreviewProperty>();
public enum OutputPrecision
{

GetInputSlots(s_TempSlots);
foreach (var s in s_TempSlots)
{
s_TempPreviewProperties.Clear();
s.GetPreviewProperties(properties, GetVariableNameForSlot(s.id));
for(int i = 0; i < properties.Count; i++)
s.GetPreviewProperties(ref s_TempPreviewProperties, GetVariableNameForSlot(s.id));
for(int i = 0; i < s_TempPreviewProperties.Count; i++)
if (properties[i].name == null)
properties.Remove(properties[i]);
if (s_TempPreviewProperties[i].name == null)
continue;
properties.Add(s_TempPreviewProperties[i]);
}
}
}

正在加载...
取消
保存