PixelPerfectPositioning Class

Summary

Adjusts the UnityEngine.Transform.localPosition every frame to keep this object aligned to a grid with a size determined by the Animancer.PixelPerfectPositioning.Renderer while wrapping the value to keep it as close to 0 as possible.
Assembly
Animancer.dll
Namespace
Animancer
Base Types
  • MonoBehaviour
graph BT Type-->Base0["MonoBehaviour"] Type["PixelPerfectPositioning"] class Type type-node

Syntax

[AddComponentMenu(Strings.MenuPrefix + "Pixel Perfect Positioning")]
[HelpURL(Strings.APIDocumentationURL + "/" + nameof(PixelPerfectPositioning))]
public sealed class PixelPerfectPositioning : MonoBehaviour

Attributes

Type Description
AddComponentMenu
HelpURLAttribute

Properties

Name Value Summary
Renderer SpriteRenderer
[UnityEngine.SerializeField] The UnityEngine.SpriteRenderer that will have its position adjusted.