IsFalse
Return true when the condition is false. Otherwise return false.
Read time 1 minuteLast updated 6 days ago
Definition
- Type: Method
- Namespace: UnityEngine.Assertions
- Assembly: UnityEngine.CoreModule
IsFalse(bool)
Return true when the condition is false. Otherwise return false.
[Conditional("UNITY_ASSERTIONS")]public static void IsFalse(bool condition)
Parameters
true or false.
Examples
using UnityEngine;using UnityEngine.Assertions;public class AssertionExampleClass : MonoBehaviour{ GameObject go; void Update() { // Make sure the Game Object is never in active state Assert.IsFalse(go.activeSelf); }}
IsFalse(bool, string)
Return true when the condition is false. Otherwise return false.
[Conditional("UNITY_ASSERTIONS")]public static void IsFalse(bool condition, string message)
Parameters
Examples
using UnityEngine;using UnityEngine.Assertions;public class AssertionExampleClass : MonoBehaviour{ GameObject go; void Update() { // Make sure the Game Object is never in active state Assert.IsFalse(go.activeSelf); }}