DirectionalSet<T> Class

Summary

A generic set of objects corresponding to up/right/down/left.
Assembly
Animancer.dll
Namespace
Animancer
Base Types
  • ScriptableObject
Derived Types
graph BT Type-->Base0["ScriptableObject"] Type["DirectionalSet<T>"] class Type type-node Derived0["DirectionalSet4<T>"]-->Type click Derived0 "/animancer/api/Animancer/DirectionalSet4_1" Derived1["DirectionalSet2<T>"]-->Type click Derived1 "/animancer/api/Animancer/DirectionalSet2_1"

Syntax

[AnimancerHelpUrl(typeof(DirectionalSet<>))]
public abstract class DirectionalSet<T> : ScriptableObject

Remarks

Documentation: Directional Animation Sets

Attributes

Type Description
AnimancerHelpUrlAttribute [Assert-Conditional] A UnityEngine.HelpURLAttribute which points to Animancer's documentation.

Type Parameters

Name Description
T

Properties

Name Value Summary
DirectionCount int
The number of directions in this set.

Methods

Name Value Summary
AddTo(List<T>) void
Adds all objects from this set to the `values`.
AddTo(T[], int) void
Adds all objects from this set to the `values`, starting from the specified `index`.
AddTo(T[], Vector2[], int) void
Calls Animancer.DirectionalSet`1.AddTo(`0[],System.Int32) and Animancer.DirectionalSet`1.AddTo(`0[],System.Int32).
AddTo(Vector2[], int) void
Adds unit vectors corresponding to each of the objects in this set to the `directions`, starting from the specified `index`.
AllowChanges(bool) void
[Assert-Only] Sets a debug flag to enable or disable the ability to modify this set.
AssertAllowChanges() void
[Assert-Only] Throws an System.InvalidOperationException if Animancer.DirectionalSet`1.AllowChanges(System.Boolean) wasn't called.
Get(int) T
Returns the object associated with the specified `direction`.
Get(Vector2) T
Returns the object closest to the specified `direction`.
GetDirection(int) Vector2
Returns a vector representing the specified `direction`.
GetDirectionName(int) string
Returns the name of the specified `direction`.
Set(int, T) void
Sets the object associated with the specified `direction`.
SetByName(string, T) int
[Editor-Only] Attempts to assign the `value` to one of this set's fields based on its `name` and returns the direction index of that field (or -1 if it was unable to determine the direction).
SetByName<U>(U) int
[Editor-Only] Attempts to assign the `value` to one of this set's fields based on its name and returns the direction index of that field (or -1 if it was unable to determine the direction).
Snap(Vector2) Vector2
Returns a copy of the `vector` pointing in the closest direction this set has an object for.