Skip to content

Commit

Permalink
Update comment
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonMa0012 committed Nov 18, 2024
1 parent 92de92b commit a06dadb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Editor/LWGUI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -191,23 +191,23 @@ public static void OnValidate(Object[] materials)
MetaDataHelper.ForceUpdateMaterialsMetadataCache(materials);
}

// Called after editing in code
// Called after edit in code
public static void OnValidate(LWGUIMetaDatas metaDatas)
{
OnValidate(metaDatas?.GetMaterialEditor()?.targets);
OnValidate(metaDatas?.GetMaterialEditor()?.targets);
}

// Called after editing or undoing the material
// Called after edit or undo
public override void ValidateMaterial(Material material)
{
base.ValidateMaterial(material);
// Undoing
// Undo
if (metaDatas == null)
{
OnValidate(new Object[] { material });
}
// Editing
// Edit
else
{
OnValidate(metaDatas);
Expand Down

0 comments on commit a06dadb

Please sign in to comment.