文档

Unity Engine

Unity Engine

TryGetProperty(ref TContainer, string, out IProperty<TContainer>)

Gets the property associated with the specified name.
阅读时间1 分钟最后更新于 1 个月前

Definition

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

TryGetProperty(T, string, IProperty<T>)

bool TryGetProperty(ref TContainer container, string name, out IProperty<TContainer> property)

Parameters

container

T
The container hosting the data.

name

The name of the property to get.

property

When this method returns, contains the property associated with the specified name, if the name is found; otherwise, null.

Returns

Type

Description

bool
true
if the INamedProperties<TContainer> contains a property with the specified name; otherwise,
false
.