Skip to content

Commit 99e3ea2

Browse files
svc-reach-platform-supportEvergreen
authored andcommitted
[Port] [6000.5] [RenderPipelineConverter] Fixed an issue where the Animation Clip would not detect Animation Clips that modify material properties.
1 parent 8613679 commit 99e3ea2

2 files changed

Lines changed: 18 additions & 5 deletions

File tree

Packages/com.unity.render-pipelines.core/Editor-PrivateShared/Tools/Converter/RenderPipelineConverterAssetItem.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,13 @@ public string guid
3030

3131
public string GlobalObjectId => m_GlobalObjectId;
3232

33-
public string name => System.IO.Path.GetFileNameWithoutExtension(assetPath);
33+
[SerializeField]
34+
private string m_Name;
35+
public string name
36+
{
37+
get => string.IsNullOrEmpty(m_Name) ? System.IO.Path.GetFileNameWithoutExtension(assetPath) : m_Name;
38+
set => m_Name = value;
39+
}
3440

3541
[SerializeField]
3642
private string m_Info;

Packages/com.unity.render-pipelines.universal/Editor/Tools/Converters/AnimationClipConverter/AnimationClipConverter.cs

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,14 +106,21 @@ void OnAnimationClipDependenciesSearchFinish()
106106
(
107107
SearchServiceUtils.IndexingOptions.DeepSearch,
108108
query,
109-
(searchItem, path) =>
109+
(item, path) =>
110110
{
111-
if (searchItem.ToObject() is not GameObject go || go.scene == null)
111+
var unityObject = item.ToObject();
112+
113+
if (unityObject == null)
112114
return;
113115

114-
var gid = GlobalObjectId.GetGlobalObjectIdSlow(go);
116+
var gid = GlobalObjectId.GetGlobalObjectIdSlow(unityObject);
117+
int type = gid.identifierType; // 1=Asset, 2=SceneObject
115118

116-
var assetItem = new RenderPipelineConverterAssetItem(gid, go.scene.path);
119+
var assetItem = new RenderPipelineConverterAssetItem(gid.ToString())
120+
{
121+
name = unityObject.name,
122+
info = path,
123+
};
117124

118125
if (animatorUsingClip.TryGetValue(path, out var list))
119126
{

0 commit comments

Comments
 (0)