Version: 2019.4

PropertyName

struct in UnityEngine

マニュアルに切り替える

説明

Represents a string as an int for efficient lookup and comparison. Use this for common PropertyNames.

Internally stores just an int to represent the string. A PropertyName can be created from a string but can not be converted back to a string. The same string always results in the same int representing that string. Thus this is a very efficient string representation in both memory and speed when all you need is comparison.

PropertyName is serializable.

ToString() is only implemented for debugging purposes in the editor it returns "theName:3737" in the player it returns "Unknown:3737".

コンストラクタ

PropertyNameInitializes the PropertyName using a string.

Public 関数

EqualsDetermines whether this instance and a specified object, which must also be a PropertyName object, have the same value.
GetHashCodeReturns the hash code for this PropertyName.
ToStringFor debugging purposes only. Returns the string value representing the string in the Editor. Returns "UnityEngine.PropertyName" in the player.

Static 関数

IsNullOrEmptyIndicates whether the specified PropertyName is an Empty string.

Operator

operator !=Determines whether two specified PropertyName have a different string value.
operator ==Determines whether two specified PropertyName have the same string value. Because two PropertyNames initialized with the same string value always have the same name index, we can simply perform a comparison of two ints to find out if the string value equals.
PropertyNameConverts the string passed into a PropertyName. See Also: PropertyName.ctor(System.String).
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961