diff --git a/TestProjects/VisualEffectGraph_HDRP/Assets/AllTests/Editor/Tests/Modify_SG_Property.vfx b/TestProjects/VisualEffectGraph_HDRP/Assets/AllTests/Editor/Tests/Modify_SG_Property.vfx new file mode 100644 index 00000000000..29ece2c6b19 --- /dev/null +++ b/TestProjects/VisualEffectGraph_HDRP/Assets/AllTests/Editor/Tests/Modify_SG_Property.vfx @@ -0,0 +1,1277 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &114340500867371532 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d01270efd3285ea4a9d6c555cb0a8027, type: 3} + m_Name: VFXUI + m_EditorClassIdentifier: + groupInfos: [] + stickyNoteInfos: [] + categories: [] + uiBounds: + serializedVersion: 2 + x: 941 + y: -190 + width: 424 + height: 847 +--- !u!114 &114350483966674976 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7d4c867f6b72b714dbb5fd1780afe208, type: 3} + m_Name: Modify_SG_Property + m_EditorClassIdentifier: + m_UIIgnoredErrors: [] + m_Parent: {fileID: 0} + m_Children: + - {fileID: 8926484042661614555} + - {fileID: 8926484042661614558} + - {fileID: 8926484042661614585} + m_UIPosition: {x: 0, y: 0} + m_UICollapsed: 1 + m_UISuperCollapsed: 0 + m_UIInfos: {fileID: 114340500867371532} + m_ParameterInfo: [] + m_ImportDependencies: [] + m_GraphVersion: 8 + m_ResourceVersion: 1 + m_SubgraphDependencies: [] + m_CategoryPath: +--- !u!2058629511 &8926484042661614527 +VisualEffectResource: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Modify_SG_Property + m_Graph: {fileID: 114350483966674976} + m_Infos: + m_RendererSettings: + motionVectorGenerationMode: 0 + shadowCastingMode: 0 + receiveShadows: 0 + reflectionProbeUsage: 0 + lightProbeUsage: 0 + m_CullingFlags: 3 + m_UpdateMode: 0 + m_PreWarmDeltaTime: 0.05 + m_PreWarmStepCount: 0 + m_InitialEventName: OnPlay +--- !u!114 &8926484042661614555 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 73a13919d81fb7444849bae8b5c812a2, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UIIgnoredErrors: [] + m_Parent: {fileID: 114350483966674976} + m_Children: + - {fileID: 8926484042661614556} + m_UIPosition: {x: 941, y: -190} + m_UICollapsed: 0 + m_UISuperCollapsed: 0 + m_InputSlots: [] + m_OutputSlots: [] + m_Label: Spawn system + m_Data: {fileID: 8926484042661614595} + m_InputFlowSlot: + - link: [] + - link: [] + m_OutputFlowSlot: + - link: + - context: {fileID: 8926484042661614558} + slotIndex: 0 + loopDuration: 0 + loopCount: 0 + delayBeforeLoop: 0 + delayAfterLoop: 0 +--- !u!114 &8926484042661614556 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f05c6884b705ce14d82ae720f0ec209f, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UIIgnoredErrors: [] + m_Parent: {fileID: 8926484042661614555} + m_Children: [] + m_UIPosition: {x: 233.38269, y: 57.572144} + m_UICollapsed: 0 + m_UISuperCollapsed: 0 + m_InputSlots: + - {fileID: 8926484042661614557} + m_OutputSlots: [] + m_Disabled: 0 +--- !u!114 &8926484042661614557 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f780aa281814f9842a7c076d436932e7, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UIIgnoredErrors: [] + m_Parent: {fileID: 0} + m_Children: [] + m_UIPosition: {x: 0, y: 0} + m_UICollapsed: 1 + m_UISuperCollapsed: 0 + m_MasterSlot: {fileID: 8926484042661614557} + m_MasterData: + m_Owner: {fileID: 8926484042661614556} + m_Value: + m_Type: + m_SerializableType: System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, + PublicKeyToken=b77a5c561934e089 + m_SerializableObject: 16 + m_Space: 2147483647 + m_Property: + name: Rate + m_serializedType: + m_SerializableType: System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, + PublicKeyToken=b77a5c561934e089 + m_Direction: 0 + m_LinkedSlots: [] +--- !u!114 &8926484042661614558 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9dfea48843f53fc438eabc12a3a30abc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UIIgnoredErrors: [] + m_Parent: {fileID: 114350483966674976} + m_Children: + - {fileID: 8926484042661614597} + m_UIPosition: {x: 941.3827, y: 114.57214} + m_UICollapsed: 0 + m_UISuperCollapsed: 0 + m_InputSlots: + - {fileID: 8926484042661614559} + m_OutputSlots: [] + m_Label: + m_Data: {fileID: 8926484042661614568} + m_InputFlowSlot: + - link: + - context: {fileID: 8926484042661614555} + slotIndex: 0 + m_OutputFlowSlot: + - link: + - context: {fileID: 8926484042661614585} + slotIndex: 0 +--- !u!114 &8926484042661614559 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1b605c022ee79394a8a776c0869b3f9a, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UIIgnoredErrors: [] + m_Parent: {fileID: 0} + m_Children: + - {fileID: 8926484042661614560} + - {fileID: 8926484042661614564} + m_UIPosition: {x: 0, y: 0} + m_UICollapsed: 1 + m_UISuperCollapsed: 0 + m_MasterSlot: {fileID: 8926484042661614559} + m_MasterData: + m_Owner: {fileID: 8926484042661614558} + m_Value: + m_Type: + m_SerializableType: UnityEditor.VFX.AABox, Unity.VisualEffectGraph.Editor, + Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + m_SerializableObject: '{"center":{"x":0.0,"y":1.0,"z":0.0},"size":{"x":2.0,"y":3.0,"z":2.0}}' + m_Space: 0 + m_Property: + name: bounds + m_serializedType: + m_SerializableType: UnityEditor.VFX.AABox, Unity.VisualEffectGraph.Editor, + Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + m_Direction: 0 + m_LinkedSlots: [] +--- !u!114 &8926484042661614560 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ac39bd03fca81b849929b9c966f1836a, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UIIgnoredErrors: [] + m_Parent: {fileID: 8926484042661614559} + m_Children: + - {fileID: 8926484042661614561} + - {fileID: 8926484042661614562} + - {fileID: 8926484042661614563} + m_UIPosition: {x: 0, y: 0} + m_UICollapsed: 1 + m_UISuperCollapsed: 0 + m_MasterSlot: {fileID: 8926484042661614559} + m_MasterData: + m_Owner: {fileID: 0} + m_Value: + m_Type: + m_SerializableType: + m_SerializableObject: + m_Space: 2147483647 + m_Property: + name: center + m_serializedType: + m_SerializableType: UnityEngine.Vector3, UnityEngine.CoreModule, Version=0.0.0.0, + Culture=neutral, PublicKeyToken=null + m_Direction: 0 + m_LinkedSlots: [] +--- !u!114 &8926484042661614561 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f780aa281814f9842a7c076d436932e7, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UIIgnoredErrors: [] + m_Parent: {fileID: 8926484042661614560} + m_Children: [] + m_UIPosition: {x: 0, y: 0} + m_UICollapsed: 1 + m_UISuperCollapsed: 0 + m_MasterSlot: {fileID: 8926484042661614559} + m_MasterData: + m_Owner: {fileID: 0} + m_Value: + m_Type: + m_SerializableType: + m_SerializableObject: + m_Space: 2147483647 + m_Property: + name: x + m_serializedType: + m_SerializableType: System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, + PublicKeyToken=b77a5c561934e089 + m_Direction: 0 + m_LinkedSlots: [] +--- !u!114 &8926484042661614562 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f780aa281814f9842a7c076d436932e7, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UIIgnoredErrors: [] + m_Parent: {fileID: 8926484042661614560} + m_Children: [] + m_UIPosition: {x: 0, y: 0} + m_UICollapsed: 1 + m_UISuperCollapsed: 0 + m_MasterSlot: {fileID: 8926484042661614559} + m_MasterData: + m_Owner: {fileID: 0} + m_Value: + m_Type: + m_SerializableType: + m_SerializableObject: + m_Space: 2147483647 + m_Property: + name: y + m_serializedType: + m_SerializableType: System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, + PublicKeyToken=b77a5c561934e089 + m_Direction: 0 + m_LinkedSlots: [] +--- !u!114 &8926484042661614563 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f780aa281814f9842a7c076d436932e7, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UIIgnoredErrors: [] + m_Parent: {fileID: 8926484042661614560} + m_Children: [] + m_UIPosition: {x: 0, y: 0} + m_UICollapsed: 1 + m_UISuperCollapsed: 0 + m_MasterSlot: {fileID: 8926484042661614559} + m_MasterData: + m_Owner: {fileID: 0} + m_Value: + m_Type: + m_SerializableType: + m_SerializableObject: + m_Space: 2147483647 + m_Property: + name: z + m_serializedType: + m_SerializableType: System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, + PublicKeyToken=b77a5c561934e089 + m_Direction: 0 + m_LinkedSlots: [] +--- !u!114 &8926484042661614564 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ac39bd03fca81b849929b9c966f1836a, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UIIgnoredErrors: [] + m_Parent: {fileID: 8926484042661614559} + m_Children: + - {fileID: 8926484042661614565} + - {fileID: 8926484042661614566} + - {fileID: 8926484042661614567} + m_UIPosition: {x: 0, y: 0} + m_UICollapsed: 1 + m_UISuperCollapsed: 0 + m_MasterSlot: {fileID: 8926484042661614559} + m_MasterData: + m_Owner: {fileID: 0} + m_Value: + m_Type: + m_SerializableType: + m_SerializableObject: + m_Space: 2147483647 + m_Property: + name: size + m_serializedType: + m_SerializableType: UnityEngine.Vector3, UnityEngine.CoreModule, Version=0.0.0.0, + Culture=neutral, PublicKeyToken=null + m_Direction: 0 + m_LinkedSlots: [] +--- !u!114 &8926484042661614565 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f780aa281814f9842a7c076d436932e7, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UIIgnoredErrors: [] + m_Parent: {fileID: 8926484042661614564} + m_Children: [] + m_UIPosition: {x: 0, y: 0} + m_UICollapsed: 1 + m_UISuperCollapsed: 0 + m_MasterSlot: {fileID: 8926484042661614559} + m_MasterData: + m_Owner: {fileID: 0} + m_Value: + m_Type: + m_SerializableType: + m_SerializableObject: + m_Space: 2147483647 + m_Property: + name: x + m_serializedType: + m_SerializableType: System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, + PublicKeyToken=b77a5c561934e089 + m_Direction: 0 + m_LinkedSlots: [] +--- !u!114 &8926484042661614566 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f780aa281814f9842a7c076d436932e7, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UIIgnoredErrors: [] + m_Parent: {fileID: 8926484042661614564} + m_Children: [] + m_UIPosition: {x: 0, y: 0} + m_UICollapsed: 1 + m_UISuperCollapsed: 0 + m_MasterSlot: {fileID: 8926484042661614559} + m_MasterData: + m_Owner: {fileID: 0} + m_Value: + m_Type: + m_SerializableType: + m_SerializableObject: + m_Space: 2147483647 + m_Property: + name: y + m_serializedType: + m_SerializableType: System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, + PublicKeyToken=b77a5c561934e089 + m_Direction: 0 + m_LinkedSlots: [] +--- !u!114 &8926484042661614567 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f780aa281814f9842a7c076d436932e7, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UIIgnoredErrors: [] + m_Parent: {fileID: 8926484042661614564} + m_Children: [] + m_UIPosition: {x: 0, y: 0} + m_UICollapsed: 1 + m_UISuperCollapsed: 0 + m_MasterSlot: {fileID: 8926484042661614559} + m_MasterData: + m_Owner: {fileID: 0} + m_Value: + m_Type: + m_SerializableType: + m_SerializableObject: + m_Space: 2147483647 + m_Property: + name: z + m_serializedType: + m_SerializableType: System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, + PublicKeyToken=b77a5c561934e089 + m_Direction: 0 + m_LinkedSlots: [] +--- !u!114 &8926484042661614568 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d78581a96eae8bf4398c282eb0b098bd, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UIIgnoredErrors: [] + m_Parent: {fileID: 114350483966674976} + m_Children: [] + m_UIPosition: {x: 0, y: 0} + m_UICollapsed: 1 + m_UISuperCollapsed: 0 + title: + m_Owners: + - {fileID: 8926484042661614558} + - {fileID: 8926484042661614585} + dataType: 0 + capacity: 32 + stripCapacity: 16 + particlePerStripCount: 16 + needsComputeBounds: 0 + boundsSettingMode: 1 + m_Space: 1 +--- !u!114 &8926484042661614585 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a0b9e6b9139e58d4c957ec54595da7d3, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UIIgnoredErrors: [] + m_Parent: {fileID: 114350483966674976} + m_Children: [] + m_UIPosition: {x: 941, y: 470} + m_UICollapsed: 0 + m_UISuperCollapsed: 0 + m_InputSlots: + - {fileID: 8926484042661614613} + m_OutputSlots: [] + m_Label: + m_Data: {fileID: 8926484042661614568} + m_InputFlowSlot: + - link: + - context: {fileID: 8926484042661614558} + slotIndex: 0 + m_OutputFlowSlot: + - link: [] + blendMode: 1 + useAlphaClipping: 0 + generateMotionVector: 0 + excludeFromTAA: 0 + materialOffset: 0 + m_SubOutputs: + - {fileID: 8926484042661614590} + cullMode: 0 + zWriteMode: 0 + zTestMode: 0 + colorMapping: 0 + uvMode: 0 + useSoftParticle: 0 + sortPriority: 0 + sort: 0 + indirectDraw: 0 + computeCulling: 0 + frustumCulling: 0 + castShadows: 0 + useExposureWeight: 0 + flipbookLayout: 0 + shaderGraph: {fileID: 4333940904281232215, guid: 01491bc83e36a6f4bb6487ac18ae12ad, + type: 3} + materialSettings: + m_PropertyNames: + - _RenderQueueType + - _AddPrecomputedVelocity + - _DepthOffsetEnable + - _ConservativeDepthOffsetEnable + - _TransparentWritingMotionVec + - _AlphaCutoffEnable + - _TransparentSortPriority + - _UseShadowThreshold + - _DoubleSidedEnable + - _DoubleSidedNormalMode + - _DoubleSidedGIMode + - _TransparentDepthPrepassEnable + - _TransparentDepthPostpassEnable + - _SurfaceType + - _BlendMode + - _SrcBlend + - _DstBlend + - _AlphaSrcBlend + - _AlphaDstBlend + - _AlphaToMask + - _AlphaToMaskInspectorValue + - _ZWrite + - _TransparentZWrite + - _CullMode + - _EnableFogOnTransparent + - _CullModeForward + - _TransparentCullMode + - _OpaqueCullMode + - _ZTestDepthEqualForOpaque + - _ZTestTransparent + - _TransparentBackfaceEnable + - _EnableBlendModePreserveSpecularLighting + - _StencilRef + - _StencilWriteMask + - _StencilRefDepth + - _StencilWriteMaskDepth + - _StencilRefMV + - _StencilWriteMaskMV + - _StencilRefDistortionVec + - _StencilWriteMaskDistortionVec + - _StencilWriteMaskGBuffer + - _StencilRefGBuffer + - _ZTestGBuffer + m_PropertyValues: + - 1 + - 0 + - 0 + - 0 + - 0 + - 0 + - 0 + - 0 + - 0 + - 2 + - 0 + - 0 + - 0 + - 0 + - 0 + - 1 + - 0 + - 1 + - 0 + - 0 + - 0 + - 1 + - 0 + - 2 + - 1 + - 2 + - 2 + - 2 + - 3 + - 4 + - 0 + - 0 + - 0 + - 6 + - 0 + - 8 + - 32 + - 40 + - 4 + - 4 + - 14 + - 2 + - 4 + primitiveType: 1 + useGeometryShader: 0 +--- !u!114 &8926484042661614586 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 70a331b1d86cc8d4aa106ccbe0da5852, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UIIgnoredErrors: [] + m_Parent: {fileID: 0} + m_Children: [] + m_UIPosition: {x: 0, y: 0} + m_UICollapsed: 1 + m_UISuperCollapsed: 0 + m_MasterSlot: {fileID: 8926484042661614586} + m_MasterData: + m_Owner: {fileID: 0} + m_Value: + m_Type: + m_SerializableType: UnityEngine.Texture2D, UnityEngine.CoreModule, Version=0.0.0.0, + Culture=neutral, PublicKeyToken=null + m_SerializableObject: '{"obj":{"fileID":2800000,"guid":"276d9e395ae18fe40a9b4988549f2349","type":3}}' + m_Space: 2147483647 + m_Property: + name: mainTexture + m_serializedType: + m_SerializableType: UnityEngine.Texture2D, UnityEngine.CoreModule, Version=0.0.0.0, + Culture=neutral, PublicKeyToken=null + m_Direction: 0 + m_LinkedSlots: [] +--- !u!114 &8926484042661614590 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 081ffb0090424ba4cb05370a42ead6b9, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UIIgnoredErrors: [] + m_Parent: {fileID: 0} + m_Children: [] + m_UIPosition: {x: 0, y: 0} + m_UICollapsed: 1 + m_UISuperCollapsed: 0 + opaqueRenderQueue: 0 + transparentRenderQueue: 1 +--- !u!114 &8926484042661614595 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f68759077adc0b143b6e1c101e82065e, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UIIgnoredErrors: [] + m_Parent: {fileID: 114350483966674976} + m_Children: [] + m_UIPosition: {x: 0, y: 0} + m_UICollapsed: 1 + m_UISuperCollapsed: 0 + title: + m_Owners: + - {fileID: 8926484042661614555} +--- !u!114 &8926484042661614596 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d78581a96eae8bf4398c282eb0b098bd, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UIIgnoredErrors: [] + m_Parent: {fileID: 0} + m_Children: [] + m_UIPosition: {x: 0, y: 0} + m_UICollapsed: 1 + m_UISuperCollapsed: 0 + title: + m_Owners: [] + dataType: 0 + capacity: 128 + stripCapacity: 1 + particlePerStripCount: 128 + needsComputeBounds: 0 + boundsSettingMode: 0 + m_Space: 0 +--- !u!114 &8926484042661614597 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a971fa2e110a0ac42ac1d8dae408704b, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UIIgnoredErrors: [] + m_Parent: {fileID: 8926484042661614558} + m_Children: [] + m_UIPosition: {x: 0, y: 0} + m_UICollapsed: 0 + m_UISuperCollapsed: 0 + m_InputSlots: + - {fileID: 8926484042661614603} + - {fileID: 8926484042661614608} + m_OutputSlots: [] + m_Disabled: 0 + attribute: position + Composition: 0 + Source: 0 + Random: 1 + channels: 6 +--- !u!114 &8926484042661614603 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5265657162cc1a241bba03a3b0476d99, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UIIgnoredErrors: [] + m_Parent: {fileID: 0} + m_Children: + - {fileID: 8926484042661614604} + m_UIPosition: {x: 0, y: 0} + m_UICollapsed: 1 + m_UISuperCollapsed: 0 + m_MasterSlot: {fileID: 8926484042661614603} + m_MasterData: + m_Owner: {fileID: 8926484042661614597} + m_Value: + m_Type: + m_SerializableType: UnityEditor.VFX.Position, Unity.VisualEffectGraph.Editor, + Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + m_SerializableObject: '{"position":{"x":0.0,"y":0.0,"z":0.0}}' + m_Space: 1 + m_Property: + name: A + m_serializedType: + m_SerializableType: UnityEditor.VFX.Position, Unity.VisualEffectGraph.Editor, + Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + m_Direction: 0 + m_LinkedSlots: [] +--- !u!114 &8926484042661614604 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ac39bd03fca81b849929b9c966f1836a, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UIIgnoredErrors: [] + m_Parent: {fileID: 8926484042661614603} + m_Children: + - {fileID: 8926484042661614605} + - {fileID: 8926484042661614606} + - {fileID: 8926484042661614607} + m_UIPosition: {x: 0, y: 0} + m_UICollapsed: 1 + m_UISuperCollapsed: 0 + m_MasterSlot: {fileID: 8926484042661614603} + m_MasterData: + m_Owner: {fileID: 0} + m_Value: + m_Type: + m_SerializableType: + m_SerializableObject: + m_Space: 2147483647 + m_Property: + name: position + m_serializedType: + m_SerializableType: UnityEngine.Vector3, UnityEngine.CoreModule, Version=0.0.0.0, + Culture=neutral, PublicKeyToken=null + m_Direction: 0 + m_LinkedSlots: [] +--- !u!114 &8926484042661614605 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f780aa281814f9842a7c076d436932e7, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UIIgnoredErrors: [] + m_Parent: {fileID: 8926484042661614604} + m_Children: [] + m_UIPosition: {x: 0, y: 0} + m_UICollapsed: 1 + m_UISuperCollapsed: 0 + m_MasterSlot: {fileID: 8926484042661614603} + m_MasterData: + m_Owner: {fileID: 0} + m_Value: + m_Type: + m_SerializableType: + m_SerializableObject: + m_Space: 2147483647 + m_Property: + name: x + m_serializedType: + m_SerializableType: System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, + PublicKeyToken=b77a5c561934e089 + m_Direction: 0 + m_LinkedSlots: [] +--- !u!114 &8926484042661614606 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f780aa281814f9842a7c076d436932e7, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UIIgnoredErrors: [] + m_Parent: {fileID: 8926484042661614604} + m_Children: [] + m_UIPosition: {x: 0, y: 0} + m_UICollapsed: 1 + m_UISuperCollapsed: 0 + m_MasterSlot: {fileID: 8926484042661614603} + m_MasterData: + m_Owner: {fileID: 0} + m_Value: + m_Type: + m_SerializableType: + m_SerializableObject: + m_Space: 2147483647 + m_Property: + name: y + m_serializedType: + m_SerializableType: System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, + PublicKeyToken=b77a5c561934e089 + m_Direction: 0 + m_LinkedSlots: [] +--- !u!114 &8926484042661614607 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f780aa281814f9842a7c076d436932e7, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UIIgnoredErrors: [] + m_Parent: {fileID: 8926484042661614604} + m_Children: [] + m_UIPosition: {x: 0, y: 0} + m_UICollapsed: 1 + m_UISuperCollapsed: 0 + m_MasterSlot: {fileID: 8926484042661614603} + m_MasterData: + m_Owner: {fileID: 0} + m_Value: + m_Type: + m_SerializableType: + m_SerializableObject: + m_Space: 2147483647 + m_Property: + name: z + m_serializedType: + m_SerializableType: System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, + PublicKeyToken=b77a5c561934e089 + m_Direction: 0 + m_LinkedSlots: [] +--- !u!114 &8926484042661614608 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5265657162cc1a241bba03a3b0476d99, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UIIgnoredErrors: [] + m_Parent: {fileID: 0} + m_Children: + - {fileID: 8926484042661614609} + m_UIPosition: {x: 0, y: 0} + m_UICollapsed: 1 + m_UISuperCollapsed: 0 + m_MasterSlot: {fileID: 8926484042661614608} + m_MasterData: + m_Owner: {fileID: 8926484042661614597} + m_Value: + m_Type: + m_SerializableType: UnityEditor.VFX.Position, Unity.VisualEffectGraph.Editor, + Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + m_SerializableObject: '{"position":{"x":1.0,"y":1.0,"z":1.0}}' + m_Space: 0 + m_Property: + name: B + m_serializedType: + m_SerializableType: UnityEditor.VFX.Position, Unity.VisualEffectGraph.Editor, + Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + m_Direction: 0 + m_LinkedSlots: [] +--- !u!114 &8926484042661614609 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ac39bd03fca81b849929b9c966f1836a, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UIIgnoredErrors: [] + m_Parent: {fileID: 8926484042661614608} + m_Children: + - {fileID: 8926484042661614610} + - {fileID: 8926484042661614611} + - {fileID: 8926484042661614612} + m_UIPosition: {x: 0, y: 0} + m_UICollapsed: 1 + m_UISuperCollapsed: 0 + m_MasterSlot: {fileID: 8926484042661614608} + m_MasterData: + m_Owner: {fileID: 0} + m_Value: + m_Type: + m_SerializableType: + m_SerializableObject: + m_Space: 2147483647 + m_Property: + name: position + m_serializedType: + m_SerializableType: UnityEngine.Vector3, UnityEngine.CoreModule, Version=0.0.0.0, + Culture=neutral, PublicKeyToken=null + m_Direction: 0 + m_LinkedSlots: [] +--- !u!114 &8926484042661614610 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f780aa281814f9842a7c076d436932e7, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UIIgnoredErrors: [] + m_Parent: {fileID: 8926484042661614609} + m_Children: [] + m_UIPosition: {x: 0, y: 0} + m_UICollapsed: 1 + m_UISuperCollapsed: 0 + m_MasterSlot: {fileID: 8926484042661614608} + m_MasterData: + m_Owner: {fileID: 0} + m_Value: + m_Type: + m_SerializableType: + m_SerializableObject: + m_Space: 2147483647 + m_Property: + name: x + m_serializedType: + m_SerializableType: System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, + PublicKeyToken=b77a5c561934e089 + m_Direction: 0 + m_LinkedSlots: [] +--- !u!114 &8926484042661614611 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f780aa281814f9842a7c076d436932e7, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UIIgnoredErrors: [] + m_Parent: {fileID: 8926484042661614609} + m_Children: [] + m_UIPosition: {x: 0, y: 0} + m_UICollapsed: 1 + m_UISuperCollapsed: 0 + m_MasterSlot: {fileID: 8926484042661614608} + m_MasterData: + m_Owner: {fileID: 0} + m_Value: + m_Type: + m_SerializableType: + m_SerializableObject: + m_Space: 2147483647 + m_Property: + name: y + m_serializedType: + m_SerializableType: System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, + PublicKeyToken=b77a5c561934e089 + m_Direction: 0 + m_LinkedSlots: [] +--- !u!114 &8926484042661614612 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f780aa281814f9842a7c076d436932e7, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UIIgnoredErrors: [] + m_Parent: {fileID: 8926484042661614609} + m_Children: [] + m_UIPosition: {x: 0, y: 0} + m_UICollapsed: 1 + m_UISuperCollapsed: 0 + m_MasterSlot: {fileID: 8926484042661614608} + m_MasterData: + m_Owner: {fileID: 0} + m_Value: + m_Type: + m_SerializableType: + m_SerializableObject: + m_Space: 2147483647 + m_Property: + name: z + m_serializedType: + m_SerializableType: System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, + PublicKeyToken=b77a5c561934e089 + m_Direction: 0 + m_LinkedSlots: [] +--- !u!114 &8926484042661614613 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ac39bd03fca81b849929b9c966f1836a, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UIIgnoredErrors: [] + m_Parent: {fileID: 0} + m_Children: + - {fileID: 8926484042661614614} + - {fileID: 8926484042661614615} + - {fileID: 8926484042661614616} + m_UIPosition: {x: 0, y: 0} + m_UICollapsed: 1 + m_UISuperCollapsed: 0 + m_MasterSlot: {fileID: 8926484042661614613} + m_MasterData: + m_Owner: {fileID: 8926484042661614585} + m_Value: + m_Type: + m_SerializableType: UnityEngine.Vector3, UnityEngine.CoreModule, Version=0.0.0.0, + Culture=neutral, PublicKeyToken=null + m_SerializableObject: '{"x":0.0,"y":0.0,"z":0.0}' + m_Space: 2147483647 + m_Property: + name: _Name_A + m_serializedType: + m_SerializableType: UnityEngine.Vector3, UnityEngine.CoreModule, Version=0.0.0.0, + Culture=neutral, PublicKeyToken=null + m_Direction: 0 + m_LinkedSlots: [] +--- !u!114 &8926484042661614614 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f780aa281814f9842a7c076d436932e7, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UIIgnoredErrors: [] + m_Parent: {fileID: 8926484042661614613} + m_Children: [] + m_UIPosition: {x: 0, y: 0} + m_UICollapsed: 1 + m_UISuperCollapsed: 0 + m_MasterSlot: {fileID: 8926484042661614613} + m_MasterData: + m_Owner: {fileID: 0} + m_Value: + m_Type: + m_SerializableType: + m_SerializableObject: + m_Space: 2147483647 + m_Property: + name: x + m_serializedType: + m_SerializableType: System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, + PublicKeyToken=b77a5c561934e089 + m_Direction: 0 + m_LinkedSlots: [] +--- !u!114 &8926484042661614615 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f780aa281814f9842a7c076d436932e7, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UIIgnoredErrors: [] + m_Parent: {fileID: 8926484042661614613} + m_Children: [] + m_UIPosition: {x: 0, y: 0} + m_UICollapsed: 1 + m_UISuperCollapsed: 0 + m_MasterSlot: {fileID: 8926484042661614613} + m_MasterData: + m_Owner: {fileID: 0} + m_Value: + m_Type: + m_SerializableType: + m_SerializableObject: + m_Space: 2147483647 + m_Property: + name: y + m_serializedType: + m_SerializableType: System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, + PublicKeyToken=b77a5c561934e089 + m_Direction: 0 + m_LinkedSlots: [] +--- !u!114 &8926484042661614616 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f780aa281814f9842a7c076d436932e7, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UIIgnoredErrors: [] + m_Parent: {fileID: 8926484042661614613} + m_Children: [] + m_UIPosition: {x: 0, y: 0} + m_UICollapsed: 1 + m_UISuperCollapsed: 0 + m_MasterSlot: {fileID: 8926484042661614613} + m_MasterData: + m_Owner: {fileID: 0} + m_Value: + m_Type: + m_SerializableType: + m_SerializableObject: + m_Space: 2147483647 + m_Property: + name: z + m_serializedType: + m_SerializableType: System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, + PublicKeyToken=b77a5c561934e089 + m_Direction: 0 + m_LinkedSlots: [] diff --git a/TestProjects/VisualEffectGraph_HDRP/Assets/AllTests/Editor/Tests/Modify_SG_Property.vfx.meta b/TestProjects/VisualEffectGraph_HDRP/Assets/AllTests/Editor/Tests/Modify_SG_Property.vfx.meta new file mode 100644 index 00000000000..b3a2d2e37cd --- /dev/null +++ b/TestProjects/VisualEffectGraph_HDRP/Assets/AllTests/Editor/Tests/Modify_SG_Property.vfx.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: dc9667f897f6f4b4286f53ee3a303c4d +VisualEffectImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/TestProjects/VisualEffectGraph_HDRP/Assets/AllTests/Editor/Tests/Modify_SG_Property_A.shadergraph b/TestProjects/VisualEffectGraph_HDRP/Assets/AllTests/Editor/Tests/Modify_SG_Property_A.shadergraph new file mode 100644 index 00000000000..c51b77f5e65 --- /dev/null +++ b/TestProjects/VisualEffectGraph_HDRP/Assets/AllTests/Editor/Tests/Modify_SG_Property_A.shadergraph @@ -0,0 +1,641 @@ +{ + "m_SGVersion": 3, + "m_Type": "UnityEditor.ShaderGraph.GraphData", + "m_ObjectId": "a63e5a6eef7b4500b98b0bb2f6193caa", + "m_Properties": [ + { + "m_Id": "b816cb8fc9944765bea07039669e1827" + } + ], + "m_Keywords": [], + "m_Dropdowns": [], + "m_CategoryData": [ + { + "m_Id": "ce4fee01ecc5494ebc51fcb6cecdfad4" + } + ], + "m_Nodes": [ + { + "m_Id": "753d35dffc9a42a78ab1e9690e30b2d0" + }, + { + "m_Id": "b844bfe248f848ccb59fbb6119502f6f" + }, + { + "m_Id": "2873684238ae403d9a3823cd58b960f6" + }, + { + "m_Id": "4b2a9cef1f66413c94595b9903bbf9f9" + }, + { + "m_Id": "bf86e8ecc7e743f8801253b491f29388" + }, + { + "m_Id": "2ed5e3de147a4b42bcd31d46f561d88a" + }, + { + "m_Id": "deaa16e6676e47f19a5a20ff4c646a8b" + } + ], + "m_GroupDatas": [], + "m_StickyNoteDatas": [], + "m_Edges": [ + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "deaa16e6676e47f19a5a20ff4c646a8b" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "2873684238ae403d9a3823cd58b960f6" + }, + "m_SlotId": 0 + } + } + ], + "m_VertexContext": { + "m_Position": { + "x": 0.0, + "y": 0.0 + }, + "m_Blocks": [ + { + "m_Id": "2873684238ae403d9a3823cd58b960f6" + }, + { + "m_Id": "4b2a9cef1f66413c94595b9903bbf9f9" + }, + { + "m_Id": "bf86e8ecc7e743f8801253b491f29388" + } + ] + }, + "m_FragmentContext": { + "m_Position": { + "x": 0.0, + "y": 200.0 + }, + "m_Blocks": [ + { + "m_Id": "753d35dffc9a42a78ab1e9690e30b2d0" + }, + { + "m_Id": "b844bfe248f848ccb59fbb6119502f6f" + }, + { + "m_Id": "2ed5e3de147a4b42bcd31d46f561d88a" + } + ] + }, + "m_PreviewData": { + "serializedMesh": { + "m_SerializedMesh": "{\"mesh\":{\"instanceID\":0}}", + "m_Guid": "" + }, + "preventRotation": false + }, + "m_Path": "Shader Graphs", + "m_GraphPrecision": 1, + "m_PreviewMode": 2, + "m_OutputNode": { + "m_Id": "" + }, + "m_ActiveTargets": [ + { + "m_Id": "bdd5219c378c4f91a1928a046b38240b" + } + ] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PositionMaterialSlot", + "m_ObjectId": "1e76162b759b48fbb30bd78d95bf46a1", + "m_Id": 0, + "m_DisplayName": "Position", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Position", + "m_StageCapability": 1, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [], + "m_Space": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "27f243ac01a14d2f8a098d1935b25b2f", + "m_Id": 0, + "m_DisplayName": "Alpha", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Alpha", + "m_StageCapability": 2, + "m_Value": 1.0, + "m_DefaultValue": 1.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "2873684238ae403d9a3823cd58b960f6", + "m_Group": { + "m_Id": "" + }, + "m_Name": "VertexDescription.Position", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "1e76162b759b48fbb30bd78d95bf46a1" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "VertexDescription.Position" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.Rendering.HighDefinition.ShaderGraph.BuiltinData", + "m_ObjectId": "2cf291543fbe446fa6fc99735ba20046", + "m_Distortion": false, + "m_DistortionMode": 0, + "m_DistortionDepthTest": true, + "m_AddPrecomputedVelocity": false, + "m_TransparentWritesMotionVec": false, + "m_AlphaToMask": false, + "m_DepthOffset": false, + "m_ConservativeDepthOffset": false, + "m_TransparencyFog": true, + "m_AlphaTestShadow": false, + "m_BackThenFrontRendering": false, + "m_TransparentDepthPrepass": false, + "m_TransparentDepthPostpass": false, + "m_SupportLodCrossFade": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "2ed5e3de147a4b42bcd31d46f561d88a", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.Emission", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "45a4f76b53914a988cd0fe8a0030d491" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.Emission" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.ColorRGBMaterialSlot", + "m_ObjectId": "45a4f76b53914a988cd0fe8a0030d491", + "m_Id": 0, + "m_DisplayName": "Emission", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Emission", + "m_StageCapability": 2, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [], + "m_ColorMode": 1, + "m_DefaultColor": { + "r": 0.0, + "g": 0.0, + "b": 0.0, + "a": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "4b2a9cef1f66413c94595b9903bbf9f9", + "m_Group": { + "m_Id": "" + }, + "m_Name": "VertexDescription.Normal", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "9b125236c42d4169839381f463fdbcd7" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "VertexDescription.Normal" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", + "m_ObjectId": "5a24f1dac44444f1b86992f76846ef25", + "m_Id": 0, + "m_DisplayName": "Name_A", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.Rendering.HighDefinition.ShaderGraph.SystemData", + "m_ObjectId": "726146df5d4a49a78dcbcd55edb01893", + "m_MaterialNeedsUpdateHash": 0, + "m_SurfaceType": 0, + "m_RenderingPass": 1, + "m_BlendMode": 0, + "m_ZTest": 4, + "m_ZWrite": false, + "m_TransparentCullMode": 2, + "m_OpaqueCullMode": 2, + "m_SortPriority": 0, + "m_AlphaTest": false, + "m_TransparentDepthPrepass": false, + "m_TransparentDepthPostpass": false, + "m_SupportLodCrossFade": false, + "m_DoubleSidedMode": 0, + "m_DOTSInstancing": false, + "m_CustomVelocity": false, + "m_Tessellation": false, + "m_TessellationMode": 0, + "m_TessellationFactorMinDistance": 20.0, + "m_TessellationFactorMaxDistance": 50.0, + "m_TessellationFactorTriangleSize": 100.0, + "m_TessellationShapeFactor": 0.75, + "m_TessellationBackFaceCullEpsilon": -0.25, + "m_TessellationMaxDisplacement": 0.009999999776482582, + "m_Version": 1, + "inspectorFoldoutMask": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "753d35dffc9a42a78ab1e9690e30b2d0", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.BaseColor", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "b255b88bc8e64af1bd5b22e6369d4246" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.BaseColor" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.Rendering.HighDefinition.ShaderGraph.HDUnlitSubTarget", + "m_ObjectId": "8e62b588886f48b3a1a698389416967c" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.NormalMaterialSlot", + "m_ObjectId": "9b125236c42d4169839381f463fdbcd7", + "m_Id": 0, + "m_DisplayName": "Normal", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Normal", + "m_StageCapability": 1, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [], + "m_Space": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.Rendering.HighDefinition.ShaderGraph.HDUnlitData", + "m_ObjectId": "a8818ba8cabc4a088875345d1926f48a", + "m_EnableShadowMatte": false, + "m_DistortionOnly": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.ColorRGBMaterialSlot", + "m_ObjectId": "b255b88bc8e64af1bd5b22e6369d4246", + "m_Id": 0, + "m_DisplayName": "Base Color", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "BaseColor", + "m_StageCapability": 2, + "m_Value": { + "x": 0.5, + "y": 0.5, + "z": 0.5 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [], + "m_ColorMode": 0, + "m_DefaultColor": { + "r": 0.5, + "g": 0.5, + "b": 0.5, + "a": 1.0 + } +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector3ShaderProperty", + "m_ObjectId": "b816cb8fc9944765bea07039669e1827", + "m_Guid": { + "m_GuidSerialized": "94723039-3c32-4c71-b453-c54ec3a09ce5" + }, + "m_Name": "Name_A", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "Name_A", + "m_DefaultReferenceName": "_Name_A", + "m_OverrideReferenceName": "", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "b844bfe248f848ccb59fbb6119502f6f", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.Alpha", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "27f243ac01a14d2f8a098d1935b25b2f" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.Alpha" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.Rendering.HighDefinition.ShaderGraph.HDTarget", + "m_ObjectId": "bdd5219c378c4f91a1928a046b38240b", + "m_ActiveSubTarget": { + "m_Id": "8e62b588886f48b3a1a698389416967c" + }, + "m_Datas": [ + { + "m_Id": "2cf291543fbe446fa6fc99735ba20046" + }, + { + "m_Id": "726146df5d4a49a78dcbcd55edb01893" + }, + { + "m_Id": "a8818ba8cabc4a088875345d1926f48a" + } + ], + "m_CustomEditorGUI": "", + "m_SupportVFX": true +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "bf86e8ecc7e743f8801253b491f29388", + "m_Group": { + "m_Id": "" + }, + "m_Name": "VertexDescription.Tangent", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "ca9aec10fc4742bfb5cedfd22ee84ca4" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "VertexDescription.Tangent" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.TangentMaterialSlot", + "m_ObjectId": "ca9aec10fc4742bfb5cedfd22ee84ca4", + "m_Id": 0, + "m_DisplayName": "Tangent", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Tangent", + "m_StageCapability": 1, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [], + "m_Space": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.CategoryData", + "m_ObjectId": "ce4fee01ecc5494ebc51fcb6cecdfad4", + "m_Name": "", + "m_ChildObjectList": [ + { + "m_Id": "b816cb8fc9944765bea07039669e1827" + } + ] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "deaa16e6676e47f19a5a20ff4c646a8b", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -188.0, + "y": 35.999996185302737, + "width": 120.00001525878906, + "height": 34.0000114440918 + } + }, + "m_Slots": [ + { + "m_Id": "5a24f1dac44444f1b86992f76846ef25" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "b816cb8fc9944765bea07039669e1827" + } +} + diff --git a/TestProjects/VisualEffectGraph_HDRP/Assets/AllTests/Editor/Tests/Modify_SG_Property_A.shadergraph.meta b/TestProjects/VisualEffectGraph_HDRP/Assets/AllTests/Editor/Tests/Modify_SG_Property_A.shadergraph.meta new file mode 100644 index 00000000000..90c9bc56be0 --- /dev/null +++ b/TestProjects/VisualEffectGraph_HDRP/Assets/AllTests/Editor/Tests/Modify_SG_Property_A.shadergraph.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 01491bc83e36a6f4bb6487ac18ae12ad +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3} diff --git a/TestProjects/VisualEffectGraph_HDRP/Assets/AllTests/Editor/Tests/Modify_SG_Property_B.shadergraph b/TestProjects/VisualEffectGraph_HDRP/Assets/AllTests/Editor/Tests/Modify_SG_Property_B.shadergraph new file mode 100644 index 00000000000..c2feda22b2d --- /dev/null +++ b/TestProjects/VisualEffectGraph_HDRP/Assets/AllTests/Editor/Tests/Modify_SG_Property_B.shadergraph @@ -0,0 +1,641 @@ +{ + "m_SGVersion": 3, + "m_Type": "UnityEditor.ShaderGraph.GraphData", + "m_ObjectId": "a63e5a6eef7b4500b98b0bb2f6193caa", + "m_Properties": [ + { + "m_Id": "b816cb8fc9944765bea07039669e1827" + } + ], + "m_Keywords": [], + "m_Dropdowns": [], + "m_CategoryData": [ + { + "m_Id": "ce4fee01ecc5494ebc51fcb6cecdfad4" + } + ], + "m_Nodes": [ + { + "m_Id": "753d35dffc9a42a78ab1e9690e30b2d0" + }, + { + "m_Id": "b844bfe248f848ccb59fbb6119502f6f" + }, + { + "m_Id": "2873684238ae403d9a3823cd58b960f6" + }, + { + "m_Id": "4b2a9cef1f66413c94595b9903bbf9f9" + }, + { + "m_Id": "bf86e8ecc7e743f8801253b491f29388" + }, + { + "m_Id": "2ed5e3de147a4b42bcd31d46f561d88a" + }, + { + "m_Id": "deaa16e6676e47f19a5a20ff4c646a8b" + } + ], + "m_GroupDatas": [], + "m_StickyNoteDatas": [], + "m_Edges": [ + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "deaa16e6676e47f19a5a20ff4c646a8b" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "2873684238ae403d9a3823cd58b960f6" + }, + "m_SlotId": 0 + } + } + ], + "m_VertexContext": { + "m_Position": { + "x": 0.0, + "y": 0.0 + }, + "m_Blocks": [ + { + "m_Id": "2873684238ae403d9a3823cd58b960f6" + }, + { + "m_Id": "4b2a9cef1f66413c94595b9903bbf9f9" + }, + { + "m_Id": "bf86e8ecc7e743f8801253b491f29388" + } + ] + }, + "m_FragmentContext": { + "m_Position": { + "x": 0.0, + "y": 200.0 + }, + "m_Blocks": [ + { + "m_Id": "753d35dffc9a42a78ab1e9690e30b2d0" + }, + { + "m_Id": "b844bfe248f848ccb59fbb6119502f6f" + }, + { + "m_Id": "2ed5e3de147a4b42bcd31d46f561d88a" + } + ] + }, + "m_PreviewData": { + "serializedMesh": { + "m_SerializedMesh": "{\"mesh\":{\"instanceID\":0}}", + "m_Guid": "" + }, + "preventRotation": false + }, + "m_Path": "Shader Graphs", + "m_GraphPrecision": 1, + "m_PreviewMode": 2, + "m_OutputNode": { + "m_Id": "" + }, + "m_ActiveTargets": [ + { + "m_Id": "bdd5219c378c4f91a1928a046b38240b" + } + ] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PositionMaterialSlot", + "m_ObjectId": "1e76162b759b48fbb30bd78d95bf46a1", + "m_Id": 0, + "m_DisplayName": "Position", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Position", + "m_StageCapability": 1, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [], + "m_Space": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "27f243ac01a14d2f8a098d1935b25b2f", + "m_Id": 0, + "m_DisplayName": "Alpha", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Alpha", + "m_StageCapability": 2, + "m_Value": 1.0, + "m_DefaultValue": 1.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "2873684238ae403d9a3823cd58b960f6", + "m_Group": { + "m_Id": "" + }, + "m_Name": "VertexDescription.Position", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "1e76162b759b48fbb30bd78d95bf46a1" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "VertexDescription.Position" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.Rendering.HighDefinition.ShaderGraph.BuiltinData", + "m_ObjectId": "2cf291543fbe446fa6fc99735ba20046", + "m_Distortion": false, + "m_DistortionMode": 0, + "m_DistortionDepthTest": true, + "m_AddPrecomputedVelocity": false, + "m_TransparentWritesMotionVec": false, + "m_AlphaToMask": false, + "m_DepthOffset": false, + "m_ConservativeDepthOffset": false, + "m_TransparencyFog": true, + "m_AlphaTestShadow": false, + "m_BackThenFrontRendering": false, + "m_TransparentDepthPrepass": false, + "m_TransparentDepthPostpass": false, + "m_SupportLodCrossFade": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "2ed5e3de147a4b42bcd31d46f561d88a", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.Emission", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "45a4f76b53914a988cd0fe8a0030d491" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.Emission" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.ColorRGBMaterialSlot", + "m_ObjectId": "45a4f76b53914a988cd0fe8a0030d491", + "m_Id": 0, + "m_DisplayName": "Emission", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Emission", + "m_StageCapability": 2, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [], + "m_ColorMode": 1, + "m_DefaultColor": { + "r": 0.0, + "g": 0.0, + "b": 0.0, + "a": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "4b2a9cef1f66413c94595b9903bbf9f9", + "m_Group": { + "m_Id": "" + }, + "m_Name": "VertexDescription.Normal", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "9b125236c42d4169839381f463fdbcd7" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "VertexDescription.Normal" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", + "m_ObjectId": "5a24f1dac44444f1b86992f76846ef25", + "m_Id": 0, + "m_DisplayName": "Name_B", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.Rendering.HighDefinition.ShaderGraph.SystemData", + "m_ObjectId": "726146df5d4a49a78dcbcd55edb01893", + "m_MaterialNeedsUpdateHash": 0, + "m_SurfaceType": 0, + "m_RenderingPass": 1, + "m_BlendMode": 0, + "m_ZTest": 4, + "m_ZWrite": false, + "m_TransparentCullMode": 2, + "m_OpaqueCullMode": 2, + "m_SortPriority": 0, + "m_AlphaTest": false, + "m_TransparentDepthPrepass": false, + "m_TransparentDepthPostpass": false, + "m_SupportLodCrossFade": false, + "m_DoubleSidedMode": 0, + "m_DOTSInstancing": false, + "m_CustomVelocity": false, + "m_Tessellation": false, + "m_TessellationMode": 0, + "m_TessellationFactorMinDistance": 20.0, + "m_TessellationFactorMaxDistance": 50.0, + "m_TessellationFactorTriangleSize": 100.0, + "m_TessellationShapeFactor": 0.75, + "m_TessellationBackFaceCullEpsilon": -0.25, + "m_TessellationMaxDisplacement": 0.009999999776482582, + "m_Version": 1, + "inspectorFoldoutMask": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "753d35dffc9a42a78ab1e9690e30b2d0", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.BaseColor", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "b255b88bc8e64af1bd5b22e6369d4246" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.BaseColor" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.Rendering.HighDefinition.ShaderGraph.HDUnlitSubTarget", + "m_ObjectId": "8e62b588886f48b3a1a698389416967c" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.NormalMaterialSlot", + "m_ObjectId": "9b125236c42d4169839381f463fdbcd7", + "m_Id": 0, + "m_DisplayName": "Normal", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Normal", + "m_StageCapability": 1, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [], + "m_Space": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.Rendering.HighDefinition.ShaderGraph.HDUnlitData", + "m_ObjectId": "a8818ba8cabc4a088875345d1926f48a", + "m_EnableShadowMatte": false, + "m_DistortionOnly": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.ColorRGBMaterialSlot", + "m_ObjectId": "b255b88bc8e64af1bd5b22e6369d4246", + "m_Id": 0, + "m_DisplayName": "Base Color", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "BaseColor", + "m_StageCapability": 2, + "m_Value": { + "x": 0.5, + "y": 0.5, + "z": 0.5 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [], + "m_ColorMode": 0, + "m_DefaultColor": { + "r": 0.5, + "g": 0.5, + "b": 0.5, + "a": 1.0 + } +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector3ShaderProperty", + "m_ObjectId": "b816cb8fc9944765bea07039669e1827", + "m_Guid": { + "m_GuidSerialized": "94723039-3c32-4c71-b453-c54ec3a09ce5" + }, + "m_Name": "Name_B", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "Name_B", + "m_DefaultReferenceName": "_Name_B", + "m_OverrideReferenceName": "", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "b844bfe248f848ccb59fbb6119502f6f", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.Alpha", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "27f243ac01a14d2f8a098d1935b25b2f" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.Alpha" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.Rendering.HighDefinition.ShaderGraph.HDTarget", + "m_ObjectId": "bdd5219c378c4f91a1928a046b38240b", + "m_ActiveSubTarget": { + "m_Id": "8e62b588886f48b3a1a698389416967c" + }, + "m_Datas": [ + { + "m_Id": "2cf291543fbe446fa6fc99735ba20046" + }, + { + "m_Id": "726146df5d4a49a78dcbcd55edb01893" + }, + { + "m_Id": "a8818ba8cabc4a088875345d1926f48a" + } + ], + "m_CustomEditorGUI": "", + "m_SupportVFX": true +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "bf86e8ecc7e743f8801253b491f29388", + "m_Group": { + "m_Id": "" + }, + "m_Name": "VertexDescription.Tangent", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "ca9aec10fc4742bfb5cedfd22ee84ca4" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "VertexDescription.Tangent" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.TangentMaterialSlot", + "m_ObjectId": "ca9aec10fc4742bfb5cedfd22ee84ca4", + "m_Id": 0, + "m_DisplayName": "Tangent", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Tangent", + "m_StageCapability": 1, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [], + "m_Space": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.CategoryData", + "m_ObjectId": "ce4fee01ecc5494ebc51fcb6cecdfad4", + "m_Name": "", + "m_ChildObjectList": [ + { + "m_Id": "b816cb8fc9944765bea07039669e1827" + } + ] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "deaa16e6676e47f19a5a20ff4c646a8b", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -188.0, + "y": 35.999996185302737, + "width": 120.00001525878906, + "height": 34.0000114440918 + } + }, + "m_Slots": [ + { + "m_Id": "5a24f1dac44444f1b86992f76846ef25" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "b816cb8fc9944765bea07039669e1827" + } +} + diff --git a/TestProjects/VisualEffectGraph_HDRP/Assets/AllTests/Editor/Tests/Modify_SG_Property_B.shadergraph.meta b/TestProjects/VisualEffectGraph_HDRP/Assets/AllTests/Editor/Tests/Modify_SG_Property_B.shadergraph.meta new file mode 100644 index 00000000000..526fd1b3f8d --- /dev/null +++ b/TestProjects/VisualEffectGraph_HDRP/Assets/AllTests/Editor/Tests/Modify_SG_Property_B.shadergraph.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: cc8ac10b542a4484bbc8263254169a12 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3} diff --git a/TestProjects/VisualEffectGraph_HDRP/Assets/AllTests/Editor/Tests/VFXSerializationTests.cs b/TestProjects/VisualEffectGraph_HDRP/Assets/AllTests/Editor/Tests/VFXSerializationTests.cs index 4f3762d30f0..fb9f6143c78 100644 --- a/TestProjects/VisualEffectGraph_HDRP/Assets/AllTests/Editor/Tests/VFXSerializationTests.cs +++ b/TestProjects/VisualEffectGraph_HDRP/Assets/AllTests/Editor/Tests/VFXSerializationTests.cs @@ -979,9 +979,59 @@ public IEnumerator Save_Then_Modify_Something_Check_The_Content_Isnt_Reverted() } } + private static readonly string s_Modify_SG_Property_VFX = "Assets/AllTests/Editor/Tests/Modify_SG_Property.vfx"; + private static readonly string s_Modify_SG_Property_SG_A = "Assets/AllTests/Editor/Tests/Modify_SG_Property_A.shadergraph"; + private static readonly string s_Modify_SG_Property_SG_B = "Assets/AllTests/Editor/Tests/Modify_SG_Property_B.shadergraph"; + private string m_Modify_SG_Property_VFX; + private string m_Modify_SG_Property_SG_A; + private string m_Modify_SG_Property_SG_B; + + [OneTimeSetUp] + public void Setup() + { + m_Modify_SG_Property_VFX = File.ReadAllText(s_Modify_SG_Property_VFX); + m_Modify_SG_Property_SG_A = File.ReadAllText(s_Modify_SG_Property_SG_A); + m_Modify_SG_Property_SG_B = File.ReadAllText(s_Modify_SG_Property_SG_B); + } + + //Cover regression 1361601 + [UnityTest] + public IEnumerator Modify_ShaderGraph_Property_Check_VFX_Compilation_Doesnt_Fail() + { + Assert.IsTrue(m_Modify_SG_Property_SG_A.Contains("Name_A")); + Assert.IsFalse(m_Modify_SG_Property_SG_A.Contains("Name_B")); + Assert.IsTrue(m_Modify_SG_Property_SG_B.Contains("Name_B")); + Assert.IsFalse(m_Modify_SG_Property_SG_B.Contains("Name_A")); + Assert.IsTrue(m_Modify_SG_Property_VFX.Contains("Name_A")); + Assert.IsFalse(m_Modify_SG_Property_VFX.Contains("Name_B")); + + AssetDatabase.ImportAsset(s_Modify_SG_Property_VFX); + + //Actually, rename the exposed property "Name_A" into "Name_B" + File.WriteAllText(s_Modify_SG_Property_SG_A, m_Modify_SG_Property_SG_B); + yield return null; + + //These import aren't suppose to trigger an exception + AssetDatabase.ImportAsset(s_Modify_SG_Property_SG_A); + AssetDatabase.ImportAsset(s_Modify_SG_Property_VFX); + + yield return null; + + var asset = AssetDatabase.LoadAssetAtPath(s_Modify_SG_Property_VFX); + var graph = asset.GetResource().GetOrCreateGraph(); + graph.GetResource().WriteAsset(); + + var newVFXContent = File.ReadAllText(s_Modify_SG_Property_VFX); + Assert.IsTrue(newVFXContent.Contains("Name_B")); + } + [OneTimeTearDown] public void CleanUp() { + File.WriteAllText(s_Modify_SG_Property_VFX, m_Modify_SG_Property_VFX); + File.WriteAllText(s_Modify_SG_Property_SG_A, m_Modify_SG_Property_SG_A); + File.WriteAllText(s_Modify_SG_Property_SG_B, m_Modify_SG_Property_SG_B); + VFXTestCommon.DeleteAllTemporaryGraph(); } } diff --git a/com.unity.visualeffectgraph/CHANGELOG.md b/com.unity.visualeffectgraph/CHANGELOG.md index 7380239f1be..274f0550665 100644 --- a/com.unity.visualeffectgraph/CHANGELOG.md +++ b/com.unity.visualeffectgraph/CHANGELOG.md @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fix potential infinite compilation when using subgraphs [Case 1346576](https://issuetracker.unity3d.com/product/unity/issues/guid/1346576/) - Prevent out of sync serialization of VFX assets that could cause the asset to be dirtied without reason - Fix undetermitism in space with LocalToWorld and WorldToLocal operators [Case 1355820](https://issuetracker.unity3d.com/product/unity/issues/guid/1355820/) +- Unexpected compilation error while modifying ShaderGraph exposed properties [Case 1361601](https://issuetracker.unity3d.com/product/unity/issues/guid/1361601/) ## [12.0.0] - 2021-01-11 ### Added diff --git a/com.unity.visualeffectgraph/Editor/Compiler/VFXCodeGenerator.cs b/com.unity.visualeffectgraph/Editor/Compiler/VFXCodeGenerator.cs index c823a8f9145..71743152bc0 100644 --- a/com.unity.visualeffectgraph/Editor/Compiler/VFXCodeGenerator.cs +++ b/com.unity.visualeffectgraph/Editor/Compiler/VFXCodeGenerator.cs @@ -416,6 +416,8 @@ internal static void BuildVertexPropertiesAssign(VFXContext context, VFXContextC foreach (string vertexParameter in context.vertexParameters) { var filteredNamedExpression = mainParameters.FirstOrDefault(o => vertexParameter == o.name); + if (filteredNamedExpression.exp == null) + throw new InvalidOperationException(string.Format("Cannot find vertex property : {0}", vertexParameter)); // If the parameter is in the global scope, read from the cbuffer directly (no suffix). if (!(expressionToName.ContainsKey(filteredNamedExpression.exp) && expressionToName[filteredNamedExpression.exp] == filteredNamedExpression.name)) @@ -480,6 +482,9 @@ internal static void BuildFragInputsGeneration(VFXContext context, VFXContextCom foreach (string fragmentParameter in context.fragmentParameters) { var filteredNamedExpression = mainParameters.FirstOrDefault(o => fragmentParameter == o.name); + if (filteredNamedExpression.exp == null) + throw new InvalidOperationException("FragInputs generation failed to find expected parameter: " + fragmentParameter); + var isInterpolant = !(expressionToName.ContainsKey(filteredNamedExpression.exp) && expressionToName[filteredNamedExpression.exp] == filteredNamedExpression.name); fragInputsGeneration.WriteAssignement(filteredNamedExpression.exp.valueType, $"output.vfx.{filteredNamedExpression.name}", $"{(isInterpolant ? "input." : string.Empty)}{filteredNamedExpression.name}"); diff --git a/com.unity.visualeffectgraph/Editor/Models/VFXGraph.cs b/com.unity.visualeffectgraph/Editor/Models/VFXGraph.cs index d139ac88dbd..9d70f283dc6 100644 --- a/com.unity.visualeffectgraph/Editor/Models/VFXGraph.cs +++ b/com.unity.visualeffectgraph/Editor/Models/VFXGraph.cs @@ -950,6 +950,11 @@ public void CompileForImport() } } } + + // Check Graph Before Import can be needed to synchronize modified shaderGraph + foreach (var child in children) + child.CheckGraphBeforeImport(); + // Graph must have been sanitized at this point by the VFXGraphPreprocessor.OnPreprocess BuildSubgraphDependencies(); PrepareSubgraphs();