private void CheckIsValidAndResolve(ref AnimationStream stream) { // Verify stream. stream.CheckIsValid(); if (IsResolvedInternal(ref stream)) { return; } // Handle create directly by user are never valid if (!createdByNative || !hasHandleIndex) { throw new InvalidOperationException("The TransformStreamHandle is invalid. Please use proper function to create the handle."); } if (!IsSameVersionAsStream(ref stream) || (hasHandleIndex && !hasSkeletonIndex)) { ResolveInternal(ref stream); } if (hasHandleIndex && !hasSkeletonIndex) { throw new InvalidOperationException("The TransformStreamHandle cannot be resolved."); } }
public static void ReadFloats(AnimationStream stream, NativeArray <PropertyStreamHandle> handles, NativeArray <float> buffer) { stream.CheckIsValid(); int num = AnimationSceneHandleUtility.ValidateAndGetArrayCount <PropertyStreamHandle, float>(ref stream, handles, buffer); bool flag = num == 0; if (!flag) { AnimationStreamHandleUtility.ReadStreamFloatsInternal(ref stream, handles.GetUnsafePtr <PropertyStreamHandle>(), buffer.GetUnsafePtr <float>(), num); } }
public static void WriteInts(AnimationStream stream, NativeArray <PropertyStreamHandle> handles, NativeArray <int> buffer, bool useMask) { stream.CheckIsValid(); int num = AnimationSceneHandleUtility.ValidateAndGetArrayCount <PropertyStreamHandle, int>(ref stream, handles, buffer); bool flag = num == 0; if (!flag) { AnimationStreamHandleUtility.WriteStreamIntsInternal(ref stream, handles.GetUnsafePtr <PropertyStreamHandle>(), buffer.GetUnsafePtr <int>(), num, useMask); } }
public static void ReadFloats(AnimationStream stream, NativeArray <PropertyStreamHandle> handles, NativeArray <float> buffer) { stream.CheckIsValid(); int count = AnimationSceneHandleUtility.ValidateAndGetArrayCount(ref stream, handles, buffer); if (count == 0) { return; } ReadStreamFloatsInternal(ref stream, handles.GetUnsafePtr(), buffer.GetUnsafePtr(), count); }
public static void WriteInts(AnimationStream stream, NativeArray <PropertyStreamHandle> handles, NativeArray <int> buffer, bool useMask) { stream.CheckIsValid(); int count = AnimationSceneHandleUtility.ValidateAndGetArrayCount(ref stream, handles, buffer); if (count == 0) { return; } WriteStreamIntsInternal(ref stream, handles.GetUnsafePtr(), buffer.GetUnsafePtr(), count, useMask); }
private void CheckIsValid(ref AnimationStream stream) { stream.CheckIsValid(); bool flag = !this.createdByNative || !this.hasHandleIndex; if (flag) { throw new InvalidOperationException("The PropertySceneHandle is invalid. Please use proper function to create the handle."); } bool flag2 = !this.HasValidTransform(ref stream); if (flag2) { throw new NullReferenceException("The transform is invalid."); } }
private void CheckIsValid(ref AnimationStream stream) { // Verify stream. stream.CheckIsValid(); // Handle create directly by user are never valid if (!createdByNative || !hasHandleIndex) { throw new InvalidOperationException("The PropertySceneHandle is invalid. Please use proper function to create the handle."); } // [case 1032369] Cannot call native code before validating that handle was created in native and has a valid handle index if (!HasValidTransform(ref stream)) { throw new NullReferenceException("The transform is invalid."); } }
internal static int ValidateAndGetArrayCount <T0, T1>(ref AnimationStream stream, NativeArray <T0> handles, NativeArray <T1> buffer) where T0 : struct where T1 : struct { stream.CheckIsValid(); if (!handles.IsCreated) { throw new NullReferenceException("Handle array is invalid."); } if (!buffer.IsCreated) { throw new NullReferenceException("Data buffer is invalid."); } if (buffer.Length < handles.Length) { throw new InvalidOperationException("Data buffer array is smaller than handles array."); } return(handles.Length); }
private void CheckIsValidAndResolve(ref AnimationStream stream) { stream.CheckIsValid(); bool flag = this.IsResolvedInternal(ref stream); if (!flag) { bool flag2 = !this.createdByNative || !this.hasHandleIndex || !this.hasBindType; if (flag2) { throw new InvalidOperationException("The PropertyStreamHandle is invalid. Please use proper function to create the handle."); } bool flag3 = !this.IsSameVersionAsStream(ref stream) || (this.hasHandleIndex && !this.hasValueArrayIndex); if (flag3) { this.ResolveInternal(ref stream); } bool flag4 = this.hasHandleIndex && !this.hasValueArrayIndex; if (flag4) { throw new InvalidOperationException("The PropertyStreamHandle cannot be resolved."); } } }
public void CopyAnimationStreamMotion(AnimationStream animationStream) { this.CheckIsValid(); animationStream.CheckIsValid(); this.CopyAnimationStreamMotionInternal(animationStream); }