Matt Dean
7 年前
当前提交
42b09806
共有 51 个文件被更改,包括 1287 次插入 和 8 次删除
-
22ShaderGraph/com.unity.shadergraph/Editor/Data/Graphs/MaterialSlot.cs
-
6ShaderGraph/com.unity.shadergraph/Editor/Data/Graphs/PreviewProperty.cs
-
2ShaderGraph/com.unity.shadergraph/Editor/Data/Graphs/TextureShaderProperty.cs
-
4ShaderGraph/com.unity.shadergraph/Editor/Data/Implementation/NodeUtils.cs
-
14ShaderGraph/com.unity.shadergraph/Editor/Data/Nodes/CodeFunctionNode.cs
-
15ShaderGraph/com.unity.shadergraph/Editor/Data/Nodes/Input/PropertyNode.cs
-
2ShaderGraph/com.unity.shadergraph/Editor/Data/Nodes/PropertyType.cs
-
6ShaderGraph/com.unity.shadergraph/Editor/Data/Nodes/SlotValue.cs
-
26ShaderGraph/com.unity.shadergraph/Editor/Data/Nodes/Utility/SubGraphNode.cs
-
28ShaderGraph/com.unity.shadergraph/Editor/Data/Util/PropertyCollector.cs
-
22ShaderGraph/com.unity.shadergraph/Editor/Drawing/Blackboard/BlackboardFieldPropertyView.cs
-
4ShaderGraph/com.unity.shadergraph/Editor/Drawing/Blackboard/BlackboardProvider.cs
-
4ShaderGraph/com.unity.shadergraph/Editor/Drawing/Controls/DefaultControl.cs
-
32ShaderGraph/com.unity.shadergraph/Editor/Drawing/Manipulators/GraphDropTarget.cs
-
6ShaderGraph/com.unity.shadergraph/Editor/Drawing/MaterialGraphEditWindow.cs
-
6ShaderGraph/com.unity.shadergraph/Editor/Resources/Styles/PortInputView.uss
-
10ShaderGraph/com.unity.shadergraph/Editor/Resources/Styles/ShaderPort.uss
-
53ShaderGraph/com.unity.shadergraph/Editor/Data/Graphs/SerializableTextureArray.cs
-
3ShaderGraph/com.unity.shadergraph/Editor/Data/Graphs/SerializableTextureArray.cs.meta
-
79ShaderGraph/com.unity.shadergraph/Editor/Data/Graphs/Texture2DArrayInputMaterialSlot.cs
-
3ShaderGraph/com.unity.shadergraph/Editor/Data/Graphs/Texture2DArrayInputMaterialSlot.cs.meta
-
31ShaderGraph/com.unity.shadergraph/Editor/Data/Graphs/Texture2DArrayMaterialSlot.cs
-
11ShaderGraph/com.unity.shadergraph/Editor/Data/Graphs/Texture2DArrayMaterialSlot.cs.meta
-
84ShaderGraph/com.unity.shadergraph/Editor/Data/Graphs/Texture2DArrayShaderProperty.cs
-
3ShaderGraph/com.unity.shadergraph/Editor/Data/Graphs/Texture2DArrayShaderProperty.cs.meta
-
79ShaderGraph/com.unity.shadergraph/Editor/Data/Graphs/Texture3DInputMaterialSlot.cs
-
3ShaderGraph/com.unity.shadergraph/Editor/Data/Graphs/Texture3DInputMaterialSlot.cs.meta
-
31ShaderGraph/com.unity.shadergraph/Editor/Data/Graphs/Texture3DMaterialSlot.cs
-
11ShaderGraph/com.unity.shadergraph/Editor/Data/Graphs/Texture3DMaterialSlot.cs.meta
-
84ShaderGraph/com.unity.shadergraph/Editor/Data/Graphs/Texture3DShaderProperty.cs
-
3ShaderGraph/com.unity.shadergraph/Editor/Data/Graphs/Texture3DShaderProperty.cs.meta
-
97ShaderGraph/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/SampleTexture2DArrayNode.cs
-
12ShaderGraph/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/SampleTexture2DArrayNode.cs.meta
-
63ShaderGraph/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/SampleTexture3DNode.cs
-
12ShaderGraph/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/SampleTexture3DNode.cs.meta
-
78ShaderGraph/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/Texture2DArrayAssetNode.cs
-
11ShaderGraph/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/Texture2DArrayAssetNode.cs.meta
-
78ShaderGraph/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/Texture3DAssetNode.cs
-
11ShaderGraph/com.unity.shadergraph/Editor/Data/Nodes/Input/Texture/Texture3DAssetNode.cs.meta
-
53ShaderGraph/com.unity.shadergraph/Editor/Drawing/Controls/Texture3DControl.cs
-
11ShaderGraph/com.unity.shadergraph/Editor/Drawing/Controls/Texture3DControl.cs.meta
-
53ShaderGraph/com.unity.shadergraph/Editor/Drawing/Controls/TextureArrayControl.cs
-
11ShaderGraph/com.unity.shadergraph/Editor/Drawing/Controls/TextureArrayControl.cs.meta
-
34ShaderGraph/com.unity.shadergraph/Editor/Drawing/Views/Slots/Texture3DSlotControlView.cs
-
3ShaderGraph/com.unity.shadergraph/Editor/Drawing/Views/Slots/Texture3DSlotControlView.cs.meta
-
34ShaderGraph/com.unity.shadergraph/Editor/Drawing/Views/Slots/TextureArraySlotControlView.cs
-
3ShaderGraph/com.unity.shadergraph/Editor/Drawing/Views/Slots/TextureArraySlotControlView.cs.meta
-
12ShaderGraph/com.unity.shadergraph/Editor/Resources/Styles/Controls/Texture3DSlotControlView.uss
-
10ShaderGraph/com.unity.shadergraph/Editor/Resources/Styles/Controls/Texture3DSlotControlView.uss.meta
-
12ShaderGraph/com.unity.shadergraph/Editor/Resources/Styles/Controls/TextureArraySlotControlView.uss
-
10ShaderGraph/com.unity.shadergraph/Editor/Resources/Styles/Controls/TextureArraySlotControlView.uss.meta
|
|||
using System; |
|||
using UnityEngine; |
|||
|
|||
namespace UnityEditor.ShaderGraph |
|||
{ |
|||
[Serializable] |
|||
public class SerializableTextureArray |
|||
{ |
|||
[SerializeField] |
|||
string m_SerializedTexture; |
|||
|
|||
[SerializeField] |
|||
string m_Guid; |
|||
|
|||
[NonSerialized] |
|||
Texture2DArray m_TextureArray; |
|||
|
|||
[Serializable] |
|||
class TextureHelper |
|||
{ |
|||
#pragma warning disable 649
|
|||
public Texture2DArray textureArray; |
|||
#pragma warning restore 649
|
|||
} |
|||
|
|||
public Texture2DArray textureArray |
|||
{ |
|||
get |
|||
{ |
|||
if (!string.IsNullOrEmpty(m_SerializedTexture)) |
|||
{ |
|||
var textureHelper = new TextureHelper(); |
|||
EditorJsonUtility.FromJsonOverwrite(m_SerializedTexture, textureHelper); |
|||
m_SerializedTexture = null; |
|||
m_Guid = AssetDatabase.AssetPathToGUID(AssetDatabase.GetAssetPath(textureHelper.textureArray)); |
|||
m_TextureArray = textureHelper.textureArray; |
|||
} |
|||
else if (!string.IsNullOrEmpty(m_Guid) && m_TextureArray == null) |
|||
{ |
|||
m_TextureArray = AssetDatabase.LoadAssetAtPath<Texture2DArray>(AssetDatabase.GUIDToAssetPath(m_Guid)); |
|||
} |
|||
|
|||
return m_TextureArray; |
|||
} |
|||
set |
|||
{ |
|||
m_SerializedTexture = null; |
|||
m_Guid = AssetDatabase.AssetPathToGUID(AssetDatabase.GetAssetPath(value)); |
|||
m_TextureArray = value; |
|||
} |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: d9807a630579843d5a2e956e776b0d3d |
|||
timeCreated: 1505346945 |
|
|||
using System; |
|||
using System.Collections.Generic; |
|||
using UnityEditor.Graphing; |
|||
using UnityEditor.ShaderGraph.Drawing.Slots; |
|||
using UnityEngine; |
|||
using UnityEngine.Experimental.UIElements; |
|||
|
|||
namespace UnityEditor.ShaderGraph |
|||
{ |
|||
[Serializable] |
|||
public class Texture2DArrayInputMaterialSlot : Texture2DArrayMaterialSlot |
|||
{ |
|||
[SerializeField] |
|||
private SerializableTextureArray m_TextureArray = new SerializableTextureArray(); |
|||
|
|||
public Texture2DArray textureArray |
|||
{ |
|||
get { return m_TextureArray.textureArray; } |
|||
set { m_TextureArray.textureArray = value; } |
|||
} |
|||
|
|||
public Texture2DArrayInputMaterialSlot() |
|||
{} |
|||
|
|||
public Texture2DArrayInputMaterialSlot( |
|||
int slotId, |
|||
string displayName, |
|||
string shaderOutputName, |
|||
ShaderStage shaderStage = ShaderStage.Dynamic, |
|||
bool hidden = false) |
|||
: base(slotId, displayName, shaderOutputName, SlotType.Input, shaderStage, hidden) |
|||
{} |
|||
|
|||
public override VisualElement InstantiateControl() |
|||
{ |
|||
return new TextureArraySlotControlView(this); |
|||
} |
|||
|
|||
public override string GetDefaultValue(GenerationMode generationMode) |
|||
{ |
|||
var matOwner = owner as AbstractMaterialNode; |
|||
if (matOwner == null) |
|||
throw new Exception(string.Format("Slot {0} either has no owner, or the owner is not a {1}", this, typeof(AbstractMaterialNode))); |
|||
|
|||
return matOwner.GetVariableNameForSlot(id); |
|||
} |
|||
|
|||
public override void AddDefaultProperty(PropertyCollector properties, GenerationMode generationMode) |
|||
{ |
|||
var matOwner = owner as AbstractMaterialNode; |
|||
if (matOwner == null) |
|||
throw new Exception(string.Format("Slot {0} either has no owner, or the owner is not a {1}", this, typeof(AbstractMaterialNode))); |
|||
|
|||
var prop = new Texture2DArrayShaderProperty(); |
|||
prop.overrideReferenceName = matOwner.GetVariableNameForSlot(id); |
|||
prop.modifiable = false; |
|||
prop.generatePropertyBlock = true; |
|||
prop.value.textureArray = textureArray; |
|||
properties.AddShaderProperty(prop); |
|||
} |
|||
|
|||
public override void GetPreviewProperties(List<PreviewProperty> properties, string name) |
|||
{ |
|||
var pp = new PreviewProperty(PropertyType.Texture2DArray) |
|||
{ |
|||
name = name, |
|||
textureValue = textureArray, |
|||
}; |
|||
properties.Add(pp); |
|||
} |
|||
|
|||
public override void CopyValuesFrom(MaterialSlot foundSlot) |
|||
{ |
|||
var slot = foundSlot as Texture2DArrayInputMaterialSlot; |
|||
if (slot != null) |
|||
m_TextureArray = slot.m_TextureArray; |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 56d6d3c32403e4aa1af1fc8b307c0133 |
|||
timeCreated: 1509276977 |
|
|||
using System; |
|||
using UnityEditor.Graphing; |
|||
|
|||
namespace UnityEditor.ShaderGraph |
|||
{ |
|||
[Serializable] |
|||
public class Texture2DArrayMaterialSlot : MaterialSlot |
|||
{ |
|||
public Texture2DArrayMaterialSlot() |
|||
{} |
|||
|
|||
public Texture2DArrayMaterialSlot( |
|||
int slotId, |
|||
string displayName, |
|||
string shaderOutputName, |
|||
SlotType slotType, |
|||
ShaderStage shaderStage = ShaderStage.Dynamic, |
|||
bool hidden = false) |
|||
: base(slotId, displayName, shaderOutputName, slotType, shaderStage, hidden) |
|||
{} |
|||
|
|||
public override SlotValueType valueType { get { return SlotValueType.Texture2DArray; } } |
|||
public override ConcreteSlotValueType concreteValueType { get { return ConcreteSlotValueType.Texture2DArray; } } |
|||
|
|||
public override void AddDefaultProperty(PropertyCollector properties, GenerationMode generationMode) |
|||
{} |
|||
|
|||
public override void CopyValuesFrom(MaterialSlot foundSlot) |
|||
{} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: b87c46f06c359416e8bf44a90c7737d8 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using System; |
|||
using System.Text; |
|||
using UnityEditor.Graphing; |
|||
using UnityEngine; |
|||
|
|||
namespace UnityEditor.ShaderGraph |
|||
{ |
|||
[Serializable] |
|||
public class Texture2DArrayShaderProperty : AbstractShaderProperty<SerializableTextureArray> |
|||
{ |
|||
[SerializeField] |
|||
private bool m_Modifiable = true; |
|||
|
|||
public Texture2DArrayShaderProperty() |
|||
{ |
|||
value = new SerializableTextureArray(); |
|||
displayName = "Texture2D Array"; |
|||
} |
|||
|
|||
public override PropertyType propertyType |
|||
{ |
|||
get { return PropertyType.Texture2DArray; } |
|||
} |
|||
|
|||
public bool modifiable |
|||
{ |
|||
get { return m_Modifiable; } |
|||
set { m_Modifiable = value; } |
|||
} |
|||
|
|||
public override Vector4 defaultValue |
|||
{ |
|||
get { return new Vector4(); } |
|||
} |
|||
|
|||
public override string GetPropertyBlockString() |
|||
{ |
|||
var result = new StringBuilder(); |
|||
if (!m_Modifiable) |
|||
{ |
|||
result.Append("[NonModifiableTextureData] "); |
|||
} |
|||
result.Append("[NoScaleOffset] "); |
|||
|
|||
result.Append(referenceName); |
|||
result.Append("(\""); |
|||
result.Append(displayName); |
|||
result.Append("\", 2DArray) = \"white\" {}"); |
|||
return result.ToString(); |
|||
} |
|||
|
|||
public override string GetPropertyDeclarationString(string delimiter = ";") |
|||
{ |
|||
return string.Format("TEXTURE2D_ARRAY({0}){1} SAMPLER(sampler{0}){1}", referenceName, delimiter); |
|||
} |
|||
|
|||
public override string GetPropertyAsArgumentString() |
|||
{ |
|||
return string.Format("TEXTURE2D_ARRAY_ARGS({0}, sampler{0})", referenceName); |
|||
} |
|||
|
|||
public override PreviewProperty GetPreviewMaterialProperty() |
|||
{ |
|||
return new PreviewProperty(PropertyType.Texture) |
|||
{ |
|||
name = referenceName, |
|||
textureValue = value.textureArray |
|||
}; |
|||
} |
|||
|
|||
public override INode ToConcreteNode() |
|||
{ |
|||
return new Texture2DAssetNode { texture = value.textureArray }; |
|||
} |
|||
|
|||
public override IShaderProperty Copy() |
|||
{ |
|||
var copied = new Texture2DArrayShaderProperty(); |
|||
copied.displayName = displayName; |
|||
copied.value = value; |
|||
return copied; |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 3e63504c5144748fd844c188e96e941b |
|||
timeCreated: 1505346949 |
|
|||
using System; |
|||
using System.Collections.Generic; |
|||
using UnityEditor.Graphing; |
|||
using UnityEditor.ShaderGraph.Drawing.Slots; |
|||
using UnityEngine; |
|||
using UnityEngine.Experimental.UIElements; |
|||
|
|||
namespace UnityEditor.ShaderGraph |
|||
{ |
|||
[Serializable] |
|||
public class Texture3DInputMaterialSlot : Texture3DMaterialSlot |
|||
{ |
|||
[SerializeField] |
|||
private SerializableTexture m_Texture = new SerializableTexture(); |
|||
|
|||
public Texture texture |
|||
{ |
|||
get { return m_Texture.texture; } |
|||
set { m_Texture.texture = value; } |
|||
} |
|||
|
|||
public Texture3DInputMaterialSlot() |
|||
{} |
|||
|
|||
public Texture3DInputMaterialSlot( |
|||
int slotId, |
|||
string displayName, |
|||
string shaderOutputName, |
|||
ShaderStage shaderStage = ShaderStage.Dynamic, |
|||
bool hidden = false) |
|||
: base(slotId, displayName, shaderOutputName, SlotType.Input, shaderStage, hidden) |
|||
{} |
|||
|
|||
public override VisualElement InstantiateControl() |
|||
{ |
|||
return new Texture3DSlotControlView(this); |
|||
} |
|||
|
|||
public override string GetDefaultValue(GenerationMode generationMode) |
|||
{ |
|||
var matOwner = owner as AbstractMaterialNode; |
|||
if (matOwner == null) |
|||
throw new Exception(string.Format("Slot {0} either has no owner, or the owner is not a {1}", this, typeof(AbstractMaterialNode))); |
|||
|
|||
return matOwner.GetVariableNameForSlot(id); |
|||
} |
|||
|
|||
public override void AddDefaultProperty(PropertyCollector properties, GenerationMode generationMode) |
|||
{ |
|||
var matOwner = owner as AbstractMaterialNode; |
|||
if (matOwner == null) |
|||
throw new Exception(string.Format("Slot {0} either has no owner, or the owner is not a {1}", this, typeof(AbstractMaterialNode))); |
|||
|
|||
var prop = new Texture3DShaderProperty(); |
|||
prop.overrideReferenceName = matOwner.GetVariableNameForSlot(id); |
|||
prop.modifiable = false; |
|||
prop.generatePropertyBlock = true; |
|||
prop.value.texture = texture; |
|||
properties.AddShaderProperty(prop); |
|||
} |
|||
|
|||
public override void GetPreviewProperties(List<PreviewProperty> properties, string name) |
|||
{ |
|||
var pp = new PreviewProperty(PropertyType.Texture3D) |
|||
{ |
|||
name = name, |
|||
textureValue = texture, |
|||
}; |
|||
properties.Add(pp); |
|||
} |
|||
|
|||
public override void CopyValuesFrom(MaterialSlot foundSlot) |
|||
{ |
|||
var slot = foundSlot as Texture3DInputMaterialSlot; |
|||
if (slot != null) |
|||
m_Texture = slot.m_Texture; |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: fa82e95b6172d4aafaed3656eb9d0a03 |
|||
timeCreated: 1509276977 |
|
|||
using System; |
|||
using UnityEditor.Graphing; |
|||
|
|||
namespace UnityEditor.ShaderGraph |
|||
{ |
|||
[Serializable] |
|||
public class Texture3DMaterialSlot : MaterialSlot |
|||
{ |
|||
public Texture3DMaterialSlot() |
|||
{} |
|||
|
|||
public Texture3DMaterialSlot( |
|||
int slotId, |
|||
string displayName, |
|||
string shaderOutputName, |
|||
SlotType slotType, |
|||
ShaderStage shaderStage = ShaderStage.Dynamic, |
|||
bool hidden = false) |
|||
: base(slotId, displayName, shaderOutputName, slotType, shaderStage, hidden) |
|||
{} |
|||
|
|||
public override SlotValueType valueType { get { return SlotValueType.Texture3D; } } |
|||
public override ConcreteSlotValueType concreteValueType { get { return ConcreteSlotValueType.Texture3D; } } |
|||
|
|||
public override void AddDefaultProperty(PropertyCollector properties, GenerationMode generationMode) |
|||
{} |
|||
|
|||
public override void CopyValuesFrom(MaterialSlot foundSlot) |
|||
{} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: d14087d6634274aee91ead8607c2e32d |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using System; |
|||
using System.Text; |
|||
using UnityEditor.Graphing; |
|||
using UnityEngine; |
|||
|
|||
namespace UnityEditor.ShaderGraph |
|||
{ |
|||
[Serializable] |
|||
public class Texture3DShaderProperty : AbstractShaderProperty<SerializableTexture> |
|||
{ |
|||
[SerializeField] |
|||
private bool m_Modifiable = true; |
|||
|
|||
public Texture3DShaderProperty() |
|||
{ |
|||
value = new SerializableTexture(); |
|||
displayName = "Texture3D"; |
|||
} |
|||
|
|||
public override PropertyType propertyType |
|||
{ |
|||
get { return PropertyType.Texture3D; } |
|||
} |
|||
|
|||
public bool modifiable |
|||
{ |
|||
get { return m_Modifiable; } |
|||
set { m_Modifiable = value; } |
|||
} |
|||
|
|||
public override Vector4 defaultValue |
|||
{ |
|||
get { return new Vector4(); } |
|||
} |
|||
|
|||
public override string GetPropertyBlockString() |
|||
{ |
|||
var result = new StringBuilder(); |
|||
if (!m_Modifiable) |
|||
{ |
|||
result.Append("[NonModifiableTextureData] "); |
|||
} |
|||
result.Append("[NoScaleOffset] "); |
|||
|
|||
result.Append(referenceName); |
|||
result.Append("(\""); |
|||
result.Append(displayName); |
|||
result.Append("\", 3D) = \"white\" {}"); |
|||
return result.ToString(); |
|||
} |
|||
|
|||
public override string GetPropertyDeclarationString(string delimiter = ";") |
|||
{ |
|||
return string.Format("TEXTURE3D({0}){1} SAMPLER(sampler{0}){1}", referenceName, delimiter); |
|||
} |
|||
|
|||
public override string GetPropertyAsArgumentString() |
|||
{ |
|||
return string.Format("TEXTURE3D_ARGS({0}, sampler{0})", referenceName); |
|||
} |
|||
|
|||
public override PreviewProperty GetPreviewMaterialProperty() |
|||
{ |
|||
return new PreviewProperty(PropertyType.Texture3D) |
|||
{ |
|||
name = referenceName, |
|||
textureValue = value.texture |
|||
}; |
|||
} |
|||
|
|||
public override INode ToConcreteNode() |
|||
{ |
|||
return new Texture3DAssetNode { texture = (Texture3D)value.texture }; |
|||
} |
|||
|
|||
public override IShaderProperty Copy() |
|||
{ |
|||
var copied = new Texture3DShaderProperty(); |
|||
copied.displayName = displayName; |
|||
copied.value = value; |
|||
return copied; |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: fa05c5d2d4d374703b6c59248a30fca3 |
|||
timeCreated: 1505346949 |
|
|||
using System.Linq; |
|||
using UnityEngine; |
|||
using UnityEditor.Graphing; |
|||
using UnityEditor.ShaderGraph.Drawing.Controls; |
|||
|
|||
namespace UnityEditor.ShaderGraph |
|||
{ |
|||
[Title("Input", "Texture", "Sample Texture 2D Array")] |
|||
public class SampleTexture2DArrayNode : AbstractMaterialNode, IGeneratesBodyCode, IMayRequireMeshUV |
|||
{ |
|||
public const int OutputSlotRGBAId = 0; |
|||
public const int OutputSlotRId = 4; |
|||
public const int OutputSlotGId = 5; |
|||
public const int OutputSlotBId = 6; |
|||
public const int OutputSlotAId = 7; |
|||
public const int TextureInputId = 1; |
|||
public const int UVInput = 2; |
|||
public const int SamplerInput = 3; |
|||
public const int IndexInputId = 8; |
|||
|
|||
const string kOutputSlotRGBAName = "RGBA"; |
|||
const string kOutputSlotRName = "R"; |
|||
const string kOutputSlotGName = "G"; |
|||
const string kOutputSlotBName = "B"; |
|||
const string kOutputSlotAName = "A"; |
|||
const string kTextureInputName = "Texture Array"; |
|||
const string kUVInputName = "UV"; |
|||
const string kSamplerInputName = "Sampler"; |
|||
const string kIndexInputName = "Index"; |
|||
|
|||
public override bool hasPreview { get { return true; } } |
|||
|
|||
public SampleTexture2DArrayNode() |
|||
{ |
|||
name = "Sample Texture 2D Array"; |
|||
UpdateNodeAfterDeserialization(); |
|||
} |
|||
|
|||
public override string documentationURL |
|||
{ |
|||
get { return "https://github.com/Unity-Technologies/ShaderGraph/wiki/Sample-Texture-2D-Array-Node"; } |
|||
} |
|||
|
|||
public sealed override void UpdateNodeAfterDeserialization() |
|||
{ |
|||
AddSlot(new Vector4MaterialSlot(OutputSlotRGBAId, kOutputSlotRGBAName, kOutputSlotRGBAName, SlotType.Output, Vector4.zero)); |
|||
AddSlot(new Vector1MaterialSlot(OutputSlotRId, kOutputSlotRName, kOutputSlotRName, SlotType.Output, 0)); |
|||
AddSlot(new Vector1MaterialSlot(OutputSlotGId, kOutputSlotGName, kOutputSlotGName, SlotType.Output, 0)); |
|||
AddSlot(new Vector1MaterialSlot(OutputSlotBId, kOutputSlotBName, kOutputSlotBName, SlotType.Output, 0)); |
|||
AddSlot(new Vector1MaterialSlot(OutputSlotAId, kOutputSlotAName, kOutputSlotAName, SlotType.Output, 0)); |
|||
AddSlot(new Texture2DArrayInputMaterialSlot(TextureInputId, kTextureInputName, kTextureInputName)); |
|||
AddSlot(new Vector1MaterialSlot(IndexInputId, kIndexInputName, kIndexInputName, SlotType.Input, 0)); |
|||
AddSlot(new UVMaterialSlot(UVInput, kUVInputName, kUVInputName, UVChannel.UV0)); |
|||
AddSlot(new SamplerStateMaterialSlot(SamplerInput, kSamplerInputName, kSamplerInputName, SlotType.Input)); |
|||
RemoveSlotsNameNotMatching(new[] { OutputSlotRGBAId, OutputSlotRId, OutputSlotGId, OutputSlotBId, OutputSlotAId, TextureInputId, IndexInputId, UVInput, SamplerInput }); |
|||
} |
|||
|
|||
// Node generations
|
|||
public virtual void GenerateNodeCode(ShaderGenerator visitor, GenerationMode generationMode) |
|||
{ |
|||
var uvName = GetSlotValue(UVInput, generationMode); |
|||
var indexName = GetSlotValue(IndexInputId, generationMode); |
|||
|
|||
//Sampler input slot
|
|||
var samplerSlot = FindInputSlot<MaterialSlot>(SamplerInput); |
|||
var edgesSampler = owner.GetEdges(samplerSlot.slotReference); |
|||
|
|||
var id = GetSlotValue(TextureInputId, generationMode); |
|||
var result = string.Format("{0}4 {1} = SAMPLE_TEXTURE2D_ARRAY({2}, {3}, {4}, {5});" |
|||
, precision |
|||
, GetVariableNameForSlot(OutputSlotRGBAId) |
|||
, id |
|||
, edgesSampler.Any() ? GetSlotValue(SamplerInput, generationMode) : "sampler" + id |
|||
, uvName |
|||
, indexName); |
|||
|
|||
visitor.AddShaderChunk(result, true); |
|||
|
|||
visitor.AddShaderChunk(string.Format("{0} {1} = {2}.r;", precision, GetVariableNameForSlot(OutputSlotRId), GetVariableNameForSlot(OutputSlotRGBAId)), true); |
|||
visitor.AddShaderChunk(string.Format("{0} {1} = {2}.g;", precision, GetVariableNameForSlot(OutputSlotGId), GetVariableNameForSlot(OutputSlotRGBAId)), true); |
|||
visitor.AddShaderChunk(string.Format("{0} {1} = {2}.b;", precision, GetVariableNameForSlot(OutputSlotBId), GetVariableNameForSlot(OutputSlotRGBAId)), true); |
|||
visitor.AddShaderChunk(string.Format("{0} {1} = {2}.a;", precision, GetVariableNameForSlot(OutputSlotAId), GetVariableNameForSlot(OutputSlotRGBAId)), true); |
|||
} |
|||
|
|||
public bool RequiresMeshUV(UVChannel channel) |
|||
{ |
|||
s_TempSlots.Clear(); |
|||
GetInputSlots(s_TempSlots); |
|||
foreach (var slot in s_TempSlots) |
|||
{ |
|||
if (slot.RequiresMeshUV(channel)) |
|||
return true; |
|||
} |
|||
return false; |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 0789ef77e28f0406dbb0970c5a8e7a2c |
|||
timeCreated: 1495637741 |
|||
licenseType: Pro |
|||
MonoImporter: |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using System.Linq; |
|||
using UnityEngine; |
|||
using UnityEditor.Graphing; |
|||
using UnityEditor.ShaderGraph.Drawing.Controls; |
|||
|
|||
namespace UnityEditor.ShaderGraph |
|||
{ |
|||
[Title("Input", "Texture", "Sample Texture 3D")] |
|||
public class SampleTexture3DNode : AbstractMaterialNode, IGeneratesBodyCode |
|||
{ |
|||
public const int OutputSlotId = 0; |
|||
public const int TextureInputId = 1; |
|||
public const int UVInput = 2; |
|||
public const int SamplerInput = 3; |
|||
|
|||
const string kOutputSlotName = "Out"; |
|||
const string kTextureInputName = "Texture"; |
|||
const string kUVInputName = "UV"; |
|||
const string kSamplerInputName = "Sampler"; |
|||
|
|||
public override bool hasPreview { get { return true; } } |
|||
|
|||
public SampleTexture3DNode() |
|||
{ |
|||
name = "Sample Texture 3D"; |
|||
UpdateNodeAfterDeserialization(); |
|||
} |
|||
|
|||
public override string documentationURL |
|||
{ |
|||
get { return "https://github.com/Unity-Technologies/ShaderGraph/wiki/Sample-Texture-3D-Node"; } |
|||
} |
|||
|
|||
public sealed override void UpdateNodeAfterDeserialization() |
|||
{ |
|||
AddSlot(new Vector4MaterialSlot(OutputSlotId, kOutputSlotName, kOutputSlotName, SlotType.Output, Vector4.zero)); |
|||
AddSlot(new Texture3DInputMaterialSlot(TextureInputId, kTextureInputName, kTextureInputName)); |
|||
AddSlot(new Vector3MaterialSlot(UVInput, kUVInputName, kUVInputName, SlotType.Input, Vector3.zero)); |
|||
AddSlot(new SamplerStateMaterialSlot(SamplerInput, kSamplerInputName, kSamplerInputName, SlotType.Input)); |
|||
RemoveSlotsNameNotMatching(new[] { OutputSlotId, TextureInputId, UVInput, SamplerInput }); |
|||
} |
|||
|
|||
// Node generations
|
|||
public virtual void GenerateNodeCode(ShaderGenerator visitor, GenerationMode generationMode) |
|||
{ |
|||
var uvName = GetSlotValue(UVInput, generationMode); |
|||
|
|||
//Sampler input slot
|
|||
var samplerSlot = FindInputSlot<MaterialSlot>(SamplerInput); |
|||
var edgesSampler = owner.GetEdges(samplerSlot.slotReference); |
|||
|
|||
var id = GetSlotValue(TextureInputId, generationMode); |
|||
var result = string.Format("{0}4 {1} = SAMPLE_TEXTURE3D({2}, {3}, {4});" |
|||
, precision |
|||
, GetVariableNameForSlot(OutputSlotId) |
|||
, id |
|||
, edgesSampler.Any() ? GetSlotValue(SamplerInput, generationMode) : "sampler" + id |
|||
, uvName); |
|||
|
|||
visitor.AddShaderChunk(result, true); |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 0c9bd58ae163e49acb187db417dbfd95 |
|||
timeCreated: 1495637741 |
|||
licenseType: Pro |
|||
MonoImporter: |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using System.Collections.Generic; |
|||
using UnityEditor.ShaderGraph.Drawing.Controls; |
|||
using UnityEngine; |
|||
using UnityEditor.Graphing; |
|||
|
|||
namespace UnityEditor.ShaderGraph |
|||
{ |
|||
[Title("Input", "Texture", "Texture 2D Array Asset")] |
|||
public class Texture2DArrayAssetNode : AbstractMaterialNode, IPropertyFromNode |
|||
{ |
|||
public const int OutputSlotId = 0; |
|||
|
|||
const string kOutputSlotName = "Out"; |
|||
|
|||
public Texture2DArrayAssetNode() |
|||
{ |
|||
name = "Texture 2D Array Asset"; |
|||
UpdateNodeAfterDeserialization(); |
|||
} |
|||
|
|||
public override string documentationURL |
|||
{ |
|||
get { return "https://github.com/Unity-Technologies/ShaderGraph/wiki/Texture-2D-Array-Asset-Node"; } |
|||
} |
|||
|
|||
public sealed override void UpdateNodeAfterDeserialization() |
|||
{ |
|||
AddSlot(new Texture2DArrayMaterialSlot(OutputSlotId, kOutputSlotName, kOutputSlotName, SlotType.Output)); |
|||
RemoveSlotsNameNotMatching(new[] { OutputSlotId }); |
|||
} |
|||
|
|||
[SerializeField] |
|||
private SerializableTextureArray m_Texture = new SerializableTextureArray(); |
|||
|
|||
[TextureArrayControl("")] |
|||
public Texture2DArray texture |
|||
{ |
|||
get { return m_Texture.textureArray; } |
|||
set |
|||
{ |
|||
if (m_Texture.textureArray == value) |
|||
return; |
|||
m_Texture.textureArray = value; |
|||
Dirty(ModificationScope.Node); |
|||
} |
|||
} |
|||
|
|||
public override void CollectShaderProperties(PropertyCollector properties, GenerationMode generationMode) |
|||
{ |
|||
properties.AddShaderProperty(new Texture2DArrayShaderProperty() |
|||
{ |
|||
overrideReferenceName = GetVariableNameForSlot(OutputSlotId), |
|||
generatePropertyBlock = true, |
|||
value = m_Texture, |
|||
modifiable = false |
|||
}); |
|||
} |
|||
|
|||
public override void CollectPreviewMaterialProperties(List<PreviewProperty> properties) |
|||
{ |
|||
properties.Add(new PreviewProperty(PropertyType.Texture2DArray) |
|||
{ |
|||
name = GetVariableNameForSlot(OutputSlotId), |
|||
textureValue = texture |
|||
}); |
|||
} |
|||
|
|||
public IShaderProperty AsShaderProperty() |
|||
{ |
|||
var prop = new Texture2DArrayShaderProperty { value = m_Texture }; |
|||
if (texture != null) |
|||
prop.displayName = texture.name; |
|||
return prop; |
|||
} |
|||
|
|||
public int outputSlotId { get { return OutputSlotId; } } |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 34c0298d9fb6e4bc9aedbeeeeb8b8054 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using System.Collections.Generic; |
|||
using UnityEditor.ShaderGraph.Drawing.Controls; |
|||
using UnityEngine; |
|||
using UnityEditor.Graphing; |
|||
|
|||
namespace UnityEditor.ShaderGraph |
|||
{ |
|||
[Title("Input", "Texture", "Texture 3D Asset")] |
|||
public class Texture3DAssetNode : AbstractMaterialNode, IPropertyFromNode |
|||
{ |
|||
public const int OutputSlotId = 0; |
|||
|
|||
const string kOutputSlotName = "Out"; |
|||
|
|||
public Texture3DAssetNode() |
|||
{ |
|||
name = "Texture 3D Asset"; |
|||
UpdateNodeAfterDeserialization(); |
|||
} |
|||
|
|||
public override string documentationURL |
|||
{ |
|||
get { return "https://github.com/Unity-Technologies/ShaderGraph/wiki/Texture-3D-Asset-Node"; } |
|||
} |
|||
|
|||
public sealed override void UpdateNodeAfterDeserialization() |
|||
{ |
|||
AddSlot(new Texture3DMaterialSlot(OutputSlotId, kOutputSlotName, kOutputSlotName, SlotType.Output)); |
|||
RemoveSlotsNameNotMatching(new[] { OutputSlotId }); |
|||
} |
|||
|
|||
[SerializeField] |
|||
private SerializableTexture m_Texture = new SerializableTexture(); |
|||
|
|||
[Texture3DControl("")] |
|||
public Texture3D texture |
|||
{ |
|||
get { return (Texture3D)m_Texture.texture; } |
|||
set |
|||
{ |
|||
if (m_Texture.texture == value) |
|||
return; |
|||
m_Texture.texture = value; |
|||
Dirty(ModificationScope.Node); |
|||
} |
|||
} |
|||
|
|||
public override void CollectShaderProperties(PropertyCollector properties, GenerationMode generationMode) |
|||
{ |
|||
properties.AddShaderProperty(new Texture3DShaderProperty() |
|||
{ |
|||
overrideReferenceName = GetVariableNameForSlot(OutputSlotId), |
|||
generatePropertyBlock = true, |
|||
value = m_Texture, |
|||
modifiable = false |
|||
}); |
|||
} |
|||
|
|||
public override void CollectPreviewMaterialProperties(List<PreviewProperty> properties) |
|||
{ |
|||
properties.Add(new PreviewProperty(PropertyType.Texture3D) |
|||
{ |
|||
name = GetVariableNameForSlot(OutputSlotId), |
|||
textureValue = texture |
|||
}); |
|||
} |
|||
|
|||
public IShaderProperty AsShaderProperty() |
|||
{ |
|||
var prop = new Texture3DShaderProperty { value = m_Texture }; |
|||
if (texture != null) |
|||
prop.displayName = texture.name; |
|||
return prop; |
|||
} |
|||
|
|||
public int outputSlotId { get { return OutputSlotId; } } |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 0b009ba9b523742a0ad6530e14a063a2 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using System; |
|||
using System.Reflection; |
|||
using UnityEditor.Experimental.UIElements; |
|||
using UnityEngine; |
|||
using UnityEngine.Experimental.UIElements; |
|||
|
|||
namespace UnityEditor.ShaderGraph.Drawing.Controls |
|||
{ |
|||
[AttributeUsage(AttributeTargets.Property)] |
|||
public class Texture3DControlAttribute : Attribute, IControlAttribute |
|||
{ |
|||
string m_Label; |
|||
|
|||
public Texture3DControlAttribute(string label = null) |
|||
{ |
|||
m_Label = label; |
|||
} |
|||
|
|||
public VisualElement InstantiateControl(AbstractMaterialNode node, PropertyInfo propertyInfo) |
|||
{ |
|||
return new Texture3DControlView(m_Label, node, propertyInfo); |
|||
} |
|||
} |
|||
|
|||
public class Texture3DControlView : VisualElement |
|||
{ |
|||
AbstractMaterialNode m_Node; |
|||
PropertyInfo m_PropertyInfo; |
|||
|
|||
public Texture3DControlView(string label, AbstractMaterialNode node, PropertyInfo propertyInfo) |
|||
{ |
|||
m_Node = node; |
|||
m_PropertyInfo = propertyInfo; |
|||
if (propertyInfo.PropertyType != typeof(Texture3D)) |
|||
throw new ArgumentException("Property must be of type Texture 3D.", "propertyInfo"); |
|||
label = label ?? ObjectNames.NicifyVariableName(propertyInfo.Name); |
|||
|
|||
if (!string.IsNullOrEmpty(label)) |
|||
Add(new Label(label)); |
|||
|
|||
var textureField = new ObjectField { value = (Texture3D)m_PropertyInfo.GetValue(m_Node, null), objectType = typeof(Texture3D) }; |
|||
textureField.OnValueChanged(OnChange); |
|||
Add(textureField); |
|||
} |
|||
|
|||
void OnChange(ChangeEvent<UnityEngine.Object> evt) |
|||
{ |
|||
m_Node.owner.owner.RegisterCompleteObjectUndo("Texture Change"); |
|||
m_PropertyInfo.SetValue(m_Node, evt.newValue, null); |
|||
this.MarkDirtyRepaint(); |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 841bd408b769d48caa3011ed9219df24 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using System; |
|||
using System.Reflection; |
|||
using UnityEditor.Experimental.UIElements; |
|||
using UnityEngine; |
|||
using UnityEngine.Experimental.UIElements; |
|||
|
|||
namespace UnityEditor.ShaderGraph.Drawing.Controls |
|||
{ |
|||
[AttributeUsage(AttributeTargets.Property)] |
|||
public class TextureArrayControlAttribute : Attribute, IControlAttribute |
|||
{ |
|||
string m_Label; |
|||
|
|||
public TextureArrayControlAttribute(string label = null) |
|||
{ |
|||
m_Label = label; |
|||
} |
|||
|
|||
public VisualElement InstantiateControl(AbstractMaterialNode node, PropertyInfo propertyInfo) |
|||
{ |
|||
return new TextureArrayControlView(m_Label, node, propertyInfo); |
|||
} |
|||
} |
|||
|
|||
public class TextureArrayControlView : VisualElement |
|||
{ |
|||
AbstractMaterialNode m_Node; |
|||
PropertyInfo m_PropertyInfo; |
|||
|
|||
public TextureArrayControlView(string label, AbstractMaterialNode node, PropertyInfo propertyInfo) |
|||
{ |
|||
m_Node = node; |
|||
m_PropertyInfo = propertyInfo; |
|||
if (propertyInfo.PropertyType != typeof(Texture2DArray)) |
|||
throw new ArgumentException("Property must be of type Texture 2D Array.", "propertyInfo"); |
|||
label = label ?? ObjectNames.NicifyVariableName(propertyInfo.Name); |
|||
|
|||
if (!string.IsNullOrEmpty(label)) |
|||
Add(new Label(label)); |
|||
|
|||
var textureField = new ObjectField { value = (Texture2DArray)m_PropertyInfo.GetValue(m_Node, null), objectType = typeof(Texture2DArray) }; |
|||
textureField.OnValueChanged(OnChange); |
|||
Add(textureField); |
|||
} |
|||
|
|||
void OnChange(ChangeEvent<UnityEngine.Object> evt) |
|||
{ |
|||
m_Node.owner.owner.RegisterCompleteObjectUndo("Texture Change"); |
|||
m_PropertyInfo.SetValue(m_Node, evt.newValue, null); |
|||
Dirty(ChangeType.Repaint); |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 0e3e309a7d3ff4d2e81a55970ef9b026 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using System; |
|||
using UnityEditor.Experimental.UIElements; |
|||
using UnityEditor.Graphing; |
|||
using UnityEngine; |
|||
using UnityEngine.Experimental.UIElements; |
|||
using Object = UnityEngine.Object; |
|||
|
|||
namespace UnityEditor.ShaderGraph.Drawing.Slots |
|||
{ |
|||
public class Texture3DSlotControlView : VisualElement |
|||
{ |
|||
Texture3DInputMaterialSlot m_Slot; |
|||
|
|||
public Texture3DSlotControlView(Texture3DInputMaterialSlot slot) |
|||
{ |
|||
m_Slot = slot; |
|||
AddStyleSheetPath("Styles/Controls/Texture3DSlotControlView"); |
|||
var objectField = new ObjectField { objectType = typeof(Texture3D), value = m_Slot.texture }; |
|||
objectField.OnValueChanged(OnValueChanged); |
|||
Add(objectField); |
|||
} |
|||
|
|||
void OnValueChanged(ChangeEvent<Object> evt) |
|||
{ |
|||
var texture = evt.newValue as Texture3D; |
|||
if (texture != m_Slot.texture) |
|||
{ |
|||
m_Slot.owner.owner.owner.RegisterCompleteObjectUndo("Change Texture"); |
|||
m_Slot.texture = texture; |
|||
m_Slot.owner.Dirty(ModificationScope.Node); |
|||
} |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 843052fb41ee94a92b93c2070c1bf577 |
|||
timeCreated: 1509718979 |
|
|||
using System; |
|||
using UnityEditor.Experimental.UIElements; |
|||
using UnityEditor.Graphing; |
|||
using UnityEngine; |
|||
using UnityEngine.Experimental.UIElements; |
|||
using Object = UnityEngine.Object; |
|||
|
|||
namespace UnityEditor.ShaderGraph.Drawing.Slots |
|||
{ |
|||
public class TextureArraySlotControlView : VisualElement |
|||
{ |
|||
Texture2DArrayInputMaterialSlot m_Slot; |
|||
|
|||
public TextureArraySlotControlView(Texture2DArrayInputMaterialSlot slot) |
|||
{ |
|||
m_Slot = slot; |
|||
AddStyleSheetPath("Styles/Controls/TextureArraySlotControlView"); |
|||
var objectField = new ObjectField { objectType = typeof(Texture2DArray), value = m_Slot.textureArray }; |
|||
objectField.OnValueChanged(OnValueChanged); |
|||
Add(objectField); |
|||
} |
|||
|
|||
void OnValueChanged(ChangeEvent<Object> evt) |
|||
{ |
|||
var textureArray = evt.newValue as Texture2DArray; |
|||
if (textureArray != m_Slot.textureArray) |
|||
{ |
|||
m_Slot.owner.owner.owner.RegisterCompleteObjectUndo("Change Texture Array"); |
|||
m_Slot.textureArray = textureArray; |
|||
m_Slot.owner.Dirty(ModificationScope.Node); |
|||
} |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: b65e883d3170e4edca841ea6a8fca626 |
|||
timeCreated: 1509718979 |
|
|||
Texture3DSlotControlView { |
|||
flex-direction: row; |
|||
align-items: center; |
|||
} |
|||
|
|||
Texture3DSlotControlView > ObjectField { |
|||
margin-top: 0; |
|||
margin-bottom: 0; |
|||
margin-left: 0; |
|||
margin-right: 0; |
|||
width: 100; |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 8d40f6518d8654aa4bf083cc5897f8ee |
|||
ScriptedImporter: |
|||
fileIDToRecycleName: |
|||
11400000: stylesheet |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
script: {fileID: 12385, guid: 0000000000000000e000000000000000, type: 0} |
|
|||
TextureArraySlotControlView { |
|||
flex-direction: row; |
|||
align-items: center; |
|||
} |
|||
|
|||
TextureArraySlotControlView > ObjectField { |
|||
margin-top: 0; |
|||
margin-bottom: 0; |
|||
margin-left: 0; |
|||
margin-right: 0; |
|||
width: 100; |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 223e574ec2e9a40e690b2d94380057cf |
|||
ScriptedImporter: |
|||
fileIDToRecycleName: |
|||
11400000: stylesheet |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
script: {fileID: 12385, guid: 0000000000000000e000000000000000, type: 0} |
撰写
预览
正在加载...
取消
保存
Reference in new issue