Struct ArSession
Represents the context for an ARCore session.
Namespace: UnityEngine.XR.ARCore
Syntax
public struct ArSession : IEquatable<ArSession>
Remarks
This is an opaque object that represents a native ArSession.
Properties
IsNull
Declaration
public readonly bool IsNull { get; }
Property Value
Type | Description |
---|---|
Boolean |
Null
Represents a null ArSession, i.e., one whose underlying native pointer is null
.
Declaration
public static readonly ArSession Null { get; }
Property Value
Type | Description |
---|---|
ArSession |
Methods
AsIntPtr()
Gets the underlying native pointer for this ArSession.
Declaration
public IntPtr AsIntPtr()
Returns
Type | Description |
---|---|
IntPtr | Returns the underlying native pointer for this ArSession. |
Equals(Object)
Tests for equality.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj | An Object to compare against. |
Returns
Type | Description |
---|---|
Boolean | Returns |
Overrides
Equals(ArSession)
Tests for equality.
Declaration
public bool Equals(ArSession other)
Parameters
Type | Name | Description |
---|---|---|
ArSession | other | The ArSession to compare against. |
Returns
Type | Description |
---|---|
Boolean | Returns |
Remarks
Two ArSessions are considered equal if their underlying pointers are equal.
FromIntPtr(IntPtr)
Create a ArSession from an existing native pointer. The native pointer must point to an existing ArSession.
Declaration
public static ArSession FromIntPtr(IntPtr value)
Parameters
Type | Name | Description |
---|---|---|
IntPtr | value | A pointer to an existing native ArSession. |
Returns
Type | Description |
---|---|
ArSession | Returns an ArSession whose underlying native pointer is
|
GetHashCode()
Generates a hash code suitable for use with a HashSet
or Dictionary
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 | Returns a hash code for this ArSession. |
Overrides
Operators
Equality(ArSession, ArSession)
Tests for equality. Same as Equals(ArSession).
Declaration
public static bool operator ==(ArSession lhs, ArSession rhs)
Parameters
Type | Name | Description |
---|---|---|
ArSession | lhs | The ArSession to compare with |
ArSession | rhs | The ArSession to compare with |
Returns
Type | Description |
---|---|
Boolean | Returns |
Explicit(ArSession to IntPtr)
Casts an ArSession to its underlying native pointer.
Declaration
public static explicit operator IntPtr(ArSession session)
Parameters
Type | Name | Description |
---|---|---|
ArSession | session | The ArSession to cast. |
Returns
Type | Description |
---|---|
IntPtr | Returns the underlying native pointer for |
Inequality(ArSession, ArSession)
Tests for inequality. Same as the negation of Equals(ArSession).
Declaration
public static bool operator !=(ArSession lhs, ArSession rhs)
Parameters
Type | Name | Description |
---|---|---|
ArSession | lhs | The ArSession to compare with |
ArSession | rhs | The ArSession to compare with |
Returns
Type | Description |
---|---|
Boolean | Returns |