private static AtomicSafetyHandle GetSafetyHandle(this Sprite sprite) { AtomicSafetyHandle result; SpriteDataAccessExtensions.GetSafetyHandle_Injected(sprite, out result); return(result); }
private static SpriteChannelInfo GetBoneWeightsInfo(Sprite sprite) { SpriteChannelInfo result; SpriteDataAccessExtensions.GetBoneWeightsInfo_Injected(sprite, out result); return(result); }
private static SpriteChannelInfo GetChannelInfo(Sprite sprite, VertexAttribute channel) { SpriteChannelInfo result; SpriteDataAccessExtensions.GetChannelInfo_Injected(sprite, channel, out result); return(result); }
public static NativeArray <BoneWeight> GetBoneWeights(this Sprite sprite) { SpriteChannelInfo boneWeightsInfo = SpriteDataAccessExtensions.GetBoneWeightsInfo(sprite); NativeArray <BoneWeight> result = NativeArrayUnsafeUtility.ConvertExistingDataToNativeArray <BoneWeight>(boneWeightsInfo.buffer, boneWeightsInfo.count, Allocator.Invalid); NativeArrayUnsafeUtility.SetAtomicSafetyHandle <BoneWeight>(ref result, sprite.GetSafetyHandle()); return(result); }
public static NativeArray <Matrix4x4> GetBindPoses(this Sprite sprite) { SpriteChannelInfo bindPoseInfo = SpriteDataAccessExtensions.GetBindPoseInfo(sprite); NativeArray <Matrix4x4> result = NativeArrayUnsafeUtility.ConvertExistingDataToNativeArray <Matrix4x4>(bindPoseInfo.buffer, bindPoseInfo.count, Allocator.Invalid); NativeArrayUnsafeUtility.SetAtomicSafetyHandle <Matrix4x4>(ref result, sprite.GetSafetyHandle()); return(result); }
public static NativeSlice <T> GetVertexAttribute <T>(this Sprite sprite, VertexAttribute channel) where T : struct { SpriteDataAccessExtensions.CheckAttributeTypeMatchesAndThrow <T>(channel); SpriteChannelInfo channelInfo = SpriteDataAccessExtensions.GetChannelInfo(sprite, channel); NativeSlice <T> result = NativeSliceUnsafeUtility.ConvertExistingDataToNativeSlice <T>(channelInfo.buffer, channelInfo.offset, channelInfo.count, channelInfo.stride); NativeSliceUnsafeUtility.SetAtomicSafetyHandle <T>(ref result, sprite.GetSafetyHandle()); return(result); }
public static void SetIndices(this Sprite sprite, NativeArray <ushort> src) { SpriteDataAccessExtensions.SetIndicesData(sprite, src.GetUnsafeReadOnlyPtr <ushort>(), src.Length); }
public static void SetBindPoses(this Sprite sprite, NativeArray <Matrix4x4> src) { SpriteDataAccessExtensions.SetBindPoseData(sprite, src.GetUnsafeReadOnlyPtr <Matrix4x4>(), src.Length); }
public static void SetVertexAttribute <T>(this Sprite sprite, VertexAttribute channel, NativeArray <T> src) where T : struct { SpriteDataAccessExtensions.CheckAttributeTypeMatchesAndThrow <T>(channel); SpriteDataAccessExtensions.SetChannelData(sprite, channel, src.GetUnsafeReadOnlyPtr <T>()); }
public static void SetBones(this Sprite sprite, SpriteBone[] src) { SpriteDataAccessExtensions.SetBoneData(sprite, src); }
public static SpriteBone[] GetBones(this Sprite sprite) { return(SpriteDataAccessExtensions.GetBoneInfo(sprite)); }
public static void SetBoneWeights(this Sprite sprite, NativeArray <BoneWeight> src) { SpriteDataAccessExtensions.SetBoneWeightsData(sprite, src.GetUnsafeReadOnlyPtr <BoneWeight>(), src.Length); }