What do you want to save?
Add Code snippet
New code examples in category C#
-
Awgiedawgie 2022-05-13 23:05:31
How can I cast int to enum?
YourEnum foo = (YourEnum)yourInt; Add solution -
Awgiedawgie 2022-05-13 23:00:13
c# declare empty string array
string[] stringArray = new string[] {}; Add solution -
Phoenix Logan 2022-05-13 22:31:39
c# how to create a new file with a random string name
// How to create a new .txt file with a random string name: // selected characters string chars = "2346789ABCDEFGHJKLMNPQRTUVWXYZabcdefghjkmnpqrtuvwxyz"; // create random generator Random rnd = new Random(); string name; do { // create name ... Add solution -
A-312 2022-05-13 22:25:54
unity state machine behaviour
using UnityEngine;public class AttackBehaviour : StateMachineBehaviour { public GameObject particle; public float radius; public float power; protected GameObject clone; override public void OnStateEnter(Animator animator, AnimatorStateI... Add solution -
Phoenix Logan 2022-05-13 22:20:02
how to play animation with code in unity
public GameObject ExampleNPC; void Update() { if(Input.GetButtonDown("Animation")) // Make sure to refrence this in Input settings { ExampleNPC.GetComponent<Animator>().Play("Anim name"); } } Add solution
Best helpers
Ranking is empty