Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


TryAccept

Tries to visit the specified container by ref using the specified visitor.
Read time 1 minuteLast updated 6 days ago

Definition

  • Type: Method
  • Namespace: Unity.Properties
  • Assembly: UnityEngine.PropertiesModule

TryAccept<T>(IPropertyBagVisitor, T, VisitParameters)

Tries to visit the specified
container
by ref using the specified
visitor
.
public static bool TryAccept<TContainer>(IPropertyBagVisitor visitor, ref TContainer container, VisitParameters parameters = default)

Parameters

The visitor.

container

T
The container to visit.

parameters

The visit parameters to use.

Returns

Type

Description

bool
true
if the visitation succeeded;
false
otherwise.

TryAccept<T>(IPropertyBagVisitor, T, VisitReturnCode, VisitParameters)

Tries to visit the specified
container
by ref using the specified
visitor
.
public static bool TryAccept<TContainer>(IPropertyBagVisitor visitor, ref TContainer container, out VisitReturnCode returnCode, VisitParameters parameters = default)

Parameters

The visitor.

container

T
The container to visit.

returnCode

When this method returns, contains the return code.

parameters

The visit parameters to use.

Returns

Type

Description

bool
true
if the visitation succeeded;
false
otherwise.

TryAccept<T>(IPropertyVisitor, T, PropertyPath, VisitReturnCode, VisitParameters)

Visit the specified
container
using the specified
visitor
at the given PropertyPath.
public static bool TryAccept<TContainer>(IPropertyVisitor visitor, ref TContainer container, in PropertyPath path, out VisitReturnCode returnCode, VisitParameters parameters = default)

Parameters

The visitor.

container

T
The container to visit.

The property path to visit.

returnCode

When this method returns, contains the return code.

parameters

The visit parameters to use.

Returns

Type

Description

bool