From d7b5942e265471e9965b5bd7694f4118efea9947 Mon Sep 17 00:00:00 2001 From: Zheng Wu Date: Thu, 2 Jan 2020 15:23:07 +0800 Subject: [PATCH] Add deactivateInRelease option. Check this option, reporter will deactivate automatically in release build. --- Reporter/Reporter.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Reporter/Reporter.cs b/Reporter/Reporter.cs index 475743c..fa100d5 100644 --- a/Reporter/Reporter.cs +++ b/Reporter/Reporter.cs @@ -301,8 +301,16 @@ enum DetailView #endif string systemMemorySize; + [SerializeField] private bool deactivateInRelease = default; + void Awake() { + if (deactivateInRelease && !Debug.isDebugBuild) + { + gameObject.SetActive(false); + return; + } + if (!Initialized) Initialize();