UnityEngine.Object implementation.
More...
#include <UnityStructures.hpp>
|
bool | IsValid () const __attribute__((always_inline)) |
| Check if object is valid.
|
|
bool | Alive () const __attribute__((always_inline)) |
| Alias for IsValid()
|
|
bool | Same (void *object) const |
| Check if current object is the same with other one.
|
|
bool | Same (Object *object) const |
| Check if current object is the same with other one.
|
|
|
BNM_INT_PTR | m_CachedPtr = 0 |
|
UnityEngine.Object implementation.
Should be used for all objects that inherit UnityEngine.Object.
◆ IsValid()
bool BNM::UnityEngine::Object::IsValid |
( |
| ) |
const |
|
inlinenodiscard |
Check if object is valid.
- Attention
- To check Unity object for null ALWAYS use this method. It checks object pointer and pointer to Unity object. These checks reduces crashes significantly.
- Returns
- True if object is not null and valid for usage in Unity.
◆ Same() [1/2]
bool BNM::UnityEngine::Object::Same |
( |
Object * | object | ) |
const |
|
inline |
Check if current object is the same with other one.
- Parameters
-
- Returns
- True if objects are the same.
◆ Same() [2/2]
bool BNM::UnityEngine::Object::Same |
( |
void * | object | ) |
const |
|
inline |
Check if current object is the same with other one.
- Parameters
-
- Returns
- True if objects are the same.