Archived
Private
Public Access
1
0
This repository has been archived on 2026-02-04. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
ProjectBackup/Unity/Testproject/Library/PackageCache/com.unity.2d.spriteshape@6.0.1/Editor/SpriteShapeAssetPostProcessor.cs
2022-11-12 13:10:03 +01:00

26 lines
841 B
C#

using UnityEngine;
using UnityEngine.U2D;
using UnityEditor;
namespace UnityEditor.U2D
{
public class SpriteShapeAssetPostProcessor : AssetPostprocessor
{
static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAssets, string[] movedAssets, string[] movedFromAssetPaths)
{
if (importedAssets.Length > 0)
{
GameObject[] allGOs = UnityEngine.Object.FindObjectsOfType<GameObject>();
foreach (GameObject go in allGOs)
{
if (!go.activeInHierarchy)
continue;
SpriteShapeController sc = go.GetComponent<SpriteShapeController>();
if (sc != null)
sc.RefreshSpriteShape();
}
}
}
}
}