We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1a4b193 commit 4e92323Copy full SHA for 4e92323
Assets/Scripts/Helpers/Debug/WhoDisabledOrEnabled.cs
@@ -0,0 +1,20 @@
1
+// shows who disabled/enabled this gameobject from another script
2
+// usage: attach to gameobject that you want to track (see console stack trace)
3
+
4
+using UnityEngine;
5
6
+namespace UnityLibrary
7
+{
8
+ public class WhoDisabledOrEnabled : MonoBehaviour
9
+ {
10
+ private void OnDisable()
11
12
+ Debug.LogError("OnDisable: " + gameObject.name, gameObject);
13
+ }
14
15
+ private void OnEnable()
16
17
+ Debug.LogError("OnEnable: " + gameObject.name, gameObject);
18
19
20
+}
0 commit comments