UnityEditor.PropertyHandlerCache.GetPropertyHash C# (CSharp) Method

GetPropertyHash() private static method

private static GetPropertyHash ( UnityEditor.SerializedProperty property ) : int
property UnityEditor.SerializedProperty
return int
        private static int GetPropertyHash(SerializedProperty property)
        {
            if (property.serializedObject.targetObject == null)
            {
                return 0;
            }
            int num2 = property.serializedObject.targetObject.GetInstanceID() ^ property.hashCodeForPropertyPathWithoutArrayIndex;
            if (property.propertyType == SerializedPropertyType.ObjectReference)
            {
                num2 ^= property.objectReferenceInstanceIDValue;
            }
            return num2;
        }

Usage Example

Beispiel #1
0
        internal PropertyHandler GetHandler(SerializedProperty property)
        {
            PropertyHandler propertyHandler;

            if (this.m_PropertyHandlers.TryGetValue(PropertyHandlerCache.GetPropertyHash(property), out propertyHandler))
            {
                return(propertyHandler);
            }
            return((PropertyHandler)null);
        }
All Usage Examples Of UnityEditor.PropertyHandlerCache::GetPropertyHash