Seven is the number.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
383 B

3 years ago
  1. using UnityEditor;
  2. namespace LeTai.TrueShadow.Editor
  3. {
  4. [InitializeOnLoad]
  5. class PrefabEventHandler
  6. {
  7. static PrefabEventHandler()
  8. {
  9. PrefabUtility.prefabInstanceUpdated += go =>
  10. {
  11. var shadows = go.GetComponentsInChildren<TrueShadow>();
  12. foreach (var shadow in shadows)
  13. shadow.ApplySerializedData();
  14. };
  15. }
  16. }
  17. }