Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Class Anims
- {
- public const string anim1 = "someAnimation";
- }
- Class SomeScript :monobehaviour
- {
- public string someAnimation = "theActualAnimationName";
- ...
- void foo
- {
- string toRun =
- this.GetType().GetField(someAnimNamesEnumValue.ToString()).GetValue(this);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement