struct in UnityEngine
Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.Close
For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.Close
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".
|Initializes the PropertyName using a string.
|Determines whether this instance and a specified object, which must also be a PropertyName object, have the same value.
|Returns the hash code for this PropertyName.
|For debugging purposes only. Returns the string value representing the string in the Editor. Returns "UnityEngine.PropertyName" in the player.
|Indicates whether the specified PropertyName is an Empty string.
|Determines whether two specified PropertyName have a different string value.
|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.
|Converts the string passed into a PropertyName. Additional resources: PropertyName.ctor(System.String).