UnityEngine.Object.GetHashCode C# (CSharp) Method

GetHashCode() public method

public GetHashCode ( ) : int
return int
		public virtual int GetHashCode(){}
		private static bool CompareBaseObjects(System.Object lhs, System.Object rhs){}

Usage Example

コード例 #1
0
    static public void CollectDependanciesRecursive(UnityEngine.Object obj, ref Dictionary <int, Object> dependencies)
    {
        if (!dependencies.ContainsKey(obj.GetHashCode()))
        {
            dependencies.Add(obj.GetHashCode(), obj);

            SerializedObject   objSO    = new SerializedObject(obj);
            SerializedProperty property = objSO.GetIterator();

            do
            {
                if ((property.propertyType == SerializedPropertyType.ObjectReference) &&
                    (property.objectReferenceValue != null)
                    ) //Don't go back up the hierarchy in transforms
                {
                    CollectDependanciesRecursive(property.objectReferenceValue, ref dependencies);

                    if (obj.GetType() == typeof(Material))
                    {
                        var i = 0;
                        i++;
                    }
                }
            } while (property.Next(true));
        }
    }
All Usage Examples Of UnityEngine.Object::GetHashCode