public override int GetHashCode() { unchecked { return(((Target != null ? Target.GetHashCode() : 0) * 397) ^ (Result != null ? Result.GetHashCode() : 0)); } }
public void SetMethod(UnityEngine.Object target, string methodName, bool dynamic, params Arg[] args) { _target = target; _methodName = methodName; // _dynamic = dynamic; _args = args; UDIDObject = target.GetHashCode().ToString(); ClearCache(); }
public static int GetHashCode(System.IntPtr L) { int nargs = LuaAPI.GetTop(L); if (nargs == 1 && LuaAPI.IsObject(L, 1)) { UnityEngine.Object arg0 = (UnityEngine.Object)LuaCallback.ToObject(L, 1); System.Int32 res = arg0.GetHashCode(); LuaCallback.PushNumber(L, res); return(1); } return(0); }
public static int GetHashCode(IntPtr L) { int result = 1; int count = LuaDLL.lua_gettop(L); if (count != 1) { LuaStatic.traceback(L, "count not enough"); LuaDLL.lua_error(L); return(result); } UnityEngine.Object obj = LuaStatic.GetObj(L, 1) as UnityEngine.Object; LuaDLL.lua_pushnumber(L, obj.GetHashCode()); return(result); }
public override int GetHashCode() { unchecked { var hashCode = startValue.GetHashCode(); hashCode = (hashCode * 397) ^ targetValue.GetHashCode(); hashCode = (hashCode * 397) ^ (onTween != null ? onTween.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (target != null ? target.GetHashCode() : 0); hashCode = (hashCode * 397) ^ targetProvided.GetHashCode(); hashCode = (hashCode * 397) ^ TweenDuration.GetHashCode(); hashCode = (hashCode * 397) ^ (int)EasingType; hashCode = (hashCode * 397) ^ TimeScaleIgnored.GetHashCode(); return(hashCode); } }
int UnityEngineObject_m_GetHashCode(RealStatePtr L, int gen_param_count) { ObjectTranslator translator = this; UnityEngine.Object gen_to_be_invoked = (UnityEngine.Object)translator.FastGetCSObj(L, 1); { int gen_ret = gen_to_be_invoked.GetHashCode( ); LuaAPI.xlua_pushinteger(L, gen_ret); return(1); } }
private static int GetHasCount(Object[] objects) { int hasValue = 0; for (int i = 0; i < objects.Length; i++) { Object targetObj = objects[i]; if (targetObj == null) { continue; } hasValue += targetObj.GetHashCode(); } return(hasValue); }
public override int GetHashCode() { return(m_Object && m_Object != null ? m_Object.GetHashCode() : 0); }
/// <summary> /// Returns true if the Unity object passed in is not null but isn't necessarily alive/destroyed. /// This is a compliment to IsInvalidObject for use when you want to determine if some value was ever once valid. /// For example if in the inspector you leave a UnityEngin.Object field null, the serializer will actually populate it with an 'Invalid Object'. /// If you ever needed to differentiate between if that value was ever a value but since destroyed VS being an invalid object, this will help. /// </summary> /// <param name="obj"></param> /// <returns></returns> public static bool IsValidObject(UnityEngine.Object obj) { //note - we use 'GetHashCode' because it returns the instanceId BUT doesn't do the stupid main thread test return(!object.ReferenceEquals(obj, null) && obj.GetHashCode() != 0); }