Created
March 22, 2024 11:13
-
-
Save baba-s/98feada6703c0973fea5a158ebd40b37 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEditor; | |
using UnityEngine; | |
[InitializeOnLoad] | |
internal static class Example | |
{ | |
static Example() | |
{ | |
PrefabUtility.prefabInstanceApplying += go => | |
{ | |
Debug.Log( $"prefabInstanceApplying: {go}", go ); | |
}; | |
PrefabUtility.prefabInstanceApplied += go => | |
{ | |
Debug.Log( $"prefabInstanceApplied: {go}", go ); | |
}; | |
PrefabUtility.prefabInstanceReverting += go => | |
{ | |
Debug.Log( $"prefabInstanceReverting: {go}", go ); | |
}; | |
PrefabUtility.prefabInstanceReverted += go => | |
{ | |
Debug.Log( $"prefabInstanceReverted: {go}", go ); | |
}; | |
PrefabUtility.prefabInstanceUnpacking += ( go, mode ) => | |
{ | |
Debug.Log( $"prefabInstanceUnpacking: {go}, {mode}", go ); | |
}; | |
PrefabUtility.prefabInstanceUnpacked += ( go, mode ) => | |
{ | |
Debug.Log( $"prefabInstanceUnpacked: {go}, {mode}", go ); | |
}; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment