We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6c8d736 commit eebdad0Copy full SHA for eebdad0
1 file changed
Runtime/Behaviours/DevelopmentBuildDependant.cs
@@ -5,10 +5,13 @@ namespace Utils.Behaviours
5
public class DevelopmentBuildDependant : MonoBehaviour
6
{
7
[SerializeField] private bool existsIfDevBuild;
8
+ [SerializeField] private bool _onlyOnBuilds;
9
10
private void Awake()
11
- if (Debug.isDebugBuild != existsIfDevBuild)
12
+ var shouldDestroy = Debug.isDebugBuild != existsIfDevBuild;
13
+ shouldDestroy |= _onlyOnBuilds && Application.isEditor;
14
+ if (shouldDestroy)
15
16
Destroy(gameObject);
17
}
0 commit comments